diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 2d175f9..23a675e 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -3214,90 +3214,90 @@ // return result; //}; //自动核查-结果保存-设备与装置-标准装置管理-核查数据管理0.02级活塞式压力计数据表 -bool BaseCommonApi::InsertStandardCheckDatePistonGauge(StandardCheckDatePistonGauge gauge) -{ - QSqlQuery query; - query.prepare("INSERT INTO biz_equipment_standard_check_data_piston_gauge " - " (id,data_id,unit,check_point,first_forward_stroke,first_reverse_stroke,second_forward_stroke,second_reverse_stroke,third_forward_stroke,third_reverse_stroke,average_value," - "average_average_value,max_indicating_error,max_return_error,params,test_value_one,measure_value_one,test_value_two,measure_value_two,test_value_three,measure_value_three," - "test_value_four,measure_value_four,test_value_five,measure_value_five,test_value_six,measure_value_six,maximum_error,create_time,update_time) " - " VALUES " - " (:id,:data_id,:unit,:check_point,:first_forward_stroke,:first_reverse_stroke,:second_forward_stroke,:second_reverse_stroke,:third_forward_stroke,:third_reverse_stroke,:average_value,:average_average_value,:max_indicating_error,:max_return_error,:params,:test_value_one,:measure_value_one,:test_value_two,:measure_value_two,:test_value_three,:measure_value_three,:test_value_four,:measure_value_four,:test_value_five,:measure_value_five,:test_value_six,:measure_value_six,:maximum_error,:create_time,:update_time) "); - QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); - query.bindValue(":id",gauge.id); - query.bindValue(":data_id",gauge.data_id); - query.bindValue(":unit",gauge.unit); - query.bindValue(":check_point",gauge.check_point); - query.bindValue(":first_forward_stroke",gauge.first_forward_stroke); - query.bindValue(":first_reverse_stroke",gauge.first_reverse_stroke); - query.bindValue(":second_forward_stroke",gauge.second_forward_stroke); - query.bindValue(":second_reverse_stroke",gauge.second_reverse_stroke); - query.bindValue(":third_forward_stroke",gauge.third_forward_stroke); - query.bindValue(":third_reverse_stroke",gauge.third_reverse_stroke); - query.bindValue(":average_value",gauge.average_value); - query.bindValue(":average_average_value",gauge.average_average_value); - query.bindValue(":max_indicating_error",gauge.max_indicating_error); - query.bindValue(":max_return_error",gauge.max_return_error); - query.bindValue(":params",gauge.params); - query.bindValue(":test_value_one",gauge.test_value_one); - query.bindValue(":measure_value_one",gauge.measure_value_one); - query.bindValue(":test_value_two",gauge.test_value_two); - query.bindValue(":measure_value_two",gauge.measure_value_two); - query.bindValue(":test_value_three",gauge.test_value_three); - query.bindValue(":measure_value_three",gauge.measure_value_three); - query.bindValue(":test_value_four",gauge.test_value_four); - query.bindValue(":measure_value_four",gauge.measure_value_four); - query.bindValue(":test_value_five",gauge.test_value_five); - query.bindValue(":measure_value_five",gauge.measure_value_five); - query.bindValue(":test_value_six",gauge.test_value_six); - query.bindValue(":measure_value_six",gauge.measure_value_six); - query.bindValue(":maximum_error",gauge.maximum_error); - query.bindValue(":create_time",currentDateTime); - query.bindValue(":update_time",currentDateTime); - bool isSuccess = query.exec(); - if (!isSuccess) { - qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); - } +//bool BaseCommonApi::InsertStandardCheckDatePistonGauge(StandardCheckDatePistonGauge gauge) +//{ +// QSqlQuery query; +// query.prepare("INSERT INTO biz_equipment_standard_check_data_piston_gauge " +// " (id,data_id,unit,check_point,first_forward_stroke,first_reverse_stroke,second_forward_stroke,second_reverse_stroke,third_forward_stroke,third_reverse_stroke,average_value," +// "average_average_value,max_indicating_error,max_return_error,params,test_value_one,measure_value_one,test_value_two,measure_value_two,test_value_three,measure_value_three," +// "test_value_four,measure_value_four,test_value_five,measure_value_five,test_value_six,measure_value_six,maximum_error,create_time,update_time) " +// " VALUES " +// " (:id,:data_id,:unit,:check_point,:first_forward_stroke,:first_reverse_stroke,:second_forward_stroke,:second_reverse_stroke,:third_forward_stroke,:third_reverse_stroke,:average_value,:average_average_value,:max_indicating_error,:max_return_error,:params,:test_value_one,:measure_value_one,:test_value_two,:measure_value_two,:test_value_three,:measure_value_three,:test_value_four,:measure_value_four,:test_value_five,:measure_value_five,:test_value_six,:measure_value_six,:maximum_error,:create_time,:update_time) "); +// QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); +// query.bindValue(":id",gauge.id); +// query.bindValue(":data_id",gauge.data_id); +// query.bindValue(":unit",gauge.unit); +// query.bindValue(":check_point",gauge.check_point); +// query.bindValue(":first_forward_stroke",gauge.first_forward_stroke); +// query.bindValue(":first_reverse_stroke",gauge.first_reverse_stroke); +// query.bindValue(":second_forward_stroke",gauge.second_forward_stroke); +// query.bindValue(":second_reverse_stroke",gauge.second_reverse_stroke); +// query.bindValue(":third_forward_stroke",gauge.third_forward_stroke); +// query.bindValue(":third_reverse_stroke",gauge.third_reverse_stroke); +// query.bindValue(":average_value",gauge.average_value); +// query.bindValue(":average_average_value",gauge.average_average_value); +// query.bindValue(":max_indicating_error",gauge.max_indicating_error); +// query.bindValue(":max_return_error",gauge.max_return_error); +// query.bindValue(":params",gauge.params); +// query.bindValue(":test_value_one",gauge.test_value_one); +// query.bindValue(":measure_value_one",gauge.measure_value_one); +// query.bindValue(":test_value_two",gauge.test_value_two); +// query.bindValue(":measure_value_two",gauge.measure_value_two); +// query.bindValue(":test_value_three",gauge.test_value_three); +// query.bindValue(":measure_value_three",gauge.measure_value_three); +// query.bindValue(":test_value_four",gauge.test_value_four); +// query.bindValue(":measure_value_four",gauge.measure_value_four); +// query.bindValue(":test_value_five",gauge.test_value_five); +// query.bindValue(":measure_value_five",gauge.measure_value_five); +// query.bindValue(":test_value_six",gauge.test_value_six); +// query.bindValue(":measure_value_six",gauge.measure_value_six); +// query.bindValue(":maximum_error",gauge.maximum_error); +// query.bindValue(":create_time",currentDateTime); +// query.bindValue(":update_time",currentDateTime); +// bool isSuccess = query.exec(); +// if (!isSuccess) { +// qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); +// } - return isSuccess; +// return isSuccess; -}; - //自动核查-结果保存-基本信息 -bool BaseCommonApi::InsertCheckDataManageBasicInfo(CheckDataManageBasicInfo baseInfo) -{ - QSqlQuery query; - query.prepare("INSERT INTO biz_equipment_standard_check_info " - " (id,data_no,check_date,check_address,temperature,humidity,check_accord,stability_examine,standard_equipment_id" - ",equipment_id,item_category_id,conclusion,remark,create_user_id,create_user_name,create_time,update_time) " - " VALUES " - " (:id,:data_no,:check_date,:check_address,:temperature,:humidity,:check_accord,:stability_examine,:standard_equipment_id," - ":equipment_id,:item_category_id,:conclusion,:remark,:create_user_id,:create_user_name,:create_time,:update_time) "); - QString checkData = baseInfo.check_date.toString("yyyy-MM-dd"); - QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); - query.bindValue(":id",baseInfo.id); - query.bindValue(":data_no",baseInfo.data_no); - query.bindValue(":check_date",checkData); - query.bindValue(":check_address",baseInfo.check_address); - query.bindValue(":temperature",baseInfo.temperature); - query.bindValue(":humidity",baseInfo.humidity); - query.bindValue(":check_accord",baseInfo.check_accord); - query.bindValue(":stability_examine",baseInfo.stability_examine); - query.bindValue(":standard_equipment_id",baseInfo.standard_equipment_id); - query.bindValue(":equipment_id",baseInfo.equipment_id); - query.bindValue(":item_category_id",baseInfo.item_category_id); - query.bindValue(":conclusion",baseInfo.conclusion); - query.bindValue(":remark",baseInfo.remark); - query.bindValue(":create_user_id",baseInfo.create_user_id); - query.bindValue(":create_user_name",baseInfo.create_user_name); - query.bindValue(":create_time",currentDateTime); - query.bindValue(":update_time",currentDateTime); - bool isSuccess = query.exec(); - if (!isSuccess) { - qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); - } +//}; +// //自动核查-结果保存-基本信息 +//bool BaseCommonApi::InsertCheckDataManageBasicInfo(CheckDataManageBasicInfo baseInfo) +//{ +// QSqlQuery query; +// query.prepare("INSERT INTO biz_equipment_standard_check_info " +// " (id,data_no,check_date,check_address,temperature,humidity,check_accord,stability_examine,standard_equipment_id" +// ",equipment_id,item_category_id,conclusion,remark,create_user_id,create_user_name,create_time,update_time) " +// " VALUES " +// " (:id,:data_no,:check_date,:check_address,:temperature,:humidity,:check_accord,:stability_examine,:standard_equipment_id," +// ":equipment_id,:item_category_id,:conclusion,:remark,:create_user_id,:create_user_name,:create_time,:update_time) "); +// QString checkData = baseInfo.check_date.toString("yyyy-MM-dd"); +// QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); +// query.bindValue(":id",baseInfo.id); +// query.bindValue(":data_no",baseInfo.data_no); +// query.bindValue(":check_date",checkData); +// query.bindValue(":check_address",baseInfo.check_address); +// query.bindValue(":temperature",baseInfo.temperature); +// query.bindValue(":humidity",baseInfo.humidity); +// query.bindValue(":check_accord",baseInfo.check_accord); +// query.bindValue(":stability_examine",baseInfo.stability_examine); +// query.bindValue(":standard_equipment_id",baseInfo.standard_equipment_id); +// query.bindValue(":equipment_id",baseInfo.equipment_id); +// query.bindValue(":item_category_id",baseInfo.item_category_id); +// query.bindValue(":conclusion",baseInfo.conclusion); +// query.bindValue(":remark",baseInfo.remark); +// query.bindValue(":create_user_id",baseInfo.create_user_id); +// query.bindValue(":create_user_name",baseInfo.create_user_name); +// query.bindValue(":create_time",currentDateTime); +// query.bindValue(":update_time",currentDateTime); +// bool isSuccess = query.exec(); +// if (!isSuccess) { +// qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); +// } - return isSuccess; -}; +// return isSuccess; +//}; //自动检定和自动核查 查询实验室及温湿度 QList BaseCommonApi::getLocationInfo() { @@ -3394,60 +3394,60 @@ -//自动核查--结果保存-设备与装置-标准装置管理-核查数据管理多功能校准源数据表 -bool BaseCommonApi::InsertStandCheckDataCalibrator(StandCheckDataCalibrator calibrator) -{ - QSqlQuery query; - query.prepare("INSERT INTO biz_equipment_standard_check_data_calibrator " - "(id, data_id, check_type, test_type, params, unit, frequency, frequency_unit, check_point, " - "test_value_one_date, test_value_one, test_value_two_date, test_value_two, " - "test_value_three_date, test_value_three, test_value_four_date, test_value_four, " - "test_value_five_date, test_value_five, test_value_six_date, test_value_six, average_value, " - "standard_deviation, relative_repeatability, urel, less_than, qualified, create_time, update_time) " - "VALUES " - "(:id, :data_id, :check_type, :test_type, :params, :unit, :frequency, :frequency_unit, :check_point, " - ":test_value_one_date, :test_value_one, :test_value_two_date, :test_value_two, " - ":test_value_three_date, :test_value_three, :test_value_four_date, :test_value_four, " - ":test_value_five_date, :test_value_five, :test_value_six_date, :test_value_six, :average_value, " - ":standard_deviation, :relative_repeatability, :urel, :less_than, :qualified, :create_time, :update_time)"); - QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); - // 绑定所有值 - query.bindValue(":id", calibrator.id); - query.bindValue(":data_id", calibrator.data_id); - query.bindValue(":check_type", calibrator.check_type); - query.bindValue(":test_type", calibrator.test_type); - query.bindValue(":params", calibrator.params); - query.bindValue(":unit", calibrator.unit); - query.bindValue(":frequency", calibrator.frequency); - query.bindValue(":frequency_unit", calibrator.frequency_unit); - query.bindValue(":check_point", calibrator.check_point); - query.bindValue(":test_value_one_date", calibrator.test_value_one_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_one", calibrator.test_value_one); - query.bindValue(":test_value_two_date", calibrator.test_value_two_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_two", calibrator.test_value_two); - query.bindValue(":test_value_three_date", calibrator.test_value_three_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_three", calibrator.test_value_three); - query.bindValue(":test_value_four_date", calibrator.test_value_four_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_four", calibrator.test_value_four); - query.bindValue(":test_value_five_date", calibrator.test_value_five_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_five", calibrator.test_value_five); - query.bindValue(":test_value_six_date", calibrator.test_value_six_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_six", calibrator.test_value_six); - query.bindValue(":average_value", calibrator.average_value); - query.bindValue(":standard_deviation", calibrator.standard_deviation); - query.bindValue(":relative_repeatability", calibrator.relative_repeatability); - query.bindValue(":urel", calibrator.urel); - query.bindValue(":less_than", calibrator.less_than); - query.bindValue(":qualified", calibrator.qualified); - query.bindValue(":create_time", currentDateTime); - query.bindValue(":update_time", currentDateTime); - bool isSuccess = query.exec(); - if (!isSuccess) { - qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); - } +////自动核查--结果保存-设备与装置-标准装置管理-核查数据管理多功能校准源数据表 +//bool BaseCommonApi::InsertStandCheckDataCalibrator(StandCheckDataCalibrator calibrator) +//{ +// QSqlQuery query; +// query.prepare("INSERT INTO biz_equipment_standard_check_data_calibrator " +// "(id, data_id, check_type, test_type, params, unit, frequency, frequency_unit, check_point, " +// "test_value_one_date, test_value_one, test_value_two_date, test_value_two, " +// "test_value_three_date, test_value_three, test_value_four_date, test_value_four, " +// "test_value_five_date, test_value_five, test_value_six_date, test_value_six, average_value, " +// "standard_deviation, relative_repeatability, urel, less_than, qualified, create_time, update_time) " +// "VALUES " +// "(:id, :data_id, :check_type, :test_type, :params, :unit, :frequency, :frequency_unit, :check_point, " +// ":test_value_one_date, :test_value_one, :test_value_two_date, :test_value_two, " +// ":test_value_three_date, :test_value_three, :test_value_four_date, :test_value_four, " +// ":test_value_five_date, :test_value_five, :test_value_six_date, :test_value_six, :average_value, " +// ":standard_deviation, :relative_repeatability, :urel, :less_than, :qualified, :create_time, :update_time)"); +// QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); +// // 绑定所有值 +// query.bindValue(":id", calibrator.id); +// query.bindValue(":data_id", calibrator.data_id); +// query.bindValue(":check_type", calibrator.check_type); +// query.bindValue(":test_type", calibrator.test_type); +// query.bindValue(":params", calibrator.params); +// query.bindValue(":unit", calibrator.unit); +// query.bindValue(":frequency", calibrator.frequency); +// query.bindValue(":frequency_unit", calibrator.frequency_unit); +// query.bindValue(":check_point", calibrator.check_point); +// query.bindValue(":test_value_one_date", calibrator.test_value_one_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_one", calibrator.test_value_one); +// query.bindValue(":test_value_two_date", calibrator.test_value_two_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_two", calibrator.test_value_two); +// query.bindValue(":test_value_three_date", calibrator.test_value_three_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_three", calibrator.test_value_three); +// query.bindValue(":test_value_four_date", calibrator.test_value_four_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_four", calibrator.test_value_four); +// query.bindValue(":test_value_five_date", calibrator.test_value_five_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_five", calibrator.test_value_five); +// query.bindValue(":test_value_six_date", calibrator.test_value_six_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_six", calibrator.test_value_six); +// query.bindValue(":average_value", calibrator.average_value); +// query.bindValue(":standard_deviation", calibrator.standard_deviation); +// query.bindValue(":relative_repeatability", calibrator.relative_repeatability); +// query.bindValue(":urel", calibrator.urel); +// query.bindValue(":less_than", calibrator.less_than); +// query.bindValue(":qualified", calibrator.qualified); +// query.bindValue(":create_time", currentDateTime); +// query.bindValue(":update_time", currentDateTime); +// bool isSuccess = query.exec(); +// if (!isSuccess) { +// qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); +// } - return isSuccess; -}; +// return isSuccess; +//}; //根据用户ID查询 当前部门ID和部门名称全程 QList BaseCommonApi::SelectDeptData(QString UserId) { diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 2d175f9..23a675e 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -3214,90 +3214,90 @@ // return result; //}; //自动核查-结果保存-设备与装置-标准装置管理-核查数据管理0.02级活塞式压力计数据表 -bool BaseCommonApi::InsertStandardCheckDatePistonGauge(StandardCheckDatePistonGauge gauge) -{ - QSqlQuery query; - query.prepare("INSERT INTO biz_equipment_standard_check_data_piston_gauge " - " (id,data_id,unit,check_point,first_forward_stroke,first_reverse_stroke,second_forward_stroke,second_reverse_stroke,third_forward_stroke,third_reverse_stroke,average_value," - "average_average_value,max_indicating_error,max_return_error,params,test_value_one,measure_value_one,test_value_two,measure_value_two,test_value_three,measure_value_three," - "test_value_four,measure_value_four,test_value_five,measure_value_five,test_value_six,measure_value_six,maximum_error,create_time,update_time) " - " VALUES " - " (:id,:data_id,:unit,:check_point,:first_forward_stroke,:first_reverse_stroke,:second_forward_stroke,:second_reverse_stroke,:third_forward_stroke,:third_reverse_stroke,:average_value,:average_average_value,:max_indicating_error,:max_return_error,:params,:test_value_one,:measure_value_one,:test_value_two,:measure_value_two,:test_value_three,:measure_value_three,:test_value_four,:measure_value_four,:test_value_five,:measure_value_five,:test_value_six,:measure_value_six,:maximum_error,:create_time,:update_time) "); - QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); - query.bindValue(":id",gauge.id); - query.bindValue(":data_id",gauge.data_id); - query.bindValue(":unit",gauge.unit); - query.bindValue(":check_point",gauge.check_point); - query.bindValue(":first_forward_stroke",gauge.first_forward_stroke); - query.bindValue(":first_reverse_stroke",gauge.first_reverse_stroke); - query.bindValue(":second_forward_stroke",gauge.second_forward_stroke); - query.bindValue(":second_reverse_stroke",gauge.second_reverse_stroke); - query.bindValue(":third_forward_stroke",gauge.third_forward_stroke); - query.bindValue(":third_reverse_stroke",gauge.third_reverse_stroke); - query.bindValue(":average_value",gauge.average_value); - query.bindValue(":average_average_value",gauge.average_average_value); - query.bindValue(":max_indicating_error",gauge.max_indicating_error); - query.bindValue(":max_return_error",gauge.max_return_error); - query.bindValue(":params",gauge.params); - query.bindValue(":test_value_one",gauge.test_value_one); - query.bindValue(":measure_value_one",gauge.measure_value_one); - query.bindValue(":test_value_two",gauge.test_value_two); - query.bindValue(":measure_value_two",gauge.measure_value_two); - query.bindValue(":test_value_three",gauge.test_value_three); - query.bindValue(":measure_value_three",gauge.measure_value_three); - query.bindValue(":test_value_four",gauge.test_value_four); - query.bindValue(":measure_value_four",gauge.measure_value_four); - query.bindValue(":test_value_five",gauge.test_value_five); - query.bindValue(":measure_value_five",gauge.measure_value_five); - query.bindValue(":test_value_six",gauge.test_value_six); - query.bindValue(":measure_value_six",gauge.measure_value_six); - query.bindValue(":maximum_error",gauge.maximum_error); - query.bindValue(":create_time",currentDateTime); - query.bindValue(":update_time",currentDateTime); - bool isSuccess = query.exec(); - if (!isSuccess) { - qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); - } +//bool BaseCommonApi::InsertStandardCheckDatePistonGauge(StandardCheckDatePistonGauge gauge) +//{ +// QSqlQuery query; +// query.prepare("INSERT INTO biz_equipment_standard_check_data_piston_gauge " +// " (id,data_id,unit,check_point,first_forward_stroke,first_reverse_stroke,second_forward_stroke,second_reverse_stroke,third_forward_stroke,third_reverse_stroke,average_value," +// "average_average_value,max_indicating_error,max_return_error,params,test_value_one,measure_value_one,test_value_two,measure_value_two,test_value_three,measure_value_three," +// "test_value_four,measure_value_four,test_value_five,measure_value_five,test_value_six,measure_value_six,maximum_error,create_time,update_time) " +// " VALUES " +// " (:id,:data_id,:unit,:check_point,:first_forward_stroke,:first_reverse_stroke,:second_forward_stroke,:second_reverse_stroke,:third_forward_stroke,:third_reverse_stroke,:average_value,:average_average_value,:max_indicating_error,:max_return_error,:params,:test_value_one,:measure_value_one,:test_value_two,:measure_value_two,:test_value_three,:measure_value_three,:test_value_four,:measure_value_four,:test_value_five,:measure_value_five,:test_value_six,:measure_value_six,:maximum_error,:create_time,:update_time) "); +// QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); +// query.bindValue(":id",gauge.id); +// query.bindValue(":data_id",gauge.data_id); +// query.bindValue(":unit",gauge.unit); +// query.bindValue(":check_point",gauge.check_point); +// query.bindValue(":first_forward_stroke",gauge.first_forward_stroke); +// query.bindValue(":first_reverse_stroke",gauge.first_reverse_stroke); +// query.bindValue(":second_forward_stroke",gauge.second_forward_stroke); +// query.bindValue(":second_reverse_stroke",gauge.second_reverse_stroke); +// query.bindValue(":third_forward_stroke",gauge.third_forward_stroke); +// query.bindValue(":third_reverse_stroke",gauge.third_reverse_stroke); +// query.bindValue(":average_value",gauge.average_value); +// query.bindValue(":average_average_value",gauge.average_average_value); +// query.bindValue(":max_indicating_error",gauge.max_indicating_error); +// query.bindValue(":max_return_error",gauge.max_return_error); +// query.bindValue(":params",gauge.params); +// query.bindValue(":test_value_one",gauge.test_value_one); +// query.bindValue(":measure_value_one",gauge.measure_value_one); +// query.bindValue(":test_value_two",gauge.test_value_two); +// query.bindValue(":measure_value_two",gauge.measure_value_two); +// query.bindValue(":test_value_three",gauge.test_value_three); +// query.bindValue(":measure_value_three",gauge.measure_value_three); +// query.bindValue(":test_value_four",gauge.test_value_four); +// query.bindValue(":measure_value_four",gauge.measure_value_four); +// query.bindValue(":test_value_five",gauge.test_value_five); +// query.bindValue(":measure_value_five",gauge.measure_value_five); +// query.bindValue(":test_value_six",gauge.test_value_six); +// query.bindValue(":measure_value_six",gauge.measure_value_six); +// query.bindValue(":maximum_error",gauge.maximum_error); +// query.bindValue(":create_time",currentDateTime); +// query.bindValue(":update_time",currentDateTime); +// bool isSuccess = query.exec(); +// if (!isSuccess) { +// qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); +// } - return isSuccess; +// return isSuccess; -}; - //自动核查-结果保存-基本信息 -bool BaseCommonApi::InsertCheckDataManageBasicInfo(CheckDataManageBasicInfo baseInfo) -{ - QSqlQuery query; - query.prepare("INSERT INTO biz_equipment_standard_check_info " - " (id,data_no,check_date,check_address,temperature,humidity,check_accord,stability_examine,standard_equipment_id" - ",equipment_id,item_category_id,conclusion,remark,create_user_id,create_user_name,create_time,update_time) " - " VALUES " - " (:id,:data_no,:check_date,:check_address,:temperature,:humidity,:check_accord,:stability_examine,:standard_equipment_id," - ":equipment_id,:item_category_id,:conclusion,:remark,:create_user_id,:create_user_name,:create_time,:update_time) "); - QString checkData = baseInfo.check_date.toString("yyyy-MM-dd"); - QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); - query.bindValue(":id",baseInfo.id); - query.bindValue(":data_no",baseInfo.data_no); - query.bindValue(":check_date",checkData); - query.bindValue(":check_address",baseInfo.check_address); - query.bindValue(":temperature",baseInfo.temperature); - query.bindValue(":humidity",baseInfo.humidity); - query.bindValue(":check_accord",baseInfo.check_accord); - query.bindValue(":stability_examine",baseInfo.stability_examine); - query.bindValue(":standard_equipment_id",baseInfo.standard_equipment_id); - query.bindValue(":equipment_id",baseInfo.equipment_id); - query.bindValue(":item_category_id",baseInfo.item_category_id); - query.bindValue(":conclusion",baseInfo.conclusion); - query.bindValue(":remark",baseInfo.remark); - query.bindValue(":create_user_id",baseInfo.create_user_id); - query.bindValue(":create_user_name",baseInfo.create_user_name); - query.bindValue(":create_time",currentDateTime); - query.bindValue(":update_time",currentDateTime); - bool isSuccess = query.exec(); - if (!isSuccess) { - qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); - } +//}; +// //自动核查-结果保存-基本信息 +//bool BaseCommonApi::InsertCheckDataManageBasicInfo(CheckDataManageBasicInfo baseInfo) +//{ +// QSqlQuery query; +// query.prepare("INSERT INTO biz_equipment_standard_check_info " +// " (id,data_no,check_date,check_address,temperature,humidity,check_accord,stability_examine,standard_equipment_id" +// ",equipment_id,item_category_id,conclusion,remark,create_user_id,create_user_name,create_time,update_time) " +// " VALUES " +// " (:id,:data_no,:check_date,:check_address,:temperature,:humidity,:check_accord,:stability_examine,:standard_equipment_id," +// ":equipment_id,:item_category_id,:conclusion,:remark,:create_user_id,:create_user_name,:create_time,:update_time) "); +// QString checkData = baseInfo.check_date.toString("yyyy-MM-dd"); +// QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); +// query.bindValue(":id",baseInfo.id); +// query.bindValue(":data_no",baseInfo.data_no); +// query.bindValue(":check_date",checkData); +// query.bindValue(":check_address",baseInfo.check_address); +// query.bindValue(":temperature",baseInfo.temperature); +// query.bindValue(":humidity",baseInfo.humidity); +// query.bindValue(":check_accord",baseInfo.check_accord); +// query.bindValue(":stability_examine",baseInfo.stability_examine); +// query.bindValue(":standard_equipment_id",baseInfo.standard_equipment_id); +// query.bindValue(":equipment_id",baseInfo.equipment_id); +// query.bindValue(":item_category_id",baseInfo.item_category_id); +// query.bindValue(":conclusion",baseInfo.conclusion); +// query.bindValue(":remark",baseInfo.remark); +// query.bindValue(":create_user_id",baseInfo.create_user_id); +// query.bindValue(":create_user_name",baseInfo.create_user_name); +// query.bindValue(":create_time",currentDateTime); +// query.bindValue(":update_time",currentDateTime); +// bool isSuccess = query.exec(); +// if (!isSuccess) { +// qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); +// } - return isSuccess; -}; +// return isSuccess; +//}; //自动检定和自动核查 查询实验室及温湿度 QList BaseCommonApi::getLocationInfo() { @@ -3394,60 +3394,60 @@ -//自动核查--结果保存-设备与装置-标准装置管理-核查数据管理多功能校准源数据表 -bool BaseCommonApi::InsertStandCheckDataCalibrator(StandCheckDataCalibrator calibrator) -{ - QSqlQuery query; - query.prepare("INSERT INTO biz_equipment_standard_check_data_calibrator " - "(id, data_id, check_type, test_type, params, unit, frequency, frequency_unit, check_point, " - "test_value_one_date, test_value_one, test_value_two_date, test_value_two, " - "test_value_three_date, test_value_three, test_value_four_date, test_value_four, " - "test_value_five_date, test_value_five, test_value_six_date, test_value_six, average_value, " - "standard_deviation, relative_repeatability, urel, less_than, qualified, create_time, update_time) " - "VALUES " - "(:id, :data_id, :check_type, :test_type, :params, :unit, :frequency, :frequency_unit, :check_point, " - ":test_value_one_date, :test_value_one, :test_value_two_date, :test_value_two, " - ":test_value_three_date, :test_value_three, :test_value_four_date, :test_value_four, " - ":test_value_five_date, :test_value_five, :test_value_six_date, :test_value_six, :average_value, " - ":standard_deviation, :relative_repeatability, :urel, :less_than, :qualified, :create_time, :update_time)"); - QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); - // 绑定所有值 - query.bindValue(":id", calibrator.id); - query.bindValue(":data_id", calibrator.data_id); - query.bindValue(":check_type", calibrator.check_type); - query.bindValue(":test_type", calibrator.test_type); - query.bindValue(":params", calibrator.params); - query.bindValue(":unit", calibrator.unit); - query.bindValue(":frequency", calibrator.frequency); - query.bindValue(":frequency_unit", calibrator.frequency_unit); - query.bindValue(":check_point", calibrator.check_point); - query.bindValue(":test_value_one_date", calibrator.test_value_one_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_one", calibrator.test_value_one); - query.bindValue(":test_value_two_date", calibrator.test_value_two_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_two", calibrator.test_value_two); - query.bindValue(":test_value_three_date", calibrator.test_value_three_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_three", calibrator.test_value_three); - query.bindValue(":test_value_four_date", calibrator.test_value_four_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_four", calibrator.test_value_four); - query.bindValue(":test_value_five_date", calibrator.test_value_five_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_five", calibrator.test_value_five); - query.bindValue(":test_value_six_date", calibrator.test_value_six_date.toString("yyyy-MM-dd")); - query.bindValue(":test_value_six", calibrator.test_value_six); - query.bindValue(":average_value", calibrator.average_value); - query.bindValue(":standard_deviation", calibrator.standard_deviation); - query.bindValue(":relative_repeatability", calibrator.relative_repeatability); - query.bindValue(":urel", calibrator.urel); - query.bindValue(":less_than", calibrator.less_than); - query.bindValue(":qualified", calibrator.qualified); - query.bindValue(":create_time", currentDateTime); - query.bindValue(":update_time", currentDateTime); - bool isSuccess = query.exec(); - if (!isSuccess) { - qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); - } +////自动核查--结果保存-设备与装置-标准装置管理-核查数据管理多功能校准源数据表 +//bool BaseCommonApi::InsertStandCheckDataCalibrator(StandCheckDataCalibrator calibrator) +//{ +// QSqlQuery query; +// query.prepare("INSERT INTO biz_equipment_standard_check_data_calibrator " +// "(id, data_id, check_type, test_type, params, unit, frequency, frequency_unit, check_point, " +// "test_value_one_date, test_value_one, test_value_two_date, test_value_two, " +// "test_value_three_date, test_value_three, test_value_four_date, test_value_four, " +// "test_value_five_date, test_value_five, test_value_six_date, test_value_six, average_value, " +// "standard_deviation, relative_repeatability, urel, less_than, qualified, create_time, update_time) " +// "VALUES " +// "(:id, :data_id, :check_type, :test_type, :params, :unit, :frequency, :frequency_unit, :check_point, " +// ":test_value_one_date, :test_value_one, :test_value_two_date, :test_value_two, " +// ":test_value_three_date, :test_value_three, :test_value_four_date, :test_value_four, " +// ":test_value_five_date, :test_value_five, :test_value_six_date, :test_value_six, :average_value, " +// ":standard_deviation, :relative_repeatability, :urel, :less_than, :qualified, :create_time, :update_time)"); +// QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); +// // 绑定所有值 +// query.bindValue(":id", calibrator.id); +// query.bindValue(":data_id", calibrator.data_id); +// query.bindValue(":check_type", calibrator.check_type); +// query.bindValue(":test_type", calibrator.test_type); +// query.bindValue(":params", calibrator.params); +// query.bindValue(":unit", calibrator.unit); +// query.bindValue(":frequency", calibrator.frequency); +// query.bindValue(":frequency_unit", calibrator.frequency_unit); +// query.bindValue(":check_point", calibrator.check_point); +// query.bindValue(":test_value_one_date", calibrator.test_value_one_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_one", calibrator.test_value_one); +// query.bindValue(":test_value_two_date", calibrator.test_value_two_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_two", calibrator.test_value_two); +// query.bindValue(":test_value_three_date", calibrator.test_value_three_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_three", calibrator.test_value_three); +// query.bindValue(":test_value_four_date", calibrator.test_value_four_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_four", calibrator.test_value_four); +// query.bindValue(":test_value_five_date", calibrator.test_value_five_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_five", calibrator.test_value_five); +// query.bindValue(":test_value_six_date", calibrator.test_value_six_date.toString("yyyy-MM-dd")); +// query.bindValue(":test_value_six", calibrator.test_value_six); +// query.bindValue(":average_value", calibrator.average_value); +// query.bindValue(":standard_deviation", calibrator.standard_deviation); +// query.bindValue(":relative_repeatability", calibrator.relative_repeatability); +// query.bindValue(":urel", calibrator.urel); +// query.bindValue(":less_than", calibrator.less_than); +// query.bindValue(":qualified", calibrator.qualified); +// query.bindValue(":create_time", currentDateTime); +// query.bindValue(":update_time", currentDateTime); +// bool isSuccess = query.exec(); +// if (!isSuccess) { +// qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); +// } - return isSuccess; -}; +// return isSuccess; +//}; //根据用户ID查询 当前部门ID和部门名称全程 QList BaseCommonApi::SelectDeptData(QString UserId) { diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.h b/softwareDirectory/AutoVerScheme/basecommonapi.h index 0021109..b803b30 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.h +++ b/softwareDirectory/AutoVerScheme/basecommonapi.h @@ -1597,12 +1597,12 @@ - //自动核查--结果保存-设备与装置-标准装置管理-多功能校准源 - static bool InsertStandCheckDataCalibrator(StandCheckDataCalibrator calibrator); - //自动核查-结果保存-设备与装置-标准装置管理-核查数据管理0.02级活塞式压力计数据表 - static bool InsertStandardCheckDatePistonGauge(StandardCheckDatePistonGauge gauge); +// //自动核查--结果保存-设备与装置-标准装置管理-多功能校准源 +// static bool InsertStandCheckDataCalibrator(StandCheckDataCalibrator calibrator); +// //自动核查-结果保存-设备与装置-标准装置管理-核查数据管理0.02级活塞式压力计数据表 +// static bool InsertStandardCheckDatePistonGauge(StandardCheckDatePistonGauge gauge); //自动核查-结果保存-基本信息 - static bool InsertCheckDataManageBasicInfo(CheckDataManageBasicInfo baseInfo); +// static bool InsertCheckDataManageBasicInfo(CheckDataManageBasicInfo baseInfo); //查询实验室及温湿度 static QList getLocationInfo(); //查询出所有实验室地点,用于自动检定/核查 结果保存 地点下拉框查询