hblastrecord.cpp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. #include "hblastrecord.h"
  2. HBlastRecord::HBlastRecord(QObject *parent) : QObject(parent)
  3. {
  4. }
  5. qint64 HBlastRecord::getId() const
  6. {
  7. return id;
  8. }
  9. void HBlastRecord::setId(qint64 newId)
  10. {
  11. id = newId;
  12. }
  13. QString HBlastRecord::getUuid() const
  14. {
  15. return uuid;
  16. }
  17. void HBlastRecord::setUuid(const QString &newUuid)
  18. {
  19. uuid = newUuid;
  20. }
  21. QString HBlastRecord::getProjectName() const
  22. {
  23. return projectName;
  24. }
  25. void HBlastRecord::setProjectName(const QString &newProjectName)
  26. {
  27. projectName = newProjectName;
  28. }
  29. QString HBlastRecord::getProjectHtid() const
  30. {
  31. return projectHtid;
  32. }
  33. void HBlastRecord::setProjectHtid(const QString &newProjectHtid)
  34. {
  35. projectHtid = newProjectHtid;
  36. }
  37. QString HBlastRecord::getProjectXmbh() const
  38. {
  39. return projectXmbh;
  40. }
  41. void HBlastRecord::setProjectXmbh(const QString &newProjectXmbh)
  42. {
  43. projectXmbh = newProjectXmbh;
  44. }
  45. QString HBlastRecord::getOperatorName() const
  46. {
  47. return operatorName;
  48. }
  49. void HBlastRecord::setOperatorName(const QString &newOperatorName)
  50. {
  51. operatorName = newOperatorName;
  52. }
  53. QString HBlastRecord::getPhone() const
  54. {
  55. return phone;
  56. }
  57. void HBlastRecord::setPhone(const QString &newPhone)
  58. {
  59. phone = newPhone;
  60. }
  61. QString HBlastRecord::getOperatorIdentity() const
  62. {
  63. return operatorIdentity;
  64. }
  65. void HBlastRecord::setOperatorIdentity(const QString &newOperatorIdentity)
  66. {
  67. operatorIdentity = newOperatorIdentity;
  68. }
  69. QString HBlastRecord::getEquipmentSn() const
  70. {
  71. return equipmentSn;
  72. }
  73. void HBlastRecord::setEquipmentSn(const QString &newEquipmentSn)
  74. {
  75. equipmentSn = newEquipmentSn;
  76. }
  77. QString HBlastRecord::getCompanyCode() const
  78. {
  79. return companyCode;
  80. }
  81. void HBlastRecord::setCompanyCode(const QString &newCompanyCode)
  82. {
  83. companyCode = newCompanyCode;
  84. }
  85. QString HBlastRecord::getAppVersion() const
  86. {
  87. return appVersion;
  88. }
  89. void HBlastRecord::setAppVersion(const QString &newAppVersion)
  90. {
  91. appVersion = newAppVersion;
  92. }
  93. QString HBlastRecord::getLongitude() const
  94. {
  95. return longitude;
  96. }
  97. void HBlastRecord::setLongitude(const QString &newLongitude)
  98. {
  99. longitude = newLongitude;
  100. }
  101. QString HBlastRecord::getLatitude() const
  102. {
  103. return latitude;
  104. }
  105. void HBlastRecord::setLatitude(const QString &newLatitude)
  106. {
  107. latitude = newLatitude;
  108. }
  109. int HBlastRecord::getEquipmentCount() const
  110. {
  111. return equipmentCount;
  112. }
  113. void HBlastRecord::setEquipmentCount(int newEquipmentCount)
  114. {
  115. equipmentCount = newEquipmentCount;
  116. }
  117. int HBlastRecord::getRegDetCount() const
  118. {
  119. return regDetCount;
  120. }
  121. void HBlastRecord::setRegDetCount(int newRegDetCount)
  122. {
  123. regDetCount = newRegDetCount;
  124. }
  125. int HBlastRecord::getErrorDetCount() const
  126. {
  127. return errorDetCount;
  128. }
  129. void HBlastRecord::setErrorDetCount(int newErrorDetCount)
  130. {
  131. errorDetCount = newErrorDetCount;
  132. }
  133. QDateTime HBlastRecord::getBlastAt() const
  134. {
  135. return blastAt;
  136. }
  137. void HBlastRecord::setBlastAt(const QDateTime &newBlastAt)
  138. {
  139. blastAt = newBlastAt;
  140. }
  141. QDateTime HBlastRecord::getCreatedAt() const
  142. {
  143. return createdAt;
  144. }
  145. void HBlastRecord::setCreatedAt(const QDateTime &newCreatedAt)
  146. {
  147. createdAt = newCreatedAt;
  148. }
  149. QDateTime HBlastRecord::getUpdatedAt() const
  150. {
  151. return updatedAt;
  152. }
  153. void HBlastRecord::setUpdatedAt(const QDateTime &newUpdatedAt)
  154. {
  155. updatedAt = newUpdatedAt;
  156. }
  157. QDateTime HBlastRecord::getDeletedAt() const
  158. {
  159. return deletedAt;
  160. }
  161. void HBlastRecord::setDeletedAt(const QDateTime &newDeletedAt)
  162. {
  163. deletedAt = newDeletedAt;
  164. }
  165. qint64 HBlastRecord::getCreateBy() const
  166. {
  167. return createBy;
  168. }
  169. void HBlastRecord::setCreateBy(qint64 newCreateBy)
  170. {
  171. createBy = newCreateBy;
  172. }
  173. qint64 HBlastRecord::getUpdateBy() const
  174. {
  175. return updateBy;
  176. }
  177. void HBlastRecord::setUpdateBy(qint64 newUpdateBy)
  178. {
  179. updateBy = newUpdateBy;
  180. }
  181. QByteArray HBlastRecord::BlastRecordToJson(const HBlastRecord& record)
  182. {
  183. QJsonObject json;
  184. json["id"] = record.getId();
  185. json["uuid"] = record.getUuid();
  186. json["project_name"] = record.getProjectName();
  187. json["project_htid"] = record.getProjectHtid();
  188. json["project_xmbh"] = record.getProjectXmbh();
  189. json["operator_name"] = record.getOperatorName();
  190. json["phone"] = record.getPhone();
  191. json["operator_identity"] = record.getOperatorIdentity();
  192. json["equipment_sn"] = record.getEquipmentSn();
  193. json["company_code"] = record.getCompanyCode();
  194. json["app_version"] = record.getAppVersion();
  195. json["longitude"] = record.getLongitude();
  196. json["latitude"] = record.getLatitude();
  197. json["equipment_count"] = record.getEquipmentCount();
  198. json["reg_det_count"] = record.getRegDetCount();
  199. json["error_det_count"] = record.getErrorDetCount();
  200. json["blast_at"] = record.getBlastAt().toString(Qt::ISODateWithMs);
  201. json["created_at"] = record.getCreatedAt().toString(Qt::ISODateWithMs);
  202. json["updated_at"] = record.getUpdatedAt().toString(Qt::ISODateWithMs);
  203. json["deleted_at"] = record.getDeletedAt().toString(Qt::ISODateWithMs);
  204. json["create_by"] = record.getCreateBy();
  205. json["update_by"] = record.getUpdateBy();
  206. QJsonDocument doc(json);
  207. return doc.toJson();
  208. }