问题修复
This commit is contained in:
parent
c13485e1b8
commit
a7b49837e7
|
|
@ -42,5 +42,5 @@ public class IotLocationVo {
|
|||
private String startAlarm;
|
||||
/** 电量百分比 */
|
||||
@ApiModelProperty(value = "电量百分比")
|
||||
private Double voltagepercent;
|
||||
private String voltagepercent;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -402,10 +402,10 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
|||
list.add(iotMaCodeMachine.getIotCode());
|
||||
map.put("deviceids", list);
|
||||
String param = JSON.toJSONString(map);
|
||||
String res = HttpHelper.doPost(HttpStatus.LAST_POSITION_URL + redisCode, param);
|
||||
// String res = HttpHelper.doPost(HttpStatus.LAST_POSITION_URL + redisCode, param);
|
||||
String res1 = HttpHelper.doPost(HttpStatus.REPORT_OF_FLINE + redisCode, param);
|
||||
//对返回的结果进行解析
|
||||
IotLocationVo iotLocationVo = resultDataHandler(res);
|
||||
IotLocationVo iotLocationVo = resultDataHandler(res1);
|
||||
String address = resultDataHandler1(res1);
|
||||
iotLocationVo.setAddress(address);
|
||||
iotMaCodeMachine.setIotLocationVo(iotLocationVo);
|
||||
|
|
@ -427,7 +427,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
|||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject jsonObject = JSONObject.from(jsonArray.getJSONObject(i));
|
||||
iotLocationVo.setIotId(jsonObject.getString("deviceid"));
|
||||
iotLocationVo.setVoltagepercent(Double.valueOf(jsonObject.getString("voltagepercent")));
|
||||
iotLocationVo.setVoltagepercent(jsonObject.getString("strstatus"));
|
||||
iotLocationVo.setCallat(StringHelper.conversionBigDecimal(jsonObject.getString("callat")));
|
||||
iotLocationVo.setCallon(StringHelper.conversionBigDecimal(jsonObject.getString("callon")));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,20 @@ public class StorageStatus {
|
|||
private String agreementCode;
|
||||
|
||||
|
||||
/**
|
||||
* 一级类目
|
||||
*/
|
||||
@ApiModelProperty(value = "一级类目")
|
||||
@Excel(name = "一级类目")
|
||||
private String typeLevelOneName;
|
||||
|
||||
/**
|
||||
* 二级类目
|
||||
*/
|
||||
@ApiModelProperty(value = "二级类目")
|
||||
@Excel(name = "二级类目")
|
||||
private String typeLevelTwoName;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
|
|
@ -227,4 +241,6 @@ public class StorageStatus {
|
|||
@ApiModelProperty(value = "装备管理方式名称")
|
||||
private String manageTypeName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -315,10 +315,30 @@ public class IotMachineServiceImpl implements IotMachineService {
|
|||
redisService.setCacheObject(TokenConstants.TOKEN_LOCATION,redisCode,23L, TimeUnit.HOURS);
|
||||
}
|
||||
map.clear();
|
||||
list.add(iotLocationVo.getIotId());
|
||||
map.put("deviceids",list);
|
||||
// list.add(iotLocationVo.getIotId());
|
||||
|
||||
map.put("deviceid",iotLocationVo.getIotId());
|
||||
String endTime = iotLocationVo.getEndTime();
|
||||
if (endTime == null) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date now = new Date();
|
||||
endTime = sdf.format(now);
|
||||
|
||||
// Calculate one month before
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(now);
|
||||
calendar.add(Calendar.MONTH, -1);
|
||||
String beginTime = sdf.format(calendar.getTime());
|
||||
|
||||
map.put("begintime", beginTime);
|
||||
map.put("endtime", endTime);
|
||||
} else {
|
||||
map.put("begintime", iotLocationVo.getBeginTime());
|
||||
map.put("endtime", endTime);
|
||||
}
|
||||
String param = JSON.toJSONString(map);
|
||||
String res = HttpHelper.doPost(HttpStatus.LAST_POSITION_URL+redisCode,param);
|
||||
// String res = HttpHelper.doPost(HttpStatus.LAST_POSITION_URL+redisCode,param);
|
||||
String res = HttpHelper.doPost(HttpStatus.REPORT_PARK_DETAIL_BY_TIME_URL+redisCode,param);
|
||||
//对返回的结果进行解析
|
||||
IotLocationVo iotLocationVoRes = resultDataHandler(res);
|
||||
log.info("返回结果resultDataHandler:{}", iotLocationVoRes);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
<!--设备分布-->
|
||||
<select id="getEquipmentDisByMap" resultType="com.bonus.sgzb.material.domain.EquipmentDis">
|
||||
select count(*) as num,province from bm_project_lot where province is not null
|
||||
select count(*) as num,province from bm_project_lot where
|
||||
longitude is not null and del_flag = 0
|
||||
<if test="province!=null and province != ''">
|
||||
AND province = #{province}
|
||||
</if>
|
||||
|
|
@ -904,7 +905,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_project_lot bpl ON bai.project_id = bpl.lot_id
|
||||
WHERE
|
||||
im.bind_status = 0
|
||||
AND imb.unbind_time IS NULL and sai.`status` = 0 and bpl.province = #{province}
|
||||
AND imb.unbind_time IS NULL and sai.`status` = 0
|
||||
</select>
|
||||
<select id="getSecondaryWarehouse" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="getStorageStatusList" resultType="com.bonus.sgzb.material.domain.StorageStatus">
|
||||
SELECT
|
||||
mt4.type_name AS typeLevelOneName,
|
||||
mt3.type_name AS typeLevelTwoName,
|
||||
mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
mt.unit_name AS unit,
|
||||
|
|
@ -187,6 +189,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
lad.type_id
|
||||
) AS subquery7 ON subquery7.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||
WHERE
|
||||
mt.`level` = 4
|
||||
AND mt.del_flag = '0'
|
||||
|
|
@ -196,5 +200,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="typeModelName != null and typeModelName != ''">
|
||||
and mt.type_name like concat('%',#{typeModelName},'%')
|
||||
</if>
|
||||
<if test="typeLevelTwoName != null and typeLevelTwoName != ''">
|
||||
and mt3.type_name like concat('%',#{typeLevelTwoName},'%')
|
||||
</if>
|
||||
<if test="typeLevelOneName != null and typeLevelOneName != ''">
|
||||
and mt4.type_name like concat('%',#{typeLevelOneName},'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue