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
9e33546a
Commit
9e33546a
authored
Nov 22, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(wealth): 费用明细,银行账号
parent
982b7af2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
203 additions
and
28 deletions
+203
-28
RegionApi.java
...ava/cn/iocoder/yudao/module/ecw/api/region/RegionApi.java
+17
-0
RegionDTO.java
...cn/iocoder/yudao/module/ecw/api/region/dto/RegionDTO.java
+16
-0
BankAccountController.java
...w/controller/admin/bankAccount/BankAccountController.java
+1
-2
BankAccountRespVO.java
...cw/controller/admin/bankAccount/vo/BankAccountRespVO.java
+12
-0
RegionApiImpl.java
...n/iocoder/yudao/module/ecw/service/api/RegionApiImpl.java
+43
-0
BankAccountService.java
...ao/module/ecw/service/bankAccount/BankAccountService.java
+1
-1
BankAccountServiceImpl.java
...odule/ecw/service/bankAccount/BankAccountServiceImpl.java
+27
-2
ReceivableServiceImpl.java
...dule/wealth/service/receivable/ReceivableServiceImpl.java
+42
-1
CostDetailPageVO.java
...r/yudao/module/wealth/vo/receivable/CostDetailPageVO.java
+25
-1
ReceivableMapper.xml
...src/main/resources/mapper/receivable/ReceivableMapper.xml
+19
-21
No files found.
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/api/region/RegionApi.java
0 → 100644
View file @
9e33546a
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
api
.
region
;
import
cn.iocoder.yudao.module.ecw.api.region.dto.RegionDTO
;
import
java.util.List
;
public
interface
RegionApi
{
/**
* 获得目的国家列表
* @return
*/
List
<
RegionDTO
>
getTradeCountryList
();
/**
* 根据id获取区域
*/
RegionDTO
getRegionById
(
Long
id
);
}
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/api/region/dto/RegionDTO.java
0 → 100644
View file @
9e33546a
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
api
.
region
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
RegionDTO
{
private
Long
id
;
@ApiModelProperty
(
value
=
"中文"
)
private
String
titleZh
;
@ApiModelProperty
(
value
=
"英文"
)
private
String
titleEn
;
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/controller/admin/bankAccount/BankAccountController.java
View file @
9e33546a
...
@@ -89,8 +89,7 @@ public class BankAccountController {
...
@@ -89,8 +89,7 @@ public class BankAccountController {
@ApiOperation
(
"获得银行账户分页"
)
@ApiOperation
(
"获得银行账户分页"
)
// @PreAuthorize("@ss.hasPermission('ecw:bank-account:query')")
// @PreAuthorize("@ss.hasPermission('ecw:bank-account:query')")
public
CommonResult
<
PageResult
<
BankAccountRespVO
>>
getBankAccountPage
(
@Valid
BankAccountPageReqVO
pageVO
)
{
public
CommonResult
<
PageResult
<
BankAccountRespVO
>>
getBankAccountPage
(
@Valid
BankAccountPageReqVO
pageVO
)
{
PageResult
<
BankAccountDO
>
pageResult
=
bankAccountService
.
getBankAccountPage
(
pageVO
);
return
success
(
bankAccountService
.
getBankAccountPage
(
pageVO
));
return
success
(
BankAccountConvert
.
INSTANCE
.
convertPage
(
pageResult
));
}
}
@GetMapping
(
"/export-excel"
)
@GetMapping
(
"/export-excel"
)
...
...
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/controller/admin/bankAccount/vo/BankAccountRespVO.java
View file @
9e33546a
...
@@ -19,4 +19,16 @@ public class BankAccountRespVO extends BankAccountBaseVO {
...
@@ -19,4 +19,16 @@ public class BankAccountRespVO extends BankAccountBaseVO {
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
true
)
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
true
)
private
Date
createTime
;
private
Date
createTime
;
@ApiModelProperty
(
value
=
"开户国家中文"
)
private
String
baCountryZh
;
@ApiModelProperty
(
value
=
"开户国家英文"
)
private
String
baCountryEn
;
@ApiModelProperty
(
value
=
"收入归属中文"
)
private
String
baIncomeBelongZh
;
@ApiModelProperty
(
value
=
"收入归属英文"
)
private
String
baIncomeBelongEn
;
}
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/api/RegionApiImpl.java
0 → 100644
View file @
9e33546a
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
service
.
api
;
import
cn.iocoder.yudao.module.ecw.api.region.RegionApi
;
import
cn.iocoder.yudao.module.ecw.api.region.dto.RegionDTO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO
;
import
cn.iocoder.yudao.module.ecw.dal.mysql.region.RegionMapper
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Service
public
class
RegionApiImpl
implements
RegionApi
{
@Resource
private
RegionMapper
regionMapper
;
@Override
public
List
<
RegionDTO
>
getTradeCountryList
()
{
List
<
RegionDO
>
countryList
=
regionMapper
.
getImportExportCountryList
();
List
<
RegionDTO
>
dtoList
=
countryList
.
stream
().
map
(
c
->
{
RegionDTO
regionDTO
=
new
RegionDTO
();
regionDTO
.
setId
(
c
.
getId
());
regionDTO
.
setTitleZh
(
c
.
getTitleZh
());
regionDTO
.
setTitleEn
(
c
.
getTitleEn
());
return
regionDTO
;
}).
collect
(
Collectors
.
toList
());
return
dtoList
;
}
@Override
public
RegionDTO
getRegionById
(
Long
id
)
{
RegionDO
regionDO
=
regionMapper
.
selectById
(
id
);
if
(
regionDO
!=
null
)
{
RegionDTO
regionDTO
=
new
RegionDTO
();
regionDTO
.
setId
(
regionDO
.
getId
());
regionDTO
.
setTitleZh
(
regionDO
.
getTitleZh
());
regionDTO
.
setTitleEn
(
regionDO
.
getTitleEn
());
return
regionDTO
;
}
return
null
;
}
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/bankAccount/BankAccountService.java
View file @
9e33546a
...
@@ -58,7 +58,7 @@ public interface BankAccountService {
...
@@ -58,7 +58,7 @@ public interface BankAccountService {
* @param pageReqVO 分页查询
* @param pageReqVO 分页查询
* @return 银行账户分页
* @return 银行账户分页
*/
*/
PageResult
<
BankAccount
D
O
>
getBankAccountPage
(
BankAccountPageReqVO
pageReqVO
);
PageResult
<
BankAccount
RespV
O
>
getBankAccountPage
(
BankAccountPageReqVO
pageReqVO
);
/**
/**
* 获得银行账户列表, 用于 Excel 导出
* 获得银行账户列表, 用于 Excel 导出
...
...
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/bankAccount/BankAccountServiceImpl.java
View file @
9e33546a
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
service
.
bankAccount
;
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
service
.
bankAccount
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO
;
import
cn.iocoder.yudao.module.ecw.dal.mysql.region.RegionMapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
cn.iocoder.yudao.module.ecw.controller.admin.bankAccount.vo.*
;
import
cn.iocoder.yudao.module.ecw.controller.admin.bankAccount.vo.*
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.bankAccount.BankAccountDO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.bankAccount.BankAccountDO
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
...
@@ -26,6 +32,8 @@ public class BankAccountServiceImpl implements BankAccountService {
...
@@ -26,6 +32,8 @@ public class BankAccountServiceImpl implements BankAccountService {
@Resource
@Resource
private
BankAccountMapper
bankAccountMapper
;
private
BankAccountMapper
bankAccountMapper
;
@Resource
private
RegionMapper
regionMapper
;
@Override
@Override
public
Long
createBankAccount
(
BankAccountCreateReqVO
createReqVO
)
{
public
Long
createBankAccount
(
BankAccountCreateReqVO
createReqVO
)
{
...
@@ -81,8 +89,25 @@ public class BankAccountServiceImpl implements BankAccountService {
...
@@ -81,8 +89,25 @@ public class BankAccountServiceImpl implements BankAccountService {
}
}
@Override
@Override
public
PageResult
<
BankAccountDO
>
getBankAccountPage
(
BankAccountPageReqVO
pageReqVO
)
{
public
PageResult
<
BankAccountRespVO
>
getBankAccountPage
(
BankAccountPageReqVO
pageReqVO
)
{
return
bankAccountMapper
.
selectPage
(
pageReqVO
);
PageResult
<
BankAccountDO
>
bankAccountDOPageResult
=
bankAccountMapper
.
selectPage
(
pageReqVO
);
PageResult
<
BankAccountRespVO
>
voPageResult
=
BankAccountConvert
.
INSTANCE
.
convertPage
(
bankAccountDOPageResult
);
List
<
RegionDO
>
countryList
=
regionMapper
.
getImportExportCountryList
();
Map
<
Long
,
RegionDO
>
countryMap
=
countryList
.
stream
().
collect
(
Collectors
.
toMap
(
RegionDO:
:
getId
,
regionDO
->
regionDO
));
voPageResult
.
getList
().
forEach
(
vo
->
{
if
(
vo
.
getBaCountry
()
!=
null
)
{
RegionDO
baCountryDO
=
countryMap
.
get
(
vo
.
getBaCountry
().
longValue
());
vo
.
setBaCountryZh
(
baCountryDO
.
getTitleZh
());
vo
.
setBaCountryEn
(
baCountryDO
.
getTitleEn
());
}
if
(
vo
.
getBaIncomeBelong
()
!=
null
)
{
RegionDO
baIncomeBelongDO
=
countryMap
.
get
(
vo
.
getBaIncomeBelong
().
longValue
());
vo
.
setBaIncomeBelongZh
(
baIncomeBelongDO
.
getTitleZh
());
vo
.
setBaIncomeBelongEn
(
baIncomeBelongDO
.
getTitleEn
());
}
});
return
voPageResult
;
}
}
@Override
@Override
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java
View file @
9e33546a
...
@@ -16,6 +16,8 @@ import cn.iocoder.yudao.module.ecw.api.currency.CurrencyApi;
...
@@ -16,6 +16,8 @@ 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.CurrencyRespDTO
;
import
cn.iocoder.yudao.module.ecw.api.customer.CustomerApi
;
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.customer.dto.CustomerDTO
;
import
cn.iocoder.yudao.module.ecw.api.region.RegionApi
;
import
cn.iocoder.yudao.module.ecw.api.region.dto.RegionDTO
;
import
cn.iocoder.yudao.module.system.api.user.AdminUserApi
;
import
cn.iocoder.yudao.module.system.api.user.AdminUserApi
;
import
cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO
;
import
cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO
;
import
cn.iocoder.yudao.module.wealth.convert.receivable.ReceivableConvert
;
import
cn.iocoder.yudao.module.wealth.convert.receivable.ReceivableConvert
;
...
@@ -37,6 +39,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -37,6 +39,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.ExecutionException
;
...
@@ -75,6 +78,9 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
...
@@ -75,6 +78,9 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
@Resource
@Resource
private
CustomerApi
customerApi
;
private
CustomerApi
customerApi
;
@Resource
private
RegionApi
regionApi
;
@Override
@Override
public
Long
createReceivable
(
ReceivableCreateReqVO
createReqVO
)
{
public
Long
createReceivable
(
ReceivableCreateReqVO
createReqVO
)
{
LoginUser
user
=
SecurityFrameworkUtils
.
getLoginUser
();
LoginUser
user
=
SecurityFrameworkUtils
.
getLoginUser
();
...
@@ -419,17 +425,35 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
...
@@ -419,17 +425,35 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
IPage
<
CostDetailPageVO
>
costDetailPage
=
costDetailPageFuture
.
get
();
IPage
<
CostDetailPageVO
>
costDetailPage
=
costDetailPageFuture
.
get
();
List
<
WealthMoneyAmountVO
>
searchStatistics
=
searchStatisticsFuture
.
get
();
List
<
WealthMoneyAmountVO
>
searchStatistics
=
searchStatisticsFuture
.
get
();
List
<
WealthMoneyAmountVO
>
totalStatistics
=
totalStatisticsFuture
.
get
();
List
<
WealthMoneyAmountVO
>
totalStatistics
=
totalStatisticsFuture
.
get
();
// 计算库中不存在的金额字段
// TODO 暂定 不含税金额 = 总金额
// 实际金额 = 含税金额 - 优惠金额
// 未核销金额 = 实际金额 - 核销金额
if
(
CollectionUtil
.
isNotEmpty
(
searchStatistics
))
{
if
(
CollectionUtil
.
isNotEmpty
(
searchStatistics
))
{
searchStatistics
.
forEach
(
vo
->
{
searchStatistics
.
forEach
(
vo
->
{
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setCurrencyName
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getTitleZh
());
vo
.
setCurrencyName
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getTitleZh
());
if
(
vo
.
getWriteOffAmount
()
==
null
)
{
vo
.
setWriteOffAmount
(
BigDecimal
.
ZERO
);
}
if
(
vo
.
getDiscountTotal
()
==
null
)
{
vo
.
setDiscountTotal
(
BigDecimal
.
ZERO
);
}
vo
.
setReceivableTotalAmount
(
vo
.
getTaxAmount
().
subtract
(
vo
.
getDiscountTotal
()));
vo
.
setNotWriteOffAmount
(
vo
.
getReceivableTotalAmount
().
subtract
(
vo
.
getWriteOffAmount
()));
vo
.
setNotWriteOffAmount
(
vo
.
getReceivableTotalAmount
().
subtract
(
vo
.
getWriteOffAmount
()));
});
});
}
}
totalStatistics
.
forEach
(
vo
->
{
totalStatistics
.
forEach
(
vo
->
{
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setCurrencyName
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getTitleZh
());
vo
.
setCurrencyName
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getTitleZh
());
if
(
vo
.
getWriteOffAmount
()
==
null
)
{
vo
.
setWriteOffAmount
(
BigDecimal
.
ZERO
);
}
if
(
vo
.
getDiscountTotal
()
==
null
)
{
vo
.
setDiscountTotal
(
BigDecimal
.
ZERO
);
}
vo
.
setNotIncludedTaxAmount
(
vo
.
getTotalAmount
());
vo
.
setReceivableTotalAmount
(
vo
.
getTaxAmount
().
subtract
(
vo
.
getDiscountTotal
()));
vo
.
setNotWriteOffAmount
(
vo
.
getReceivableTotalAmount
().
subtract
(
vo
.
getWriteOffAmount
()));
vo
.
setNotWriteOffAmount
(
vo
.
getReceivableTotalAmount
().
subtract
(
vo
.
getWriteOffAmount
()));
});
});
...
@@ -441,6 +465,23 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
...
@@ -441,6 +465,23 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
if
(
CollectionUtil
.
isNotEmpty
(
records
))
{
if
(
CollectionUtil
.
isNotEmpty
(
records
))
{
records
.
forEach
(
vo
->
{
records
.
forEach
(
vo
->
{
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setNotIncludedTaxAmount
(
vo
.
getTotalAmount
());
if
(
vo
.
getDiscountTotal
()
==
null
)
{
vo
.
setDiscountTotal
(
BigDecimal
.
ZERO
);
}
vo
.
setReceivableTotalAmount
(
vo
.
getTaxAmount
().
subtract
(
vo
.
getDiscountTotal
()));
if
(
vo
.
getWriteOffAmount
()
==
null
)
{
vo
.
setWriteOffAmount
(
BigDecimal
.
ZERO
);
}
vo
.
setNotWriteOffAmount
(
vo
.
getReceivableTotalAmount
().
subtract
(
vo
.
getWriteOffAmount
()));
vo
.
setWriteOffProportion
(
vo
.
getWriteOffAmount
().
divide
(
vo
.
getReceivableTotalAmount
(),
4
,
BigDecimal
.
ROUND_HALF_UP
).
toString
()
+
"%"
);
RegionDTO
regionCity
=
regionApi
.
getRegionById
(
vo
.
getDestinationCity
().
longValue
());
vo
.
setDestinationCityZh
(
regionCity
.
getTitleZh
());
vo
.
setDestinationCityEn
(
regionCity
.
getTitleEn
());
RegionDTO
regionCountry
=
regionApi
.
getRegionById
(
vo
.
getDestinationCountry
().
longValue
());
vo
.
setDestinationCountryZh
(
regionCountry
.
getTitleZh
());
vo
.
setDestinationCountryEn
(
regionCountry
.
getTitleEn
());
});
});
return
voBuilder
return
voBuilder
.
list
(
records
)
.
list
(
records
)
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/CostDetailPageVO.java
View file @
9e33546a
...
@@ -92,10 +92,16 @@ public class CostDetailPageVO {
...
@@ -92,10 +92,16 @@ public class CostDetailPageVO {
@ApiModelProperty
(
value
=
"含税金额"
)
@ApiModelProperty
(
value
=
"含税金额"
)
private
BigDecimal
taxAmount
;
private
BigDecimal
taxAmount
;
@ApiModelProperty
(
value
=
"不含税金额"
)
private
BigDecimal
notIncludedTaxAmount
;
@ExcelProperty
(
"优惠金额"
)
@ExcelProperty
(
"优惠金额"
)
@ApiModelProperty
(
value
=
"优惠金额"
)
@ApiModelProperty
(
value
=
"优惠金额"
)
private
BigDecimal
discountTotal
;
private
BigDecimal
discountTotal
;
@ApiModelProperty
(
value
=
"实际金额"
)
private
BigDecimal
receivableTotalAmount
;
@ExcelProperty
(
"收款状态(0未收款,1收款中,2已收款)"
)
@ExcelProperty
(
"收款状态(0未收款,1收款中,2已收款)"
)
@ApiModelProperty
(
value
=
"收款状态(0未收款,1收款中,2已收款)"
)
@ApiModelProperty
(
value
=
"收款状态(0未收款,1收款中,2已收款)"
)
private
Integer
state
;
private
Integer
state
;
...
@@ -131,14 +137,32 @@ public class CostDetailPageVO {
...
@@ -131,14 +137,32 @@ public class CostDetailPageVO {
@ApiModelProperty
(
value
=
"目的仓英文"
)
@ApiModelProperty
(
value
=
"目的仓英文"
)
private
String
objectiveWarehouseEn
;
private
String
objectiveWarehouseEn
;
@ApiModelProperty
(
value
=
"目的国家"
)
private
Integer
destinationCountry
;
@ApiModelProperty
(
value
=
"目的国家中文"
)
private
String
destinationCountryZh
;
@ApiModelProperty
(
value
=
"目的国家英文"
)
private
String
destinationCountryEn
;
@ApiModelProperty
(
value
=
"目的城市"
)
private
Integer
destinationCity
;
@ApiModelProperty
(
value
=
"目的城市中文"
)
private
String
destinationCityZh
;
@ApiModelProperty
(
value
=
"目的城市英文"
)
private
String
destinationCityEn
;
@ApiModelProperty
(
value
=
"费用来源:1 订单计算 2 费用申请 3 特需费用"
)
@ApiModelProperty
(
value
=
"费用来源:1 订单计算 2 费用申请 3 特需费用"
)
private
Integer
feeSource
;
private
Integer
feeSource
;
@ApiModelProperty
(
value
=
"核销金额"
)
@ApiModelProperty
(
value
=
"核销金额"
)
private
BigDecimal
writeOffAmount
;
private
BigDecimal
writeOffAmount
;
@ApiModelProperty
(
value
=
"未核销金额"
)
private
BigDecimal
notWriteOffAmount
;
@ApiModelProperty
(
value
=
"核销比例"
)
@ApiModelProperty
(
value
=
"核销比例"
)
private
BigDecimal
writeOffProportion
;
private
String
writeOffProportion
;
@ApiModelProperty
(
value
=
"更新时间"
)
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
private
Date
updateTime
;
...
...
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receivable/ReceivableMapper.xml
View file @
9e33546a
...
@@ -10,18 +10,16 @@
...
@@ -10,18 +10,16 @@
o.channel_id,
o.channel_id,
de.departure_warehouse_id,
de.departure_warehouse_id,
ob.objective_warehouse_id,
ob.objective_warehouse_id,
er.receipt_no,
er.write_off_proportion,
er.write_off_amount,
dew.title_zh departure_warehouse_zh,
dew.title_zh departure_warehouse_zh,
dew.title_en departure_warehouse_en,
dew.title_en departure_warehouse_en,
obw.title_zh objective_warehouse_zh,
obw.title_zh objective_warehouse_zh,
obw.title_en objective_warehouse_en
obw.title_en objective_warehouse_en,
obw.guojia destination_country,
obw.shi destination_city
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
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
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
LEFT JOIN ecw_receipt er ON r.receipt_id = er.id
LEFT JOIN ecw_warehouse dew ON de.departure_warehouse_id = dew.id
LEFT JOIN ecw_warehouse dew ON de.departure_warehouse_id = dew.id
LEFT JOIN ecw_warehouse obw ON ob.objective_warehouse_id = obw.id
LEFT JOIN ecw_warehouse obw ON ob.objective_warehouse_id = obw.id
WHERE
WHERE
...
@@ -31,22 +29,25 @@
...
@@ -31,22 +29,25 @@
</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
er.currency_id,
r.currency_id,
SUM(er.receivable_total_amount) AS receivable_total_amount,
SUM(r.total_amount) AS total_amount,
SUM(er.write_off_amount) AS write_off_amount
SUM(r.tax_amount) AS tax_amount,
SUM(r.discount_total) AS discount_total,
SUM(r.write_off_amount) AS write_off_amount
FROM ecw_receivable r
FROM ecw_receivable r
<if
test=
"query.transportId != null or query.shipmentChannel != null"
>
LEFT JOIN ecw_order o ON o.order_id = r.order_id
</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
</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
</if>
</if>
LEFT JOIN ecw_receipt er ON r.receipt_id = er.id
WHERE
WHERE
r.deleted = 0
r.deleted = 0
AND er.currency_id IS NOT NULL
<include
refid=
"costDetailPageCondition"
/>
<include
refid=
"costDetailPageCondition"
/>
GROUP BY
e
r.currency_id
GROUP BY r.currency_id
</select>
</select>
<sql
id=
"costDetailPageCondition"
>
<sql
id=
"costDetailPageCondition"
>
...
@@ -54,14 +55,14 @@
...
@@ -54,14 +55,14 @@
AND r.order_no = #{query.orderNo}
AND r.order_no = #{query.orderNo}
</if>
</if>
<if
test=
"query.transportId != null"
>
<if
test=
"query.transportId != null"
>
AND
r
.transport_id = #{query.transportId}
AND
o
.transport_id = #{query.transportId}
</if>
</if>
<if
test=
"query.shipmentChannel != null"
>
<if
test=
"query.shipmentChannel != null"
>
<if
test=
"query.shipmentChannel.size() == 1"
>
<if
test=
"query.shipmentChannel.size() == 1"
>
AND
r.shipment_channel
= #{query.shipmentChannel[0]}
AND
o.channel_id
= #{query.shipmentChannel[0]}
</if>
</if>
<if
test=
"query.shipmentChannel.size() > 1"
>
<if
test=
"query.shipmentChannel.size() > 1"
>
AND
r.shipment_channel
IN
AND
o.channel_id
IN
<foreach
collection=
"query.shipmentChannel"
item=
"item"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"query.shipmentChannel"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
...
@@ -138,7 +139,7 @@
...
@@ -138,7 +139,7 @@
</if>
</if>
<if
test=
"query.collectionType != null"
>
<if
test=
"query.collectionType != null"
>
<if
test=
"query.collectionType.size() == 1"
>
<if
test=
"query.collectionType.size() == 1"
>
AND r.collection_type = #{query.
fee
Type[0]}
AND r.collection_type = #{query.
collection
Type[0]}
</if>
</if>
<if
test=
"query.collectionType.size() > 1"
>
<if
test=
"query.collectionType.size() > 1"
>
AND r.collection_type IN
AND r.collection_type IN
...
@@ -237,18 +238,15 @@
...
@@ -237,18 +238,15 @@
<select
id=
"costDetailAmount"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receivable.WealthMoneyAmountVO"
>
<select
id=
"costDetailAmount"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receivable.WealthMoneyAmountVO"
>
SELECT
SELECT
e
r.currency_id,
r.currency_id,
SUM(r.total_amount) AS total_amount,
SUM(r.total_amount) AS total_amount,
SUM(r.tax_amount) AS tax_amount,
SUM(r.tax_amount) AS tax_amount,
SUM(r.discount_total) AS discount_total,
SUM(r.discount_total) AS discount_total,
SUM(er.receivable_total_amount) AS receivable_total_amount,
SUM(r.write_off_amount) AS write_off_amount
SUM(er.write_off_amount) AS write_off_amount
FROM ecw_receivable r
FROM ecw_receivable r
LEFT JOIN ecw_receipt er ON r.receipt_id = er.id
WHERE
WHERE
r.deleted = 0
r.deleted = 0
AND er.currency_id IS NOT NULL
GROUP BY r.currency_id
GROUP BY er.currency_id
</select>
</select>
<select
id=
"batchGenReceiptPage"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receivable.BatchGenReceiptPageVO"
>
<select
id=
"batchGenReceiptPage"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receivable.BatchGenReceiptPageVO"
>
SELECT
SELECT
...
...
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