java实现考勤机信息同步
/**
* 更新傳感器的用戶信息
*
* @param sensorNumber
* @param attendanceEmployeeVos
*/
private synchronized void initializeAdd(String sensorNumber, List attendanceEmployeeVos) {
if (attendanceEmployeeVos != null && attendanceEmployeeVos.size() > 0) {
StringBuilder builder = new StringBuilder();
int y = 1;
for (AttendanceDataEmployeeVo attendanceEmployeeVo : attendanceEmployeeVos) {
// 更新用戶信息命令
builder.append("\nC:-" + (++y) + “:DATA UPDATE USERINFO”);
builder.append("\tPIN=" + attendanceEmployeeVo.getEmployeePin() +
“\tName=” + attendanceEmployeeVo.getEmployeeName() +
“\tGrp=” + attendanceEmployeeVo.getDeptId());
for (int i = 0; i < attendanceEmployeeVo.getEmployeeFingers().size(); i++) {
//更新指模命令
builder.append("\nC:-" + (++y) + “:DATA UPDATE FINGERTMP”);
builder.append("\tPIN=" + attendanceEmployeeVo.getEmployeePin() +
“\tFID=” + attendanceEmployeeVo.getEmployeeFingers().get(i).getFid() +
“\tSize=” + attendanceEmployeeVo.getEmployeeFingers().get(i).getTmp().length() +
“\tTMP=” + attendanceEmployeeVo.getEmployeeFingers().get(i).getTmp());
}
}
mapUpdate.put(sensorNumber, builder.toString());
}
}
總結
以上是生活随笔為你收集整理的java实现考勤机信息同步的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 二叉树学习之二叉查找树
- 下一篇: 【转载】RocketMQ优秀文章