1、修改Obj比较的bug
This commit is contained in:
parent
c7760ac319
commit
5299ec0b48
@ -10,7 +10,6 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -51,7 +50,7 @@ public class AbnormalDeviceProcessor{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Scheduled(cron = "0 0/10 * * * ?") // 每30分钟执行一次
|
||||
//@Scheduled(cron = "0 0/10 * * * ?") // 每30分钟执行一次
|
||||
private void checkDevice() {
|
||||
logger.info("zny checkDevice");
|
||||
//checkNoDataDevice("2345084","2415276","2345076");
|
||||
|
||||
@ -8,7 +8,7 @@ public class ObjUtil {
|
||||
String[] items2 = obj2.toString().replaceAll(" +","").split(",|:");
|
||||
|
||||
String diff = "";
|
||||
for(int i=0; i<items.length; i++){
|
||||
for(int i=0; i<items.length&&i<items2.length; i++){
|
||||
if(!items[i].equals(items2[i])){
|
||||
diff += items[i]+"->"+items2[i].substring(items2[i].indexOf('=')+1)+",";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user