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
4c495fa0
Commit
4c495fa0
authored
Mar 06, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
5cdb9a3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
12 deletions
+53
-12
CostTypeDao.java
.../main/java/com/blt/other/module/cost/dao/CostTypeDao.java
+48
-7
CostTypeServiceImpl.java
...t/other/module/cost/service/impl/CostTypeServiceImpl.java
+3
-4
CostTypeMapper.xml
cost-service/src/main/resources/mapper/CostTypeMapper.xml
+2
-1
No files found.
cost-service/src/main/java/com/blt/other/module/cost/dao/CostTypeDao.java
View file @
4c495fa0
...
...
@@ -15,27 +15,68 @@ import java.util.List;
@Repository
public
interface
CostTypeDao
extends
BaseMapper
<
CostTypeDomain
>
{
//分页获取费用类型
/**
* 分页获取费用类型
*
* @param page page
* @param req req
* @return res
*/
IPage
<
CostTypeResult
>
queryPage
(
@Param
(
"page"
)
IPage
<
CostTypeResult
>
page
,
@Param
(
"req"
)
CostTypeBaseReq
req
);
//获取全部费用类型
/**
* 获取全部费用类型
*
* @param req req
* @return res
*/
List
<
CostTypeResult
>
queryAll
(
@Param
(
"req"
)
CostTypeBaseReq
req
);
//根据编号查
/**
* 根据编号查
*
* @param typeNo typeNo
* @return res
*/
CostTypeDomain
selectByNo
(
String
typeNo
);
//获取费用类型详情
/**
* 获取费用类型详情
*
* @param id id
* @return res
*/
CostTypeResult
queryDetail
(
Integer
id
);
//获取费用类型详情
/**
* 获取费用类型详情
*
* @param typeNo typeNo
* @return res
*/
CostTypeResult
queryByNo
(
String
typeNo
);
//根据费用类型名称和类型查询
/**
* 根据费用类型名称和类型查询
*
* @param name name
* @param type type
* @return res
*/
CostTypeDomain
selectByNameAndType
(
@Param
(
"name"
)
String
name
,
@Param
(
"type"
)
Integer
type
);
//
/**
* @return res
*/
List
<
CostTypeDomain
>
selectTestType
();
/**
* 根据类型名称和会计科目名称查询
*
* @param typeName
* @param accountSubjectName
* @return
*/
CostTypeDomain
selectByTypeNameAndAccountSubjectName
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"accountSubjectName"
)
String
accountSubjectName
);
}
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostTypeServiceImpl.java
View file @
4c495fa0
...
...
@@ -33,6 +33,9 @@ import java.time.LocalDateTime;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author robbendev
*/
@Service
@Slf4j
public
class
CostTypeServiceImpl
extends
ServiceImpl
<
CostTypeDao
,
CostTypeDomain
>
implements
CostTypeService
{
...
...
@@ -64,7 +67,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
costTypeDomain
.
setIsManageCost
(
req
.
getIsManageCost
());
costTypeDomain
.
setCostTemplateType
(
this
.
getCostTemplateType
(
req
.
getType
()));
costTypeDomain
.
setNsAccountingSubjectId
(
req
.
getNsAccountingSubjectId
());
this
.
save
(
costTypeDomain
);
...
...
@@ -79,7 +81,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
lendCostTypeDomain
.
setTypeName
(
req
.
getTypeName
());
lendCostTypeDomain
.
setDescription
(
req
.
getDescription
());
lendCostTypeDomain
.
setAccountingSubjectId
(
lendAccountingSubject
.
getId
());
lendCostTypeDomain
.
setNsAccountingSubjectId
(
req
.
getNsAccountingSubjectId
());
this
.
save
(
lendCostTypeDomain
);
}
...
...
@@ -104,7 +105,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
lendCostTypeDomain
.
setUpdateUser
(
oaUser
.
getUserName
());
lendCostTypeDomain
.
setLastUpdateTime
(
LocalDateTime
.
now
());
lendCostTypeDomain
.
setIsManageCost
(
req
.
getIsManageCost
());
lendCostTypeDomain
.
setNsAccountingSubjectId
(
req
.
getNsAccountingSubjectId
());
this
.
updateById
(
lendCostTypeDomain
);
}
...
...
@@ -115,7 +115,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
costTypeDomain
.
setDescription
(
req
.
getDescription
());
costTypeDomain
.
setUpdateUserId
(
oaUser
.
getOaUserId
());
costTypeDomain
.
setUpdateUser
(
oaUser
.
getUserName
());
costTypeDomain
.
setNsAccountingSubjectId
(
req
.
getNsAccountingSubjectId
());
if
(
req
.
getAccountingSubjectId
()
!=
null
)
{
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
req
.
getAccountingSubjectId
());
...
...
cost-service/src/main/resources/mapper/CostTypeMapper.xml
View file @
4c495fa0
...
...
@@ -24,7 +24,8 @@
t1.last_update_time,
t1.create_user_id,
t1.create_user,
t1.is_manage_cost
t1.is_manage_cost,
t2.ns_accounting_subject_id
from cost_type t1
left join accounting_subject t2 on t1.accounting_subject_id = t2.id
where t1.cost_template_type =#{req.costTemplateType}
...
...
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