This commit is contained in:
liulu 2024-11-19 16:18:31 +08:00
parent f154af5352
commit dc349561bf

View File

@ -188,7 +188,7 @@ public class DeviceServiceImpl implements DeviceService {
ParamConf tmkInit = paramConfMapper.selectByKey("tmk_init");
if (tmkInit != null && "true".equals(tmkInit.getValue())) {
status.setHasDevice(true);
status.setTmkInit(false);
status.setTmkInit(true);
return status;
}
status.setTmkInit(false);
@ -260,11 +260,16 @@ public class DeviceServiceImpl implements DeviceService {
// sdfApi.closeSession(sh);
// sdfApi.closeDevice(dh);
ParamConf conf = new ParamConf();
conf.setKey("tmk_init");
conf.setValue("true");
conf.setCreatTime(LocalDateTime.now());
paramConfMapper.insert(conf);
if (tmkInit == null) {
tmkInit = new ParamConf();
tmkInit.setValue("true");
tmkInit.setKey("tmk_init");
tmkInit.setCreatTime(LocalDateTime.now());
paramConfMapper.insert(tmkInit);
} else {
tmkInit.setValue("true");
paramConfMapper.updateById(tmkInit);
}
}
private void checkName(String name) {