|
@ -80,7 +80,7 @@ public class MedicineWarrayService extends BaseJpaService<Mediicinewarray, Medii
|
|
}
|
|
}
|
|
|
|
|
|
public JSONObject getTemperature(
|
|
public JSONObject getTemperature(
|
|
String equNum, String equType, String netStatus, String lowT, String heightT,
|
|
|
|
|
|
String equNum, String equType, String netStatus, String lowT, String heightT,String lowH,String heightH,
|
|
String content, String startTime, String endTime, int page, int size) throws Exception {
|
|
String content, String startTime, String endTime, int page, int size) throws Exception {
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
String sql = "SELECT\n" +
|
|
String sql = "SELECT\n" +
|
|
@ -130,19 +130,25 @@ public class MedicineWarrayService extends BaseJpaService<Mediicinewarray, Medii
|
|
// conditionSql += " and t.type like '%温度%'";
|
|
// conditionSql += " and t.type like '%温度%'";
|
|
|
|
|
|
if (!StringUtils.isEmpty(equNum)){
|
|
if (!StringUtils.isEmpty(equNum)){
|
|
conditionSql += " and t.equ_num = '" + equNum + "'";
|
|
|
|
|
|
conditionSql += " and t.equ_num = '" + equNum + "' ";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(equType)){
|
|
if (!StringUtils.isEmpty(equType)){
|
|
conditionSql += " and t.equ_type = '" + equType + "'";
|
|
|
|
|
|
conditionSql += " and t.equ_type = '" + equType + "' ";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(netStatus)){
|
|
if (!StringUtils.isEmpty(netStatus)){
|
|
conditionSql += " and t.network_status = '" + netStatus + "'";
|
|
|
|
|
|
conditionSql += " and t.network_status = '" + netStatus + "' ";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(lowT)) {
|
|
if (!StringUtils.isEmpty(lowT)) {
|
|
conditionSql += " and t.temperature >= " + lowT;
|
|
|
|
|
|
conditionSql += " and t.temperature >= " + lowT +" ";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(heightT)) {
|
|
if (!StringUtils.isEmpty(heightT)) {
|
|
conditionSql += " and t.temperature <= " + heightT;
|
|
|
|
|
|
conditionSql += " and t.temperature <= " + heightT +" ";
|
|
|
|
}
|
|
|
|
if (!StringUtils.isEmpty(lowH)) {
|
|
|
|
conditionSql += " and t.humidity >= " + lowH +" ";
|
|
|
|
}
|
|
|
|
if (!StringUtils.isEmpty(heightH)) {
|
|
|
|
conditionSql += " and t.humidity <= " + heightH +" ";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(content)){
|
|
if (!StringUtils.isEmpty(content)){
|
|
conditionSql += " and CONCAT(IFNULL(t.`equ_name`,''), IFNULL(t.`equ_num`,'')) like '%" + content + "%'";
|
|
conditionSql += " and CONCAT(IFNULL(t.`equ_name`,''), IFNULL(t.`equ_num`,'')) like '%" + content + "%'";
|
|
@ -807,8 +813,6 @@ public class MedicineWarrayService extends BaseJpaService<Mediicinewarray, Medii
|
|
mediicinedevice.setAbnormal(type);
|
|
mediicinedevice.setAbnormal(type);
|
|
mediicinedevice.setLogTime(new Date());
|
|
mediicinedevice.setLogTime(new Date());
|
|
mediicinedevice.setNowHumidity(humidity+"");
|
|
mediicinedevice.setNowHumidity(humidity+"");
|
|
mediicinedevice.setNetworkStatus("1");
|
|
|
|
mediicinedevice.setSaleStatus("1");
|
|
|
|
deviceDao.save(mediicinedevice);
|
|
deviceDao.save(mediicinedevice);
|
|
Mediicinewarray mediicinewarray = medicinedeviceService.uploadDeviceInfo(equNum, temperature, humidity, type, null, null, null, null);
|
|
Mediicinewarray mediicinewarray = medicinedeviceService.uploadDeviceInfo(equNum, temperature, humidity, type, null, null, null, null);
|
|
result.put("msg",mediicinewarray);
|
|
result.put("msg",mediicinewarray);
|