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
0d7c3c47
Commit
0d7c3c47
authored
Sep 16, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code重复同步数据
parent
7c23a0fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
2 deletions
+45
-2
BranchCompanyBiz.java
.../java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
+5
-0
CompanyBaseBiz.java
...in/java/com/xxfc/platform/vehicle/biz/CompanyBaseBiz.java
+32
-0
BranchCompanyMapper.java
...com/xxfc/platform/vehicle/mapper/BranchCompanyMapper.java
+6
-0
CompanyController.java
...m/xxfc/platform/vehicle/rest/admin/CompanyController.java
+2
-2
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
View file @
0d7c3c47
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.vehicle.biz;
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.vehicle.biz;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.ace.cache.annotation.Cache
;
import
com.ace.cache.annotation.Cache
;
import
com.ace.cache.annotation.CacheClear
;
import
com.ace.cache.annotation.CacheClear
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
...
@@ -393,4 +394,8 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
...
@@ -393,4 +394,8 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
pageDataVO
.
setTotalCount
(
dataVO
.
getTotalCount
());
pageDataVO
.
setTotalCount
(
dataVO
.
getTotalCount
());
return
pageDataVO
;
return
pageDataVO
;
}
}
public
List
<
JSONObject
>
getList
(){
return
mapper
.
getList
();
}
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/CompanyBaseBiz.java
View file @
0d7c3c47
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.vehicle.biz;
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.vehicle.biz;
import
com.ace.cache.annotation.CacheClear
;
import
com.ace.cache.annotation.CacheClear
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.RandomUtil
;
import
com.github.wxiaoqi.security.common.util.RandomUtil
;
...
@@ -25,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -25,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
tk.mybatis.mapper.entity.Example
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -124,6 +126,36 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
...
@@ -124,6 +126,36 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
//临时数据同步5(添加车辆)
public
ObjectRestResponse
synchro5
(){
List
<
JSONObject
>
list
=
branchCompanyBiz
.
getList
();
Integer
number
=
10000
;
if
(
list
.
size
()>
0
){
for
(
JSONObject
obj:
list
){
Integer
code
=
obj
.
getInteger
(
"code"
);
if
(
code
==
null
||
code
==
0
){
continue
;
}
Example
example
=
new
Example
(
Vehicle
.
class
);
example
.
createCriteria
().
andEqualTo
(
"code"
,
code
);
List
<
Vehicle
>
vehicles
=
vehicleBiz
.
selectByExample
(
example
);
int
num
=
0
;
for
(
Vehicle
vehicle:
vehicles
){
num
++;
if
(
num
==
1
){
continue
;
}
number
++;
vehicle
.
setCode
(
number
);
vehicleBiz
.
updateSelectiveById
(
vehicle
);
}
}
}
return
ObjectRestResponse
.
succ
();
}
public
String
getNumberPlate
(
int
number
){
public
String
getNumberPlate
(
int
number
){
String
str
=
number
+
""
;
String
str
=
number
+
""
;
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/BranchCompanyMapper.java
View file @
0d7c3c47
package
com
.
xxfc
.
platform
.
vehicle
.
mapper
;
package
com
.
xxfc
.
platform
.
vehicle
.
mapper
;
import
com.alibaba.fastjson.JSONObject
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyListDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyListDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.BranchCompanyListVO
;
import
com.xxfc.platform.vehicle.pojo.vo.BranchCompanyListVO
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
tk.mybatis.mapper.additional.idlist.SelectByIdListMapper
;
import
tk.mybatis.mapper.additional.idlist.SelectByIdListMapper
;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
...
@@ -17,4 +19,8 @@ public interface BranchCompanyMapper extends Mapper<BranchCompany>, SelectByIdLi
...
@@ -17,4 +19,8 @@ public interface BranchCompanyMapper extends Mapper<BranchCompany>, SelectByIdLi
List
<
Integer
>
findCompanyIdsByAreaId
(
@Param
(
"areaId"
)
Integer
areaId
);
List
<
Integer
>
findCompanyIdsByAreaId
(
@Param
(
"areaId"
)
Integer
areaId
);
List
<
BranchCompanyListDTO
>
findBranchCompanys
(
@Param
(
"provinceCode"
)
Integer
provinceCode
,
@Param
(
"cityCode"
)
Integer
cityCode
);
List
<
BranchCompanyListDTO
>
findBranchCompanys
(
@Param
(
"provinceCode"
)
Integer
provinceCode
,
@Param
(
"cityCode"
)
Integer
cityCode
);
@Select
(
"SELECT `code`,count(id) cd FROM `vehicle` WHERE is_del=0 and number_plate LIKE '%测试%' GROUP BY code HAVING cd>=2"
)
List
<
JSONObject
>
getList
();
}
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/CompanyController.java
View file @
0d7c3c47
...
@@ -33,8 +33,8 @@ public class CompanyController extends BaseController<CompanyBaseBiz> {
...
@@ -33,8 +33,8 @@ public class CompanyController extends BaseController<CompanyBaseBiz> {
@ApiOperation
(
"同步股权3"
)
@ApiOperation
(
"同步股权3"
)
@PostMapping
(
"synchro3"
)
@PostMapping
(
"synchro3"
)
public
ObjectRestResponse
<
String
>
synchro3
()
{
public
ObjectRestResponse
synchro3
()
{
return
baseBiz
.
synchro
3
();
return
baseBiz
.
synchro
5
();
}
}
...
...
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