123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- #include "hblastrecord.h"
- HBlastRecord::HBlastRecord(QObject *parent) : QObject(parent)
- {
- }
- qint64 HBlastRecord::getId() const
- {
- return id;
- }
- void HBlastRecord::setId(qint64 newId)
- {
- id = newId;
- }
- QString HBlastRecord::getUuid() const
- {
- return uuid;
- }
- void HBlastRecord::setUuid(const QString &newUuid)
- {
- uuid = newUuid;
- }
- QString HBlastRecord::getProjectName() const
- {
- return projectName;
- }
- void HBlastRecord::setProjectName(const QString &newProjectName)
- {
- projectName = newProjectName;
- }
- QString HBlastRecord::getProjectHtid() const
- {
- return projectHtid;
- }
- void HBlastRecord::setProjectHtid(const QString &newProjectHtid)
- {
- projectHtid = newProjectHtid;
- }
- QString HBlastRecord::getProjectXmbh() const
- {
- return projectXmbh;
- }
- void HBlastRecord::setProjectXmbh(const QString &newProjectXmbh)
- {
- projectXmbh = newProjectXmbh;
- }
- QString HBlastRecord::getOperatorName() const
- {
- return operatorName;
- }
- void HBlastRecord::setOperatorName(const QString &newOperatorName)
- {
- operatorName = newOperatorName;
- }
- QString HBlastRecord::getPhone() const
- {
- return phone;
- }
- void HBlastRecord::setPhone(const QString &newPhone)
- {
- phone = newPhone;
- }
- QString HBlastRecord::getOperatorIdentity() const
- {
- return operatorIdentity;
- }
- void HBlastRecord::setOperatorIdentity(const QString &newOperatorIdentity)
- {
- operatorIdentity = newOperatorIdentity;
- }
- QString HBlastRecord::getEquipmentSn() const
- {
- return equipmentSn;
- }
- void HBlastRecord::setEquipmentSn(const QString &newEquipmentSn)
- {
- equipmentSn = newEquipmentSn;
- }
- QString HBlastRecord::getCompanyCode() const
- {
- return companyCode;
- }
- void HBlastRecord::setCompanyCode(const QString &newCompanyCode)
- {
- companyCode = newCompanyCode;
- }
- QString HBlastRecord::getAppVersion() const
- {
- return appVersion;
- }
- void HBlastRecord::setAppVersion(const QString &newAppVersion)
- {
- appVersion = newAppVersion;
- }
- QString HBlastRecord::getLongitude() const
- {
- return longitude;
- }
- void HBlastRecord::setLongitude(const QString &newLongitude)
- {
- longitude = newLongitude;
- }
- QString HBlastRecord::getLatitude() const
- {
- return latitude;
- }
- void HBlastRecord::setLatitude(const QString &newLatitude)
- {
- latitude = newLatitude;
- }
- int HBlastRecord::getEquipmentCount() const
- {
- return equipmentCount;
- }
- void HBlastRecord::setEquipmentCount(int newEquipmentCount)
- {
- equipmentCount = newEquipmentCount;
- }
- int HBlastRecord::getRegDetCount() const
- {
- return regDetCount;
- }
- void HBlastRecord::setRegDetCount(int newRegDetCount)
- {
- regDetCount = newRegDetCount;
- }
- int HBlastRecord::getErrorDetCount() const
- {
- return errorDetCount;
- }
- void HBlastRecord::setErrorDetCount(int newErrorDetCount)
- {
- errorDetCount = newErrorDetCount;
- }
- QDateTime HBlastRecord::getBlastAt() const
- {
- return blastAt;
- }
- void HBlastRecord::setBlastAt(const QDateTime &newBlastAt)
- {
- blastAt = newBlastAt;
- }
- QDateTime HBlastRecord::getCreatedAt() const
- {
- return createdAt;
- }
- void HBlastRecord::setCreatedAt(const QDateTime &newCreatedAt)
- {
- createdAt = newCreatedAt;
- }
- QDateTime HBlastRecord::getUpdatedAt() const
- {
- return updatedAt;
- }
- void HBlastRecord::setUpdatedAt(const QDateTime &newUpdatedAt)
- {
- updatedAt = newUpdatedAt;
- }
- QDateTime HBlastRecord::getDeletedAt() const
- {
- return deletedAt;
- }
- void HBlastRecord::setDeletedAt(const QDateTime &newDeletedAt)
- {
- deletedAt = newDeletedAt;
- }
- qint64 HBlastRecord::getCreateBy() const
- {
- return createBy;
- }
- void HBlastRecord::setCreateBy(qint64 newCreateBy)
- {
- createBy = newCreateBy;
- }
- qint64 HBlastRecord::getUpdateBy() const
- {
- return updateBy;
- }
- void HBlastRecord::setUpdateBy(qint64 newUpdateBy)
- {
- updateBy = newUpdateBy;
- }
- QByteArray HBlastRecord::BlastRecordToJson(const HBlastRecord& record)
- {
- QJsonObject json;
- json["id"] = record.getId();
- json["uuid"] = record.getUuid();
- json["project_name"] = record.getProjectName();
- json["project_htid"] = record.getProjectHtid();
- json["project_xmbh"] = record.getProjectXmbh();
- json["operator_name"] = record.getOperatorName();
- json["phone"] = record.getPhone();
- json["operator_identity"] = record.getOperatorIdentity();
- json["equipment_sn"] = record.getEquipmentSn();
- json["company_code"] = record.getCompanyCode();
- json["app_version"] = record.getAppVersion();
- json["longitude"] = record.getLongitude();
- json["latitude"] = record.getLatitude();
- json["equipment_count"] = record.getEquipmentCount();
- json["reg_det_count"] = record.getRegDetCount();
- json["error_det_count"] = record.getErrorDetCount();
- json["blast_at"] = record.getBlastAt().toString(Qt::ISODateWithMs);
- json["created_at"] = record.getCreatedAt().toString(Qt::ISODateWithMs);
- json["updated_at"] = record.getUpdatedAt().toString(Qt::ISODateWithMs);
- json["deleted_at"] = record.getDeletedAt().toString(Qt::ISODateWithMs);
- json["create_by"] = record.getCreateBy();
- json["update_by"] = record.getUpdateBy();
- QJsonDocument doc(json);
- return doc.toJson();
- }
|