Subversion Repositories SmartDukaan

Rev

Rev 3480 | Rev 4012 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3480 Rev 4011
Line 69... Line 69...
69
					System.out.println("User name is " + assignTo);
69
					System.out.println("User name is " + assignTo);
70
					try {
70
					try {
71
						EntityState state = CreationUtils.getEntityState(entityId);
71
						EntityState state = CreationUtils.getEntityState(entityId);
72
						if(state.getStatus() == EntityStatus.READY){
72
						if(state.getStatus() == EntityStatus.READY){
73
						    Calendar cl = Calendar.getInstance();
73
						    Calendar cl = Calendar.getInstance();
-
 
74
						    int hourOfDay = cl.get(Calendar.HOUR_OF_DAY);
-
 
75
						    int minuteOfHour = cl.get(Calendar.HOUR_OF_DAY);
-
 
76
						    int totalMinutes = 60*hourOfDay + minuteOfHour;  
74
		                    if(cl.get(Calendar.HOUR_OF_DAY) >= 14 && cl.get(Calendar.HOUR_OF_DAY) < 16){
77
		                    if(totalMinutes > 14*60 + 45 && totalMinutes < 15*60 + 30){
75
		                        addActionError("Sorry.... This is not right time to assign this entity. Please visit after 4 PM.");
78
		                        addActionError("Sorry.... This is not right time to assign this entity. Please visit after 4 PM.");
76
		                        return "success";   
79
		                        return "success";   
77
		                    }
80
		                    }
78
						    List<Long> inconsistentEntities = CreationUtils.getInconsistentEntities();
81
						    List<Long> inconsistentEntities = CreationUtils.getInconsistentEntities();
79
						    if(inconsistentEntities == null){
82
						    if(inconsistentEntities == null){
Line 118... Line 121...
118
					addActionError("Unable to mark entity as ready.");
121
					addActionError("Unable to mark entity as ready.");
119
					e.printStackTrace();
122
					e.printStackTrace();
120
				}
123
				}
121
				return "success";
124
				return "success";
122
			}
125
			}
-
 
126
			
-
 
127
			
-
 
128
			if(action.equalsIgnoreCase("iteminfo")){
-
 
129
				return "iteminfo";
-
 
130
			}
-
 
131
 
-
 
132
			
123
		}
133
		}
124
		addActionError("There is some problem, please contact admin.");
134
		addActionError("There is some problem, please contact admin.");
125
		return "success";
135
		return "success";
126
	}
136
	}
127
 
137