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
97cb0f3a
Commit
97cb0f3a
authored
Mar 03, 2020
by
yinyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增费用大类管理成本判断
parent
7a50c5d3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
4 deletions
+45
-4
CostTypeController.java
...m/blt/other/other_cost/controller/CostTypeController.java
+10
-4
CostTypeDao.java
...c/main/java/com/blt/other/other_cost/dao/CostTypeDao.java
+5
-0
CostTypeService.java
...ava/com/blt/other/other_cost/service/CostTypeService.java
+5
-0
CostTypeServiceImpl.java
...lt/other/other_cost/service/impl/CostTypeServiceImpl.java
+11
-0
CostTypeMapper.xml
cost-core/src/main/resources/mapper/CostTypeMapper.xml
+14
-0
No files found.
cost-core/src/main/java/com/blt/other/other_cost/controller/CostTypeController.java
View file @
97cb0f3a
...
...
@@ -6,10 +6,7 @@ import com.blt.other.other_cost.dto.CostTypeKindDto;
import
com.blt.other.other_cost.service.CostCompanyService
;
import
com.blt.other.other_cost.service.CostTypeKindService
;
import
com.blt.other.other_cost.service.CostTypeService
;
import
com.blt.other.other_database.model.CostCompanyDomain
;
import
com.blt.other.other_database.model.CostTypeDomain
;
import
com.blt.other.other_database.model.CostTypeKindDomain
;
import
com.blt.other.other_database.model.LogisticsSupplierBankDomain
;
import
com.blt.other.other_database.model.*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -41,6 +38,8 @@ public class CostTypeController {
@Autowired
private
CostTypeService
costTypeService
;
@Value
(
"${costTypeKind.logisticsSubjectCode}"
)
private
String
logisticsSubjectCode
;
//物流科目编号
...
...
@@ -97,6 +96,13 @@ public class CostTypeController {
String
companyNo
=
request
.
getParameter
(
"companyNo"
);
String
typeName
=
request
.
getParameter
(
"typeName"
);
String
subjectCode
=
request
.
getParameter
(
"subjectCode"
);
boolean
ismanage
=
Boolean
.
valueOf
(
request
.
getParameter
(
"ismanage"
));
if
(
ismanage
)
{
TypeRelationDomain
typeRelationDomain
=
costTypeService
.
getTyeRelation
(
typeName
);
if
(
typeRelationDomain
==
null
)
{
costTypeService
.
insertTypeRalation
(
typeName
);
}
}
// String costFormStr = request.getParameter("costForm");
// Integer costForm = null;
// try {
...
...
cost-core/src/main/java/com/blt/other/other_cost/dao/CostTypeDao.java
View file @
97cb0f3a
package
com
.
blt
.
other
.
other_cost
.
dao
;
import
com.blt.other.other_database.model.TypeRelationDomain
;
import
com.blt.other.other_database.model.CostTypeDomain
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -47,4 +48,8 @@ public interface CostTypeDao {
CostTypeDomain
selectByCompanyNameAndTypeName
(
@Param
(
"companyName"
)
String
companyName
,
@Param
(
"typeName"
)
String
typeName
);
CostTypeDomain
selectByCompanyNoAndTypeNameAndCostForm
(
CostTypeDomain
costTypeDomain
);
TypeRelationDomain
getTyeRelation
(
@Param
(
"typeName"
)
String
typeName
);
Integer
insertTypeRalation
(
@Param
(
"typeName"
)
String
typeName
);
}
cost-core/src/main/java/com/blt/other/other_cost/service/CostTypeService.java
View file @
97cb0f3a
package
com
.
blt
.
other
.
other_cost
.
service
;
import
com.blt.other.other_cost.dto.CostTypeDto
;
import
com.blt.other.other_database.model.TypeRelationDomain
;
import
com.blt.other.other_database.model.CostTypeDomain
;
import
java.util.List
;
...
...
@@ -29,4 +30,8 @@ public interface CostTypeService {
CostTypeDto
domainToDto
(
CostTypeDomain
costTypeDomain
);
CostTypeDomain
getByTypeNo
(
String
typeNo
);
TypeRelationDomain
getTyeRelation
(
String
typeName
);
Integer
insertTypeRalation
(
String
typeName
);
}
cost-core/src/main/java/com/blt/other/other_cost/service/impl/CostTypeServiceImpl.java
View file @
97cb0f3a
...
...
@@ -3,6 +3,7 @@ package com.blt.other.other_cost.service.impl;
import
com.blt.other.other_cost.dao.CostCompanyDao
;
import
com.blt.other.other_cost.dao.CostTypeDao
;
import
com.blt.other.other_cost.dto.CostTypeDto
;
import
com.blt.other.other_database.model.TypeRelationDomain
;
import
com.blt.other.other_cost.service.CostTypeService
;
import
com.blt.other.other_database.mapper.StatusMapper
;
import
com.blt.other.other_database.model.CostCompanyDomain
;
...
...
@@ -88,6 +89,16 @@ public class CostTypeServiceImpl implements CostTypeService {
return
costTypeDao
.
selectByTypeNo
(
typeNo
);
}
@Override
public
TypeRelationDomain
getTyeRelation
(
String
typeName
)
{
return
costTypeDao
.
getTyeRelation
(
typeName
);
}
@Override
public
Integer
insertTypeRalation
(
String
typeName
)
{
return
costTypeDao
.
insertTypeRalation
(
typeName
);
}
public
Integer
doInsert
(
CostTypeDomain
ctd
){
// 获取 companyName
CostCompanyDomain
companyDomain
=
costCompanyDao
.
selectByNo
(
ctd
.
getCompanyNo
());
...
...
cost-core/src/main/resources/mapper/CostTypeMapper.xml
View file @
97cb0f3a
...
...
@@ -71,4 +71,17 @@
AND
type_name = #{typeName}
</select>
<select
id=
"getTyeRelation"
resultType=
"com.blt.other.other_database.model.TypeRelationDomain"
>
select
*
from
type_relation
where fee_type = #{typeName} limit 1
</select>
<insert
id=
"insertTypeRalation"
>
insert into type_relation(manage_cost_type, fee_type)
value(#{typeName}, #{typeName})
</insert>
</mapper>
\ No newline at end of file
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