Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-cost
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
huluobin
bailuntec-cost
Commits
6a3d971f
Commit
6a3d971f
authored
Jan 13, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 费用系统master 过期方法删除
parent
9cb85350
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
157 deletions
+0
-157
CostApiService.java
...ava/com/blt/other/module/cost/service/CostApiService.java
+0
-49
CostApiServiceImpl.java
...lt/other/module/cost/service/impl/CostApiServiceImpl.java
+0
-108
No files found.
cost-service/src/main/java/com/blt/other/module/cost/service/CostApiService.java
View file @
6a3d971f
...
@@ -2,13 +2,10 @@ package com.blt.other.module.cost.service;
...
@@ -2,13 +2,10 @@ package com.blt.other.module.cost.service;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.bailuntec.cost.api.dto.LogisticsCostDto
;
import
com.bailuntec.cost.api.dto.LogisticsCostDto
;
import
com.bailuntec.cost.api.dto.ManageCostDto
;
import
com.bailuntec.cost.api.dto.WageCostDto
;
import
com.bailuntec.cost.api.dto.WageCostDto
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.model.CostDomain
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
public
interface
CostApiService
{
public
interface
CostApiService
{
...
@@ -23,52 +20,6 @@ public interface CostApiService {
...
@@ -23,52 +20,6 @@ public interface CostApiService {
/**
/**
* <p>
* <p>
* 查询所有的费用单和采购单
* </p>
*
* @param startDateStr 开始时间
* @param endDateStr 开始时间
* @param feeSuperType 大类
* @param feeSubType 小类
* @param companyValue 公司主体value
* @param companyName 主体名称
* @param departmentName 部门
* @param createUserId 创建用户id
* @param payUserId 支付用户id
* @return 单据
*/
List
<
ManageCostDto
>
getMangeCostList
(
LocalDateTime
startDateStr
,
LocalDateTime
endDateStr
,
String
feeSuperType
,
String
feeSubType
,
Integer
companyValue
,
String
companyName
,
String
departmentName
,
Integer
createUserId
,
Integer
payUserId
)
throws
Exception
;
/**
* <p>
* 查询所有的物流的费用单和采购单
* </p>
*
* @param startDateStr 开始时间
* @param endDateStr 开始时间
* @param feeSuperType 大类
* @param feeSubType 小类
* @param companyValue 公司主体value
* @param companyName 主体名称
* @param departmentName 部门
* @param createUserId 创建用户id
* @param payUserId 支付用户id
* @return 单据
*/
List
<
ManageCostDto
>
getLogisticsCostList
(
LocalDateTime
startDateStr
,
LocalDateTime
endDateStr
,
String
feeSuperType
,
String
feeSubType
,
Integer
companyValue
,
String
companyName
,
String
departmentName
,
Integer
createUserId
,
Integer
payUserId
)
throws
Exception
;
/**
* 查询资产负债表相关费用单
*
* @param startDate
* @param endDate
* @return
*/
List
<
CostDomain
>
getBalanceSheetCost
(
Date
startDate
,
Date
endDate
);
/**
* <p>
* 根据费用单号列表
* 根据费用单号列表
* 查询原来传输到数据中心时为待支付状态 变成 已支付状态后的费用单
* 查询原来传输到数据中心时为待支付状态 变成 已支付状态后的费用单
* </p>
* </p>
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostApiServiceImpl.java
View file @
6a3d971f
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.bailuntec.cost.api.dto.*
;
import
com.bailuntec.cost.api.dto.*
;
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
;
...
@@ -9,7 +8,6 @@ import com.blt.other.common.config.property.CostUrlProperties;
...
@@ -9,7 +8,6 @@ import com.blt.other.common.config.property.CostUrlProperties;
import
com.blt.other.common.config.property.ProjectConstant
;
import
com.blt.other.common.config.property.ProjectConstant
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.common.util.HttpUtil
;
import
com.blt.other.common.util.PathUtil
;
import
com.blt.other.common.util.PathUtil
;
import
com.blt.other.database.model.CostCompanyDomain
;
import
com.blt.other.database.model.CostCompanyDomain
;
import
com.blt.other.database.model.CostLogDomain
;
import
com.blt.other.database.model.CostLogDomain
;
...
@@ -35,9 +33,6 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -35,9 +33,6 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -155,108 +150,6 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -155,108 +150,6 @@ public class CostApiServiceImpl implements CostApiService {
}
}
@Override
@Override
public
List
<
ManageCostDto
>
getMangeCostList
(
LocalDateTime
startDateStr
,
LocalDateTime
endDateStr
,
String
feeSuperType
,
String
feeSubType
,
Integer
companyValue
,
String
companyName
,
String
departmentName
,
Integer
createUserId
,
Integer
payUserId
)
{
ArrayList
<
Integer
>
companyValueList
=
new
ArrayList
<>(
6
);
if
(
companyValue
!=
null
)
{
companyValueList
.
add
(
companyValue
);
if
(
companyValue
.
equals
(
53
))
{
companyValueList
.
add
(
50
);
companyValueList
.
add
(
59
);
companyValueList
.
add
(
60
);
companyValueList
.
add
(
61
);
companyValueList
.
add
(
66
);
companyValueList
.
add
(
78
);
companyValueList
.
add
(
72
);
companyValueList
.
add
(
71
);
companyValueList
.
add
(
67
);
companyValueList
.
add
(
58
);
companyValueList
.
add
(
64
);
companyValueList
.
add
(
46
);
}
}
List
<
ManageCostDto
>
manageCostDtoList
=
costDao
.
selectManageCost
(
startDateStr
,
endDateStr
,
feeSuperType
,
feeSubType
,
companyValueList
,
companyName
,
departmentName
,
createUserId
,
payUserId
);
if
(
manageCostDtoList
!=
null
&&
!
manageCostDtoList
.
isEmpty
())
{
for
(
ManageCostDto
manageCostDto
:
manageCostDtoList
)
{
if
(!
manageCostDto
.
getCurrency
().
equals
(
"CNY"
))
{
BigDecimal
exhcnageRate
=
CurUtils
.
getCur
(
manageCostDto
.
getCurrency
(),
"CNY"
);
manageCostDto
.
setAmountRmb
(
manageCostDto
.
getAmount
().
multiply
(
exhcnageRate
).
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
}
}
}
if
((
companyValue
==
null
||
companyValue
==
2
)
&&
((
feeSuperType
==
null
&&
departmentName
==
null
)
||
((
"耗材"
.
equals
(
feeSuperType
)
||
"耗材"
.
equals
(
feeSubType
))
&&
"采购部"
.
equals
(
departmentName
))
||
((
"耗材"
.
equals
(
feeSuperType
)
||
"耗材"
.
equals
(
feeSubType
))
&&
departmentName
==
null
)))
{
try
{
String
param
=
"?companymainvalue_from=40&isquestion=-1&orderType=-1&cashier_type=1&sourcecode=buy&order=asc&offset=0&limit=1000"
+
"&cashier_time_start="
+
startDateStr
+
"&cashier_time_end="
+
endDateStr
;
ConsumablesResultDto
consumablesResultDto
=
JSONObject
.
parseObject
(
HttpUtil
.
httpGet
(
costUrlProperties
.
getConsumablesApi
+
param
),
ConsumablesResultDto
.
class
);
if
(
consumablesResultDto
.
getTotal
()
>
0
&&
consumablesResultDto
.
getRows
().
size
()
>
0
)
{
for
(
ManageCostDto
manageCostDto
:
consumablesResultDto
.
getRows
())
{
manageCostDto
.
setReceiveUnit
(
"余江县酷乐电子用品店"
);
manageCostDto
.
setReason
(
"耗材"
);
manageCostDto
.
setManageCostType
(-
1
);
manageCostDto
.
setDepartmentName
(
"采购部"
);
manageCostDto
.
setCompanyValue
(
2
);
manageCostDto
.
setCompanyName
(
"香港百伦科技有限公司"
);
manageCostDto
.
setFeeSuperType
(
"耗材"
);
manageCostDto
.
setFeeSubType
(
"耗材"
);
if
(!
manageCostDto
.
getCurrency
().
equals
(
"CNY"
))
{
BigDecimal
exhcnageRate
=
CurUtils
.
getCur
(
manageCostDto
.
getCurrency
(),
"CNY"
);
manageCostDto
.
setAmountRmb
(
manageCostDto
.
getAmount
().
multiply
(
exhcnageRate
).
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
}
manageCostDtoList
.
add
(
manageCostDto
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
">>>>>获取耗材信息失败"
);
}
}
return
manageCostDtoList
;
}
@Override
public
List
<
ManageCostDto
>
getLogisticsCostList
(
LocalDateTime
startDateStr
,
LocalDateTime
endDateStr
,
String
feeSuperType
,
String
feeSubType
,
Integer
companyValue
,
String
companyName
,
String
departmentName
,
Integer
createUserId
,
Integer
payUserId
)
throws
Exception
{
ArrayList
<
Integer
>
companyValueList
=
new
ArrayList
<>(
6
);
if
(
companyValue
!=
null
)
{
companyValueList
.
add
(
companyValue
);
if
(
companyValue
.
equals
(
53
))
{
companyValueList
.
add
(
50
);
companyValueList
.
add
(
59
);
companyValueList
.
add
(
60
);
companyValueList
.
add
(
61
);
companyValueList
.
add
(
66
);
companyValueList
.
add
(
78
);
companyValueList
.
add
(
72
);
companyValueList
.
add
(
71
);
companyValueList
.
add
(
67
);
companyValueList
.
add
(
58
);
companyValueList
.
add
(
64
);
companyValueList
.
add
(
46
);
}
}
return
costDao
.
getLogisticsCostList
(
startDateStr
,
endDateStr
,
feeSuperType
,
feeSubType
,
companyValueList
,
companyName
,
departmentName
,
createUserId
,
payUserId
);
}
@Override
public
List
<
CostDomain
>
getBalanceSheetCost
(
Date
startDate
,
Date
endDate
)
{
return
costDao
.
selectBalanceSheetCost
(
startDate
,
endDate
);
}
@Override
public
List
<
CostDomain
>
getNoPayCost
(
List
<
String
>
costNoList
)
{
public
List
<
CostDomain
>
getNoPayCost
(
List
<
String
>
costNoList
)
{
return
costDao
.
selectList
(
new
LambdaQueryWrapper
<
CostDomain
>()
return
costDao
.
selectList
(
new
LambdaQueryWrapper
<
CostDomain
>()
.
eq
(
CostDomain:
:
getCostForm
,
CostDomain
.
COST_FROM_1
)
.
eq
(
CostDomain:
:
getCostForm
,
CostDomain
.
COST_FROM_1
)
...
@@ -264,7 +157,6 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -264,7 +157,6 @@ public class CostApiServiceImpl implements CostApiService {
.
in
(
CostDomain:
:
getCostNo
,
costNoList
));
.
in
(
CostDomain:
:
getCostNo
,
costNoList
));
}
}
@Override
@Override
public
CostDomain
getCostDetails
(
String
costNo
)
{
public
CostDomain
getCostDetails
(
String
costNo
)
{
return
costDao
.
selectByCostNo
(
costNo
);
return
costDao
.
selectByCostNo
(
costNo
);
...
...
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