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
aca2b54b
Commit
aca2b54b
authored
Aug 23, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
股权
parent
5628808e
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
173 additions
and
56 deletions
+173
-56
BranchCompanyStockRightFindDTO.java
...form/vehicle/pojo/dto/BranchCompanyStockRightFindDTO.java
+22
-0
BranchCompanyStockRightForWeChatOfficeVO.java
...cle/pojo/vo/BranchCompanyStockRightForWeChatOfficeVO.java
+23
-0
BranchCompanyStockRightBiz.java
...xxfc/platform/vehicle/biz/BranchCompanyStockRightBiz.java
+81
-52
VehicleJobHandler.java
...m/xxfc/platform/vehicle/jobhandler/VehicleJobHandler.java
+1
-1
BranchCompanyStockRightMapper.java
...latform/vehicle/mapper/BranchCompanyStockRightMapper.java
+3
-0
BranchCompanyStockRightController.java
...tform/vehicle/rest/BranchCompanyStockRightController.java
+14
-0
BranchCompanyStockRightMapper.xml
...c/main/resources/mapper/BranchCompanyStockRightMapper.xml
+29
-3
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/dto/BranchCompanyStockRightFindDTO.java
0 → 100644
View file @
aca2b54b
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
.
dto
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/8/22 19:58
*/
@Data
public
class
BranchCompanyStockRightFindDTO
extends
PageParam
{
private
Integer
provinceCode
;
private
Integer
cityCode
;
private
BigDecimal
price
;
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/vo/BranchCompanyStockRightForWeChatOfficeVO.java
0 → 100644
View file @
aca2b54b
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
.
vo
;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/8/22 20:03
*/
@Data
public
class
BranchCompanyStockRightForWeChatOfficeVO
{
private
Integer
id
;
private
String
companyName
;
private
Integer
balance
;
private
Integer
total
;
private
BigDecimal
price
;
private
String
cover
;
private
Integer
type
;
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyStockRightBiz.java
View file @
aca2b54b
This diff is collapsed.
Click to expand it.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/jobhandler/VehicleJobHandler.java
View file @
aca2b54b
...
@@ -51,7 +51,7 @@ public class VehicleJobHandler extends IJobHandler {
...
@@ -51,7 +51,7 @@ public class VehicleJobHandler extends IJobHandler {
int
betweenMonth
=
Integer
.
valueOf
(
dictionary
.
getDetail
()).
intValue
();
int
betweenMonth
=
Integer
.
valueOf
(
dictionary
.
getDetail
()).
intValue
();
int
month
=
nowMonth
+
betweenMonth
>
12
?
(
betweenMonth
+
nowMonth
)
-
12
:
nowMonth
+
betweenMonth
;
int
month
=
nowMonth
+
betweenMonth
>
12
?
(
betweenMonth
+
nowMonth
)
-
12
:
nowMonth
+
betweenMonth
;
year
=
month
>
nowMonth
?
year
:
year
+
1
;
year
=
month
>
nowMonth
?
year
:
year
+
1
;
String
yearAndMonth
=
String
.
format
(
"%d-%s"
,
year
,
month
>
10
?
month:
"0"
+
month
);
String
yearAndMonth
=
String
.
format
(
"%d-%s"
,
year
,
month
>
=
10
?
month:
"0"
+
month
);
XxlJobLogger
.
log
(
"----查询到的车型ids:【{}】"
,
existVehicleIds
);
XxlJobLogger
.
log
(
"----查询到的车型ids:【{}】"
,
existVehicleIds
);
if
(
CollectionUtils
.
isNotEmpty
(
existVehicleIds
))
{
if
(
CollectionUtils
.
isNotEmpty
(
existVehicleIds
))
{
List
<
VehicleBookInfo
>
bookInfos
=
existVehicleIds
.
stream
().
map
(
vehicleId
->
{
List
<
VehicleBookInfo
>
bookInfos
=
existVehicleIds
.
stream
().
map
(
vehicleId
->
{
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/BranchCompanyStockRightMapper.java
View file @
aca2b54b
...
@@ -7,6 +7,7 @@ import com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockInfoRightVo;
...
@@ -7,6 +7,7 @@ import com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockInfoRightVo;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
...
@@ -25,4 +26,6 @@ public interface BranchCompanyStockRightMapper extends Mapper<BranchCompanyStock
...
@@ -25,4 +26,6 @@ public interface BranchCompanyStockRightMapper extends Mapper<BranchCompanyStock
int
addCompamyList
(
@Param
(
"list"
)
List
<
BranchCompanyStockRight
>
list
);
int
addCompamyList
(
@Param
(
"list"
)
List
<
BranchCompanyStockRight
>
list
);
Integer
getCompanyInfo
(
@Param
(
"name"
)
String
name
);
Integer
getCompanyInfo
(
@Param
(
"name"
)
String
name
);
List
<
BranchCompanyStockRight
>
findWithPageByPriceOrCode
(
@Param
(
"price"
)
BigDecimal
price
,
@Param
(
"provinceCode"
)
Integer
provinceCode
,
@Param
(
"cityCode"
)
Integer
cityCode
);
}
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/BranchCompanyStockRightController.java
View file @
aca2b54b
...
@@ -4,6 +4,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
...
@@ -4,6 +4,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.vehicle.biz.BranchCompanyStockApplyInfoBiz
;
import
com.xxfc.platform.vehicle.biz.BranchCompanyStockApplyInfoBiz
;
import
com.xxfc.platform.vehicle.biz.BranchCompanyStockRightBiz
;
import
com.xxfc.platform.vehicle.biz.BranchCompanyStockRightBiz
;
import
com.xxfc.platform.vehicle.common.BaseController
;
import
com.xxfc.platform.vehicle.common.BaseController
;
...
@@ -12,7 +13,9 @@ import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
...
@@ -12,7 +13,9 @@ import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
import
com.xxfc.platform.vehicle.entity.BranchCompanyStockApplyInfo
;
import
com.xxfc.platform.vehicle.entity.BranchCompanyStockApplyInfo
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyStockApplyVo
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyStockApplyVo
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyStockSearchVo
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyStockSearchVo
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyStockRightFindDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockInfoRightVo
;
import
com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockInfoRightVo
;
import
com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockRightForWeChatOfficeVO
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -191,4 +194,15 @@ public class BranchCompanyStockRightController extends BaseController<BranchComp
...
@@ -191,4 +194,15 @@ public class BranchCompanyStockRightController extends BaseController<BranchComp
return
baseBiz
.
importExcel
(
multipartfile
,
request
);
return
baseBiz
.
importExcel
(
multipartfile
,
request
);
}
}
/**
* 微信公众号查询
* @param branchCompanyStockRightFindDTO
* @return
*/
@GetMapping
(
"/webchat_office/stockrights"
)
public
ObjectRestResponse
<
PageDataVO
<
BranchCompanyStockRightForWeChatOfficeVO
>>
findBranchCompanyStockRightsForWechatOffice
(
BranchCompanyStockRightFindDTO
branchCompanyStockRightFindDTO
){
PageDataVO
<
BranchCompanyStockRightForWeChatOfficeVO
>
branchCompanyStockRightForWeChatOfficeVOPageDataVO
=
baseBiz
.
findWithPageByPriceOrCode
(
branchCompanyStockRightFindDTO
);
return
ObjectRestResponse
.
succ
(
branchCompanyStockRightForWeChatOfficeVOPageDataVO
);
}
}
}
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/BranchCompanyStockRightMapper.xml
View file @
aca2b54b
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<trim
prefix=
"where"
suffixOverrides=
"and"
>
<trim
prefix=
"where"
suffixOverrides=
"and"
>
c.is_del = 0 and
c.is_del = 0 and
<if
test=
"companyName != null"
>
<if
test=
"companyName != null"
>
c.name
like
CONCAT('%',#{companyName},'%')
c.name
like
CONCAT('%',#{companyName},'%')
</if>
</if>
<if
test=
"addrProvince != null"
>
<if
test=
"addrProvince != null"
>
c.addr_province = #{addrProvince} and
c.addr_province = #{addrProvince} and
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
r.price
<
= #{priceEnd} and
r.price
<
= #{priceEnd} and
</if>
</if>
</trim>
</trim>
order
by
rank DESC,price DESC
order
by
rank DESC,price DESC
</select>
</select>
<select
id=
"selectAllPrice"
resultType=
"int"
>
<select
id=
"selectAllPrice"
resultType=
"int"
>
select distinct price from branch_company_stock_info_right where is_del=0 order by price
select distinct price from branch_company_stock_info_right where is_del=0 order by price
...
@@ -76,8 +76,34 @@
...
@@ -76,8 +76,34 @@
insert into branch_company_stock_info_right (
insert into branch_company_stock_info_right (
company_id,balance,total,price,state,company_pic,crt_time,upd_time
company_id,balance,total,price,state,company_pic,crt_time,upd_time
) VALUES
) VALUES
<foreach
collection
=
"list"
item=
"item"
index=
"index"
separator
=
","
>
<foreach
collection
=
"list"
item=
"item"
index=
"index"
separator
=
","
>
(#{item.companyId},#{item.balance},#{item.total},#{item.price},#{item.state},#{item.companyPic},#{item.crtTime},#{item.updTime})
(#{item.companyId},#{item.balance},#{item.total},#{item.price},#{item.state},#{item.companyPic},#{item.crtTime},#{item.updTime})
</foreach>
</foreach>
</insert>
</insert>
<select
id=
"findWithPageByPriceOrCode"
resultType=
"com.xxfc.platform.vehicle.entity.BranchCompanyStockRight"
>
SELECT
bcsir.id,
bcsir.balance,
bcsir.total,
bcsir.type,
bcsir.price,
cb.cover,
cb.name
FROM
( SELECT id, company_base_id, balance, total, price, type FROM `branch_company_stock_info_right` WHERE `state` =
2 AND `is_del`=0
<if
test=
"price != null"
>
AND `price`=#{price}
</if>
) AS `bcsir`
INNER JOIN ( SELECT id, `name`, cover FROM `company_base` WHERE 1=1
<if
test=
"provinceCode != null"
>
AND `addr_province`=#{provinceCode}
</if>
<if
test=
"cityCode != null"
>
AND `addr_city`=#{provinceCode}
</if>
) AS `cb` ON cb.id = bcsir.company_base_id
</select>
</mapper>
</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