修复爱尚家的bug
This commit is contained in:
@@ -5,8 +5,6 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.hjm.controller.PushCallback;
|
||||
import com.gxwebsoft.hjm.entity.HjmCar;
|
||||
import com.gxwebsoft.hjm.service.HjmCarService;
|
||||
import org.eclipse.paho.client.mqttv3.*;
|
||||
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -53,7 +51,7 @@ public class TestMain {
|
||||
// System.out.println("decrypt = " + decrypt);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
// public void mqtt() throws MqttException {
|
||||
////tcp://MQTT安装的服务器地址:MQTT定义的端口号
|
||||
// String HOST = "tcp://1.14.159.185:1883";
|
||||
@@ -94,19 +92,4 @@ public class TestMain {
|
||||
// client.subscribe("/SW_GSP/#", 2);
|
||||
// while (true);
|
||||
// }
|
||||
|
||||
private String fenToYuan(String amount) {
|
||||
NumberFormat format = NumberFormat.getInstance();
|
||||
try {
|
||||
Number number = format.parse(amount);
|
||||
double temp = number.doubleValue() / 100.0;
|
||||
format.setGroupingUsed(false);
|
||||
// 设置返回的小数部分所允许的最大位数
|
||||
format.setMaximumFractionDigits(2);
|
||||
amount = format.format(temp);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user