diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index f65fe8b..f882df6 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -114,7 +114,7 @@ QList result; QSqlQuery query; QString deptId=ConvertStaffInfo(temporary_user_id).dept_id; - query.prepare("SELECT blei.id AS id, eei.equipment_name AS sampleName, eei.model AS sampleModel,eei.help_instruction AS helpInstruction, " + query.prepare("SELECT blei.id AS id, blei.sample_id as equipmentId,eei.equipment_name AS sampleName, eei.model AS sampleModel,eei.help_instruction AS helpInstruction, " " eei.manufacture_no AS manufactureNo, eei.manufacturer,bo.customer_name,sd.SIMPLE_NAME,bo.require_over_time, bo.is_urgent,blei.measure_status " "FROM biz_business_lab_executive_info blei " "JOIN eqpt_equipment_info eei ON eei.id = blei.sample_id " @@ -127,21 +127,24 @@ if (query.exec()) { while (query.next()) { - Dept Dept; - Dept.id = query.value("id").toString(); - Dept.sample_name = query.value("sampleName").toString(); - Dept.sample_model = query.value("sampleModel").toString(); - Dept.help_instruction = query.value("helpInstruction").toString(); - Dept.manufacture_no = query.value("manufactureNo").toString(); - Dept.manufacturer = query.value("manufacturer").toString(); - Dept.customer_name = query.value("customer_name").toString(); - Dept.FULL_NAME = query.value("SIMPLE_NAME").toString(); - Dept.require_over_time = query.value("require_over_time").toDateTime(); - Dept.is_urgent = query.value("is_urgent").toString(); - Dept.measure_status=query.value("measure_status").toString(); + Dept dept; + dept.id = query.value("id").toString(); + dept.sample_name = query.value("sampleName").toString(); + dept.sample_id = query.value("equipmentId").toString(); + dept.sample_model = query.value("sampleModel").toString(); + dept.help_instruction = query.value("helpInstruction").toString(); + dept.manufacture_no = query.value("manufactureNo").toString(); + dept.manufacturer = query.value("manufacturer").toString(); + dept.customer_name = query.value("customer_name").toString(); + dept.FULL_NAME = query.value("SIMPLE_NAME").toString(); + dept.require_over_time = query.value("require_over_time").toDateTime(); + dept.is_urgent = query.value("is_urgent").toString(); + dept.measure_status=query.value("measure_status").toString(); - result.append(Dept); + result.append(dept); +// qDebug() <<"---+"< result; QSqlQuery query; QString deptId=ConvertStaffInfo(temporary_user_id).dept_id; - query.prepare("SELECT blei.id AS id, eei.equipment_name AS sampleName, eei.model AS sampleModel,eei.help_instruction AS helpInstruction, " + query.prepare("SELECT blei.id AS id, blei.sample_id as equipmentId,eei.equipment_name AS sampleName, eei.model AS sampleModel,eei.help_instruction AS helpInstruction, " " eei.manufacture_no AS manufactureNo, eei.manufacturer,bo.customer_name,sd.SIMPLE_NAME,bo.require_over_time, bo.is_urgent,blei.measure_status " "FROM biz_business_lab_executive_info blei " "JOIN eqpt_equipment_info eei ON eei.id = blei.sample_id " @@ -127,21 +127,24 @@ if (query.exec()) { while (query.next()) { - Dept Dept; - Dept.id = query.value("id").toString(); - Dept.sample_name = query.value("sampleName").toString(); - Dept.sample_model = query.value("sampleModel").toString(); - Dept.help_instruction = query.value("helpInstruction").toString(); - Dept.manufacture_no = query.value("manufactureNo").toString(); - Dept.manufacturer = query.value("manufacturer").toString(); - Dept.customer_name = query.value("customer_name").toString(); - Dept.FULL_NAME = query.value("SIMPLE_NAME").toString(); - Dept.require_over_time = query.value("require_over_time").toDateTime(); - Dept.is_urgent = query.value("is_urgent").toString(); - Dept.measure_status=query.value("measure_status").toString(); + Dept dept; + dept.id = query.value("id").toString(); + dept.sample_name = query.value("sampleName").toString(); + dept.sample_id = query.value("equipmentId").toString(); + dept.sample_model = query.value("sampleModel").toString(); + dept.help_instruction = query.value("helpInstruction").toString(); + dept.manufacture_no = query.value("manufactureNo").toString(); + dept.manufacturer = query.value("manufacturer").toString(); + dept.customer_name = query.value("customer_name").toString(); + dept.FULL_NAME = query.value("SIMPLE_NAME").toString(); + dept.require_over_time = query.value("require_over_time").toDateTime(); + dept.is_urgent = query.value("is_urgent").toString(); + dept.measure_status=query.value("measure_status").toString(); - result.append(Dept); + result.append(dept); +// qDebug() <<"---+"<