|
@@ -226,8 +226,8 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
|
|
}
|
|
}
|
|
|
|
|
|
public void timeCalibration() {
|
|
public void timeCalibration() {
|
|
- Integer count = timeCalibrationRecordMapper.selectCountByToday();
|
|
|
|
- if (count == 0) {
|
|
|
|
|
|
+ List<TimeCalibrationRecord> count = timeCalibrationRecordMapper.selectCountByToday();
|
|
|
|
+ if (count.size()==0) {
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd,HH:mm:ss");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd,HH:mm:ss");
|
|
String dateStr = sdf.format(date);
|
|
String dateStr = sdf.format(date);
|
|
@@ -239,6 +239,7 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
|
|
logger.info("校准系统模块时间转成16进制的字符串==>" + strHexStr16);
|
|
logger.info("校准系统模块时间转成16进制的字符串==>" + strHexStr16);
|
|
sendMsg(strHexStr16);
|
|
sendMsg(strHexStr16);
|
|
TimeCalibrationRecord timeCalibrationRecord = new TimeCalibrationRecord();
|
|
TimeCalibrationRecord timeCalibrationRecord = new TimeCalibrationRecord();
|
|
|
|
+ timeCalibrationRecord.setIndate(new Date());
|
|
timeCalibrationRecordMapper.insertSelective(timeCalibrationRecord);
|
|
timeCalibrationRecordMapper.insertSelective(timeCalibrationRecord);
|
|
}
|
|
}
|
|
}
|
|
}
|