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
7d3d1256
Commit
7d3d1256
authored
Jan 25, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# update
parent
fe89a9f5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
9 deletions
+22
-9
CostController.java
.../com/blt/other/module/cost/controller/CostController.java
+0
-3
AppCostServiceImpl.java
...lt/other/module/cost/service/impl/AppCostServiceImpl.java
+15
-0
CostExportServiceImpl.java
...other/module/cost/service/impl/CostExportServiceImpl.java
+7
-6
No files found.
cost-service/src/main/java/com/blt/other/module/cost/controller/CostController.java
View file @
7d3d1256
...
...
@@ -94,7 +94,6 @@ public class CostController {
searchKeysVo
.
getParams
().
getKeys
().
setIsLend
(
2
);
}
return
costListSearchService
.
searchByKeys
(
searchKeysVo
);
}
@ApiOperation
(
"获取借支单列表"
)
...
...
@@ -143,7 +142,6 @@ public class CostController {
return
resp
;
}
@ApiOperation
(
"修改费用单信息"
)
@PostMapping
({
"reset/resetFile"
,
"reset/resetNoFile"
})
public
UpdateCostResp
resetFile
(
@RequestBody
CostDomain
costDomain
)
{
...
...
@@ -154,7 +152,6 @@ public class CostController {
return
resp
;
}
@ApiOperation
(
"提交费用单"
)
@PostMapping
(
"submitAudit"
)
public
UpdateCostResp
submitAudit
(
@RequestParam
String
costNo
)
{
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/AppCostServiceImpl.java
View file @
7d3d1256
...
...
@@ -18,6 +18,7 @@ import com.blt.other.module.cost.service.impl.costcheck.*;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
/**
* <p>
...
...
@@ -97,4 +98,18 @@ public class AppCostServiceImpl implements AppCostService {
throw
new
BizRuntimeException
(
"invalid cost status"
);
}
}
public
static
BigDecimal
rece
(
BigDecimal
amount
,
int
months
)
{
if
(
months
>
1
)
{
return
rece
(
amount
.
add
(
new
BigDecimal
(
"10000"
)).
multiply
(
new
BigDecimal
(
"1.1"
)),
months
-
1
);
}
else
{
return
amount
.
add
(
new
BigDecimal
(
"10000"
)).
multiply
(
new
BigDecimal
(
"1.1"
));
}
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
rece
(
new
BigDecimal
(
"50000"
),
12
));
}
}
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostExportServiceImpl.java
View file @
7d3d1256
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
import
com.b
lt.other.module.auth.dao.UserDa
o
;
import
com.b
ailuntec.cost.api.dto.CostDt
o
;
import
com.blt.other.common.util.PathUtil
;
import
com.blt.other.database.model.CostExpDomain
;
import
com.blt.other.database.model.UserDomain
;
import
com.blt.other.module.auth.dao.UserDao
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.dao.CostDetailDao
;
import
com.blt.other.module.cost.dao.CostExpDao
;
import
com.b
ailuntec.cost.api.dto.CostDto
;
import
com.b
lt.other.module.cost.model.CostDetailDomain
;
import
com.blt.other.module.cost.service.CostDetailService
;
import
com.blt.other.module.cost.service.CostExportService
;
import
com.blt.other.module.cost.service.CostService
;
import
com.blt.other.module.cost.vo.CostExportVo
;
import
com.blt.other.module.cost.model.CostDetailDomain
;
import
com.blt.other.database.model.CostExpDomain
;
import
com.blt.other.database.model.UserDomain
;
import
org.apache.poi.hssf.usermodel.*
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -53,7 +53,7 @@ public class CostExportServiceImpl implements CostExportService {
}
// 设置表头
String
[]
headers
=
{
"费用单号"
,
"费用类型"
,
"费用单大类"
,
"费用单小类"
,
"费用单状态"
,
"借支/借还"
,
"关联借支单号"
,
"借支单状态"
,
"是否抵个税"
,
"付款主体"
,
"收款单位"
,
"付款理由"
,
"付款金额"
,
"币种"
,
"创建人名称"
,
"下单时间"
,
"用途"
,
"付款时间"
,
"发票状态"
,
"项目"
,
"客户编号"
};
,
"项目"
,
"客户编号"
,
"会计科目"
};
HSSFRow
row0
=
sheet
.
createRow
(
0
);
for
(
int
i
=
0
;
i
<
headers
.
length
;
i
++)
{
HSSFCell
cell
=
row0
.
createCell
(
i
);
...
...
@@ -116,6 +116,7 @@ public class CostExportServiceImpl implements CostExportService {
}
row
.
createCell
(
19
).
setCellValue
(
costDto
.
getProjectType
());
row
.
createCell
(
20
).
setCellValue
(
costDto
.
getCustomerNum
());
row
.
createCell
(
21
).
setCellValue
(
costDto
.
getAccountingSubjectName
());
rows
++;
}
// 保存到本地,并且返回路径
...
...
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