Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-reportcenter
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7b5faac1
authored
Dec 12, 2020
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]代码修改
1 parent
21ad242a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
37 deletions
src/main/java/cn/com/glsx/report/modules/entity/ChannelRiskData.java
src/main/java/cn/com/glsx/report/modules/model/ChannelRiskDataModel.java
src/main/resources/mapper/ChannelRiskDataMapper.xml
src/main/java/cn/com/glsx/report/modules/entity/ChannelRiskData.java
View file @
7b5faac
...
...
@@ -6,6 +6,7 @@ import lombok.experimental.Accessors;
import
javax.persistence.Column
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.util.Date
;
/**
...
...
@@ -119,4 +120,13 @@ public class ChannelRiskData {
@Column
(
name
=
"type"
)
private
Integer
type
;
@Transient
private
String
adcode
;
@Column
(
name
=
"center_lat"
)
private
Double
center_lat
;
@Column
(
name
=
"center_lng"
)
private
Double
center_lng
;
}
src/main/java/cn/com/glsx/report/modules/model/ChannelRiskDataModel.java
View file @
7b5faac
...
...
@@ -50,4 +50,9 @@ public class ChannelRiskDataModel {
* 激活地址
*/
private
String
address
;
/**
* 省编码
*/
private
String
adcode
;
}
src/main/resources/mapper/ChannelRiskDataMapper.xml
View file @
7b5faac
...
...
@@ -19,8 +19,9 @@
<result
column=
"shop_name"
jdbcType=
"VARCHAR"
property=
"shop_name"
/>
<result
column=
"labels"
jdbcType=
"VARCHAR"
property=
"labels"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"center_lat"
jdbcType=
"DOUBLE"
property=
"type"
/>
<result
column=
"center_lat"
jdbcType=
"DOUBLE"
property=
"type"
/>
<result
column=
"center_lat"
jdbcType=
"DOUBLE"
property=
"center_lat"
/>
<result
column=
"center_lng"
jdbcType=
"DOUBLE"
property=
"center_lng"
/>
<result
column=
"adcode"
jdbcType=
"VARCHAR"
property=
"adcode"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, workorder_no, owner_name,vin, sn, active_date, dev_type,gps_time, lng,
...
...
@@ -32,7 +33,7 @@
active_date,owner_name,vin,sn,address,lng,lat,zone
FROM t_channel_risk_data
<if
test=
"isExcep == 'true'"
>
where type=1
where type=1
and labels!=-1
</if>
<if
test=
"isExcep == 'false'"
>
where type=0
...
...
@@ -107,38 +108,6 @@
group by xAxis ORDER BY gps_time
</select>
<select
id=
"findProTimeInstallSheet"
resultType=
"java.util.Map"
>
select
DATE_FORMAT(gps_time,'%Y年%c月') as xAxis,
count(id) as value
from t_channel_risk_data
where type=0
<if
test=
"monthNum !=null and monthNum !=''"
>
and gps_time>=DATE_SUB(last_day(curdate()), INTERVAL #{monthNum} MONTH)+1
</if>
<if
test=
"channelName !=null and channelName !=''"
>
and shop_name=#{channelName}
</if>
and prov=#{proviceName}
group by xAxis ORDER BY gps_time
</select>
<select
id=
"findCityTimeInstallSheet"
resultType=
"java.util.Map"
>
select
DATE_FORMAT(gps_time,'%Y年%c月') as xAxis,
count(id) as value
from t_channel_risk_data
where type=0
<if
test=
"monthNum !=null and monthNum !=''"
>
and gps_time>=DATE_SUB(last_day(curdate()), INTERVAL #{monthNum} MONTH)+1
</if>
<if
test=
"channelName !=null and channelName !=''"
>
and shop_name=#{channelName}
</if>
and city=#{cityName}
group by xAxis ORDER BY gps_time
</select>
<select
id=
"findOutletsData"
resultType=
"java.util.Map"
>
select
labels as shop_name,address,count(labels) as orderCount,center_lat,center_lng
...
...
@@ -151,9 +120,9 @@
</select>
<select
id=
"findOutletsDataDetail"
resultMap=
"BaseResultMap"
>
select active_date,owner_name,vin,sn,address,lng,
select active_date,owner_name,vin,sn,address,lng,
t2.adcode,
lat
from t_channel_risk_data
from t_channel_risk_data
t1 left join base_provinces t2 on t1.prov=t2.name
where type=1 and labels!=-1
<if
test=
"item.provinceName !=null and item.provinceName !=''"
>
and prov=#{item.provinceName}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment