123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- /*
- * houseinfo.h
- *
- * Created on: 2022年5月27日
- * Author: dingxy
- */
- #ifndef JNI_CORE_HOUSEINFO_H_
- #define JNI_CORE_HOUSEINFO_H_
- #include "base/strings.hpp"
- namespace j {
- struct house_setting{
- std::string UserID;
- std::string UserPassword;
- std::string Token;
- std::string code;
- std::string name;
- std::string replace;
- std::string password;
- std::string community;
- std::string communityId;
- int communitycode;
- std::string area;
- std::string areaId;
- int areacode;
- std::string build;
- std::string buildId;
- int buildcode;
- std::string unit;
- std::string unitId;
- int unitcode;
- std::string floor;
- std::string floorId;
- int floorcode;
- std::string room;
- std::string roomId;
- int roomcode;
- public:
- house_setting() {
- code = "";
- name = "";
- replace = "false";
- password = "";
- community = "";
- communityId = "";
- communitycode = 0;
- area = "";
- areaId = "";
- areacode = 0;
- build = "";
- buildId = "";
- buildcode = 0;
- unit = "";
- unitId = "";
- unitcode = 0;
- floor = "";
- floorId = "";
- floorcode = 0;
- room = "";
- roomId = "";
- roomcode = 0;
- }
- std::string ToAddressString() const {
- return base::format("%s %s %s层 %s室", build.c_str(), unit.c_str(), floor.c_str(), room.c_str());
- }
- std::string ToWuyeString() const {
- return base::format("MN-%d-0-0-0-0-1", communitycode);
- }
- std::string ToUserString() const {
- return base::format("RM-%d-%d-%d-%d-%d-%d", communitycode, areacode, buildcode, unitcode, floorcode, roomcode);
- }
- std::string ToDoorPartString() const {
- return base::format("OD-%d-%d-%d-%d-0-", communitycode, areacode, buildcode, unitcode);
- }
- };
- };
- #endif /* JNI_CORE_HOUSEINFO_H_ */
|