Skip to content

Commit

Permalink
fix: bot for agent temperature scale
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagi committed Jun 7, 2023
1 parent 53e0137 commit 9584b7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.springframework.web.client.RestTemplate;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.Date;
import java.util.List;
Expand Down Expand Up @@ -97,7 +98,7 @@ public void sendProjectReportMessage(int projectId, String projectName, Date sta
public void sendErrorDevice(int agentId, int errorType, int tem, String udId) {
var robots = baseMapper.computeAgentRobots(agentId);
if (robots.isEmpty()) return;
var msg = new DeviceMessage(errorType, tem, udId);
var msg = new DeviceMessage(errorType, new BigDecimal(BigInteger.valueOf(tem),1), udId);
send(robots, msg);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
import lombok.AllArgsConstructor;
import org.cloud.sonic.controller.tools.robot.Message;

import java.math.BigDecimal;

@AllArgsConstructor
public class DeviceMessage extends Message {
public int errorType;
public int tem;
public BigDecimal tem;
public String udId;
}

0 comments on commit 9584b7a

Please sign in to comment.