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
c50d9178
Commit
c50d9178
authored
Aug 23, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hz_dev' into base-modify
parents
fcce217c
b863c77b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
5 deletions
+131
-5
CompanyVo.java
...ain/java/com/xxfc/platform/vehicle/pojo/vo/CompanyVo.java
+2
-1
CompanyBaseBiz.java
...in/java/com/xxfc/platform/vehicle/biz/CompanyBaseBiz.java
+23
-3
CompanyBaseMapper.java
...a/com/xxfc/platform/vehicle/mapper/CompanyBaseMapper.java
+5
-0
CompanyController.java
...m/xxfc/platform/vehicle/rest/admin/CompanyController.java
+47
-1
CompanyBaseMapper.xml
...le-server/src/main/resources/mapper/CompanyBaseMapper.xml
+54
-0
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/vo/CompanyVo.java
View file @
c50d9178
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
.
vo
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -9,7 +10,7 @@ import java.math.BigDecimal;
* 分公司信息
*/
@Data
public
class
CompanyVo
{
public
class
CompanyVo
extends
PageParam
{
/**
* 公司基本信息表
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/CompanyBaseBiz.java
View file @
c50d9178
...
...
@@ -4,21 +4,19 @@ package com.xxfc.platform.vehicle.biz;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.vehicle.entity.*
;
import
com.xxfc.platform.vehicle.mapper.BranchCompanyStockInfoMapper
;
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
;
...
...
@@ -109,6 +107,7 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
return
ObjectRestResponse
.
succ
();
}
//获取详情
public
ObjectRestResponse
getCompanyDetail
(
CompanyVo
companyVo
){
if
(
companyVo
==
null
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数不能为空"
);
...
...
@@ -186,6 +185,27 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
}
return
ObjectRestResponse
.
succ
();
}
public
ObjectRestResponse
delCompany
(
Integer
id
){
CompanyBase
companyBase
=
new
CompanyBase
();
companyBase
.
setId
(
id
);
companyBase
.
setIsDel
(
1
);
updateSelectiveById
(
companyBase
);
return
ObjectRestResponse
.
succ
();
}
public
ObjectRestResponse
getList
(
CompanyVo
companyVo
){
Integer
page
=
1
;
Integer
limit
=
10
;
if
(
companyVo
.
getPage
()!=
null
&&
companyVo
.
getPage
()>
0
){
page
=
companyVo
.
getPage
();
}
if
(
companyVo
.
getLimit
()!=
null
&&
companyVo
.
getLimit
()>
0
){
limit
=
companyVo
.
getLimit
();
}
return
ObjectRestResponse
.
succ
(
PageDataVO
.
pageInfo
(
page
,
limit
,
()->
mapper
.
getList
(
companyVo
)));
}
public
CompanyBaseVo
findCompanyDetailById
(
Integer
id
)
{
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/CompanyBaseMapper.java
View file @
c50d9178
...
...
@@ -3,12 +3,15 @@ package com.xxfc.platform.vehicle.mapper;
import
com.xxfc.platform.vehicle.entity.CompanyBase
;
import
com.xxfc.platform.vehicle.pojo.dto.CompanyBaseDetailDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.CompanyVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Result
;
import
org.apache.ibatis.annotations.Results
;
import
org.apache.ibatis.annotations.Select
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
public
interface
CompanyBaseMapper
extends
Mapper
<
CompanyBase
>
{
...
...
@@ -19,4 +22,6 @@ public interface CompanyBaseMapper extends Mapper<CompanyBase> {
@Result
(
property
=
"townName"
,
column
=
"addr_town"
)
})
CompanyBaseDetailDTO
findCompanyBaseById
(
@Param
(
"id"
)
Integer
id
);
List
<
CompanyBase
>
getList
(
CompanyVo
companyVo
);
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/CompanyController.java
View file @
c50d9178
...
...
@@ -13,6 +13,7 @@ import com.xxfc.platform.vehicle.entity.BranchCompanyStockApplyInfo;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyStockApplyVo
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyStockSearchVo
;
import
com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockInfoRightVo
;
import
com.xxfc.platform.vehicle.pojo.vo.CompanyVo
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -27,10 +28,55 @@ import javax.servlet.http.HttpServletRequest;
public
class
CompanyController
extends
BaseController
<
CompanyBaseBiz
>
{
@ApiOperation
(
"同步分公司信息"
)
@PostMapping
(
"synchro"
)
public
ObjectRestResponse
<
String
>
synchro
()
{
return
baseBiz
.
synchro
();
}
@ApiOperation
(
"查询公司列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
getList
(
CompanyVo
companyVo
){
return
baseBiz
.
getList
(
companyVo
);
}
@ApiOperation
(
"设置基础信息"
)
@RequestMapping
(
value
=
"/updCompany"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
updCompany
(
@RequestBody
CompanyVo
companyVo
){
return
baseBiz
.
updCompany
(
companyVo
);
}
@ApiOperation
(
"添加分公司"
)
@RequestMapping
(
value
=
"/addCompany"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
addCompany
(
@RequestBody
CompanyVo
companyVo
){
return
baseBiz
.
updCompany
(
companyVo
);
}
@ApiOperation
(
"获取详情"
)
@RequestMapping
(
value
=
"/getCompanyDetail"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
getCompanyDetail
(
CompanyVo
companyVo
){
return
baseBiz
.
getCompanyDetail
(
companyVo
);
}
@ApiOperation
(
"设置股权信息"
)
@RequestMapping
(
value
=
"/updStockInfo"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
updStockInfo
(
CompanyVo
companyVo
){
return
baseBiz
.
updStockInfo
(
companyVo
);
}
@ApiOperation
(
"设置详情"
)
@RequestMapping
(
value
=
"/updCompanyDetail"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
updCompanyDetail
(
CompanyVo
companyVo
){
return
baseBiz
.
updCompanyDetail
(
companyVo
);
}
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/del"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
del
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
){
return
baseBiz
.
delCompany
(
id
);
}
}
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/CompanyBaseMapper.xml
0 → 100644
View file @
c50d9178
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.xxfc.platform.vehicle.mapper.CompanyBaseMapper"
>
<select
id=
"getList"
parameterType=
"com.xxfc.platform.vehicle.pojo.vo.CompanyVo"
resultType=
"com.xxfc.platform.vehicle.pojo.vo.CompanyVo"
>
SELECT
c.id as companyId,
c.`name` as companyName,
c.addr_detail as addrDetail,
c.state,
c.leader,
c.leader_contact_info as leaderContactInfo,
c.latitude,
c.longitude,
c.vehice_service_phone as vehiceServicePhone,
c.tour_service_phone as tourServicePhone,
c.zone_id as zoneId,
c.addr_province as addrProvince,
c.province_name as provinceName,
c.addr_city as addrCity,
c.city_name as cityName,
c.addr_town as addrTown,
c.town_name as townName,
b.cover,
b.id,
b.`name`,
r.id as stockId,
r.balance,
r.rank,
r.stock_state as stockState,
r.total,
r.type,
r.price
FROM branch_company c
LEFT JOIN company_base b ON c.company_base_id=b.id
LEFT JOIN branch_company_stock_info_right r ON c.company_base_id=r.company_base_id
<where>
b.is_del=0
<if
test=
"zoneId != null and zoneId !='' "
>
and c.zone_id = #{zoneId}
</if>
<if
test=
"addrProvince != null and addrProvince != ''"
>
and c.addr_province =#{addrProvince}
</if>
<if
test=
"addrCity != null and addrCity != ''"
>
and c.addr_city =#{addrCity}
</if>
<if
test=
"name != null and name != ''"
>
and b.`name` like CONCAT('%',#{name},'%')
</if>
</where>
order by c.id desc
</select>
</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