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
d99d1771
Commit
d99d1771
authored
Jan 21, 2025
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(wealth): 优化
parent
8fa247ff
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
77 additions
and
56 deletions
+77
-56
20250106.sql
sql/v2.2财务/20250106.sql
+2
-0
OrderQueryServiceImpl.java
...odule/order/service/order/impl/OrderQueryServiceImpl.java
+16
-13
ContainerReportOrderQueryVO.java
...ao/module/order/vo/order/ContainerReportOrderQueryVO.java
+2
-2
OrderMapper.xml
...rder-core/src/main/resources/mapper/order/OrderMapper.xml
+1
-0
ReceiptServiceImpl.java
...dao/module/wealth/service/receipt/ReceiptServiceImpl.java
+39
-26
ReceiptItemServiceImpl.java
...le/wealth/service/receiptItem/ReceiptItemServiceImpl.java
+4
-4
ReceivableServiceImpl.java
...dule/wealth/service/receivable/ReceivableServiceImpl.java
+1
-0
CostDetailPageVO.java
...r/yudao/module/wealth/vo/receivable/CostDetailPageVO.java
+2
-0
ReceivableMapper.xml
...src/main/resources/mapper/receivable/ReceivableMapper.xml
+10
-11
No files found.
sql/v2.2财务/20250106.sql
View file @
d99d1771
...
@@ -36,6 +36,8 @@ ALTER TABLE `ecw_receipt` ADD COLUMN `invoice_id` bigint NULL DEFAULT NULL COMME
...
@@ -36,6 +36,8 @@ ALTER TABLE `ecw_receipt` ADD COLUMN `invoice_id` bigint NULL DEFAULT NULL COMME
ALTER
TABLE
`ecw_receipt`
ADD
COLUMN
`generate_path`
int
NULL
DEFAULT
0
COMMENT
'生成路径'
AFTER
`invoice_id`
;
ALTER
TABLE
`ecw_receipt`
ADD
COLUMN
`generate_path`
int
NULL
DEFAULT
0
COMMENT
'生成路径'
AFTER
`invoice_id`
;
ALTER
TABLE
`ecw_receipt`
ADD
COLUMN
`write_off_diff_main_currency`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'核销误差兑额外费用主币种金额'
AFTER
`generate_path`
;
CREATE
TABLE
`ecw_receipt_bank_writeoff_range`
(
CREATE
TABLE
`ecw_receipt_bank_writeoff_range`
(
`id`
bigint
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`id`
bigint
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`write_off_down`
int
NOT
NULL
DEFAULT
10000
COMMENT
'核销比例下界(除以100)'
,
`write_off_down`
int
NOT
NULL
DEFAULT
10000
COMMENT
'核销比例下界(除以100)'
,
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
View file @
d99d1771
...
@@ -4,11 +4,11 @@ import cn.hutool.core.collection.CollectionUtil;
...
@@ -4,11 +4,11 @@ import cn.hutool.core.collection.CollectionUtil;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.OrderApprovalTypeCheckEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.OrderApprovalTypeCheckEvent
;
import
cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum
;
import
cn.iocoder.yudao.framework.common.exception.ServiceException
;
import
cn.iocoder.yudao.framework.common.exception.ServiceException
;
import
cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants
;
import
cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum
;
import
cn.iocoder.yudao.framework.excel.handler.WaterMarkHandler
;
import
cn.iocoder.yudao.framework.excel.handler.WaterMarkHandler
;
import
cn.iocoder.yudao.framework.i18n.core.I18nMessage
;
import
cn.iocoder.yudao.framework.i18n.core.I18nMessage
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
...
@@ -17,7 +17,6 @@ import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
...
@@ -17,7 +17,6 @@ import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import
cn.iocoder.yudao.framework.security.core.LoginUser
;
import
cn.iocoder.yudao.framework.security.core.LoginUser
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.customer.service.zhongPao.ZhongPaoService
;
import
cn.iocoder.yudao.module.customer.service.zhongPao.ZhongPaoService
;
...
@@ -60,7 +59,6 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehousePicture.OrderW
...
@@ -60,7 +59,6 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehousePicture.OrderW
import
cn.iocoder.yudao.module.order.dal.mysql.approval.OrderApprovalMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.approval.OrderApprovalMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.order.OrderMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.order.OrderMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderItem.OrderItemMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderItem.OrderItemMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderItemPackLog.OrderItemPackLogMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderTime.OrderTimeMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderTime.OrderTimeMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderWarehouseIn.OrderWarehouseInMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderWarehouseIn.OrderWarehouseInMapper
;
import
cn.iocoder.yudao.module.order.dto.*
;
import
cn.iocoder.yudao.module.order.dto.*
;
...
@@ -99,10 +97,8 @@ import com.alibaba.excel.write.metadata.WriteSheet;
...
@@ -99,10 +97,8 @@ import com.alibaba.excel.write.metadata.WriteSheet;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.NotNull
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -127,7 +123,6 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU
...
@@ -127,7 +123,6 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU
import
static
cn
.
iocoder
.
yudao
.
framework
.
excel
.
constant
.
ExportConstant
.*;
import
static
cn
.
iocoder
.
yudao
.
framework
.
excel
.
constant
.
ExportConstant
.*;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
ErrorCodeConstants
.*;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
ErrorCodeConstants
.*;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
OrderApprovalTypeEnum
.
ORDER_UPDATE
;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
OrderApprovalTypeEnum
.
ORDER_UPDATE
;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
OrderApprovalTypeEnum
.
merge_order
;
import
static
cn
.
iocoder
.
yudao
.
module
.
product
.
enums
.
ErrorCodeConstants
.
NOT_FIND_CURRENCY
;
import
static
cn
.
iocoder
.
yudao
.
module
.
product
.
enums
.
ErrorCodeConstants
.
NOT_FIND_CURRENCY
;
/**
/**
...
@@ -3107,7 +3102,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
...
@@ -3107,7 +3102,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
writeOffTotalFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
writeOffAmountActual
);
writeOffTotalFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
writeOffAmountActual
);
}
}
// 计算未收
// 计算未收
if
(
notWriteOffAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
if
(
notWriteOffAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
=
0
)
{
if
(
notWriteOffTotalFeeGroupDtoMap
.
containsKey
(
receivableDO
.
getCurrencyId
()))
{
if
(
notWriteOffTotalFeeGroupDtoMap
.
containsKey
(
receivableDO
.
getCurrencyId
()))
{
notWriteOffTotalFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
notWriteOffAmount
.
add
(
notWriteOffTotalFeeGroupDtoMap
.
get
(
receivableDO
.
getCurrencyId
())));
notWriteOffTotalFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
notWriteOffAmount
.
add
(
notWriteOffTotalFeeGroupDtoMap
.
get
(
receivableDO
.
getCurrencyId
())));
}
else
{
}
else
{
...
@@ -3201,7 +3196,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
...
@@ -3201,7 +3196,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
writeOffFreightFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
writeOffAmountActual
);
writeOffFreightFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
writeOffAmountActual
);
}
}
// 计算未收
// 计算未收
if
(
notWriteOffAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
if
(
notWriteOffAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
=
0
)
{
if
(
notWriteOffFreightFeeGroupDtoMap
.
containsKey
(
receivableDO
.
getCurrencyId
()))
{
if
(
notWriteOffFreightFeeGroupDtoMap
.
containsKey
(
receivableDO
.
getCurrencyId
()))
{
notWriteOffFreightFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
notWriteOffAmount
.
add
(
notWriteOffFreightFeeGroupDtoMap
.
get
(
receivableDO
.
getCurrencyId
())));
notWriteOffFreightFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
notWriteOffAmount
.
add
(
notWriteOffFreightFeeGroupDtoMap
.
get
(
receivableDO
.
getCurrencyId
())));
}
else
{
}
else
{
...
@@ -3246,7 +3241,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
...
@@ -3246,7 +3241,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
writeOffClearanceFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
writeOffAmountActual
);
writeOffClearanceFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
writeOffAmountActual
);
}
}
// 计算未收
// 计算未收
if
(
notWriteOffAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
if
(
notWriteOffAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
=
0
)
{
if
(
notWriteOffClearanceFeeGroupDtoMap
.
containsKey
(
receivableDO
.
getCurrencyId
()))
{
if
(
notWriteOffClearanceFeeGroupDtoMap
.
containsKey
(
receivableDO
.
getCurrencyId
()))
{
notWriteOffClearanceFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
notWriteOffAmount
.
add
(
notWriteOffClearanceFeeGroupDtoMap
.
get
(
receivableDO
.
getCurrencyId
())));
notWriteOffClearanceFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
notWriteOffAmount
.
add
(
notWriteOffClearanceFeeGroupDtoMap
.
get
(
receivableDO
.
getCurrencyId
())));
}
else
{
}
else
{
...
@@ -3303,7 +3298,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
...
@@ -3303,7 +3298,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
writeOffOtherFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
writeOffAmountActual
);
writeOffOtherFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
writeOffAmountActual
);
}
}
// 计算未收
// 计算未收
if
(
notWriteOffAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
if
(
notWriteOffAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
=
0
)
{
if
(
notWriteOffOtherFeeGroupDtoMap
.
containsKey
(
receivableDO
.
getCurrencyId
()))
{
if
(
notWriteOffOtherFeeGroupDtoMap
.
containsKey
(
receivableDO
.
getCurrencyId
()))
{
notWriteOffOtherFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
notWriteOffAmount
.
add
(
notWriteOffOtherFeeGroupDtoMap
.
get
(
receivableDO
.
getCurrencyId
())));
notWriteOffOtherFeeGroupDtoMap
.
put
(
receivableDO
.
getCurrencyId
(),
notWriteOffAmount
.
add
(
notWriteOffOtherFeeGroupDtoMap
.
get
(
receivableDO
.
getCurrencyId
())));
}
else
{
}
else
{
...
@@ -3545,8 +3540,12 @@ public class OrderQueryServiceImpl implements OrderQueryService {
...
@@ -3545,8 +3540,12 @@ public class OrderQueryServiceImpl implements OrderQueryService {
private
void
convertFeeGroup
(
Map
<
Integer
,
CurrencyRespDTO
>
currencyRespDTOMap
,
Map
<
Long
,
BigDecimal
>
feeGroupDtoMap
,
List
<
FeeGroupDto
>
feeGroupDtoList
,
StringBuilder
sb
)
{
private
void
convertFeeGroup
(
Map
<
Integer
,
CurrencyRespDTO
>
currencyRespDTOMap
,
Map
<
Long
,
BigDecimal
>
feeGroupDtoMap
,
List
<
FeeGroupDto
>
feeGroupDtoList
,
StringBuilder
sb
)
{
for
(
Map
.
Entry
<
Long
,
BigDecimal
>
entry
:
feeGroupDtoMap
.
entrySet
())
{
for
(
Map
.
Entry
<
Long
,
BigDecimal
>
entry
:
feeGroupDtoMap
.
entrySet
())
{
int
currencyId
=
entry
.
getKey
().
intValue
();
if
(
currencyRespDTOMap
.
get
(
currencyId
)
==
null
)
{
continue
;
}
FeeGroupDto
feeGroupDto
=
new
FeeGroupDto
();
FeeGroupDto
feeGroupDto
=
new
FeeGroupDto
();
CurrencyRespDTO
currencyRespDTO
=
currencyRespDTOMap
.
get
(
entry
.
getKey
().
intValue
()
);
CurrencyRespDTO
currencyRespDTO
=
currencyRespDTOMap
.
get
(
currencyId
);
feeGroupDto
.
setCurrencyId
(
entry
.
getKey
());
feeGroupDto
.
setCurrencyId
(
entry
.
getKey
());
feeGroupDto
.
setAmount
(
entry
.
getValue
().
setScale
(
0
,
RoundingMode
.
HALF_UP
));
feeGroupDto
.
setAmount
(
entry
.
getValue
().
setScale
(
0
,
RoundingMode
.
HALF_UP
));
if
(
Objects
.
nonNull
(
currencyRespDTO
))
{
if
(
Objects
.
nonNull
(
currencyRespDTO
))
{
...
@@ -3564,6 +3563,10 @@ public class OrderQueryServiceImpl implements OrderQueryService {
...
@@ -3564,6 +3563,10 @@ public class OrderQueryServiceImpl implements OrderQueryService {
private
void
convertFeeGroup
(
Map
<
Integer
,
CurrencyRespDTO
>
currencyRespDTOMap
,
Map
<
Long
,
BigDecimal
>
feeGroupDtoMap1
,
Map
<
Long
,
BigDecimal
>
feeGroupDtoMap2
,
List
<
FeeGroupDto
>
feeGroupDtoList
,
StringBuilder
sb
)
{
private
void
convertFeeGroup
(
Map
<
Integer
,
CurrencyRespDTO
>
currencyRespDTOMap
,
Map
<
Long
,
BigDecimal
>
feeGroupDtoMap1
,
Map
<
Long
,
BigDecimal
>
feeGroupDtoMap2
,
List
<
FeeGroupDto
>
feeGroupDtoList
,
StringBuilder
sb
)
{
for
(
Map
.
Entry
<
Long
,
BigDecimal
>
entry
:
feeGroupDtoMap1
.
entrySet
())
{
for
(
Map
.
Entry
<
Long
,
BigDecimal
>
entry
:
feeGroupDtoMap1
.
entrySet
())
{
int
currencyId
=
entry
.
getKey
().
intValue
();
if
(
currencyRespDTOMap
.
get
(
currencyId
)
==
null
)
{
continue
;
}
FeeGroupDto
feeGroupDto
=
new
FeeGroupDto
();
FeeGroupDto
feeGroupDto
=
new
FeeGroupDto
();
CurrencyRespDTO
currencyRespDTO
=
currencyRespDTOMap
.
get
(
entry
.
getKey
().
intValue
());
CurrencyRespDTO
currencyRespDTO
=
currencyRespDTOMap
.
get
(
entry
.
getKey
().
intValue
());
feeGroupDto
.
setCurrencyId
(
entry
.
getKey
());
feeGroupDto
.
setCurrencyId
(
entry
.
getKey
());
...
@@ -3832,10 +3835,10 @@ public class OrderQueryServiceImpl implements OrderQueryService {
...
@@ -3832,10 +3835,10 @@ public class OrderQueryServiceImpl implements OrderQueryService {
query
.
setLang
(
I18nMessage
.
getLang
());
query
.
setLang
(
I18nMessage
.
getLang
());
}
}
ArrayList
<
Integer
>
orderType
=
new
ArrayList
<>();
ArrayList
<
Integer
>
orderType
=
new
ArrayList
<>();
if
(
query
.
getIsHeavyCargo
()
!=
null
&&
query
.
getIsHeavyCargo
())
{
if
(
query
.
getIsHeavyCargo
()
!=
null
&&
query
.
getIsHeavyCargo
()
==
1
)
{
orderType
.
add
(
2
);
orderType
.
add
(
2
);
}
}
if
(
query
.
getIsPaoCargo
()
!=
null
&&
query
.
getIsPaoCargo
())
{
if
(
query
.
getIsPaoCargo
()
!=
null
&&
query
.
getIsPaoCargo
()
==
1
)
{
orderType
.
add
(
3
);
orderType
.
add
(
3
);
}
}
query
.
setOrderType
(
orderType
);
query
.
setOrderType
(
orderType
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/order/ContainerReportOrderQueryVO.java
View file @
d99d1771
...
@@ -40,9 +40,9 @@ public class ContainerReportOrderQueryVO {
...
@@ -40,9 +40,9 @@ public class ContainerReportOrderQueryVO {
@ApiModelProperty
(
value
=
"订单状态详情见字典:order_status"
)
@ApiModelProperty
(
value
=
"订单状态详情见字典:order_status"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
value
=
"是否重货"
)
@ApiModelProperty
(
value
=
"是否重货"
)
private
Boolean
isHeavyCargo
;
private
Integer
isHeavyCargo
;
@ApiModelProperty
(
value
=
"是否泡货"
)
@ApiModelProperty
(
value
=
"是否泡货"
)
private
Boolean
isPaoCargo
;
private
Integer
isPaoCargo
;
@ApiModelProperty
(
value
=
"订单类型"
)
@ApiModelProperty
(
value
=
"订单类型"
)
private
List
<
Integer
>
orderType
;
private
List
<
Integer
>
orderType
;
@ApiModelProperty
(
value
=
"是否控货"
)
@ApiModelProperty
(
value
=
"是否控货"
)
...
...
yudao-module-order/yudao-module-order-core/src/main/resources/mapper/order/OrderMapper.xml
View file @
d99d1771
...
@@ -7634,6 +7634,7 @@
...
@@ -7634,6 +7634,7 @@
LEFT JOIN ecw_customer norc on norc.id = nor.customer_id
LEFT JOIN ecw_customer norc on norc.id = nor.customer_id
LEFT JOIN ecw_customer neeo on neeo.id = nee.customer_id
LEFT JOIN ecw_customer neeo on neeo.id = nee.customer_id
WHERE o.`container_number` = #{query.containerNumber}
WHERE o.`container_number` = #{query.containerNumber}
<include
refid=
"containerOrderSummaryQuery"
/>
</select>
</select>
<sql
id=
"containerOrderSummaryQuery"
>
<sql
id=
"containerOrderSummaryQuery"
>
<if
test=
"query.orderNo != null and query.orderNo != '' "
>
<if
test=
"query.orderNo != null and query.orderNo != '' "
>
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receipt/ReceiptServiceImpl.java
View file @
d99d1771
...
@@ -648,7 +648,7 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
...
@@ -648,7 +648,7 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
}
}
//已核销状态记录
//已核销状态记录
List
<
ReceiptItemDO
>
list
=
listItemList
.
stream
().
filter
(
i
->
i
.
getReceiptId
()
==
ReceiptId
&&
i
.
getStatus
()
!=
0
).
collect
(
Collectors
.
toList
());
List
<
ReceiptItemDO
>
list
=
listItemList
.
stream
().
filter
(
i
->
i
.
getReceiptId
()
==
ReceiptId
&&
(
i
.
getStatus
()
==
1
||
i
.
getStatus
()
==
3
)
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isEmpty
(
list
))
{
if
(
CollectionUtil
.
isEmpty
(
list
))
{
//核销金额为0 核销比例为空
//核销金额为0 核销比例为空
return
sR
;
return
sR
;
...
@@ -921,15 +921,18 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
...
@@ -921,15 +921,18 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
update
.
setBmpId
(
bpmId
);
update
.
setBmpId
(
bpmId
);
update
.
setFinanceRemark
(
financeRemark
);
update
.
setFinanceRemark
(
financeRemark
);
// 更新核销误差兑额外费用主币种金额
// 更新核销误差兑额外费用主币种金额
if
(
null
==
diff
)
{
diff
=
totalAmount
.
subtract
(
receiptDO
.
getReceivableTotalAmount
());
}
List
<
ReceiptRelationOrderInfoVO
>
relationOrder
=
receiptMapper
.
getOrderInfoByReceiptId
(
receiptDO
.
getId
());
List
<
ReceiptRelationOrderInfoVO
>
relationOrder
=
receiptMapper
.
getOrderInfoByReceiptId
(
receiptDO
.
getId
());
OrderVO
orderVO
=
receiptMapper
.
getContainerNumberByOrderId
(
relationOrder
.
get
(
0
).
getOrderId
());
OrderVO
orderVO
=
receiptMapper
.
getContainerNumberByOrderId
(
relationOrder
.
get
(
0
).
getOrderId
());
if
(
null
!=
orderVO
)
{
if
(
null
!=
orderVO
)
{
RegionDTO
region
=
regionApi
.
getRegionById
(
Long
.
parseLong
(
orderVO
.
getCountry
()));
RegionDTO
region
=
regionApi
.
getRegionById
(
Long
.
parseLong
(
orderVO
.
getCountry
()));
Long
importCurrency3
=
Long
.
parseLong
(
region
.
getImportCurrency3
());
Long
importCurrency3
=
Long
.
parseLong
(
region
.
getImportCurrency3
());
if
(!
currencyId
.
equals
(
importCurrency3
))
{
if
(!
currencyId
.
equals
(
importCurrency3
))
{
diff
=
diff
==
null
?
null
:
diff
.
multiply
(
currencyApi
.
getCurrencyRate
(
currencyId
,
importCurrency3
).
getCurrencyRate
());
diff
=
diff
.
multiply
(
currencyApi
.
getCurrencyRate
(
currencyId
,
importCurrency3
).
getCurrencyRate
());
}
}
update
.
setWriteOffDiffMainCurrency
(
diff
==
null
?
"0"
:
diff
.
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
update
.
setWriteOffDiffMainCurrency
(
diff
.
setScale
(
2
,
RoundingMode
.
HALF_UP
)
+
" "
+
currencyApi
.
getAllCurrency
().
get
(
importCurrency3
.
intValue
()).
getFuhao
());
}
}
receiptMapper
.
updateById
(
update
);
receiptMapper
.
updateById
(
update
);
}
}
...
@@ -1148,6 +1151,9 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
...
@@ -1148,6 +1151,9 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
backVO
.
setInvoiceVO
(
invoiceInReceiptRespVO
);
backVO
.
setInvoiceVO
(
invoiceInReceiptRespVO
);
}
}
}
}
if
(
receiptDO
.
getOpenInvoice
()
!=
null
&&
receiptDO
.
getOpenInvoice
()
==
0
)
{
backVO
.
setInvoiceId
(
null
);
}
backVO
.
setCreator
(
adminUserApi
.
getUserName
(
receiptDO
.
getCreator
()));
backVO
.
setCreator
(
adminUserApi
.
getUserName
(
receiptDO
.
getCreator
()));
backVO
.
setUpdater
(
adminUserApi
.
getUserName
(
receiptDO
.
getUpdater
()));
backVO
.
setUpdater
(
adminUserApi
.
getUserName
(
receiptDO
.
getUpdater
()));
return
backVO
;
return
backVO
;
...
@@ -1173,31 +1179,38 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
...
@@ -1173,31 +1179,38 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
@Override
@Override
public
void
updateReceiptItemStatus
(
Long
receiptId
)
{
public
void
updateReceiptItemStatus
(
Long
receiptId
)
{
List
<
ReceiptItemDO
>
listItem
=
receiptItemMapper
.
selectList
(
ReceiptItemDO:
:
getReceiptId
,
receiptId
);
List
<
ReceiptItemDO
>
listItem
=
receiptItemMapper
.
selectList
(
ReceiptItemDO:
:
getReceiptId
,
receiptId
);
ReceiptItemStatusInReceiptEnum
receiptItemStatus
=
null
;
//ReceiptItemStatusInReceiptEnum receiptItemStatus = null;
int
countItem
=
listItem
.
size
();
//int countItem = listItem.size();
if
(
countItem
==
0
)
{
//if (countItem == 0) {
receiptItemStatus
=
ReceiptItemStatusInReceiptEnum
.
NO_INPUT
;
// receiptItemStatus = ReceiptItemStatusInReceiptEnum.NO_INPUT;
}
else
{
//} else {
long
draft
=
listItem
.
stream
().
filter
(
i
->
Objects
.
equals
(
i
.
getStatus
(),
DRAFT
.
getValue
())
||
Objects
.
equals
(
i
.
getStatus
(),
WRITE_OFF_APPROVE_REJECT
.
getValue
())).
count
();
// long draft = listItem.stream().filter(i -> Objects.equals(i.getStatus(), DRAFT.getValue()) || Objects.equals(i.getStatus(), WRITE_OFF_APPROVE_REJECT.getValue())).count();
long
writeOff
=
listItem
.
stream
().
filter
(
i
->
Objects
.
equals
(
i
.
getStatus
(),
WRITE_OFF
.
getValue
())).
count
();
// long writeOff = listItem.stream().filter(i -> Objects.equals(i.getStatus(), WRITE_OFF.getValue())).count();
long
writeOffApproving
=
listItem
.
stream
().
filter
(
i
->
Objects
.
equals
(
i
.
getStatus
(),
WRITE_OFF_APPROVE_ING
.
getValue
())).
count
();
// long writeOffApproving = listItem.stream().filter(i -> Objects.equals(i.getStatus(), WRITE_OFF_APPROVE_ING.getValue())).count();
long
writeOffNoApproving
=
listItem
.
stream
().
filter
(
i
->
Objects
.
equals
(
i
.
getStatus
(),
WRITE_OFF_NO_APPROVE_ING
.
getValue
())).
count
();
// long writeOffNoApproving = listItem.stream().filter(i -> Objects.equals(i.getStatus(), WRITE_OFF_NO_APPROVE_ING.getValue())).count();
if
(
draft
==
countItem
)
{
// if (draft == countItem) {
receiptItemStatus
=
ReceiptItemStatusInReceiptEnum
.
UN_SUBMITTED
;
// receiptItemStatus = ReceiptItemStatusInReceiptEnum.UN_SUBMITTED;
}
else
if
(
draft
>
0
&&
draft
<
countItem
)
{
// } else if (draft > 0 && draft < countItem) {
receiptItemStatus
=
ReceiptItemStatusInReceiptEnum
.
PART_SUBMITTED
;
// receiptItemStatus = ReceiptItemStatusInReceiptEnum.PART_SUBMITTED;
}
else
if
(
writeOffApproving
==
countItem
)
{
// } else if (writeOffApproving == countItem) {
receiptItemStatus
=
ReceiptItemStatusInReceiptEnum
.
UN_APPROVED
;
// receiptItemStatus = ReceiptItemStatusInReceiptEnum.UN_APPROVED;
}
else
if
(
writeOff
==
countItem
)
{
// } else if (writeOff == countItem) {
receiptItemStatus
=
ReceiptItemStatusInReceiptEnum
.
ALL_APPROVED
;
// receiptItemStatus = ReceiptItemStatusInReceiptEnum.ALL_APPROVED;
}
else
if
((
writeOffApproving
+
writeOffNoApproving
)
==
countItem
||
(
writeOff
+
writeOffNoApproving
)
==
countItem
||
(
writeOffApproving
+
writeOff
)
==
countItem
)
{
// } else if ((writeOffApproving + writeOffNoApproving) == countItem || (writeOff + writeOffNoApproving) == countItem || (writeOffApproving + writeOff) == countItem) {
receiptItemStatus
=
ReceiptItemStatusInReceiptEnum
.
PART_APPROVED
;
// receiptItemStatus = ReceiptItemStatusInReceiptEnum.PART_APPROVED;
}
// }
}
//}
if
(
receiptItemStatus
!=
null
)
{
//if (receiptItemStatus != null) {
// ReceiptDO receiptDO = new ReceiptDO();
// receiptDO.setId(receiptId);
// receiptDO.setReceiptItemStatus(receiptItemStatus.getValue());
// receiptMapper.updateById(receiptDO);
//}
ReceiptItemStatusInReceiptEnum
receiptMxStatus
=
getReceiptMxStatus
(
listItem
,
receiptId
);
if
(
receiptMxStatus
!=
null
)
{
ReceiptDO
receiptDO
=
new
ReceiptDO
();
ReceiptDO
receiptDO
=
new
ReceiptDO
();
receiptDO
.
setId
(
receiptId
);
receiptDO
.
setId
(
receiptId
);
receiptDO
.
setReceiptItemStatus
(
receipt
Item
Status
.
getValue
());
receiptDO
.
setReceiptItemStatus
(
receipt
Mx
Status
.
getValue
());
receiptMapper
.
updateById
(
receiptDO
);
receiptMapper
.
updateById
(
receiptDO
);
}
}
}
}
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemServiceImpl.java
View file @
d99d1771
...
@@ -595,7 +595,7 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
...
@@ -595,7 +595,7 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
if
(
writeOffRate
.
compareTo
(
writeOffDown
)
<
0
||
writeOffRate
.
compareTo
(
writeOffUp
)
>
0
)
{
if
(
writeOffRate
.
compareTo
(
writeOffDown
)
<
0
||
writeOffRate
.
compareTo
(
writeOffUp
)
>
0
)
{
return
false
;
return
false
;
}
}
String
remark
=
"核销比例为: "
+
writeOffRate
+
"%, "
+
"符合核销比例"
+
writeOffDown
+
"%-"
+
writeOffUp
+
"%"
;
String
remark
=
"核销比例为: "
+
writeOffRate
.
divide
(
new
BigDecimal
(
"100"
),
2
,
RoundingMode
.
HALF_UP
)
+
"%, "
+
"符合核销比例"
+
writeOffDown
.
divide
(
new
BigDecimal
(
"100"
),
2
,
RoundingMode
.
HALF_UP
)
+
"%-"
+
writeOffUp
.
divide
(
new
BigDecimal
(
"100"
),
2
,
RoundingMode
.
HALF_UP
)
+
"%"
;
receiptService
.
recordLog
(
receiptItemDO
.
getReceiptId
(),
ReceiptLinkEnum
.
APPROVE_BANK_RECEIPT
,
remark
,
WorkFlowEmus
.
FINANCE_RECEIPT_ITEM_WRITE_OFF
.
getValue
());
receiptService
.
recordLog
(
receiptItemDO
.
getReceiptId
(),
ReceiptLinkEnum
.
APPROVE_BANK_RECEIPT
,
remark
,
WorkFlowEmus
.
FINANCE_RECEIPT_ITEM_WRITE_OFF
.
getValue
());
return
true
;
return
true
;
}
}
...
@@ -996,9 +996,9 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
...
@@ -996,9 +996,9 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
createReqVO
.
setAccountId
(
account
.
getId
());
createReqVO
.
setAccountId
(
account
.
getId
());
createReqVO
.
setAccountName
(
account
.
getBaAccountName
());
createReqVO
.
setAccountName
(
account
.
getBaAccountName
());
createReqVO
.
setAccountBankName
(
account
.
getBaBankName
());
createReqVO
.
setAccountBankName
(
account
.
getBaBankName
());
if
(
account
.
getBaCurrency
()
!=
null
&&
!
allCurrency
.
get
(
account
.
getBaCurrency
()).
getFuhao
().
equals
(
createReqVO
.
getPayCurrency
()))
{
//
if (account.getBaCurrency() != null && !allCurrency.get(account.getBaCurrency()).getFuhao().equals(createReqVO.getPayCurrency())) {
return
new
ReceiptItemBatchRespVO
(
createReqVO
.
getOrderNo
(),
createReqVO
.
getPayer
(),
0
,
"收款账号币种与实收金额币种不一致"
);
//
return new ReceiptItemBatchRespVO(createReqVO.getOrderNo(), createReqVO.getPayer(), 0, "收款账号币种与实收金额币种不一致");
}
//
}
return
null
;
return
null
;
}
}
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java
View file @
d99d1771
...
@@ -534,6 +534,7 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
...
@@ -534,6 +534,7 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
if
(
CollectionUtil
.
isNotEmpty
(
records
))
{
if
(
CollectionUtil
.
isNotEmpty
(
records
))
{
records
.
forEach
(
vo
->
{
records
.
forEach
(
vo
->
{
vo
.
setUpdater
(
vo
.
getUpdaterName
());
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setNotIncludedTaxAmount
(
vo
.
getTotalAmount
());
vo
.
setNotIncludedTaxAmount
(
vo
.
getTotalAmount
());
if
(
vo
.
getDiscountTotal
()
==
null
)
{
if
(
vo
.
getDiscountTotal
()
==
null
)
{
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/CostDetailPageVO.java
View file @
d99d1771
...
@@ -174,6 +174,8 @@ public class CostDetailPageVO {
...
@@ -174,6 +174,8 @@ public class CostDetailPageVO {
@ApiModelProperty
(
value
=
"更新人"
)
@ApiModelProperty
(
value
=
"更新人"
)
private
String
updater
;
private
String
updater
;
@ApiModelProperty
(
value
=
"更新人"
)
private
String
updaterName
;
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
private
Date
createTime
;
private
Date
createTime
;
...
...
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receivable/ReceivableMapper.xml
View file @
d99d1771
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
<select
id=
"getCostDetailPage"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receivable.CostDetailPageVO"
>
<select
id=
"getCostDetailPage"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receivable.CostDetailPageVO"
>
SELECT
SELECT
o.order_no,
o.transport_id,
o.transport_id,
o.channel_id,
o.channel_id,
o.status,
o.status,
...
@@ -16,23 +15,23 @@
...
@@ -16,23 +15,23 @@
obw.title_en objective_warehouse_en,
obw.title_en objective_warehouse_en,
obw.guojia destination_country,
obw.guojia destination_country,
obw.shi destination_city,
obw.shi destination_city,
usu.username AS updater,
usu.username AS updater
Name
,
asu.username AS approver,
asu.username AS approver,
ra.update_time AS approverTime,
ra.update_time AS approverTime,
r.*
r.*
FROM ecw_receivable r
FROM ecw_receivable r
LEFT JOIN ecw_order o ON o.order_id = r.order_id
LEFT JOIN ecw_order o ON o.order_id = r.order_id
AND r.deleted = 0
LEFT JOIN ecw_order_departure de ON de.order_id = o.order_id
LEFT JOIN ecw_order_departure de ON de.order_id = o.order_id
AND de.deleted = 0
LEFT JOIN ecw_order_objective ob ON ob.order_id = o.order_id
LEFT JOIN ecw_order_objective ob ON ob.order_id = o.order_id
AND ob.deleted = 0
LEFT JOIN ecw_warehouse dew ON de.departure_warehouse_id = dew.id
LEFT JOIN ecw_warehouse dew ON de.departure_warehouse_id = dew.id
AND dew.deleted = 0
LEFT JOIN ecw_warehouse obw ON ob.objective_warehouse_id = obw.id
LEFT JOIN ecw_warehouse obw ON ob.objective_warehouse_id = obw.id
AND obw.deleted = 0
LEFT JOIN ecw_receipt_approval ra ON ra.receipt_id = r.receipt_id
LEFT JOIN ecw_receipt_approval ra ON ra.receipt_id = r.receipt_id
AND ra.deleted = 0
LEFT JOIN system_user usu ON usu.id = r.updater
LEFT JOIN system_user usu ON usu.id = r.updater
LEFT JOIN system_user asu ON asu.id = ra.updater
LEFT JOIN system_user asu ON asu.id = ra.updater
WHERE
WHERE
r.deleted = 0
r.deleted = 0
<include
refid=
"costDetailPageCondition"
/>
<include
refid=
"costDetailPageCondition"
/>
ORDER BY r.create_time
GROUP BY r.id
</select>
</select>
<select
id=
"costDetailSearchAmount"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receivable.WealthMoneyAmountVO"
>
<select
id=
"costDetailSearchAmount"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receivable.WealthMoneyAmountVO"
>
SELECT
SELECT
...
@@ -46,10 +45,10 @@
...
@@ -46,10 +45,10 @@
LEFT JOIN ecw_order o ON o.order_id = r.order_id
LEFT JOIN ecw_order o ON o.order_id = r.order_id
</if>
</if>
<if
test=
"query.departureWareHouseId != null"
>
<if
test=
"query.departureWareHouseId != null"
>
LEFT JOIN ecw_order_departure de ON de.order_id = r.order_id
LEFT JOIN ecw_order_departure de ON de.order_id = r.order_id
AND de.deleted = 0
</if>
</if>
<if
test=
"query.destCountry != null or query.destCity != null or query.objectiveWareHouseId != null"
>
<if
test=
"query.destCountry != null or query.destCity != null or query.objectiveWareHouseId != null"
>
LEFT JOIN ecw_order_objective ob ON ob.order_id = r.order_id
LEFT JOIN ecw_order_objective ob ON ob.order_id = r.order_id
AND ob.deleted = 0
</if>
</if>
WHERE
WHERE
r.deleted = 0
r.deleted = 0
...
...
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