diff --git a/app/HGProductionTool/ProductionTool_zh_CN.qm b/app/HGProductionTool/ProductionTool_zh_CN.qm
index 016f7f6..315dcf9 100644
Binary files a/app/HGProductionTool/ProductionTool_zh_CN.qm and b/app/HGProductionTool/ProductionTool_zh_CN.qm differ
diff --git a/app/HGProductionTool/ProductionTool_zh_CN.ts b/app/HGProductionTool/ProductionTool_zh_CN.ts
index 72dae88..8bef3b6 100644
--- a/app/HGProductionTool/ProductionTool_zh_CN.ts
+++ b/app/HGProductionTool/ProductionTool_zh_CN.ts
@@ -130,45 +130,45 @@
取消
-
-
-
-
+
+
+
+
提示
-
+
速度模式
-
+
失败!
-
+
成功!
-
+
检测到固件版本不一致,请烧录正确的固件并重新检查
-
+
检测到电机版本不一致,请更换正确的电机并重新检查
-
+
休眠时间
-
+
Vid和Pid
@@ -181,32 +181,32 @@
检测到配置%1不一致,已重新配置,请再次检查
-
+
配置一致!
-
+
设备已丢失
-
+
序列号为空
-
+
序列号不合法
-
+
该设备正在进行测试
-
+
设置序列号失败
@@ -216,100 +216,100 @@
设备名: %1
-
+
Target Configration:
目标配置:
-
-
-
-
+
+
+
+
Speep mode: %1PPM
速度模式: %1PPM
-
+
Pass
-
-
-
-
+
+
+
+
设置
-
-
-
-
+
+
+
+
Sleep time: %1minute
休眠时间: %1分钟
-
-
+
+
Vid: %1 Pid: %2
Vid: %1 Pid: %2
-
-
-
-
+
+
+
+
设备型号: %1
-
-
+
+
固件版本:%1
-
-
+
+
电机板版本号:%1
-
-
+
+
Vid: %1
Pid: %2
-
+
当前设备配置:
-
+
Fail
-
-
+
+
设置序列号: %1
-
+
设备型号
@@ -322,14 +322,14 @@ Pid: %2
检测到%1不一致,请烧录正确的固件并重新检查
-
-
+
+
检测到当前设备的vid-pid和设备对象不一致.
-
-
+
+
请重启设备刷新.
@@ -350,24 +350,24 @@ Pid: %2
测试结果:成功!
-
-
-
+
+
+
检测到配置 %1不一致,请重新配置后再次检查
-
+
检测到配置 %1不一致,请重启后再次检查
-
+
将目标配置设置到设备
-
+
测试内容:
@@ -376,21 +376,21 @@ Pid: %2
成功,请检查配置
-
-
-
-
+
+
+
+
休眠时间: 不休眠
-
-
+
+
测试员: %1, 测试项: %2
-
+
设置序列号成功
@@ -717,90 +717,113 @@ Pid: %2
登录
-
+
+
+
+
+
+
+
+ 图像测试工位
+
+
+
+
+ 成品检验工位
+
+
+
账户:
-
+
密码:
-
+
+
+ 设备类型:
+
+
+
+
+ 设备配置:
+
+
+
+
+ 打开文件目录
+
+
+
+
+ 刷新配置
+
+
+
Show password
记住密码
-
+
显示密码
-
- 数据库地址:
+ 数据库地址:
-
- 数据库端口:
+ 数据库端口:
-
- FTP地址:
+ FTP地址:
-
- FTP端口:
+ FTP端口:
-
- 烧录工位
+ 烧录工位
-
- 初检工位
+ 初检工位
-
- 图像测试工位
+ 图像测试工位
-
- 选择配置:
+ 选择配置:
-
- 刷新列表
+ 刷新列表
-
- 打开文件目录
+ 打开文件目录
-
- 压力测试工位
+ 压力测试工位
-
+
注册
-
- 选择配置文件
+ 选择配置文件
@@ -815,7 +838,7 @@ Pid: %2
端口号:
-
+
登录
@@ -840,39 +863,61 @@ Pid: %2
登录
-
-
-
-
-
+
+
+
+
+
提示
-
+
账户不存在
-
+
密码不能为空
-
+
密码错误
-
+
请先选择配置文件
-
+
配置文件不存在
+
+
+
+
+ 初检工位
+
+
+
+
+
+ 图像测试工位
+
+
+
+
+ 成品检验工位
+
+
+
+
+ 烧录工位
+
选择配置文件
@@ -1071,17 +1116,17 @@ Pid: %2
关闭设备
-
+
序号
-
+
选择
-
+
设备
@@ -1188,12 +1233,12 @@ Pid: %2
序列号
-
+
提示
-
+
请至少勾选一台设备
@@ -1347,12 +1392,12 @@ Pid: %2
设备未连接
-
+
设备类型:
-
+
序列号:
@@ -1369,7 +1414,7 @@ Pid: %2
休眠时间:
-
+
加载上一次上传的图片
@@ -1378,14 +1423,14 @@ Pid: %2
设备已断开
-
+
提示
-
-
-
+
+
+
畸变修正值:
@@ -1398,71 +1443,76 @@ Pid: %2
取消
-
+
目标配置: 速度模式:
-
+
休眠时间:
-
+
,但是校正有异常
-
+
请验证设备配置:
-
+
vid:%1
-
+
pid:%1
-
+
休眠时间:%1分钟
-
+
休眠时间:%1
-
-
+
+
不休眠
-
+
速度模式:%1PPM
-
+
设备型号:%1
+
+
+
+ 设备序列号:
+
Serial number: %1, Test item: %2, Test result: Failed! Reason: %3
@@ -1474,21 +1524,21 @@ Pid: %2
设备序列号: %1, 测试项: %2, 测试结果: 通过!
-
-
+
+
设备历史扫描张数:
-
-
-
-
+
+
+
+
提示
-
+
请验证设备内存和硬盘容量大小:
@@ -1505,32 +1555,32 @@ Pid: %2
-
+
测试员: %1, 测试项: %2, 测试结果: 不通过! 原因: %3
-
+
测试员: %1, 测试项: %2, 测试结果: 通过!
-
+
无纸
-
+
设备处于休眠模式
-
+
设备处于计数模式
-
+
其他错误
@@ -1539,74 +1589,81 @@ Pid: %2
设备序列号:%1
-
+
序号
-
+
测试项
-
+
测试状态
-
+
+
未测试
-
-
+
+
+
+
+
+
+
+
不通过
-
+
实际内存容量:%1
-
+
警告
-
+
检测到设备硬盘或内存过小!
-
+
设备当前畸变值:
-
+
200dpi: %1
-
+
300dpi: %1
-
+
600dpi: %1
-
+
不支持
-
-
+
+
通过
@@ -1632,31 +1689,31 @@ Pid: %2
Pid:
-
-
+
+
设备滚轴张数:
-
-
+
+
标准圆:宽 * 高:
-
+
固件号:
-
+
设备序列号:%1
-
+
device firmware number:%1
@@ -1664,13 +1721,13 @@ Pid: %2
-
+
Target cpu size:%1
目标内存大小:>%1
-
+
Target disk size:%1
目标硬盘容量:>%1
@@ -1680,22 +1737,22 @@ Pid: %2
实际内存大小:%1
-
+
实际硬盘容量:%1
-
+
分钟
-
+
VID:
-
+
PID:
@@ -1725,77 +1782,77 @@ Pid: %2
F5-刷新设备列表
-
+
用户
-
+
信息
-
+
新建项目
-
+
账户管理
-
+
修改密码
-
+
导出
-
+
登出
-
+
-
+
退出
-
+
上传配置文件
-
+
刷新设备列表
-
+
查看日志
-
+
-
+
-
+
关于...
@@ -1816,53 +1873,73 @@ Pid: %2
数据库错误
-
-
-
-
-
+
+
+
+
提示
-
+
华高生产工具-烧录工位
-
+
+
华高生产工具-初检工位
-
+
+
华高生产工具-图像测试工位
-
- 华高生产工具-压力测试工位
+ 华高生产工具-压力测试工位
-
-
-
+
+
+ 华高生产工具-成品检验工位
+
+
+
+
+
测试中,请勿关闭!
-
+
+
+ 华高生产工具-烧录工位
+
+
+
+
+ 刷新设备列表(F5)
+
+
+
+
+ 开始初检
+
+
+
关于 %1
-
+
华高生产工具
-
+
<p>版本号: %1</p>
@@ -1884,8 +1961,7 @@ Pid: %2
取消
-
-
+
不能创建更多项目
diff --git a/app/HGProductionTool/dialog_login.ui b/app/HGProductionTool/dialog_login.ui
index d1f93df..70d6b5a 100644
--- a/app/HGProductionTool/dialog_login.ui
+++ b/app/HGProductionTool/dialog_login.ui
@@ -6,257 +6,231 @@
0
0
- 557
- 351
+ 728
+ 474
-
-
- 557
- 351
-
-
-
-
- 557
- 351
-
-
Dialog
-
- -
-
-
- 0
-
-
-
- Login
-
-
-
-
- 40
- 220
- 131
- 20
-
-
-
- station1
-
-
- true
-
-
-
-
-
- 190
- 220
- 141
- 21
-
-
-
- station2
-
-
-
-
-
- 340
- 220
- 151
- 21
-
-
-
- station3
-
-
-
-
-
- 160
- 260
- 75
- 31
-
-
-
- LOG IN
-
-
- true
-
-
- true
-
-
-
-
-
- 280
- 260
- 75
- 31
-
-
-
- Register
-
-
-
-
-
- 380
- 80
- 111
- 21
-
-
-
- show password
-
-
-
-
-
- 140
- 30
- 191
- 22
-
-
-
-
-
-
- 380
- 60
- 131
- 21
-
-
-
- remember password
-
-
-
-
-
- 70
- 30
- 48
- 16
-
-
-
- account:
-
-
-
-
-
- 140
- 70
- 191
- 22
-
-
-
-
-
-
- 70
- 70
- 54
- 16
-
-
-
- password:
-
-
-
-
-
- 50
- 130
- 81
- 20
-
-
-
- device type:
-
-
-
-
-
- 140
- 130
- 271
- 22
-
-
-
-
-
-
- 40
- 170
- 91
- 20
-
-
-
- device config:
-
-
-
-
-
- 140
- 170
- 271
- 22
-
-
-
-
-
-
- 420
- 150
- 91
- 23
-
-
-
- view directory
-
-
-
-
-
- 420
- 180
- 91
- 23
-
-
-
- update connfig
-
-
-
-
-
-
+
+
+
+ 250
+ 30
+ 191
+ 31
+
+
+
+
+
+
+ 500
+ 300
+ 151
+ 31
+
+
+
+ station3
+
+
+
+
+
+ 470
+ 90
+ 111
+ 31
+
+
+
+ show password
+
+
+
+
+
+ 190
+ 150
+ 271
+ 31
+
+
+
+
+
+
+ 250
+ 90
+ 191
+ 31
+
+
+
+
+
+
+ 90
+ 210
+ 91
+ 31
+
+
+
+ device config:
+
+
+
+
+
+ 400
+ 370
+ 75
+ 31
+
+
+
+ Register
+
+
+
+
+
+ 280
+ 300
+ 141
+ 31
+
+
+
+ station2
+
+
+
+
+
+ 190
+ 210
+ 271
+ 31
+
+
+
+
+
+
+ 180
+ 30
+ 48
+ 31
+
+
+
+ account:
+
+
+
+
+
+ 90
+ 150
+ 81
+ 31
+
+
+
+ device type:
+
+
+
+
+
+ 180
+ 90
+ 54
+ 31
+
+
+
+ password:
+
+
+
+
+
+ 100
+ 300
+ 131
+ 31
+
+
+
+ station1
+
+
+ true
+
+
+
+
+
+ 490
+ 150
+ 151
+ 31
+
+
+
+ view directory
+
+
+
+
+
+ 470
+ 30
+ 131
+ 31
+
+
+
+ remember password
+
+
+
+
+
+ 490
+ 210
+ 151
+ 31
+
+
+
+ update connfig
+
+
+
+
+
+ 230
+ 370
+ 75
+ 31
+
+
+
+ LOG IN
+
+
+ true
+
+
+ true
+
+
diff --git a/app/HGProductionTool/form_maininterface.cpp b/app/HGProductionTool/form_maininterface.cpp
index 36c2faa..3edc556 100644
--- a/app/HGProductionTool/form_maininterface.cpp
+++ b/app/HGProductionTool/form_maininterface.cpp
@@ -748,6 +748,18 @@ QString Form_mainInterface::getDevPid()
return QString::fromStdString(buf);
}
+QString Form_mainInterface::getDevSn()
+{
+ std::string serialNum;
+ unsigned int serialNumLen = 0;
+ if(SANE_STATUS_NO_MEM == sane_io_control(m_handle, IO_CTRL_CODE_GET_SERIAL, nullptr, &serialNumLen) && serialNumLen)
+ {
+ serialNum.resize(serialNumLen);
+ sane_io_control(m_handle, IO_CTRL_CODE_GET_SERIAL, &serialNum[0], &serialNumLen);
+ }
+ return QString::fromStdString(serialNum.c_str());
+}
+
int Form_mainInterface::getRollerNum()
{
SANE_Int rollCount = 0;
@@ -919,6 +931,11 @@ void Form_mainInterface::on_tableWidget_currentItemChanged(QTableWidgetItem *cur
if (!path.isEmpty())
m_textTips->insertImg(path);
}
+ if (name.toStdWString() == HGPDTTOOLDB_NAME_GET_SN)
+ {
+ QString str(tr("device serial number:") + getDevSn());
+ m_textTips->setViewContent(str);
+ }
}
}
diff --git a/app/HGProductionTool/form_maininterface.h b/app/HGProductionTool/form_maininterface.h
index c0defed..98effdd 100644
--- a/app/HGProductionTool/form_maininterface.h
+++ b/app/HGProductionTool/form_maininterface.h
@@ -97,6 +97,7 @@ private:
QString getSleepTime();
QString getDevVid();
QString getDevPid();
+ QString getDevSn();
int getRollerNum();
int getHistoryCount();
void getLogInfo(int ret);
diff --git a/code/base/test_base.cpp b/code/base/test_base.cpp
index 2e48e4d..7f2fa93 100644
--- a/code/base/test_base.cpp
+++ b/code/base/test_base.cpp
@@ -60,7 +60,9 @@ static struct Test_Map
{HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_300DPI ,HGPDTTOOLDB_TITLE_IMAGE_CORRECTION_RGB_300DPI},
{HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_300DPI ,HGPDTTOOLDB_TITLE_IMAGE_CORRECTION_GRAY_300DPI},
{HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_600DPI ,HGPDTTOOLDB_TITLE_IMAGE_CORRECTION_RGB_600DPI},
-{HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_600DPI ,HGPDTTOOLDB_TITLE_IMAGE_CORRECTION_GRAY_600DPI}
+{HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_600DPI ,HGPDTTOOLDB_TITLE_IMAGE_CORRECTION_GRAY_600DPI},
+{HGPDTTOOLDB_NAME_GET_SN ,HGPDTTOOLDB_TITLE_GET_SN},
+{HGPDTTOOLDB_NAME_KEY_INSPECTION ,HGPDTTOOLDB_TITLE_KEY_INSPECTION}
};
static std::string StringToUtf(std::string strValue)
@@ -618,7 +620,8 @@ test::~test()
void test::init_test_map_()
{
test_map_[WRITE_CFG_NAME] = &test::set_init_cfg;
- test_map_[HGPDTTOOLDB_NAME_SET_JSON_SN] = &test::test_set_json_serial_num;
+ test_map_[HGPDTTOOLDB_NAME_SET_JSON_SN] = &test::test_set_json_serial_num;
+ test_map_[HGPDTTOOLDB_NAME_GET_SN] = &test::test_get_serial_num;
test_map_[HGPDTTOOLDB_NAME_CLEAR_PAPER_PATH] = &test::tset_clear_paper_path;
test_map_[HGPDTTOOLDB_NAME_KEY_FUNCTION] = &test::test_key_funtion;
test_map_[HGPDTTOOLDB_NAME_COUNTING_MODE] = &test::test_count_mode;
@@ -896,6 +899,11 @@ int test::test_set_json_serial_num(void* data)
return ret;
}
+int test::test_get_serial_num(void* data)
+{
+ helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, NULL, true);
+ return SCANNER_ERR_OK;
+}
/* 清理纸道功能确认 */
int test::tset_clear_paper_path(void* data)
{
@@ -1051,7 +1059,7 @@ int test::test_reset(void* data)
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
/* 走纸检查 */
-int test::test_paper_feed(void* data) //使用单张扫描测试
+int test::test_paper_feed(void* data)
{
return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
}
diff --git a/code/base/test_base.h b/code/base/test_base.h
index 9dd4410..6b0abdb 100644
--- a/code/base/test_base.h
+++ b/code/base/test_base.h
@@ -116,12 +116,18 @@
#define HGPDTTOOLDB_TITLE_IMAGE_CORRECTION_RGB_600DPI L"彩色图像扫描校正+600dpi"
/*灰度图像扫描校正+600dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_CORRECTION_GRAY_600DPI L"灰度图像扫描校正+600dpi"
+/*关键项检查*/
+#define HGPDTTOOLDB_TITLE_KEY_INSPECTION L"关键项检查"
+/* 获取设备序列号 */
+#define HGPDTTOOLDB_TITLE_GET_SN L"获取设备序列号"
//////////////////////////////////////NAME//////////////////////////////////////
#define WRITE_CFG_NAME L"write-cfg"
/* 设置json序列号 */
#define HGPDTTOOLDB_NAME_SET_JSON_SN L"SET_JSON_SN"
+/* 获取设备序列号 */
+#define HGPDTTOOLDB_NAME_GET_SN L"GET_SN"
/* 拨码开关校验 */
#define HGPDTTOOLDB_NAME_DIAL_SWITCH L"DIAL_SWITCH"
/* 检查船型开关功能 */
@@ -240,6 +246,9 @@
#define HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_600DPI L"IMAGE_CORRECTION_RGB_600DPI"
/*灰度图像扫描校正+600dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_600DPI L"IMAGE_CORRECTION_GRAY_600DPI"
+/*关键项检查*/
+#define HGPDTTOOLDB_NAME_KEY_INSPECTION L"KEY_INSPECTION"
+
#define TEST_DLL
#ifdef TEST_DLL
@@ -350,6 +359,7 @@ private:
int set_init_cfg(void* data);
/*设置序列号*/
int test_set_json_serial_num(void* data);
+ int test_get_serial_num(void *data);
/* 清理纸道功能确认 */
int tset_clear_paper_path(void* data);
/* 按键功能检测 */