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
d376de7f
Commit
d376de7f
authored
Nov 19, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-vehicle-bg' into base-modify
parents
ea4f8190
4ba206b8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
BranchCompanyVehicleCount.java
...fc/platform/vehicle/entity/BranchCompanyVehicleCount.java
+6
-0
BranchCompanyVehicleCountBiz.java
...fc/platform/vehicle/biz/BranchCompanyVehicleCountBiz.java
+5
-4
BranchCompanyVehicleCountMapper.xml
...main/resources/mapper/BranchCompanyVehicleCountMapper.xml
+3
-3
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/BranchCompanyVehicleCount.java
View file @
d376de7f
package
com
.
xxfc
.
platform
.
vehicle
.
entity
;
package
com
.
xxfc
.
platform
.
vehicle
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
...
@@ -32,6 +34,10 @@ public class BranchCompanyVehicleCount {
...
@@ -32,6 +34,10 @@ public class BranchCompanyVehicleCount {
* 统计日期
* 统计日期
*/
*/
@Column
(
name
=
"count_date"
)
@Column
(
name
=
"count_date"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
countDate
;
private
Date
countDate
;
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyVehicleCountBiz.java
View file @
d376de7f
...
@@ -31,16 +31,17 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
...
@@ -31,16 +31,17 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
}
}
public
ObjectRestResponse
<
PageDataVO
<
BranchCompanyVehicleCount
>>
findAll
(
BranchCompanyVehicleCountDTO
branchCompanyVehicleCountDTO
)
{
public
ObjectRestResponse
<
PageDataVO
<
BranchCompanyVehicleCount
>>
findAll
(
BranchCompanyVehicleCountDTO
branchCompanyVehicleCountDTO
)
{
vehicleInformationDownloadBiz
.
add
();
Integer
pageNo
=
branchCompanyVehicleCountDTO
.
getPage
()
==
null
?
1
:
branchCompanyVehicleCountDTO
.
getPage
();
Integer
pageNo
=
branchCompanyVehicleCountDTO
.
getPage
()
==
null
?
1
:
branchCompanyVehicleCountDTO
.
getPage
();
Integer
pageSize
=
branchCompanyVehicleCountDTO
.
getLimit
()
==
null
?
10
:
branchCompanyVehicleCountDTO
.
getLimit
();
Integer
pageSize
=
branchCompanyVehicleCountDTO
.
getLimit
()
==
null
?
10
:
branchCompanyVehicleCountDTO
.
getLimit
();
Integer
type
=
branchCompanyVehicleCountDTO
.
getType
()
==
null
?
1
:
branchCompanyVehicleCountDTO
.
getType
();
branchCompanyVehicleCountDTO
.
setPage
(
pageNo
);
branchCompanyVehicleCountDTO
.
setPage
(
pageNo
);
branchCompanyVehicleCountDTO
.
setLimit
(
pageSize
);
branchCompanyVehicleCountDTO
.
setLimit
(
pageSize
);
if
(
branchCompanyVehicleCountDTO
.
getType
()
==
1
)
{
branchCompanyVehicleCountDTO
.
setType
(
type
);
if
(
type
==
1
)
{
branchCompanyVehicleCountDTO
.
setDayNum
(
1
);
branchCompanyVehicleCountDTO
.
setDayNum
(
1
);
}
else
if
(
branchCompanyVehicleCountDTO
.
getType
()
==
2
)
{
}
else
if
(
type
==
2
)
{
branchCompanyVehicleCountDTO
.
setDayNum
(
7
);
branchCompanyVehicleCountDTO
.
setDayNum
(
7
);
}
else
if
(
branchCompanyVehicleCountDTO
.
getType
()
==
3
)
{
}
else
if
(
type
==
3
)
{
branchCompanyVehicleCountDTO
.
setDayNum
(
getCurrentMonthLastDay
());
branchCompanyVehicleCountDTO
.
setDayNum
(
getCurrentMonthLastDay
());
}
}
Query
query
=
new
Query
(
branchCompanyVehicleCountDTO
);
Query
query
=
new
Query
(
branchCompanyVehicleCountDTO
);
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/BranchCompanyVehicleCountMapper.xml
View file @
d376de7f
...
@@ -17,14 +17,14 @@
...
@@ -17,14 +17,14 @@
(
(
CASE
CASE
WHEN #{type} = 1 THEN
WHEN #{type} = 1 THEN
vehicle_num / #{dayNum}
,
vehicle_num / #{dayNum}
WHEN #{type} = 2 THEN
WHEN #{type} = 2 THEN
vehicle_num / #{dayNum}
,
vehicle_num / #{dayNum}
WHEN #{type} = 3 THEN
WHEN #{type} = 3 THEN
vehicle_num / #{dayNum}
vehicle_num / #{dayNum}
END
END
)
)
) AS
count
from branch_company_vehicle_count
) AS
vehicleNum
from branch_company_vehicle_count
<where>
<where>
<if
test=
"companyName != null and companyName != ''"
>
<if
test=
"companyName != null and companyName != ''"
>
and company_name like concat('%', #{companyName}, '%')
and company_name like concat('%', #{companyName}, '%')
...
...
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