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 @@ 取消 - - - - + + + + tips 提示 - + Speed mode 速度模式 - + Failed! 失败! - + Succeed! 成功! - + Inconsistent firmware detected, please burn the correct firmware, and check again 检测到固件版本不一致,请烧录正确的固件并重新检查 - + Inconsistent motor version detected, please exchange the correct motor, and check again 检测到电机版本不一致,请更换正确的电机并重新检查 - + Sleep time 休眠时间 - + Vid and Pid Vid和Pid @@ -181,32 +181,32 @@ 检测到配置%1不一致,已重新配置,请再次检查 - + Consistent configuration 配置一致! - + device is lost 设备已丢失 - + Serial num is empty 序列号为空 - + sn is illegal 序列号不合法 - + The device is testing 该设备正在进行测试 - + set sn failed 设置序列号失败 @@ -216,100 +216,100 @@ 设备名: %1 - + Target Configration: Target Configration: 目标配置: - - - - + + + + Speep mode: %1PPM Speep mode: %1PPM 速度模式: %1PPM - + Pass Pass - - - - + + + + Set 设置 - - - - + + + + Sleep time: %1minute Sleep time: %1minute 休眠时间: %1分钟 - - + + Vid: %1 Pid: %2 Vid: %1 Pid: %2 Vid: %1 Pid: %2 - - - - + + + + Device model: %1 设备型号: %1 - - + + Firmware version: %1 固件版本:%1 - - + + Motor version: %1 电机板版本号:%1 - - + + Vid: %1 Pid: %2 Vid: %1 Pid: %2 - + Current Configration of device: 当前设备配置: - + Fail Fail - - + + Set serial number: %1 设置序列号: %1 - + Device model 设备型号 @@ -322,14 +322,14 @@ Pid: %2 检测到%1不一致,请烧录正确的固件并重新检查 - - + + Detected that the current device's vid-pid and device object are not consistent. 检测到当前设备的vid-pid和设备对象不一致. - - + + Please reboot device to update. 请重启设备刷新. @@ -350,24 +350,24 @@ Pid: %2 测试结果:成功! - - - + + + Inconsistent configuration %1detected, please reconfigure, and check again 检测到配置 %1不一致,请重新配置后再次检查 - + Inconsistent configuration %1detected, please reboot and reconfigure, and check again 检测到配置 %1不一致,请重启后再次检查 - + Set configuration to device 将目标配置设置到设备 - + Test content: 测试内容: @@ -376,21 +376,21 @@ Pid: %2 成功,请检查配置 - - - - + + + + Sleep time: Not sleeping 休眠时间: 不休眠 - - + + Tester: %1, Test item: %2 测试员: %1, 测试项: %2 - + set sn succeed 设置序列号成功 @@ -717,90 +717,113 @@ Pid: %2 登录 - + + station1 + + + + + station2 + 图像测试工位 + + + + station3 + 成品检验工位 + + + account: 账户: - + password: 密码: - + + device type: + 设备类型: + + + + device config: + 设备配置: + + + + view directory + 打开文件目录 + + + + update connfig + 刷新配置 + + + remember password Show password 记住密码 - + show password 显示密码 - dbHost: - 数据库地址: + 数据库地址: - dbPort: - 数据库端口: + 数据库端口: - ftpHost: - FTP地址: + FTP地址: - ftpPort: - FTP端口: + FTP端口: - Burn - 烧录工位 + 烧录工位 - InitTest - 初检工位 + 初检工位 - ImageTest - 图像测试工位 + 图像测试工位 - Select config file: - 选择配置: + 选择配置: - Update - 刷新列表 + 刷新列表 - View directory - 打开文件目录 + 打开文件目录 - PressureTest - 压力测试工位 + 压力测试工位 - + Register 注册 - Select Profile - 选择配置文件 + 选择配置文件 Select config file @@ -815,7 +838,7 @@ Pid: %2 端口号: - + LOG IN 登录 @@ -840,39 +863,61 @@ Pid: %2 登录 - - - - - + + + + + Prompt 提示 - + Account dose not exist 账户不存在 - + Password can not be empty 密码不能为空 - + Password error 密码错误 - + Please select a profile first 请先选择配置文件 - + Profile is not exsits 配置文件不存在 + + + + init test + 初检工位 + + + + + image test + 图像测试工位 + + + + finish test + 成品检验工位 + + + + burn + 烧录工位 + Select profile 选择配置文件 @@ -1071,17 +1116,17 @@ Pid: %2 关闭设备 - + ID 序号 - + selected 选择 - + device 设备 @@ -1188,12 +1233,12 @@ Pid: %2 序列号 - + tips 提示 - + Please check a devices at least 请至少勾选一台设备 @@ -1347,12 +1392,12 @@ Pid: %2 设备未连接 - + Device type: 设备类型: - + SerialNum: 序列号: @@ -1369,7 +1414,7 @@ Pid: %2 休眠时间: - + load last image which uploaded last time 加载上一次上传的图片 @@ -1378,14 +1423,14 @@ Pid: %2 设备已断开 - + tips 提示 - - - + + + destortion value: 畸变修正值: @@ -1398,71 +1443,76 @@ Pid: %2 取消 - + speed mode: 目标配置: 速度模式: - + sleep time: 休眠时间: - + ,but correct information is abnormal ,但是校正有异常 - + please verify the configuration of the device: 请验证设备配置: - + vid:%1 vid:%1 - + pid:%1 pid:%1 - + sleep time:%1minute 休眠时间:%1分钟 - + sleep time:%1 休眠时间:%1 - - + + Not sleeping 不休眠 - + speed mode:%1PPM 速度模式:%1PPM - + device model:%1 设备型号:%1 + + + device serial number: + 设备序列号: + Serial number: %1, Test item: %2, Test result: Failed! Reason: %3 Serial number: %1, Test item: %2, Test result: Failed! Reason: %3 @@ -1474,21 +1524,21 @@ Pid: %2 设备序列号: %1, 测试项: %2, 测试结果: 通过! - - + + device history scan count: 设备历史扫描张数: - - - - + + + + Prompt 提示 - + please verify the size of the device's cpu and disk: 请验证设备内存和硬盘容量大小: @@ -1505,32 +1555,32 @@ Pid: %2 - + Tester: %1, Test item: %2, Test result: Failed! Reason: %3 测试员: %1, 测试项: %2, 测试结果: 不通过! 原因: %3 - + Tester: %1, Test item: %2, Test result: Pass! 测试员: %1, 测试项: %2, 测试结果: 通过! - + No paper 无纸 - + Device is sleeping 设备处于休眠模式 - + Counting mode 设备处于计数模式 - + Other error 其他错误 @@ -1539,74 +1589,81 @@ Pid: %2 设备序列号:%1 - + ID 序号 - + Test items 测试项 - + status 测试状态 - + + not test 未测试 - - + + + + + + + + not pass 不通过 - + Actual cpu size:%1 实际内存容量:%1 - + Warning 警告 - + Device hard drive or memory detected to be too small! 检测到设备硬盘或内存过小! - + The device distortion: 设备当前畸变值: - + 200dpi: %1 200dpi: %1 - + 300dpi: %1 300dpi: %1 - + 600dpi: %1 600dpi: %1 - + not support 不支持 - - + + pass 通过 @@ -1632,31 +1689,31 @@ Pid: %2 Pid: - - + + device roller count: 设备滚轴张数: - - + + image pixel: 标准圆:宽 * 高: - + FirmwareNum: 固件号: - + device serial number:%1 设备序列号:%1 - + device firmware number:%1 device firmware number:%1 @@ -1664,13 +1721,13 @@ Pid: %2 - + Target cpu size:>%1 Target cpu size:%1 目标内存大小:>%1 - + Target disk size:>%1 Target disk size:%1 目标硬盘容量:>%1 @@ -1680,22 +1737,22 @@ Pid: %2 实际内存大小:%1 - + Actual disk size:%1 实际硬盘容量:%1 - + minute 分钟 - + VID: VID: - + PID: PID: @@ -1725,77 +1782,77 @@ Pid: %2 F5-刷新设备列表 - + menu_user 用户 - + menu_about 信息 - + act_newDevice 新建项目 - + act_manage 账户管理 - + act_changePwd 修改密码 - + act_export 导出 - + act_logOut 登出 - + Ctrl+Q - + act_close 退出 - + act_upload 上传配置文件 - + act_refreshDevice 刷新设备列表 - + act_openLog 查看日志 - + Ctrl+L - + act_setLogPath - + act_about 关于... @@ -1816,53 +1873,73 @@ Pid: %2 数据库错误 - - - - - + + + + tips 提示 - + production tool-burn station 华高生产工具-烧录工位 - + + production tool-init test station 华高生产工具-初检工位 - + + production tool-image test station 华高生产工具-图像测试工位 - production tool-pressure test station - 华高生产工具-压力测试工位 + 华高生产工具-压力测试工位 - - - + + production tool-finish test station + 华高生产工具-成品检验工位 + + + + + Is testing, do not close! 测试中,请勿关闭! - + + burn mode + 华高生产工具-烧录工位 + + + + Refresh(F5) + 刷新设备列表(F5) + + + + Start Init Test + 开始初检 + + + about %1 关于 %1 - + Production tool 华高生产工具 - + <p>DriverVer: %1</p> <p>版本号: %1</p> @@ -1884,8 +1961,7 @@ Pid: %2 取消 - - + cannot create more table 不能创建更多项目 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); /* 按键功能检测 */