新增安防告警不带图片和只上传图片
This commit is contained in:
@ -45,6 +45,15 @@ public interface UploadedPhotosMapper
|
||||
*/
|
||||
public int updateUploadedPhotos(UploadedPhotos uploadedPhotos);
|
||||
|
||||
/**
|
||||
* 通过SN和图片进行更新数据
|
||||
* @param uploadedPhotos
|
||||
* @return
|
||||
*/
|
||||
public int updateBySnAndTime(UploadedPhotos uploadedPhotos);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除存储上传的照片信息
|
||||
*
|
||||
|
@ -89,6 +89,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateBySnAndTime" parameterType="com.fastbee.iot.model.anfang.UploadedPhotos">
|
||||
update uploaded_photos
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="photoPath != null and photoPath != ''">photo_path = #{photoPath},</if>
|
||||
<if test="monitorPath != null and monitorPath != ''">monitor_path = #{monitorPath},</if>
|
||||
<if test="imei != null and imei != ''">imei = #{imei},</if>
|
||||
<if test="sn != null">sn = #{sn},</if>
|
||||
<if test="lat != null">lat = #{lat},</if>
|
||||
<if test="lng != null">lng = #{lng},</if>
|
||||
<if test="temp != null">temp = #{temp},</if>
|
||||
<if test="doorState != null">door_state = #{doorState},</if>
|
||||
<if test="shakeState != null">shake_state = #{shakeState},</if>
|
||||
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
|
||||
</trim>
|
||||
where sn = #{sn} and upload_time = #{uploadTime}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUploadedPhotosById" parameterType="Long">
|
||||
delete from uploaded_photos where id = #{id}
|
||||
</delete>
|
||||
|
@ -119,8 +119,10 @@ public class MaGuangaiRecordServiceImpl implements IMaGuangaiRecordService
|
||||
record.setCardId(item.get("card_id").toString());
|
||||
record.setAreaCode(item.get("area_code").toString());
|
||||
record.setUserBalance(com.fastbee.common.utils.NumberUtils.formatFloat(Float.parseFloat(item.get("user_balance").toString())/100)+"");
|
||||
record.setCurFlow(item.get("cur_flow").toString());
|
||||
record.setCurEle(item.get("cur_ele").toString());
|
||||
record.setCurFlow(item.get("cur_flow").toString().equals("null")?"--":
|
||||
(com.fastbee.common.utils.NumberUtils.formatFloat(Float.parseFloat(item.get("cur_flow").toString())/100)+""));
|
||||
record.setCurEle(item.get("cur_ele").toString().equals("null")?"--":
|
||||
(com.fastbee.common.utils.NumberUtils.formatFloat(Float.parseFloat(item.get("cur_ele").toString())/100)+""));
|
||||
record.setStatus(Integer.parseInt(item.get("status").toString()));
|
||||
if(StringUtils.isNotEmpty(item.get("create_time").toString())){
|
||||
if(NumberUtil.isNumber(item.get("create_time").toString())) {
|
||||
|
Reference in New Issue
Block a user