|
@@ -272,18 +272,6 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
|
|
|
return deviceNum;
|
|
|
}
|
|
|
|
|
|
- //下发传感器阈值20~200
|
|
|
- public void sendThreshold(){
|
|
|
- List<SensorThreshold> list = sensorThresholdMapper.selectByExample(new SensorThresholdExample());
|
|
|
- if(list.size()>0){
|
|
|
- SensorThreshold sensorThreshold = list.get(0);
|
|
|
- String threshold = "#LIMIT VALUE="+sensorThreshold.getThreshold();
|
|
|
- sendMsg(threshold);
|
|
|
- //下发完处理掉数据
|
|
|
- sensorThresholdMapper.deleteByPrimaryKey(sensorThreshold.getId());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
public void sendPackage(String equipmentNo) {
|
|
|
if (equipmentNo.indexOf("FAAF") != -1) {
|
|
|
logger.info("非法云模盒编号,不作下发处理");
|
|
@@ -456,6 +444,7 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
|
|
|
List<MouldHistoryTime> list = mouldHistoryTimeMapper.selectByExample(mExp);
|
|
|
if (list.size() > 0) {
|
|
|
MouldHistory mouldHistory = mouldHistoryMapper.selectByPrimaryKey(list.get(0).getHistoryId());
|
|
|
+ logger.info("本次运行次数: " + item.getRunCnt()+" 上一小时的运行次数:"+mouldHistory.getRunCnt()+" 上一小时的historyId:"+mouldHistory.getId());
|
|
|
mcr.setDateStr(sdf.format(openTime));
|
|
|
mcr.setEquipmentNo(item.getEquipmentNo());
|
|
|
mcr.setRuntime(item.getRunCnt() - mouldHistory.getRunCnt());
|