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
6721e693
Commit
6721e693
authored
Jan 08, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
cb969661
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
2 deletions
+23
-2
CostTypeDao.java
.../main/java/com/blt/other/module/cost/dao/CostTypeDao.java
+5
-0
CostTypeServiceImpl.java
...t/other/module/cost/service/impl/CostTypeServiceImpl.java
+10
-0
CostTypeMapper.xml
...ec-cost-core/src/main/resources/mapper/CostTypeMapper.xml
+7
-0
OtherApplicationTests.java
...re/src/test/java/com/blt/other/OtherApplicationTests.java
+1
-2
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dao/CostTypeDao.java
View file @
6721e693
...
@@ -9,6 +9,9 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -9,6 +9,9 @@ import org.apache.ibatis.annotations.Mapper;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
@Mapper
@Repository
@Repository
public
interface
CostTypeDao
extends
BaseMapper
<
CostTypeDomain
>
{
public
interface
CostTypeDao
extends
BaseMapper
<
CostTypeDomain
>
{
...
@@ -28,4 +31,6 @@ public interface CostTypeDao extends BaseMapper<CostTypeDomain> {
...
@@ -28,4 +31,6 @@ public interface CostTypeDao extends BaseMapper<CostTypeDomain> {
//根据费用类型名称和类型查询
//根据费用类型名称和类型查询
CostTypeDomain
selectByNameAndType
(
@Param
(
"name"
)
String
name
,
@Param
(
"type"
)
Integer
type
);
CostTypeDomain
selectByNameAndType
(
@Param
(
"name"
)
String
name
,
@Param
(
"type"
)
Integer
type
);
List
<
CostTypeDomain
>
selectTestType
();
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/CostTypeServiceImpl.java
View file @
6721e693
...
@@ -40,6 +40,16 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
...
@@ -40,6 +40,16 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
costTypeDomain
.
setCostTemplateType
(
this
.
getCostTemplateType
(
req
.
getType
()));
costTypeDomain
.
setCostTemplateType
(
this
.
getCostTemplateType
(
req
.
getType
()));
this
.
save
(
costTypeDomain
);
this
.
save
(
costTypeDomain
);
if
(
req
.
getType
().
equals
(
1
))
{
CostTypeDomain
lendCostTypeDomain
=
new
CostTypeDomain
();
lendCostTypeDomain
.
setCostTemplateType
(
CostTypeDomain
.
borrow
);
lendCostTypeDomain
.
setAccountingSubjectNo
(
"1345912843756503041"
);
lendCostTypeDomain
.
setTypeNo
(
IdWorker
.
getIdStr
());
lendCostTypeDomain
.
setTypeName
(
req
.
getTypeName
());
lendCostTypeDomain
.
setDescription
(
req
.
getDescription
());
}
}
}
@Override
@Override
...
...
bailuntec-cost-core/src/main/resources/mapper/CostTypeMapper.xml
View file @
6721e693
...
@@ -71,5 +71,12 @@
...
@@ -71,5 +71,12 @@
where cost_template_type = #{type}
where cost_template_type = #{type}
and type_name = #{name}
and type_name = #{name}
</select>
</select>
<select
id=
"selectTestType"
resultType=
"com.blt.other.database.model.CostTypeDomain"
>
SELECT t1.* from cost_type t1
LEFT JOIN cost_type t2 on t1.type_name =t2.type_name and t2.cost_template_type = 2
where t1.cost_template_type = 9 and t2.id is null;
</select>
</mapper>
</mapper>
bailuntec-cost-core/src/test/java/com/blt/other/OtherApplicationTests.java
View file @
6721e693
...
@@ -364,8 +364,7 @@ public class OtherApplicationTests {
...
@@ -364,8 +364,7 @@ public class OtherApplicationTests {
@Rollback
(
value
=
false
)
@Rollback
(
value
=
false
)
@Test
@Test
public
void
testType
()
{
public
void
testType
()
{
costTypeDao
.
selectList
(
new
LambdaQueryWrapper
<
CostTypeDomain
>()
costTypeDao
.
selectTestType
()
.
eq
(
CostTypeDomain:
:
getCostTemplateType
,
CostTypeDomain
.
feeType
))
.
forEach
(
costTypeDomain
->
{
.
forEach
(
costTypeDomain
->
{
CostTypeDomain
item
=
new
CostTypeDomain
();
CostTypeDomain
item
=
new
CostTypeDomain
();
item
.
setCostTemplateType
(
CostTypeDomain
.
borrow
);
item
.
setCostTemplateType
(
CostTypeDomain
.
borrow
);
...
...
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