saveQuery = "Insert into item_setup"
+ " (item_no,item_name,description,maximum_level,minimum_level,reorder_level,item_type,entered_by,entered_timestamp) "
+ " values('"+Integer.parseInt(itemNo)+"','" + itemName + "','" + description + "','" + Integer.parseInt(maxLevel) + "','" + Integer.parseInt(minLevel) + "','" + Integer.parseInt(recordLevel) + "','" + isItem + "','" + statusValA + "','"+institute_id+"','N','"+user_no+"',sysdate)";
System.out.println("measurement query= " + saveQuery);
'" + Integer.parseInt(maxLevel) + "'
=
'" + Integer.parseInt(maxLevel.isEmpty()?"0":maxLevel) + "'
Also follow this :
saveQuery = "UPDATE UNIT SET " +
" UNIT_NAME='"+unitName+"'," +
" UNIT_QTY='"+Integer.parseInt(unitQuantity.isEmpty() ? "0": unitQuantity)+"'," +
" UNIT_DESCRIPTION='"+description+"'," +
" UNIT_STATUS='"+status+"'," +
" UPDATED_BY='"+user_no+"'," +
" UPDATED_TIMESTAMP=sysdate" +
" WHERE unit_id='"+Integer.parseInt(unitId.isEmpty() ? "0" : unitId)+"' and INSTITUTE_ID='"+institute_id+"'";
System.out.println(" Measurement Upadte Query : " + saveQuery);
saveQuery="Insert into item_setup"
+" (item_no,item_name,description,parent_item_no,minimum_level,maximum_level,reorder_level,active_status,item_type,institute_id,data_type,entered_by,entered_timestamp)"
+" values( "
+" '"+Integer.parseInt(itemNo.isEmpty()|| itemNo==null?"0":itemNo)+"',"
+" '"+itemName+"','"+description+"',"
+" '"+Integer.parseInt(parentItem.isEmpty()|| parentItem==null?"0":parentItem)+"',"
+" '"+Integer.parseInt(minimumLevel.isEmpty()|| minimumLevel==null?"0":minimumLevel)+"',"
+ " '"+Integer.parseInt(maximumLevel.isEmpty()|| maximumLevel==null?"0":maximumLevel)+"',"
+" '"+Integer.parseInt(recordLevel.isEmpty()|| recordLevel==null?"0":recordLevel)+"',"
+" '"+status+"','"+isItem+"','"+institute_id+"','N','"+user_no+"',sysdate ) ";
System.out.println("measurement query= " + saveQuery);
+ " (item_no,item_name,description,maximum_level,minimum_level,reorder_level,item_type,entered_by,entered_timestamp) "
+ " values('"+Integer.parseInt(itemNo)+"','" + itemName + "','" + description + "','" + Integer.parseInt(maxLevel) + "','" + Integer.parseInt(minLevel) + "','" + Integer.parseInt(recordLevel) + "','" + isItem + "','" + statusValA + "','"+institute_id+"','N','"+user_no+"',sysdate)";
System.out.println("measurement query= " + saveQuery);
'" + Integer.parseInt(maxLevel) + "'
=
'" + Integer.parseInt(maxLevel.isEmpty()?"0":maxLevel) + "'
Also follow this :
saveQuery = "UPDATE UNIT SET " +
" UNIT_NAME='"+unitName+"'," +
" UNIT_QTY='"+Integer.parseInt(unitQuantity.isEmpty() ? "0": unitQuantity)+"'," +
" UNIT_DESCRIPTION='"+description+"'," +
" UNIT_STATUS='"+status+"'," +
" UPDATED_BY='"+user_no+"'," +
" UPDATED_TIMESTAMP=sysdate" +
" WHERE unit_id='"+Integer.parseInt(unitId.isEmpty() ? "0" : unitId)+"' and INSTITUTE_ID='"+institute_id+"'";
System.out.println(" Measurement Upadte Query : " + saveQuery);
saveQuery="Insert into item_setup"
+" (item_no,item_name,description,parent_item_no,minimum_level,maximum_level,reorder_level,active_status,item_type,institute_id,data_type,entered_by,entered_timestamp)"
+" values( "
+" '"+Integer.parseInt(itemNo.isEmpty()|| itemNo==null?"0":itemNo)+"',"
+" '"+itemName+"','"+description+"',"
+" '"+Integer.parseInt(parentItem.isEmpty()|| parentItem==null?"0":parentItem)+"',"
+" '"+Integer.parseInt(minimumLevel.isEmpty()|| minimumLevel==null?"0":minimumLevel)+"',"
+ " '"+Integer.parseInt(maximumLevel.isEmpty()|| maximumLevel==null?"0":maximumLevel)+"',"
+" '"+Integer.parseInt(recordLevel.isEmpty()|| recordLevel==null?"0":recordLevel)+"',"
+" '"+status+"','"+isItem+"','"+institute_id+"','N','"+user_no+"',sysdate ) ";
System.out.println("measurement query= " + saveQuery);
No comments:
Post a Comment