Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
765acaad
Commit
765acaad
authored
Aug 23, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
355c3d3e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
5 deletions
+32
-5
CompanyBaseBiz.java
...in/java/com/xxfc/platform/vehicle/biz/CompanyBaseBiz.java
+32
-5
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/CompanyBaseBiz.java
View file @
765acaad
...
...
@@ -10,12 +10,14 @@ import com.xxfc.platform.vehicle.mapper.CompanyBaseMapper;
import
com.xxfc.platform.vehicle.pojo.dto.CompanyBaseDetailDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.CompanyBaseVo
;
import
com.xxfc.platform.vehicle.pojo.vo.CompanyVo
;
import
groovyjarjarpicocli.CommandLine
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.genid.GenId
;
import
java.math.BigDecimal
;
import
java.util.List
;
...
...
@@ -28,6 +30,9 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
@Autowired
BranchCompanyStockRightBiz
stockRightBiz
;
@Autowired
BranchCompanyBiz
branchCompanyBiz
;
@Autowired
BranchCompanyStockInfoMapper
stockInfoMapper
;
...
...
@@ -96,14 +101,36 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
Integer
companyId
=
companyVo
.
getCompanyId
();
if
(
companyId
==
null
||
companyId
==
0
){
branchCompany
.
setId
(
null
);
insertSelective
(
companyBase
);
branchCompanyBiz
.
insertSelective
(
branchCompany
);
}
else
{
branchCompany
.
setId
(
companyId
);
updateSelectiveById
(
companyBase
);
branchCompanyBiz
.
updateSelectiveById
(
branchCompany
);
}
return
ObjectRestResponse
.
succ
();
}
public
ObjectRestResponse
getCompanyDetail
(
CompanyVo
companyVo
){
if
(
companyVo
==
null
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数不能为空"
);
}
Integer
companyBaseId
=
companyVo
.
getId
();
Integer
companyId
=
companyVo
.
getCompanyId
();
Integer
stockId
=
companyVo
.
getStockId
();
if
(
companyBaseId
!=
null
&&
companyBaseId
>
0
){
CompanyBase
companyBase
=
selectById
(
companyBaseId
);
BeanUtils
.
copyProperties
(
companyBase
,
companyVo
);
}
if
(
companyId
!=
null
&&
companyId
>
0
){
BranchCompany
branchCompany
=
branchCompanyBiz
.
selectById
(
companyId
);
BeanUtils
.
copyProperties
(
branchCompany
,
companyVo
);
}
if
(
stockId
!=
null
&&
stockId
>
0
){
BranchCompanyStockRight
stockRight
=
stockRightBiz
.
selectById
(
stockId
);
BeanUtils
.
copyProperties
(
stockRight
,
companyVo
);
}
return
ObjectRestResponse
.
succ
(
companyVo
);
}
//设置股权信息
public
ObjectRestResponse
updStockInfo
(
CompanyVo
companyVo
){
...
...
@@ -152,10 +179,10 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
Integer
companyId
=
companyVo
.
getCompanyId
();
if
(
companyId
==
null
||
companyId
==
0
){
branchCompany
.
setId
(
null
);
insertSelective
(
companyBase
);
branchCompanyBiz
.
insertSelective
(
branchCompany
);
}
else
{
branchCompany
.
setId
(
companyId
);
updateSelectiveById
(
companyBase
);
branchCompanyBiz
.
updateSelectiveById
(
branchCompany
);
}
return
ObjectRestResponse
.
succ
();
}
...
...
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