Commit 7b5faac1 by 111-PC\111

[+]代码修改

1 parent 21ad242a
......@@ -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;
}
......@@ -50,4 +50,9 @@ public class ChannelRiskDataModel {
* 激活地址
*/
private String address;
/**
* 省编码
*/
private String adcode;
}
......@@ -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}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!