Двигаюсь по полям
This commit is contained in:
@ -494,7 +494,7 @@ public class DbOpenHelper extends SQLiteOpenHelper
|
|||||||
"lon5 double, " +
|
"lon5 double, " +
|
||||||
"lat6 double, " +
|
"lat6 double, " +
|
||||||
"lon6 double, " +
|
"lon6 double, " +
|
||||||
"bio_hectare double, " + //"bio_hectare integer, " ++++++++
|
"bio_hectare double, " + //"bio_hectare integer, "
|
||||||
"bio_biotope_id integer," + //тип биотопаCIT (степь, залежь, посевы) тип биотопаDMA (равнины, холмы, посевы) тип биотопаLMI (низкие сухие тростники, высокие влажные тростники, другое)
|
"bio_biotope_id integer," + //тип биотопаCIT (степь, залежь, посевы) тип биотопаDMA (равнины, холмы, посевы) тип биотопаLMI (низкие сухие тростники, высокие влажные тростники, другое)
|
||||||
"bio_greenery_id integer,"+ //растительность: сухая, всходы, зеленая, засыхающая
|
"bio_greenery_id integer,"+ //растительность: сухая, всходы, зеленая, засыхающая
|
||||||
"bio_greenery_cover_id integer,"+ //растительный покров(Редкий, Ср., Густой)
|
"bio_greenery_cover_id integer,"+ //растительный покров(Редкий, Ср., Густой)
|
||||||
@ -677,7 +677,7 @@ public class DbOpenHelper extends SQLiteOpenHelper
|
|||||||
"efficacy_passed_time float," + //Прошло времени после обработки
|
"efficacy_passed_time float," + //Прошло времени после обработки
|
||||||
"efficacy_mortality_method integer," + //метод подсчета смертности
|
"efficacy_mortality_method integer," + //метод подсчета смертности
|
||||||
"safety_clothing text," + //Какой защитной одеждой пользовался оператор
|
"safety_clothing text," + //Какой защитной одеждой пользовался оператор
|
||||||
"safety_clothing_clean boolean," + //В 2024 сказали оставить только в форме по ЗЧ и ОС
|
"safety_clothing_clean boolean," + //В 2024 сказали оставить только в форме по ЗЧ и ОС (теперь это поле там)
|
||||||
"safety_operator_health boolean," +
|
"safety_operator_health boolean," +
|
||||||
"description text," + //Описание
|
"description text," + //Описание
|
||||||
"safety_inform text," + //Кто был оповещен об обработках?
|
"safety_inform text," + //Кто был оповещен об обработках?
|
||||||
@ -710,7 +710,8 @@ public class DbOpenHelper extends SQLiteOpenHelper
|
|||||||
|
|
||||||
//Идентификация места мониторинга
|
//Идентификация места мониторинга
|
||||||
"observer text, " + //Имя руководителя бригады по мониторингу ЗЧ и ОС
|
"observer text, " + //Имя руководителя бригады по мониторингу ЗЧ и ОС
|
||||||
"date integer," + //Дата мониторинга (секунд с 1970 года)
|
"date text," + //Дата мониторинга (секунд с 1970 года)
|
||||||
|
"timezone text, " + //Временная зона
|
||||||
"frmlocustdel_filled boolean," + //Заполнялась ли Форма по Мониторингу противосаранчовых обработок бригадой по обработке? (Похоже что это бесполезное поле так как есть поле frmlocustdel_uid)
|
"frmlocustdel_filled boolean," + //Заполнялась ли Форма по Мониторингу противосаранчовых обработок бригадой по обработке? (Похоже что это бесполезное поле так как есть поле frmlocustdel_uid)
|
||||||
|
|
||||||
//Бригада по обработке
|
//Бригада по обработке
|
||||||
@ -770,6 +771,7 @@ public class DbOpenHelper extends SQLiteOpenHelper
|
|||||||
|
|
||||||
"safety_Control boolean," + // Осуществлялся ли бригадой по мониторингу ЗЧ и ОС контроль в отношении наблюдаемого или зарегистрированного воздействия на окружающую среду
|
"safety_Control boolean," + // Осуществлялся ли бригадой по мониторингу ЗЧ и ОС контроль в отношении наблюдаемого или зарегистрированного воздействия на окружающую среду
|
||||||
"safety_Control_Actions text," + // Если Да, опишите последующее действие(я)
|
"safety_Control_Actions text," + // Если Да, опишите последующее действие(я)
|
||||||
|
"safety_clothing_clean boolean," + // Защитная одержа чистая и в хорошем состоянии (перенесли из таблицы обработки саранчи)
|
||||||
|
|
||||||
"map_treatment boolean," + // Была ли составлена ситуационная карта обработки?
|
"map_treatment boolean," + // Была ли составлена ситуационная карта обработки?
|
||||||
|
|
||||||
@ -1236,7 +1238,7 @@ public class DbOpenHelper extends SQLiteOpenHelper
|
|||||||
|
|
||||||
//Информация об инсектицидах
|
//Информация об инсектицидах
|
||||||
"insecticide_part_number text," + //Номер партии препарата (если указан на контейнере)
|
"insecticide_part_number text," + //Номер партии препарата (если указан на контейнере)
|
||||||
"insecticide_manufactured_date integer," + //Дата производства или срок годности (срок хранения)
|
"insecticide_manufactured_date text," + //Дата производства или срок годности (срок хранения)
|
||||||
"insecticide_expiration_date integer," + //********** На всякий случай, может и не пригодиться **********
|
"insecticide_expiration_date integer," + //********** На всякий случай, может и не пригодиться **********
|
||||||
"insecticide_container_state_id integer," + //Состояние пакетов или контейнеров с инсектицидами
|
"insecticide_container_state_id integer," + //Состояние пакетов или контейнеров с инсектицидами
|
||||||
|
|
||||||
@ -1367,9 +1369,16 @@ public class DbOpenHelper extends SQLiteOpenHelper
|
|||||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN date TO date_DEL;");
|
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN date TO date_DEL;");
|
||||||
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN date_temp TO date;");
|
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN date_temp TO date;");
|
||||||
|
|
||||||
++++++++
|
//Дата производства или срок годности (срок хранения)
|
||||||
|
db.execSQL("ALTER TABLE frmlocusthealth ADD COLUMN insecticide_manufactured_date_temp TEXT;");
|
||||||
|
db.execSQL("UPDATE frmlocusthealth SET insecticide_manufactured_date_temp = insecticide_manufactured_date;");
|
||||||
|
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN insecticide_manufactured_date TO insecticide_manufactured_date_DEL;");
|
||||||
|
db.execSQL("ALTER TABLE frmlocusthealth RENAME COLUMN insecticide_manufactured_date_temp TO insecticide_manufactured_date;");
|
||||||
|
|
||||||
sql = "ALTER TABLE frmlocusthealth ADD safety_clothing_clean boolean;";
|
sql = "ALTER TABLE frmlocusthealth ADD safety_clothing_clean boolean;";
|
||||||
db.execSQL(sql);
|
db.execSQL(sql);
|
||||||
|
sql = "ALTER TABLE frmlocusthealth ADD timezone text;";
|
||||||
|
db.execSQL(sql);
|
||||||
|
|
||||||
oldVersion=153;
|
oldVersion=153;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1261,8 +1261,6 @@ public class LocustDelActivity extends FragmentActivity implements LocationListe
|
|||||||
|
|
||||||
edtSafEmptyContainers = (EditText) findViewById(R.id.edtSafEmptyContainers);
|
edtSafEmptyContainers = (EditText) findViewById(R.id.edtSafEmptyContainers);
|
||||||
guiTable.add(edtSafEmptyContainers, "safety_container");
|
guiTable.add(edtSafEmptyContainers, "safety_container");
|
||||||
|
|
||||||
|
|
||||||
edtSafEmptyContainers.addTextChangedListener(new TextWatcher()
|
edtSafEmptyContainers.addTextChangedListener(new TextWatcher()
|
||||||
{
|
{
|
||||||
public void afterTextChanged(Editable s)
|
public void afterTextChanged(Editable s)
|
||||||
|
|||||||
@ -109,15 +109,31 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
public EditText edtLonCenter = null; // Долгота
|
public EditText edtLonCenter = null; // Долгота
|
||||||
public ListView latlonList = null;
|
public ListView latlonList = null;
|
||||||
|
|
||||||
|
//Идентификация места мониторинга
|
||||||
|
public EditText edtObserverHealth = null; //H Имя руководителя бригады по мониторингу ЗЧ и ОС
|
||||||
|
public EditText edtMonitoringDate = null; //H Дата мониторинга
|
||||||
|
public EditText edtMonitoringTimeZone = null; //H Временная зона для: Дата мониторинга
|
||||||
|
public View spiFrmLocustDelFilled = null; //H Заполнялась ли Форма по Мониторингу противосаранчовых обработок бригадой по обработке?
|
||||||
|
|
||||||
|
//Бригада по обработке
|
||||||
|
public EditText edtBrigadeCount = null; //H Количество работников в бригаде по обработке
|
||||||
|
public EditText edtBrigadeCountTrained = null; //H Количество работников, ранее обученных обращению с инсектицидами и их применению
|
||||||
|
|
||||||
|
|
||||||
public EditText edtInfestedArea = null; // заселенная площадь(га)
|
public EditText edtInfestedArea = null; // заселенная площадь(га)
|
||||||
public EditText edtTreatedArea = null; // обработанная площадь(га)
|
public EditText edtTreatedArea = null; // обработанная площадь(га)
|
||||||
public View spiVegType = null; // Тип(дикая, культурная)
|
public View spiVegType = null; // Тип(дикая, культурная)
|
||||||
public EditText edtVegHeight = null; // Высота (м)
|
public EditText edtVegHeight = null; // Высота (м)
|
||||||
public View spiVegCover = null; // Растительный покров (Редкий, Ср., Густой)
|
public View spiVegCover = null; // Растительный покров (Редкий, Ср., Густой)
|
||||||
public EditText edtVegCrop = null; // Перечисление культур
|
public EditText edtVegCrop = null; // Перечисление культур
|
||||||
public View spiVegDamage = null; // Повреждения растительного покрова(%)
|
//public View spiVegDamage = null; // Повреждения растительного покрова(%)
|
||||||
public EditText edtVegDamageArea = null; // Площадь повреждений (га)
|
//public EditText edtVegDamageArea = null; // Площадь повреждений (га)
|
||||||
|
|
||||||
|
//Информация об инсектицидах
|
||||||
public EditText edtInsName = null; // коммерческое название
|
public EditText edtInsName = null; // коммерческое название
|
||||||
|
public EditText edtInsPartNumber = null; //H Номер партии препарата (если указан на контейнере)
|
||||||
|
public EditText edtInsManufacturedDate = null; //H Дата производства или Срок годности (срок хранения)
|
||||||
|
|
||||||
public EditText edtInsActiveSubstance = null; // Наименование активного вещества отравы
|
public EditText edtInsActiveSubstance = null; // Наименование активного вещества отравы
|
||||||
public EditText edtInsConcentration = null; // концентрация(г д.в./л или%)
|
public EditText edtInsConcentration = null; // концентрация(г д.в./л или%)
|
||||||
public View spiInsFormulation = null; // формуляция(УМО, КЭ, др.)
|
public View spiInsFormulation = null; // формуляция(УМО, КЭ, др.)
|
||||||
@ -154,7 +170,7 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
public View spiMainPurpose = null; // Основная цель при обработке (Имаго,Кулиги,Стаи,Разреженные)
|
public View spiMainPurpose = null; // Основная цель при обработке (Имаго,Кулиги,Стаи,Разреженные)
|
||||||
|
|
||||||
|
|
||||||
public View spiLocustPhaseId = null; // Фара саранчи
|
//public View spiLocustPhaseId = null; // Фара саранчи
|
||||||
public View spiSprPlatform = null; // Вид опрыскивания
|
public View spiSprPlatform = null; // Вид опрыскивания
|
||||||
|
|
||||||
public View spiSprPlatformA = null; // «Авиа» - выпадающий список:«Самолет», «Вертолет», «Дельтаплан».
|
public View spiSprPlatformA = null; // «Авиа» - выпадающий список:«Самолет», «Вертолет», «Дельтаплан».
|
||||||
@ -197,18 +213,18 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
public View spiHlthProtectiveClothingClean = null; // Защитная одежда чистая и в хорошем состоянии
|
public View spiHlthProtectiveClothingClean = null; // Защитная одежда чистая и в хорошем состоянии
|
||||||
|
|
||||||
|
|
||||||
public View spiProtectiveClothingClean = null;
|
//public View spiProtectiveClothingClean = null;
|
||||||
public View spiOperatorExposedInsecticide = null;
|
public View spiOperatorExposedInsecticide = null;
|
||||||
public EditText edtDescription = null;
|
public EditText edtDescription = null;
|
||||||
public CheckBox cbTest; //Тестовая ли анкета
|
public CheckBox cbTest; //Тестовая ли анкета
|
||||||
|
|
||||||
public CheckBox cbSafInformFarmer = null; // Кто был оповещен об обработках? Фермер
|
//public CheckBox cbSafInformFarmer = null; // Кто был оповещен об обработках? Фермер
|
||||||
public CheckBox cbSafInformShepherd = null; // Кто был оповещен об обработках? Пастух
|
//public CheckBox cbSafInformShepherd = null; // Кто был оповещен об обработках? Пастух
|
||||||
public CheckBox cbSafInformVillager = null; // Кто был оповещен об обработках? Сельский житель
|
//public CheckBox cbSafInformVillager = null; // Кто был оповещен об обработках? Сельский житель
|
||||||
public CheckBox cbSafInformOfficial = null; // Кто был оповещен об обработках? Чиновник
|
//public CheckBox cbSafInformOfficial = null; // Кто был оповещен об обработках? Чиновник
|
||||||
public CheckBox cbSafInformBeekeeper = null; // Кто был оповещен об обработках? Пчеловод
|
//public CheckBox cbSafInformBeekeeper = null; // Кто был оповещен об обработках? Пчеловод
|
||||||
public CheckBox cbSafInformOther = null; // Кто был оповещен об обработках? Другие
|
//public CheckBox cbSafInformOther = null; // Кто был оповещен об обработках? Другие
|
||||||
public EditText edtInform = null; // Сборная колонка для (Фермер,Сельский житель,Чиновник,Пчеловод,Другие)
|
//public EditText edtInform = null; // Сборная колонка для (Фермер,Сельский житель,Чиновник,Пчеловод,Другие)
|
||||||
|
|
||||||
//public SpinnerDB spiSafEmptyСontainers = null; // Пустые контейнеры
|
//public SpinnerDB spiSafEmptyСontainers = null; // Пустые контейнеры
|
||||||
public CheckBox cbTripleRinsed = null;
|
public CheckBox cbTripleRinsed = null;
|
||||||
@ -365,7 +381,31 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
// };
|
// };
|
||||||
|
|
||||||
|
|
||||||
|
//sql = "ALTER TABLE frmlocusthealth ADD timezone text;";
|
||||||
|
//db.execSQL(sql);
|
||||||
|
|
||||||
|
|
||||||
|
//**********Идентификация места мониторинга**********
|
||||||
|
|
||||||
|
//H Имя руководителя бригады по мониторингу ЗЧ и ОС
|
||||||
|
edtObserverHealth = (EditText) findViewById(R.id.edtObserverHealth);
|
||||||
|
guiTableHealth.add(edtObserverHealth, "observer");
|
||||||
|
//H Дата мониторинга
|
||||||
|
edtMonitoringDate = (EditText) findViewById(R.id.edtMonitoringDate);
|
||||||
|
guiTableHealth.add(edtMonitoringDate, "date");
|
||||||
|
//H Временная зона для: Дата мониторинга
|
||||||
|
edtMonitoringTimeZone = (EditText) findViewById(R.id.edtMonitoringTimeZone);
|
||||||
|
guiTableHealth.add(edtMonitoringTimeZone,"timezone");
|
||||||
|
|
||||||
|
//**********Бригада по обработке**********
|
||||||
|
//H Количество работников в бригаде по обработке
|
||||||
|
edtBrigadeCount = (EditText) findViewById(R.id.edtBrigadeCount);
|
||||||
|
guiTableHealth.add(edtBrigadeCount, "brigade_count");
|
||||||
|
//H Количество работников, ранее обученных обращению с инсектицидами и их применению
|
||||||
|
edtBrigadeCountTrained = (EditText) findViewById(R.id.edtBrigadeCountTrained);
|
||||||
|
guiTableHealth.add(edtBrigadeCountTrained, "brigade_count_trained");
|
||||||
|
|
||||||
|
//**********Информация о растительности**********
|
||||||
//Тип растительности
|
//Тип растительности
|
||||||
spiVegType = findViewById(R.id.spiVegType); // Тип(Дикая, Культурная)
|
spiVegType = findViewById(R.id.spiVegType); // Тип(Дикая, Культурная)
|
||||||
guiTableDel.add(spiVegType, "vegetation_type_id");
|
guiTableDel.add(spiVegType, "vegetation_type_id");
|
||||||
@ -414,9 +454,17 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
edtVegCrop = (EditText) findViewById(R.id.edtVegCrop); // Перечисление культур
|
edtVegCrop = (EditText) findViewById(R.id.edtVegCrop); // Перечисление культур
|
||||||
guiTableDel.add(edtVegCrop, "vegetation_crop");
|
guiTableDel.add(edtVegCrop, "vegetation_crop");
|
||||||
|
|
||||||
//Наименование инсектицида
|
//**********Информация об инсектицидах**********
|
||||||
edtInsName = (EditText) findViewById(R.id.edtInsName); // коммерческое название
|
// коммерческое название (Наименование инсектицида)
|
||||||
|
edtInsName = (EditText) findViewById(R.id.edtInsName);
|
||||||
guiTableDel.add(edtInsName, "insecticide_name");
|
guiTableDel.add(edtInsName, "insecticide_name");
|
||||||
|
//H Номер партии препарата (если указан на контейнере)
|
||||||
|
edtInsPartNumber = (EditText) findViewById(R.id.edtInsPartNumber);
|
||||||
|
guiTableHealth.add(edtInsPartNumber, "insecticide_part_number");
|
||||||
|
//H Дата производства или Срок годности (срок хранения)
|
||||||
|
edtInsManufacturedDate = (EditText) findViewById(R.id.edtInsPartNumber);
|
||||||
|
guiTableHealth.add(edtInsManufacturedDate, "insecticide_manufactured_date");
|
||||||
|
+++++++++
|
||||||
|
|
||||||
// Наименование активного вещества отравы
|
// Наименование активного вещества отравы
|
||||||
edtInsActiveSubstance = (EditText) findViewById(R.id.edtInsActiveSubstance);
|
edtInsActiveSubstance = (EditText) findViewById(R.id.edtInsActiveSubstance);
|
||||||
@ -480,6 +528,7 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
edtInsRate = (EditText) findViewById(R.id.edtInsRate);
|
edtInsRate = (EditText) findViewById(R.id.edtInsRate);
|
||||||
guiTableDel.add(edtInsRate, "insecticide_rate");
|
guiTableDel.add(edtInsRate, "insecticide_rate");
|
||||||
|
|
||||||
|
//**********Погодные условия**********
|
||||||
// время начала
|
// время начала
|
||||||
spiWeaTimeStart = findViewById(R.id.spiWeaTimeStart);
|
spiWeaTimeStart = findViewById(R.id.spiWeaTimeStart);
|
||||||
guiTableDel.add(spiWeaTimeStart, "weather_time_start");
|
guiTableDel.add(spiWeaTimeStart, "weather_time_start");
|
||||||
@ -897,6 +946,102 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
((selectDB)spiEffectiveness).addField(getString(R.string.Yes), "1");
|
((selectDB)spiEffectiveness).addField(getString(R.string.Yes), "1");
|
||||||
((selectDB)spiEffectiveness).addField(getString(R.string.No), "0");
|
((selectDB)spiEffectiveness).addField(getString(R.string.No), "0");
|
||||||
|
|
||||||
|
//Оператор случайно подвергся воздействию инсектицида или плохое самочувствие
|
||||||
|
spiOperatorExposedInsecticide = findViewById(R.id.spiOperatorExposedInsecticide);
|
||||||
|
guiTableDel.add(spiOperatorExposedInsecticide, "safety_operator_health");
|
||||||
|
((selectDB)spiOperatorExposedInsecticide).addField("", "");
|
||||||
|
((selectDB)spiOperatorExposedInsecticide).addField(getString(R.string.Yes), "1");
|
||||||
|
((selectDB)spiOperatorExposedInsecticide).addField(getString(R.string.No), "0");
|
||||||
|
|
||||||
|
// если да, то какое
|
||||||
|
edtDescription = (EditText) findViewById(R.id.edtDescription);
|
||||||
|
guiTableDel.add(edtDescription, "description");
|
||||||
|
|
||||||
|
|
||||||
|
// Пустые контейнеры (выборка локализованных названий)
|
||||||
|
dboh = new DbOpenHelper(this);
|
||||||
|
cursor = dboh
|
||||||
|
.getReadableDatabase()
|
||||||
|
.rawQuery(
|
||||||
|
"select d.id, COALESCE((SELECT translation FROM _translations t JOIN _languages l ON t.language_id=l.id WHERE t.del = 0 AND identifier = d.name AND l.short_name='"
|
||||||
|
+ Tools.getLang() + "' LIMIT 1),d.name) name from list_containers d where d.del=0 order by d.sort,d.name", null);
|
||||||
|
if (cursor.moveToFirst())
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if(cursor.getLong(cursor.getColumnIndex("id"))==1)
|
||||||
|
((CheckBox) findViewById(R.id.cbTripleRinsed)).setText(cursor.getString(cursor.getColumnIndex("name")));
|
||||||
|
if(cursor.getLong(cursor.getColumnIndex("id"))==2)
|
||||||
|
((CheckBox) findViewById(R.id.cbPunctured)).setText(cursor.getString(cursor.getColumnIndex("name")));
|
||||||
|
if(cursor.getLong(cursor.getColumnIndex("id"))==3)
|
||||||
|
((CheckBox) findViewById(R.id.cbTakenBackToBase)).setText(cursor.getString(cursor.getColumnIndex("name")));
|
||||||
|
if(cursor.getLong(cursor.getColumnIndex("id"))==4)
|
||||||
|
((CheckBox) findViewById(R.id.cbLeftInField)).setText(cursor.getString(cursor.getColumnIndex("name")));
|
||||||
|
if(cursor.getLong(cursor.getColumnIndex("id"))==5)
|
||||||
|
((CheckBox) findViewById(R.id.cbBuried)).setText(cursor.getString(cursor.getColumnIndex("name")));
|
||||||
|
if(cursor.getLong(cursor.getColumnIndex("id"))==6)
|
||||||
|
((CheckBox) findViewById(R.id.cbBurned)).setText(cursor.getString(cursor.getColumnIndex("name")));
|
||||||
|
} while (cursor.moveToNext());
|
||||||
|
}
|
||||||
|
cursor.close();
|
||||||
|
dboh.close();
|
||||||
|
//Тут сам выбор значений из базы
|
||||||
|
edtSafEmptyContainers = (EditText) findViewById(R.id.edtSafEmptyContainers);
|
||||||
|
guiTableDel.add(edtSafEmptyContainers, "safety_container");
|
||||||
|
edtSafEmptyContainers.addTextChangedListener(new TextWatcher()
|
||||||
|
{
|
||||||
|
public void afterTextChanged(Editable s){}
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after){}
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count)
|
||||||
|
{
|
||||||
|
String str = LocustHealthActivity.this.edtSafEmptyContainers.getText().toString();
|
||||||
|
if (str.indexOf("1") != -1)
|
||||||
|
LocustHealthActivity.this.cbTripleRinsed.setChecked(true);
|
||||||
|
if (str.indexOf("2") != -1)
|
||||||
|
LocustHealthActivity.this.cbPunctured.setChecked(true);
|
||||||
|
if (str.indexOf("3") != -1)
|
||||||
|
LocustHealthActivity.this.cbTakenBackToBase.setChecked(true);
|
||||||
|
if (str.indexOf("4") != -1)
|
||||||
|
LocustHealthActivity.this.cbLeftInField.setChecked(true);
|
||||||
|
if (str.indexOf("5") != -1)
|
||||||
|
LocustHealthActivity.this.cbBuried.setChecked(true);
|
||||||
|
if (str.indexOf("6") != -1)
|
||||||
|
LocustHealthActivity.this.cbBurned.setChecked(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
cbTripleRinsed = (CheckBox) findViewById(R.id.cbTripleRinsed);
|
||||||
|
cbPunctured = (CheckBox) findViewById(R.id.cbPunctured);
|
||||||
|
cbTakenBackToBase = (CheckBox) findViewById(R.id.cbTakenBackToBase);
|
||||||
|
cbLeftInField = (CheckBox) findViewById(R.id.cbLeftInField);
|
||||||
|
cbBuried = (CheckBox) findViewById(R.id.cbBuried);
|
||||||
|
cbBurned = (CheckBox) findViewById(R.id.cbBurned);
|
||||||
|
|
||||||
|
|
||||||
|
// воздействие на нецелевые организмы
|
||||||
|
spiSafNonTarget = findViewById(R.id.spiSafNonTarget);
|
||||||
|
guiTableDel.add(spiSafNonTarget, "safety_non_target");
|
||||||
|
((selectDB)spiSafNonTarget).addField("", "");
|
||||||
|
((selectDB)spiSafNonTarget).addField(getString(R.string.Yes), "1");
|
||||||
|
((selectDB)spiSafNonTarget).addField(getString(R.string.No), "0");
|
||||||
|
|
||||||
|
// если да, то какое воздействие на нецелевые организмы
|
||||||
|
edtSafNonTargetEffect = (EditText) findViewById(R.id.edtSafNonTargetEffect);
|
||||||
|
guiTableDel.add(edtSafNonTargetEffect, "safety_non_target_effect");
|
||||||
|
|
||||||
|
// Другие инциденты по здоровью или окружающей среде, возникшие возможно при обработке
|
||||||
|
spiSafIncident = findViewById(R.id.spiSafIncident);
|
||||||
|
guiTableDel.add(spiSafIncident, "safety_incident");
|
||||||
|
((selectDB)spiSafIncident).addField("", "");
|
||||||
|
((selectDB)spiSafIncident).addField(getString(R.string.Yes), "1");
|
||||||
|
((selectDB)spiSafIncident).addField(getString(R.string.No), "0");
|
||||||
|
|
||||||
|
// Если Да, тип инцидента и кем сообщен (описание)
|
||||||
|
edtSafIncidentEffect = (EditText) findViewById(R.id.edtSafIncidentEffect);
|
||||||
|
guiTableDel.add(edtSafIncidentEffect, "safety_incident_effect");
|
||||||
|
|
||||||
|
|
||||||
|
edtComments = (EditText) findViewById(R.id.edtComments); // КОММЕНТАР<D090>?<3F>?
|
||||||
|
guiTableDel.add(edtComments, "comments");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1635,14 +1780,8 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
|
|||||||
// ((selectDB)spiProtectiveClothingClean).addField(getString(R.string.Yes), "1");
|
// ((selectDB)spiProtectiveClothingClean).addField(getString(R.string.Yes), "1");
|
||||||
// ((selectDB)spiProtectiveClothingClean).addField(getString(R.string.No), "0");
|
// ((selectDB)spiProtectiveClothingClean).addField(getString(R.string.No), "0");
|
||||||
//
|
//
|
||||||
// spiOperatorExposedInsecticide = findViewById(R.id.spiOperatorExposedInsecticide);
|
|
||||||
// guiTable.add(spiOperatorExposedInsecticide, "safety_operator_health");
|
|
||||||
// ((selectDB)spiOperatorExposedInsecticide).addField("", "");
|
|
||||||
// ((selectDB)spiOperatorExposedInsecticide).addField(getString(R.string.Yes), "1");
|
|
||||||
// ((selectDB)spiOperatorExposedInsecticide).addField(getString(R.string.No), "0");
|
|
||||||
//
|
//
|
||||||
// edtDescription = (EditText) findViewById(R.id.edtDescription); // если да, то какое
|
|
||||||
// guiTable.add(edtDescription, "description");
|
|
||||||
//
|
//
|
||||||
// cbTest = (CheckBox) findViewById(R.id.cbTest);
|
// cbTest = (CheckBox) findViewById(R.id.cbTest);
|
||||||
// guiTable.add(cbTest, "test");
|
// guiTable.add(cbTest, "test");
|
||||||
|
|||||||
@ -599,6 +599,7 @@ public class LocustHealthListActivity extends AppCompatActivity
|
|||||||
llList.removeAllViews();
|
llList.removeAllViews();
|
||||||
|
|
||||||
DbOpenHelper dboh = new DbOpenHelper(LocustHealthListActivity.this);
|
DbOpenHelper dboh = new DbOpenHelper(LocustHealthListActivity.this);
|
||||||
|
|
||||||
Cursor cursor = null;
|
Cursor cursor = null;
|
||||||
switch (spiList.getSelectedItemPosition())
|
switch (spiList.getSelectedItemPosition())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -878,7 +878,7 @@
|
|||||||
android:background="@color/transparent"
|
android:background="@color/transparent"
|
||||||
app:boxBackgroundColor="@color/transparent">
|
app:boxBackgroundColor="@color/transparent">
|
||||||
|
|
||||||
<dbfields.DateTimeTM
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/edtInsManufacturedDate"
|
android:id="@+id/edtInsManufacturedDate"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -888,32 +888,8 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:singleLine="true" />
|
android:singleLine="true" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/edtTimeZone3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:minWidth="2dp"
|
|
||||||
android:visibility="invisible"
|
|
||||||
android:inputType="text"/>
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnGetDate3"
|
|
||||||
style="@style/Widget.MaterialComponents.Button.Icon"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:insetLeft="0dp"
|
|
||||||
android:insetTop="0dp"
|
|
||||||
android:insetRight="0dp"
|
|
||||||
android:insetBottom="0dp"
|
|
||||||
android:minWidth="40dp"
|
|
||||||
app:icon="@drawable/ic_clock"
|
|
||||||
app:iconGravity="textStart"
|
|
||||||
app:iconPadding="0dp"
|
|
||||||
app:iconSize="24dp" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user