⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 worksearch.jsp

📁 tomcat最新安装程序
💻 JSP
📖 第 1 页 / 共 2 页
字号:
							checked="";
						}
						if(deptIDShow.equals(userDept[i][0])){
							out.println("<option value=\""+userDept[i][2]+"\""+checked+">"+userDept[i][3]+"</option>");
						}
					}
			  %>
              </select></td>
            <TD class="common">&nbsp;&nbsp;&nbsp;月份: 
              <select name="select6">
          <%
		  	checked="";
		  	for(int i=nowYear;i>=2003;i--){
				if(year!=null&&year.equals(String.valueOf(i))){
			  		checked=" selected";
				}
		  %>
                <option value="<%=i%>"<%=checked%>><%=i%></option>
          <%
				}
		  %>
              </select>
              <select name="select7">
                 <%
			  		for(int i=1;i<=12;i++){
					checked="";
					if(month!=null&&month.equals(String.valueOf(i))){
						checked=" selected";
					}
			  %>
                <option value="<%=i%>"<%=checked%>><%=i%></option>
                
				<%
					}
				%>
              </select>
              月 </TD>
          </TR>
          <TR > 
            <TD colSpan=2 align="center"><input name="imageField" type="image" src="../image/search.gif" ></TD>
          </TR>
        </table>
      </form>
      <table border="1" width="98%" align="center"  bordercolor="A1B7DB" class="collapse">
        <tr bgcolor="9BD0F8"> 
          <td class="common" colspan="10" ><strong>考勤显示:<%=year%>年<%=month%>月</strong></td>
        </tr>
        <tr bgcolor="F7FDF3" align="center"> 
          <td width="10%" class="common">姓名</td>
          <td width="10%" class="common">日期</td>
          <!--<td width="13%" class="common">考勤模式</td>-->
          <td width="10%" class="common">考勤时段</td>
          <td width="10%" class="common">上午情况</td>
          <td width="10%" class="common">考勤时段</td>
          <td width="10%" class="common">下午情况</td>
          <td width="10%" class="common">晚上加班</td>
        </tr>
        <%
		String amArrive,amLeave,theDate,nightArrive,nightLeave,pmArrive,pmLeave,User_ID,mod;
		String t1,t2,t3,t4,t5,t6,t7,t8;
		int num;
	  	if(r1.equals("1")){
			//由部门id获得人员ID
			//人员权限校验,用户对该ID有查看权
			
			for(int i=0;i<userDept.length;i++){
			if(dept.equals(userDept[i][0])){
				userIDShow=userDept[i][2];
			
			userNameShow=userDept[i][3];
			timeRecordRecordSet=timeManage.getOneTimeRecord(userIDShow,year+"-"+month+"-"+day);			
	  		while(timeRecordRecordSet.next()){					
				amArrive=timeRecordRecordSet.getREC_amArrive();
				amLeave=timeRecordRecordSet.getREC_amLeave();
				theDate=timeRecordRecordSet.getREC_date();
				nightArrive=timeRecordRecordSet.getREC_nightArrive();
				nightLeave=timeRecordRecordSet.getREC_nightLeave();
				pmArrive=timeRecordRecordSet.getREC_pmArrive();
				pmLeave=timeRecordRecordSet.getREC_pmLeave();
				timeBookRecordSet=timeManage.getOneTimeBook(theDate);
				
				num=timeBookRecordSet.size();
				if(num==0){
					timeBookRecordSet=timeManage.getTimeBook("1");
				}
				num=timeBookRecordSet.size();
				timeBookRecordSet.next();
				if(num==1){
					mod="早九晚五制";
					t4=timeBookRecordSet.getTIM_start().substring(0,5);
					if(amArrive==null||amArrive.trim().equals("")){
						t5="未点";
					}else{
						t5=amArrive.substring(0,5);
					}
					t6=timeBookRecordSet.getTIM_end().substring(0,5);
					if(pmLeave==null||pmLeave.trim().equals("")){
						t7="未点";
					}else{
						t7=pmLeave.substring(0,5);
					}					
				}else{
					mod="上下午上班制";
					System.out.println("^^^^^^t4=^^^^^"+timeBookRecordSet.getTIM_start());
					System.out.println("^^^^^^theDate=^^^^^"+theDate);
					t4=timeBookRecordSet.getTIM_start().substring(0,5);
					t6=timeBookRecordSet.getTIM_end().substring(0,5);
					timeBookRecordSet.next();
					t4=t4+"-"+t6;
					t6=timeBookRecordSet.getTIM_start().substring(0,5)+"-"+timeBookRecordSet.getTIM_end().substring(0,5);
					if(amArrive==null||amArrive.trim().equals("")){
						t5="未点";
					}else{
						t5=amArrive.substring(0,5);
					}
					if(amLeave==null||amLeave.trim().equals("")){
						t5=t5+"-"+"未点";
					}else{
						t5=t5+"-"+amLeave.substring(0,5);
					}
					if(pmArrive==null||pmArrive.trim().equals("")){
						t7="未点";
					}else{
						t7=pmArrive.substring(0,5);
					}
					if(pmLeave==null||pmLeave.trim().equals("")){
						t7=t7+"-"+"未点";
					}else{
						t7=t7+"-"+pmLeave.substring(0,5);
					}
				}
				if(nightArrive==null||nightArrive.trim().equals("")){
					t8="未加班";
				}else if(nightLeave==null||nightLeave.trim().equals("")){
					t8=nightArrive.substring(0,5)+"-"+"未点";
				}else{
					t8=nightArrive.substring(0,5)+"-"+nightLeave.substring(0,5);
				}
	  %>
        <tr align="center"> 
          <td height="20"class="common"><%=userNameShow%></td>
          <td height="20"class="common"><%=theDate%></td>
          <!--<td height="20"class="common"><%=mod%></td>-->
          <td height="20"class="common"><%=t4%></td>
          <td height="20"class="common"><%=t5%></td>
          <td height="20"class="common"><%=t6%></td>
          <td height="20"class="common"><%=t7%></td>
          <td height="20"class="common"><%=t8%></td>
        </tr>
        <%
	  		}			
			}
			}
		}else if(r1.equals("2")){
			//人员权限校验,用户对该ID有查看权
			if(!userPurviewManage.havePurview(userList,userIDShow)){
				response.sendRedirect("/krm/jsp/diary/noPopedom.htm");
				return;
			}
			self=userDeptManage.getName(userIDShow);
			userNameShow=self[3];
			timeRecordRecordSet=timeManage.getTimeRecordByMonth(userIDShow,year+"-"+month);			
	  		while(timeRecordRecordSet.next()){					
				amArrive=timeRecordRecordSet.getREC_amArrive();
				amLeave=timeRecordRecordSet.getREC_amLeave();
				theDate=timeRecordRecordSet.getREC_date();
				nightArrive=timeRecordRecordSet.getREC_nightArrive();
				nightLeave=timeRecordRecordSet.getREC_nightLeave();
				pmArrive=timeRecordRecordSet.getREC_pmArrive();
				pmLeave=timeRecordRecordSet.getREC_pmLeave();
				timeBookRecordSet=timeManage.getOneTimeBook(theDate);
				
				num=timeBookRecordSet.size();
				if(num==0){
				timeBookRecordSet=timeManage.getTimeBook("1");
				}
				num=timeBookRecordSet.size();
				timeBookRecordSet.next();
				if(num==1){
					mod="早九晚五制";
					t4=timeBookRecordSet.getTIM_start().substring(0,5);
					if(amArrive==null||amArrive.trim().equals("")){
						t5="未点";
					}else{
						t5=amArrive.substring(0,5);
					}
					t6=timeBookRecordSet.getTIM_end().substring(0,5);
					if(pmLeave==null||pmLeave.trim().equals("")){
						t7="未点";
					}else{
						t7=pmLeave.substring(0,5);
					}					
				}else{
					mod="上下午上班制";
					System.out.println("^^^^^^t4=^^^^^"+timeBookRecordSet.getTIM_start());
					System.out.println("^^^^^^theDate=^^^^^"+theDate);
					
					t4=timeBookRecordSet.getTIM_start().substring(0,5);
					t6=timeBookRecordSet.getTIM_end().substring(0,5);
					timeBookRecordSet.next();
					t4=t4+"-"+t6;
					t6=timeBookRecordSet.getTIM_start().substring(0,5)+"-"+timeBookRecordSet.getTIM_end().substring(0,5);
					if(amArrive==null||amArrive.trim().equals("")){
						t5="未点";
					}else{
						t5=amArrive.substring(0,5);
					}
					if(amLeave==null||amLeave.trim().equals("")){
						t5=t5+"-"+"未点";
					}else{
						t5=t5+"-"+amLeave.substring(0,5);
					}
					if(pmArrive==null||pmArrive.trim().equals("")){
						t7="未点";
					}else{
						t7=pmArrive.substring(0,5);
					}
					if(pmLeave==null||pmLeave.trim().equals("")){
						t7=t7+"-"+"未点";
					}else{
						t7=t7+"-"+pmLeave.substring(0,5);
					}
				}
				if(nightArrive==null||nightArrive.trim().equals("")){
					t8="未加班";
				}else if(nightLeave==null||nightLeave.trim().equals("")){
					t8=nightArrive.substring(0,5)+"-"+"未点";
				}else{
					t8=nightArrive.substring(0,5)+"-"+nightLeave.substring(0,5);
				}
	  %>
        <tr align="center"> 
          <td height="20"class="common"><%=userNameShow%></td>
          <td height="20"class="common"><%=theDate%></td>
          <!--<td height="20"class="common"><%=mod%></td>-->
          <td height="20"class="common"><%=t4%></td>
          <td height="20"class="common"><%=t5%></td>
          <td height="20"class="common"><%=t6%></td>
          <td height="20"class="common"><%=t7%></td>
          <td height="20"class="common"><%=t8%></td>
        </tr>
        <%
	  		}
		}
	  %>
      </table>
      <br>
	  
		<%}else{%>
	  <table   width="100%" align="center" height="20%" bordercolor="A1B7DB" class="collapse">
       <tr  bgcolor="3366CC">
           <td  class="common" align="center"><font color="#FFFFFF">系统信息!</font></td> 
       </tr>
       <tr>
           <td class="common" bgcolor="D4E8F4" align="center">您没有可以查看的数据!</td>
       </tr> 
	 </table>
      <%}%>
	  </fieldset>
</td>
</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -