Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
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
bltdc
dc-cost-system
Commits
71e36dfb
Commit
71e36dfb
authored
Nov 05, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ef7a363c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
27 deletions
+39
-27
CostApiController.java
...m/blt/other/module/cost/controller/CostApiController.java
+26
-18
CostDao.java
.../src/main/java/com/blt/other/module/cost/dao/CostDao.java
+5
-4
CostApiService.java
...ava/com/blt/other/module/cost/service/CostApiService.java
+4
-2
CostApiServiceImpl.java
...lt/other/module/cost/service/impl/CostApiServiceImpl.java
+4
-3
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostApiController.java
View file @
71e36dfb
...
...
@@ -9,6 +9,7 @@ import com.bailuntec.cost.api.response.CostResult;
import
com.blt.other.module.cost.service.CostApiService
;
import
com.blt.other.module.database.model.CostDomain
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.SneakyThrows
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -17,6 +18,8 @@ import org.springframework.web.bind.annotation.*;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -75,6 +78,7 @@ public class CostApiController implements CostApi {
}
@SneakyThrows
@ApiOperation
(
"查询所有的费用单和采购单"
)
@Override
@GetMapping
(
"/manageCostList"
)
...
...
@@ -87,18 +91,21 @@ public class CostApiController implements CostApi {
@RequestParam
(
name
=
"departmentName"
,
required
=
false
)
String
departmentName
,
@RequestParam
(
name
=
"createUserId"
,
required
=
false
)
Integer
createUserId
,
@RequestParam
(
name
=
"payUserId"
,
required
=
false
)
Integer
payUserId
)
{
try
{
if
(!
StringUtils
.
isEmpty
(
departmentName
))
{
departmentName
=
departmentName
.
toLowerCase
();
}
List
<
ManageCostDto
>
manageCostDtoList
=
costApiService
.
getMangeCostList
(
startDateStr
,
endDateStr
,
feeSuperType
,
feeSubType
,
companyValue
,
companyName
,
departmentName
,
createUserId
,
payUserId
);
return
CostResult
.
success
(
manageCostDtoList
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
CostResult
.
error
();
if
(!
StringUtils
.
isEmpty
(
departmentName
))
{
departmentName
=
departmentName
.
toLowerCase
();
}
DateTimeFormatter
df
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
LocalDateTime
startDate
=
LocalDateTime
.
parse
(
startDateStr
,
df
);
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
endDateStr
,
df
);
List
<
ManageCostDto
>
manageCostDtoList
=
costApiService
.
getMangeCostList
(
startDate
,
endDate
,
feeSuperType
,
feeSubType
,
companyValue
,
companyName
,
departmentName
,
createUserId
,
payUserId
);
return
CostResult
.
success
(
manageCostDtoList
);
}
@SneakyThrows
@ApiOperation
(
"查询所有的物流费用单和采购单"
)
@Override
@GetMapping
(
"/logisticsCostList"
)
...
...
@@ -111,16 +118,17 @@ public class CostApiController implements CostApi {
@RequestParam
(
name
=
"departmentName"
,
required
=
false
)
String
departmentName
,
@RequestParam
(
name
=
"createUserId"
,
required
=
false
)
Integer
createUserId
,
@RequestParam
(
name
=
"payUserId"
,
required
=
false
)
Integer
payUserId
)
{
try
{
if
(!
StringUtils
.
isEmpty
(
departmentName
))
{
departmentName
=
departmentName
.
toLowerCase
();
}
List
<
ManageCostDto
>
manageCostDtoList
=
costApiService
.
getLogisticsCostList
(
startDateStr
,
endDateStr
,
feeSuperType
,
feeSubType
,
companyValue
,
companyName
,
departmentName
,
createUserId
,
payUserId
);
return
CostResult
.
success
(
manageCostDtoList
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
CostResult
.
error
();
if
(!
StringUtils
.
isEmpty
(
departmentName
))
{
departmentName
=
departmentName
.
toLowerCase
();
}
DateTimeFormatter
df
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
LocalDateTime
startDate
=
LocalDateTime
.
parse
(
startDateStr
,
df
);
LocalDateTime
endDate
=
LocalDateTime
.
parse
(
endDateStr
,
df
);
List
<
ManageCostDto
>
manageCostDtoList
=
costApiService
.
getLogisticsCostList
(
startDate
,
endDate
,
feeSuperType
,
feeSubType
,
companyValue
,
companyName
,
departmentName
,
createUserId
,
payUserId
);
return
CostResult
.
success
(
manageCostDtoList
);
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dao/CostDao.java
View file @
71e36dfb
...
...
@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -101,8 +102,8 @@ public interface CostDao {
* @param payUserId payUserId
* @return
*/
List
<
ManageCostDto
>
selectManageCost
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
List
<
ManageCostDto
>
selectManageCost
(
@Param
(
"startDate"
)
LocalDateTime
startDate
,
@Param
(
"endDate"
)
LocalDateTime
endDate
,
@Param
(
"feeSuperType"
)
String
feeSuperType
,
@Param
(
"feeSubType"
)
String
feeSubType
,
@Param
(
"companyValueList"
)
List
<
Integer
>
companyValueList
,
...
...
@@ -127,8 +128,8 @@ public interface CostDao {
* @param payUserId payUserId
* @return
*/
List
<
ManageCostDto
>
getLogisticsCostList
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
List
<
ManageCostDto
>
getLogisticsCostList
(
@Param
(
"startDate"
)
LocalDateTime
startDate
,
@Param
(
"endDate"
)
LocalDateTime
endDate
,
@Param
(
"feeSuperType"
)
String
feeSuperType
,
@Param
(
"feeSubType"
)
String
feeSubType
,
@Param
(
"companyValueList"
)
List
<
Integer
>
companyValueList
,
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/CostApiService.java
View file @
71e36dfb
...
...
@@ -5,8 +5,10 @@ import com.bailuntec.cost.api.dto.LogisticsCostDto;
import
com.bailuntec.cost.api.dto.ManageCostDto
;
import
com.bailuntec.cost.api.dto.WageCostDto
;
import
com.blt.other.module.database.model.CostDomain
;
import
org.springframework.cglib.core.Local
;
import
java.io.IOException
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -36,7 +38,7 @@ public interface CostApiService {
* @param payUserId 支付用户id
* @return 单据
*/
List
<
ManageCostDto
>
getMangeCostList
(
String
startDateStr
,
String
endDateStr
,
String
feeSuperType
,
String
feeSubType
,
Integer
companyValue
,
String
companyName
,
String
departmentName
,
Integer
createUserId
,
Integer
payUserId
)
throws
Exception
;
List
<
ManageCostDto
>
getMangeCostList
(
LocalDateTime
startDateStr
,
LocalDateTime
endDateStr
,
String
feeSuperType
,
String
feeSubType
,
Integer
companyValue
,
String
companyName
,
String
departmentName
,
Integer
createUserId
,
Integer
payUserId
)
throws
Exception
;
/**
...
...
@@ -55,7 +57,7 @@ public interface CostApiService {
* @param payUserId 支付用户id
* @return 单据
*/
List
<
ManageCostDto
>
getLogisticsCostList
(
String
startDateStr
,
String
endDateStr
,
String
feeSuperType
,
String
feeSubType
,
Integer
companyValue
,
String
companyName
,
String
departmentName
,
Integer
createUserId
,
Integer
payUserId
)
throws
Exception
;
List
<
ManageCostDto
>
getLogisticsCostList
(
LocalDateTime
startDateS
,
LocalDateTime
endDateStr
,
String
feeSuperType
,
String
feeSubType
,
Integer
companyValue
,
String
companyName
,
String
departmentName
,
Integer
createUserId
,
Integer
payUserId
)
throws
Exception
;
/**
* 查询资产负债表相关费用单
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/CostApiServiceImpl.java
View file @
71e36dfb
...
...
@@ -25,6 +25,7 @@ import javax.annotation.Resource;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -149,8 +150,8 @@ public class CostApiServiceImpl implements CostApiService {
}
@Override
public
List
<
ManageCostDto
>
getMangeCostList
(
String
startDateStr
,
String
endDateStr
,
public
List
<
ManageCostDto
>
getMangeCostList
(
LocalDateTime
startDateStr
,
LocalDateTime
endDateStr
,
String
feeSuperType
,
String
feeSubType
,
Integer
companyValue
,
...
...
@@ -221,7 +222,7 @@ public class CostApiServiceImpl implements CostApiService {
}
@Override
public
List
<
ManageCostDto
>
getLogisticsCostList
(
String
startDateStr
,
String
endDateStr
,
String
feeSuperType
,
String
feeSubType
,
Integer
companyValue
,
String
companyName
,
String
departmentName
,
Integer
createUserId
,
Integer
payUserId
)
throws
Exception
{
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
);
...
...
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