|
@@ -69,6 +69,7 @@ static bool serverInfo = true; // 判断是否需要从服务器获取服务器
|
|
|
static int inBedCount = 0;
|
|
|
static int emptyBedCount = 0;
|
|
|
static int mainThemeInt = StoragePreferences::getInt(STORE_THEME, defaultThemeInt);
|
|
|
+static int mainModeInt = StoragePreferences::getInt(STORE_MODE, defaultModeInt);
|
|
|
|
|
|
|
|
|
|
|
@@ -94,8 +95,6 @@ void setMainTheme() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
static void getServerInfo(){
|
|
|
|
|
|
string url = getHttpGateway() + "/ncs_url/server_info";
|
|
@@ -162,7 +161,30 @@ static void getFrameRoom(int frame_id) {
|
|
|
}
|
|
|
|
|
|
if (mBedListViewPtr != NULL) {
|
|
|
- mBedListViewPtr->refreshListView();
|
|
|
+ if (mainModeInt == 1) {
|
|
|
+ mBedListViewPtr->refreshListView();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ if (frameBedList.size() <= 3) {
|
|
|
+ mBedListViewPtr->refreshListView();
|
|
|
+ mBedListViewPtr->setVisible(true);
|
|
|
+ mBedListView2Ptr->setVisible(false);
|
|
|
+ mBedListView3Ptr->setVisible(false);
|
|
|
+ }
|
|
|
+ else if (frameBedList.size() > 3 && frameBedList.size() <= 6) {
|
|
|
+ mBedListView2Ptr->refreshListView();
|
|
|
+ mBedListViewPtr->setVisible(false);
|
|
|
+ mBedListView2Ptr->setVisible(true);
|
|
|
+ mBedListView3Ptr->setVisible(false);
|
|
|
+
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ mBedListView3Ptr->refreshListView();
|
|
|
+ mBedListViewPtr->setVisible(false);
|
|
|
+ mBedListView2Ptr->setVisible(false);
|
|
|
+ mBedListView3Ptr->setVisible(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -569,6 +591,11 @@ static int getListItemCount_BedListView(const ZKListView *pListView) {
|
|
|
static void obtainListItemData_BedListView(ZKListView *pListView,ZKListView::ZKListItem *pListItem, int index) {
|
|
|
//LOGD(" obtainListItemData_ BedListView !!!\n");
|
|
|
|
|
|
+ if (mainModeInt == 2) {
|
|
|
+ if (frameBedList.size() > 3) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (frameBedList.size() > 0) {
|
|
|
ZKListView::ZKListSubItem* bedNum = pListItem->findSubItemByID(ID_MAIN_BedNumSubItem);
|
|
|
ZKListView::ZKListSubItem* name = pListItem->findSubItemByID(ID_MAIN_CustomerNameSubItem);
|
|
@@ -580,10 +607,10 @@ static void obtainListItemData_BedListView(ZKListView *pListView,ZKListView::ZKL
|
|
|
ZKListView::ZKListSubItem* nurse = pListItem->findSubItemByID(ID_MAIN_NurseSubItem);
|
|
|
|
|
|
if (mainThemeInt == 1) {
|
|
|
- bedNum->setBackgroundPic("/main/chuanghao-bg.png");
|
|
|
+ bedNum->setBackgroundPic("/9/chuanghao_bg.9.png");
|
|
|
}
|
|
|
else if (mainThemeInt == 2) {
|
|
|
- bedNum->setBackgroundPic("/main/chuanghao-bg-pink.png");
|
|
|
+ bedNum->setBackgroundPic("/9/chuanghao_bg_pink.9.png");
|
|
|
}
|
|
|
|
|
|
|
|
@@ -623,17 +650,17 @@ static void obtainListItemData_BedListView(ZKListView *pListView,ZKListView::ZKL
|
|
|
if (customerSex == "0") { // 如果性别为女性,替换成女性,底色为粉色
|
|
|
sex->setText(LANGUAGEMANAGER->getValue("Woman"));
|
|
|
sex->setTextColor(0xFF9F9F);
|
|
|
- sex->setBackgroundPic("main/woman.png");
|
|
|
+ sex->setBackgroundPic("9/lightRed.9.png");
|
|
|
}
|
|
|
else if (customerSex == "1") {
|
|
|
sex->setText(LANGUAGEMANAGER->getValue("Man"));
|
|
|
sex->setTextColor(0x3A78EF);
|
|
|
- sex->setBackgroundPic("main/man.png");
|
|
|
+ sex->setBackgroundPic("9/lightBlue.9.png");
|
|
|
}
|
|
|
else {
|
|
|
sex->setText(LANGUAGEMANAGER->getValue("Unknown"));
|
|
|
sex->setTextColor(0x37B643);
|
|
|
- sex->setBackgroundPic("main/age.png");
|
|
|
+ sex->setBackgroundPic("9/lightGreen.9.png");
|
|
|
}
|
|
|
|
|
|
|
|
@@ -708,3 +735,205 @@ static void onListItemClick_BedListView(ZKListView *pListView, int index, int id
|
|
|
//LOGD(" onListItemClick_ BedListView !!!\n");
|
|
|
}
|
|
|
|
|
|
+static int getListItemCount_BedListView2(const ZKListView *pListView) {
|
|
|
+ //LOGD("getListItemCount_BedListView2 !\n");
|
|
|
+ return frameBedList.size();
|
|
|
+}
|
|
|
+
|
|
|
+static void obtainListItemData_BedListView2(ZKListView *pListView,ZKListView::ZKListItem *pListItem, int index) {
|
|
|
+ //LOGD(" obtainListItemData_ BedListView2 !!!\n");
|
|
|
+ if (mainModeInt == 2) {
|
|
|
+ if (frameBedList.size() <= 3 || frameBedList.size() > 6) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (frameBedList.size() > 0) {
|
|
|
+ ZKListView::ZKListSubItem* bedNum = pListItem->findSubItemByID(ID_MAIN_BedNumSubItem2);
|
|
|
+ ZKListView::ZKListSubItem* name = pListItem->findSubItemByID(ID_MAIN_CustomerNameSubItem2);
|
|
|
+ ZKListView::ZKListSubItem* age = pListItem->findSubItemByID(ID_MAIN_AgeSubItem2);
|
|
|
+ ZKListView::ZKListSubItem* sex = pListItem->findSubItemByID(ID_MAIN_SexSubItem2);
|
|
|
+ ZKListView::ZKListSubItem* doctorTitle = pListItem->findSubItemByID(ID_MAIN_DoctorTitleSubItem2);
|
|
|
+ ZKListView::ZKListSubItem* nurseTitle = pListItem->findSubItemByID(ID_MAIN_NurseTitleSubItem2);
|
|
|
+ ZKListView::ZKListSubItem* doctor = pListItem->findSubItemByID(ID_MAIN_DoctorSubItem2);
|
|
|
+ ZKListView::ZKListSubItem* nurse = pListItem->findSubItemByID(ID_MAIN_NurseSubItem2);
|
|
|
+
|
|
|
+ if (mainThemeInt == 1) {
|
|
|
+ bedNum->setBackgroundPic("/9/chuanghao_bg.9.png");
|
|
|
+ }
|
|
|
+ else if (mainThemeInt == 2) {
|
|
|
+ bedNum->setBackgroundPic("/9/chuanghao_bg_pink.9.png");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ string frameBedName = frameBedList[index]["frame_bed"]["full_name"].asString();
|
|
|
+ if (frameBedName == "") {
|
|
|
+ bedNum->setText(LANGUAGEMANAGER->getValue("EmptyBed"));
|
|
|
+ } else {
|
|
|
+ int nPos = frameBedName.find("-");
|
|
|
+ if (nPos != -1) {
|
|
|
+ frameBedName = frameBedName.substr(nPos + 1, frameBedName.length());
|
|
|
+ }
|
|
|
+ bedNum->setText(frameBedName);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 用户相关
|
|
|
+ string customerName = frameBedList[index]["customer_name"].asString();
|
|
|
+ if (customerName == "") {
|
|
|
+ name->setText(LANGUAGEMANAGER->getValue("EmptyCustomer"));
|
|
|
+ } else {
|
|
|
+ name->setText(customerName);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (partSetting.customerAgeHiddenOnDoor != 0) {
|
|
|
+ if (frameBedList[index]["customer_age"].asString() == "") {
|
|
|
+ age->setText("");
|
|
|
+ } else {
|
|
|
+ age->setText("*" + frameBedList[index]["customer_age_unit"].asString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ age->setText(frameBedList[index]["customer_age"].asString() + frameBedList[index]["customer_age_unit"].asString());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ string customerSex = frameBedList[index]["customer_sex"].asString();
|
|
|
+ if (customerSex == "0") { // 如果性别为女性,替换成女性,底色为粉色
|
|
|
+ sex->setText(LANGUAGEMANAGER->getValue("Woman"));
|
|
|
+ sex->setTextColor(0xFF9F9F);
|
|
|
+ sex->setBackgroundPic("9/lightRed.9.png");
|
|
|
+ }
|
|
|
+ else if (customerSex == "1") {
|
|
|
+ sex->setText(LANGUAGEMANAGER->getValue("Man"));
|
|
|
+ sex->setTextColor(0x3A78EF);
|
|
|
+ sex->setBackgroundPic("9/lightBlue.9.png");
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ sex->setText(LANGUAGEMANAGER->getValue("Unknown"));
|
|
|
+ sex->setTextColor(0x37B643);
|
|
|
+ sex->setBackgroundPic("9/lightGreen.9.png");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 医生护士相关
|
|
|
+ if (rightTitleInfo["doctor_valid"] != 1){
|
|
|
+ doctorTitle->setVisible(false);
|
|
|
+ } else {
|
|
|
+ doctorTitle->setText(rightTitleInfo["doctor_title"].asString());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (rightTitleInfo["nurse_valid"] != 1){
|
|
|
+ nurseTitle->setVisible(false);
|
|
|
+ } else {
|
|
|
+ nurseTitle->setText(rightTitleInfo["nurse_title"].asString());
|
|
|
+ }
|
|
|
+ doctor->setText(frameBedList[index]["doctor_name"].asString());
|
|
|
+ nurse->setText(frameBedList[index]["nurse_name"].asString());
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+static void onListItemClick_BedListView2(ZKListView *pListView, int index, int id) {
|
|
|
+ //LOGD(" onListItemClick_ BedListView2 !!!\n");
|
|
|
+}
|
|
|
+static int getListItemCount_BedListView3(const ZKListView *pListView) {
|
|
|
+ //LOGD("getListItemCount_BedListView3 !\n");
|
|
|
+ return frameBedList.size();
|
|
|
+}
|
|
|
+
|
|
|
+static void obtainListItemData_BedListView3(ZKListView *pListView,ZKListView::ZKListItem *pListItem, int index) {
|
|
|
+ //LOGD(" obtainListItemData_ BedListView3 !!!\n");
|
|
|
+ if (mainModeInt == 2) {
|
|
|
+ if (frameBedList.size() <= 6) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (frameBedList.size() > 0) {
|
|
|
+ ZKListView::ZKListSubItem* bedNum = pListItem->findSubItemByID(ID_MAIN_BedNumSubItem3);
|
|
|
+ ZKListView::ZKListSubItem* name = pListItem->findSubItemByID(ID_MAIN_CustomerNameSubItem3);
|
|
|
+ ZKListView::ZKListSubItem* age = pListItem->findSubItemByID(ID_MAIN_AgeSubItem3);
|
|
|
+ ZKListView::ZKListSubItem* sex = pListItem->findSubItemByID(ID_MAIN_SexSubItem3);
|
|
|
+ ZKListView::ZKListSubItem* doctorTitle = pListItem->findSubItemByID(ID_MAIN_DoctorTitleSubItem3);
|
|
|
+ ZKListView::ZKListSubItem* nurseTitle = pListItem->findSubItemByID(ID_MAIN_NurseTitleSubItem3);
|
|
|
+ ZKListView::ZKListSubItem* doctor = pListItem->findSubItemByID(ID_MAIN_DoctorSubItem3);
|
|
|
+ ZKListView::ZKListSubItem* nurse = pListItem->findSubItemByID(ID_MAIN_NurseSubItem3);
|
|
|
+
|
|
|
+ if (mainThemeInt == 1) {
|
|
|
+ bedNum->setBackgroundPic("/9/chuanghao_bg.9.png");
|
|
|
+ }
|
|
|
+ else if (mainThemeInt == 2) {
|
|
|
+ bedNum->setBackgroundPic("/9/chuanghao_bg_pink.9.png");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ string frameBedName = frameBedList[index]["frame_bed"]["full_name"].asString();
|
|
|
+ if (frameBedName == "") {
|
|
|
+ bedNum->setText(LANGUAGEMANAGER->getValue("EmptyBed"));
|
|
|
+ } else {
|
|
|
+ int nPos = frameBedName.find("-");
|
|
|
+ if (nPos != -1) {
|
|
|
+ frameBedName = frameBedName.substr(nPos + 1, frameBedName.length());
|
|
|
+ }
|
|
|
+ bedNum->setText(frameBedName);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 用户相关
|
|
|
+ string customerName = frameBedList[index]["customer_name"].asString();
|
|
|
+ if (customerName == "") {
|
|
|
+ name->setText(LANGUAGEMANAGER->getValue("EmptyCustomer"));
|
|
|
+ } else {
|
|
|
+ name->setText(customerName);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (partSetting.customerAgeHiddenOnDoor != 0) {
|
|
|
+ if (frameBedList[index]["customer_age"].asString() == "") {
|
|
|
+ age->setText("");
|
|
|
+ } else {
|
|
|
+ age->setText("*" + frameBedList[index]["customer_age_unit"].asString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ age->setText(frameBedList[index]["customer_age"].asString() + frameBedList[index]["customer_age_unit"].asString());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ string customerSex = frameBedList[index]["customer_sex"].asString();
|
|
|
+ if (customerSex == "0") { // 如果性别为女性,替换成女性,底色为粉色
|
|
|
+ sex->setText(LANGUAGEMANAGER->getValue("Woman"));
|
|
|
+ sex->setTextColor(0xFF9F9F);
|
|
|
+ sex->setBackgroundPic("9/lightRed.9.png");
|
|
|
+ }
|
|
|
+ else if (customerSex == "1") {
|
|
|
+ sex->setText(LANGUAGEMANAGER->getValue("Man"));
|
|
|
+ sex->setTextColor(0x3A78EF);
|
|
|
+ sex->setBackgroundPic("9/lightBlue.9.png");
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ sex->setText(LANGUAGEMANAGER->getValue("Unknown"));
|
|
|
+ sex->setTextColor(0x37B643);
|
|
|
+ sex->setBackgroundPic("9/lightGreen.9.png");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 医生护士相关
|
|
|
+ if (rightTitleInfo["doctor_valid"] != 1){
|
|
|
+ doctorTitle->setVisible(false);
|
|
|
+ } else {
|
|
|
+ doctorTitle->setText(rightTitleInfo["doctor_title"].asString());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (rightTitleInfo["nurse_valid"] != 1){
|
|
|
+ nurseTitle->setVisible(false);
|
|
|
+ } else {
|
|
|
+ nurseTitle->setText(rightTitleInfo["nurse_title"].asString());
|
|
|
+ }
|
|
|
+ doctor->setText(frameBedList[index]["doctor_name"].asString());
|
|
|
+ nurse->setText(frameBedList[index]["nurse_name"].asString());
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+static void onListItemClick_BedListView3(ZKListView *pListView, int index, int id) {
|
|
|
+ //LOGD(" onListItemClick_ BedListView3 !!!\n");
|
|
|
+}
|