Merge pull request #41 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GG_PromoComplainceActivity
Gg promo complaince activity
This commit is contained in:
Generated
+1
-1
@@ -41,7 +41,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -4841,7 +4841,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select DISTINCT SK.SKU_ID,SK.SKU,SK.MRP,SK.SKU_SEQUENCE,M.MBQ,BR.COMPANY_ID " +
|
||||
dbcursor = db.rawQuery("Select DISTINCT SK.SKU_ID,SK.SKU,SK.MRP,SK.SKU_SEQUENCE,M.MBQ,BR.COMPANY_ID,M.MUST_HAVE " +
|
||||
"from MAPPING_STOCK M " +
|
||||
"inner join SKU_MASTER SK " +
|
||||
"on M.SKU_ID=SK.SKU_ID " +
|
||||
@@ -4853,7 +4853,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
"on SB.CATEGORY_ID=CA.CATEGORY_ID " +
|
||||
"where CA.CATEGORY_ID='" + category_id + "' AND BR.BRAND_ID='" + brand_id +
|
||||
"' AND M.KEYACCOUNT_ID = '" + keyAccount_id + "' AND M.STORETYPE_ID = '" + storeType_id +
|
||||
"' AND M.CLASS_ID = '" + class_id + "'", null);
|
||||
"' AND M.CLASS_ID = '" + class_id + "' order by M.MUST_HAVE DESC", null);
|
||||
|
||||
/*dbcursor = db.rawQuery("Select DISTINCT SK.SKU_ID,SK.SKU,SK.MRP,SK.SKU_SEQUENCE,M.MBQ " +
|
||||
"from MAPPING_STOCK M " +
|
||||
@@ -4881,6 +4881,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setSku_sequence(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_SEQUENCE")));
|
||||
cd.setMbq(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MBQ")));
|
||||
cd.setCompany_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("COMPANY_ID")));
|
||||
cd.setMust_have(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MUST_HAVE")));
|
||||
cd.setToggleValue("1");
|
||||
cd.setFacing("");
|
||||
cd.setStock("");
|
||||
@@ -4921,6 +4922,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setFacing(dbcursor.getString(dbcursor.getColumnIndexOrThrow("FACING")));
|
||||
cd.setStock(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STOCK")));
|
||||
cd.setCompany_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("COMPANY_ID")));
|
||||
cd.setMust_have(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MUST_HAVE")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
@@ -4955,9 +4957,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
values.put("SKU_SEQUENCE", data.getSku_sequence());
|
||||
values.put("MBQ", data.getMbq());
|
||||
values.put("TOGGLE_VALUE", data.getToggleValue());
|
||||
values.put("FACING", data.getFacing());
|
||||
if (data.getFacing().equals("")) {
|
||||
values.put("FACING", "0");
|
||||
} else {
|
||||
values.put("FACING", data.getFacing());
|
||||
}
|
||||
values.put("STOCK", data.getStock());
|
||||
values.put("COMPANY_ID", data.getCompany_id());
|
||||
values.put("MUST_HAVE", data.getMust_have());
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_MSL_AVAILABILITY_STOCK_FACING, null, values);
|
||||
}
|
||||
@@ -4983,9 +4990,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
MSL_AvailabilityStockFacingGetterSetter data = hashMapListChildData.get(hashMapListHeaderData.get(i)).get(j);
|
||||
|
||||
values.put("TOGGLE_VALUE", data.getToggleValue());
|
||||
values.put("FACING", data.getFacing());
|
||||
values.put("STOCK", data.getStock());
|
||||
|
||||
if (data.getFacing().equals("")) {
|
||||
values.put("FACING", "0");
|
||||
} else {
|
||||
values.put("FACING", data.getFacing());
|
||||
}
|
||||
|
||||
db.update(CommonString.TABLE_INSERT_MSL_AVAILABILITY_STOCK_FACING, values,
|
||||
"Brand_Id ='" + hashMapListHeaderData.get(i).getBrand_id() + "' AND SKU_ID ='" + data.getSku_id() +
|
||||
"' AND Category_Id='" + categoryId + "' AND Store_Id='" + storeId + "'", null);
|
||||
@@ -5053,6 +5065,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setToggleValue(dbcursor.getString(dbcursor.getColumnIndexOrThrow("TOGGLE_VALUE")));
|
||||
cd.setFacing(dbcursor.getString(dbcursor.getColumnIndexOrThrow("FACING")));
|
||||
cd.setStock(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STOCK")));
|
||||
cd.setMust_have(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MUST_HAVE")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
|
||||
@@ -798,6 +798,9 @@ public class CommonString {
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "TOGGLE_VALUE"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "MUST_HAVE"
|
||||
+ " VARCHAR"
|
||||
|
||||
+ ")";
|
||||
|
||||
+52
-32
@@ -132,7 +132,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
str = CommonString.FILE_PATH ;
|
||||
str = CommonString.FILE_PATH;
|
||||
|
||||
prepareList();
|
||||
|
||||
@@ -581,35 +581,38 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
|
||||
//Company_id
|
||||
if (listDataChild.get(listDataHeader.get(i)).get(j).getCompany_id().equals("1")) {
|
||||
|
||||
if (!camera_allow.equalsIgnoreCase("1")) {
|
||||
if (!(planogramShelfHeaderDataList.size() > 0)) {
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.stock_planogram_data_noCamera_data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (faceup.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.faceup_value);
|
||||
break;
|
||||
} else {
|
||||
if (data.getToggleValue().equals("0")) {
|
||||
|
||||
if (stock.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
if (data.getMust_have().equals("1")) {
|
||||
if (!camera_allow.equalsIgnoreCase("1")) {
|
||||
if (!(planogramShelfHeaderDataList.size() > 0)) {
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.stock_value);
|
||||
Error_Message = getResources().getString(R.string.stock_planogram_data_noCamera_data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (faceup.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.faceup_value);
|
||||
break;
|
||||
} else {
|
||||
if (data.getToggleValue().equals("0")) {
|
||||
|
||||
if (stock.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.stock_value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
if (faceup.equals("")) {
|
||||
@@ -784,8 +787,10 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
holder.txt_skuName.setText(childData.getSku());
|
||||
holder.txt_mbq.setText(childData.getMbq());
|
||||
|
||||
if (childData.getCompany_id().equals("1")) {
|
||||
if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
|
||||
holder.txt_skuName.setTextColor(getResources().getColor(R.color.colorPrimary));
|
||||
|
||||
holder.txt_mbq.setVisibility(View.VISIBLE);
|
||||
holder.toggle_available.setVisibility(View.VISIBLE);
|
||||
holder.facing.setVisibility(View.VISIBLE);
|
||||
@@ -796,13 +801,25 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
holder.stock.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.txt_skuName.setTextColor(getResources().getColor(R.color.black));
|
||||
|
||||
holder.txt_mbq.setVisibility(View.GONE);
|
||||
holder.toggle_available.setVisibility(View.GONE);
|
||||
holder.facing.setVisibility(View.VISIBLE);
|
||||
holder.stock.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
/* if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
|
||||
} else {
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
*//*holder.txt_mbq.setVisibility(View.GONE);
|
||||
holder.toggle_available.setVisibility(View.GONE);
|
||||
holder.facing.setVisibility(View.VISIBLE);
|
||||
holder.stock.setVisibility(View.GONE);*//*
|
||||
}*/
|
||||
|
||||
|
||||
final ViewHolder finalHolder = holder;
|
||||
holder.toggle_available.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@@ -1020,6 +1037,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
boolean tempflag = false;
|
||||
|
||||
if (childData.getCompany_id().equals("1")) {
|
||||
|
||||
if (childData.getToggleValue().equals("0")) {
|
||||
if (holder.stock.getText().toString().equals("")) {
|
||||
holder.stock.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
@@ -1035,11 +1053,13 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
tempflag = true;
|
||||
}
|
||||
} else {
|
||||
if (holder.facing.getText().toString().equals("")) {
|
||||
holder.facing.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.facing.setHint(getString(R.string.empty));
|
||||
tempflag = true;
|
||||
if (childData.getMust_have().equals("1")) {
|
||||
if (holder.facing.getText().toString().equals("")) {
|
||||
holder.facing.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.facing.setHint(getString(R.string.empty));
|
||||
tempflag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -431,15 +431,16 @@ public class UploadActivity extends AppCompatActivity {
|
||||
} else {
|
||||
stock = "0";
|
||||
}
|
||||
onXML = "[MSL_AVAILABILITY_STOCK_FACING_DATA]"
|
||||
onXML = "[MSL_AVAILABILITY_STOCK_FACING_DATA_NEW]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[SKU_ID]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getSku_id()) + "[/SKU_ID]"
|
||||
+ "[MBQ]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getMbq()) + "[/MBQ]"
|
||||
+ "[AVAILABILITY]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getToggleValue()) + "[/AVAILABILITY]"
|
||||
+ "[FACING]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getFacing()) + "[/FACING]"
|
||||
+ "[STOCK]" + Integer.parseInt(stock) + "[/STOCK]" +
|
||||
"[/MSL_AVAILABILITY_STOCK_FACING_DATA]";
|
||||
+ "[STOCK]" + Integer.parseInt(stock) + "[/STOCK]"
|
||||
+ "[MUST_HAVE]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getMust_have()) + "[/MUST_HAVE]" +
|
||||
"[/MSL_AVAILABILITY_STOCK_FACING_DATA_NEW]";
|
||||
|
||||
mslAvailability_stockFacing_xml = mslAvailability_stockFacing_xml + onXML;
|
||||
}
|
||||
@@ -449,7 +450,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", sos_xml);
|
||||
request.addProperty("KEYS", "MSL_AVAILABILITY_STOCK_FACING_DATA");
|
||||
request.addProperty("KEYS", "MSL_AVAILABILITY_STOCK_FACING_DATA_NEW");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
|
||||
@@ -637,7 +638,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[DISPLAY_ID]" + additionalVisibilityList.get(J).getSku_id() + "[/DISPLAY_ID]"
|
||||
+ "[SKU_LIST]" + additional_visibility_dialog_xml + "[/SKU_LIST]"
|
||||
+ "[/ADDITIONAL_VISIBILITY_NEW]";
|
||||
//Here getSku_id gives display_id
|
||||
//Here getSku_id gives display_id
|
||||
|
||||
additional_visibility_data_xml = additional_visibility_data_xml + onXML;
|
||||
KeyID = "";
|
||||
@@ -720,7 +721,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
String brandxml = "";
|
||||
String brandxml = "";
|
||||
String brandchild;
|
||||
|
||||
if (brandList.size() > 0) {
|
||||
|
||||
+9
-1
@@ -6,7 +6,7 @@ package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
public class MSL_AvailabilityStockFacingGetterSetter {
|
||||
String sub_category_id, sub_category, brand_id, brand,
|
||||
sku_id, sku, mrp, sku_sequence, toggleValue, mbq, category_id, facing, stock,company_id;
|
||||
sku_id, sku, mrp, sku_sequence, toggleValue, mbq, category_id, facing, stock,company_id,must_have;
|
||||
|
||||
public String getSub_category_id() {
|
||||
return sub_category_id;
|
||||
@@ -119,4 +119,12 @@ public class MSL_AvailabilityStockFacingGetterSetter {
|
||||
public void setCompany_id(String company_id) {
|
||||
this.company_id = company_id;
|
||||
}
|
||||
|
||||
public String getMust_have() {
|
||||
return must_have;
|
||||
}
|
||||
|
||||
public void setMust_have(String must_have) {
|
||||
this.must_have = must_have;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true">
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_promoComplianceName"
|
||||
@@ -125,7 +125,7 @@
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
android:weightSum="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
@@ -162,7 +162,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/toggle_selector_background"
|
||||
android:textOff="@string/no"
|
||||
android:textOn="@string/yes"/>
|
||||
android:textOn="@string/yes" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -211,6 +211,7 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:weightSum="5">
|
||||
|
||||
<LinearLayout
|
||||
@@ -278,7 +279,8 @@
|
||||
android:id="@+id/lin_addtional_promo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="10dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
@@ -53,9 +54,10 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
android:weightSum="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
@@ -153,6 +155,7 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:weightSum="5">
|
||||
|
||||
<LinearLayout
|
||||
@@ -192,9 +195,10 @@
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -53,7 +53,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
android:weightSum="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
@@ -88,9 +88,9 @@
|
||||
android:id="@+id/toggle_inStock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/toggle_selector_background"
|
||||
android:textOff="@string/no"
|
||||
android:textOn="@string/yes"
|
||||
android:background="@drawable/toggle_selector_background" />
|
||||
android:textOn="@string/yes" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -127,18 +127,20 @@
|
||||
android:id="@+id/toggle_promoAnnouncer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/toggle_selector_background"
|
||||
android:textOff="@string/no"
|
||||
android:textOn="@string/yes"
|
||||
android:background="@drawable/toggle_selector_background"/>
|
||||
android:textOn="@string/yes" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!--Running on Pos-->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:weightSum="5">
|
||||
|
||||
<LinearLayout
|
||||
@@ -166,9 +168,9 @@
|
||||
android:id="@+id/toggle_runningPos"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/toggle_selector_background"
|
||||
android:textOff="@string/no"
|
||||
android:textOn="@string/yes"
|
||||
android:background="@drawable/toggle_selector_background"/>
|
||||
android:textOn="@string/yes" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user