| | |
| | | * 行政区编码 |
| | | */ |
| | | @ApiModelProperty(value = "行政区编码") |
| | | private String addvcd; |
| | | private String district; |
| | | /** |
| | | * 行政区编码 |
| | | */ |
| | |
| | | <result column="waringType" property="waringType"/> |
| | | <result column="deviceNumber" property="deviceNumber"/> |
| | | <result column="region" property="region"/> |
| | | <result column="addvcd" property="addvcd"/> |
| | | <result column="district" property="district"/> |
| | | <result column="alarmId" property="alarmId"/> |
| | | <result column="level" property="level"/> |
| | | <result column="coordinate" property="coordinate"/> |
| | |
| | | |
| | | <select id="selectAlarmPage" resultMap="alarmResultMap"> |
| | | select a.id,a.alarmType,a.alarmPeople,a.alarmTime,a.galarmPeople,a.sex,a.phoneNumber,a.place,a.content,a.waringType, |
| | | a.deviceNumber,a.region,a.addvcd, a.alarmId,a.LEVEL,ST_ASTEXT (a.coordinate) AS coordinate,FORMAT(a.jd,6) as jd,FORMAT(a.wd,6) as wd,a.jtype,a.rname from sys_alarm a where 1=1 |
| | | a.deviceNumber,a.region,a.district, a.alarmId,a.LEVEL,ST_ASTEXT (a.coordinate) AS coordinate,FORMAT(a.jd,6) as jd,FORMAT(a.wd,6) as wd,a.jtype,a.rname from sys_alarm a where 1=1 |
| | | <if test="alarm.jtype!=null"> |
| | | and a.jtype like concat(concat('%', #{alarm.jtype}), '%') |
| | | </if> |
| | |
| | | and a.galarmPeople like concat(concat('%', #{alarm.galarmPeople}), '%') |
| | | </if> |
| | | <if test="alarm.addvcd!=null"> |
| | | and a.addvcd like concat(concat('%', #{alarm.addvcd}), '%') |
| | | and a.district like concat(concat('%', #{alarm.district}), '%') |
| | | </if> |
| | | <if test="alarm.level!=null"> |
| | | and a.level like concat(concat('%', #{alarm.level}), '%') |
| | |
| | | a.waringType, |
| | | a.deviceNumber, |
| | | a.region, |
| | | a.addvcd, |
| | | a.district, |
| | | a.alarmId, |
| | | a.czTime, |
| | | a.bz, |
| | |
| | | e.stype, |
| | | e.channelNumber |
| | | FROM |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.addvcd LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where 1=1 |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.district LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where 1=1 |
| | | <if test="jtype!=null and jtype!=''"> |
| | | and a.jtype=#{jtype} |
| | | </if> |
| | | <if test="addvcd!=null and addvcd!=''"> |
| | | and a.addvcd=#{addvcd} |
| | | and a.district=#{addvcd} |
| | | </if> |
| | | <if test="waringType!=null and waringType!=''"> |
| | | and a.waringType=#{waringType} |
| | |
| | | a.waringType, |
| | | a.deviceNumber, |
| | | a.region, |
| | | a.addvcd, |
| | | a.district, |
| | | a.alarmId, |
| | | a.rname, |
| | | a.jjTime, |
| | |
| | | a.jtype, |
| | | d.addvnm |
| | | FROM |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.addvcd where 1=1 |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.district where 1=1 |
| | | <if test="id!=null and id!=''"> |
| | | and a.id=#{id} |
| | | </if> |
| | |
| | | a.waringType, |
| | | a.deviceNumber, |
| | | a.region, |
| | | a.addvcd, |
| | | a.district, |
| | | a.alarmId, |
| | | a.jjTime, |
| | | a.rname, |
| | |
| | | e.stype, |
| | | e.channelNumber |
| | | FROM |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.addvcd LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where 1=1 |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.district LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where 1=1 |
| | | <if test="id!=null and id!=''"> |
| | | and a.id >#{id} |
| | | </if> |
| | |
| | | <!--新增--> |
| | | <insert id="s" parameterType="org.springblade.modules.alarm.entity.Alarm"> |
| | | INSERT INTO sys_alarm (alarmType,alarmPeople,alarmTime,galarmPeople,sex,phoneNumber,place,content,waringType,deviceNumber, |
| | | region,addvcd,alarmId,level,rname,coordinate,jd,wd,jtype,czTime,bz,jjTime) VALUES |
| | | (#{alarmType},#{alarmPeople},#{alarmTime},#{galarmPeople},#{sex},#{phoneNumber},#{place},#{content},#{waringType},#{deviceNumber},#{region},#{addvcd}, |
| | | region,district,alarmId,level,rname,coordinate,jd,wd,jtype,czTime,bz,jjTime) VALUES |
| | | (#{alarmType},#{alarmPeople},#{alarmTime},#{galarmPeople},#{sex},#{phoneNumber},#{place},#{content},#{waringType},#{deviceNumber},#{region},#{district}, |
| | | #{alarmId},#{level},#{rname},POINT(#{jd},#{wd}),#{jd},#{wd},#{jtype} |
| | | ,#{czTime},#{bz},#{jjTime}) |
| | | </insert> |
| | |
| | | update sys_alarm SET alarmType=#{alarmType},alarmPeople=#{alarmPeople},alarmTime=#{alarmTime}, |
| | | galarmPeople=#{galarmPeople},sex=#{sex},phoneNumber=#{phoneNumber},place=#{place}, |
| | | content=#{content},waringType=#{waringType},deviceNumber=#{deviceNumber},region=#{region}, |
| | | addvcd=#{addvcd},alarmId=#{alarmId},level=#{level},rname=#{rname},jd=#{jd}, |
| | | district=#{addvcd},alarmId=#{alarmId},level=#{level},rname=#{rname},jd=#{jd}, |
| | | wd=#{wd},coordinate=POINT(#{jd},#{wd}),jtype=#{jtype},jtype=#{jtype},czTime=#{czTime},bz=#{bz},jjTime=#{jjTime} where id=#{id} |
| | | </update> |
| | | |
| | |
| | | a.waringType, |
| | | a.deviceNumber, |
| | | a.region, |
| | | a.addvcd, |
| | | a.district, |
| | | a.alarmId, |
| | | a.LEVEL, |
| | | ST_ASTEXT (a.coordinate ) AS coordinate, |
| | |
| | | e.stype, |
| | | e.channelNumber |
| | | FROM |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.addvcd LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.district LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where |
| | | DATE_FORMAT(alarmTime,'%Y-%m-%d') >=#{beginTime} and DATE_FORMAT(alarmTime,'%Y-%m-%d') <=#{endTime} ORDER BY alarmTime desc |
| | | </select> |
| | | |
| | |
| | | |
| | | <update id="updateClinent" parameterType="org.springblade.modules.equipment.entity.Equipment"> |
| | | update sys_equipment SET deviceName=#{deviceName},deviceNumber=#{deviceNumber},deviceType=#{deviceType}, |
| | | ownership=#{ownership},devicestate=#{devicestate},stime=#{stime}, |
| | | addvcd=#{addvcd},street=#{street},dtype=#{dtype},pay=#{pay},expireTime=#{expireTime},heartbeat=#{heartbeat} where id=#{id} |
| | | ownership=#{ownership},devicestate=#{devicestate}, |
| | | addvcd=#{addvcd},street=#{street},dtype=#{dtype},pay=#{pay} |
| | | |
| | | <choose> |
| | | <when test="expireTime!=null and expireTime!=''"> |
| | | ,expireTime=#{expireTime} |
| | | </when> |
| | | <otherwise> |
| | | ,expireTime= null |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | <choose> |
| | | <when test="heartbeat!=null and heartbeat!=''"> |
| | | ,heartbeat=#{heartbeat} |
| | | </when> |
| | | <otherwise> |
| | | ,heartbeat= null |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | <choose> |
| | | <when test="stime!=null and stime!=''"> |
| | | ,stime=#{stime} |
| | | </when> |
| | | <otherwise> |
| | | ,stime= null |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | |
| | |
| | | alarm.setAlarmTime(df.format(day)); |
| | | alarm.setPlace((String) list.get(0).get("streeName"));//事发地址 |
| | | alarm.setDeviceNumber((String) list.get(0).get("deviceNumber"));//设备编号 |
| | | alarm.setAddvcd((String) list.get(0).get("addvcd"));//行政区编码 |
| | | alarm.setDistrict((String) list.get(0).get("addvcd"));//行政区编码 |
| | | alarm.setJd((String) list.get(0).get("jd"));//经度 |
| | | alarm.setWd((String) list.get(0).get("wd"));//纬度 |
| | | alarm.setJtype("0"); |
| | |
| | | primary: master |
| | | datasource: |
| | | master: |
| | | url: jdbc:mysql://47.110.245.84:3306/springboot?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&useOldAliasMetadataBehavior=true |
| | | username: sa |
| | | password: 131556 |
| | | url: jdbc:mysql://192.168.0.105:3306/springboot?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&useOldAliasMetadataBehavior=true |
| | | username: root |
| | | password: 123456 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | slaves: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://47.110.245.84:3306/fjpt?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&useOldAliasMetadataBehavior=true |
| | | username: sa |
| | | password: 131556 |
| | | url: jdbc:mysql://192.168.0.105:3306/jfpt?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&useOldAliasMetadataBehavior=true |
| | | username: root |
| | | password: 123456 |
| | | |
| | | #第三方登陆 |
| | | social: |
| | |
| | | jpa: |
| | | show-sql: true |
| | | hibernate: |
| | | naming: |
| | | physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl |
| | | naming: |
| | | physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl |
| | | properties: |
| | | hibernate.format_sql: true |
| | | hibernate.dialect: org.hibernate.spatial.dialect.mysql.MySQL56InnoDBSpatialDialect |