Jelajahi Sumber

打卡管理->打卡记录管理
1.添加姓名、手机号为搜索属性
2.上班时间搜索从单一时间调整为时间段搜索,搜索逻辑参考用户管理->会员管理

Qifeng-Wu 5 tahun lalu
induk
melakukan
8579a2f72c

+ 3 - 0
happy-job-base-system/src/main/webapp/webpage/modules/wspunch/wsPunchClockList.js

@@ -233,6 +233,9 @@ $(document).ready(function() {
     $('#startPunchClock').datetimepicker({
         format: "YYYY-MM-DD"
     });
+     $('#endPunchClock').datetimepicker({
+        format: "YYYY-MM-DD"
+    });
 		
 	});
 		

+ 35 - 13
happy-job-base-system/src/main/webapp/webpage/modules/wspunch/wsPunchClockList.jsp

@@ -22,25 +22,47 @@
 		<div class="accordion-inner">
 			<form:form id="searchForm" modelAttribute="wsPunchClock" class="form form-horizontal well clearfix">
 				<div class="col-xs-12 col-sm-3 col-md-2">
+					<label class="label-item single-overflow pull-left" title="姓名">姓名:</label>
+					<form:input path="userName" htmlEscape="false" maxlength="10"  class=" form-control input-sm" placeholder="请输入姓名搜索"/>
+				</div>
+				<div class="col-xs-12 col-sm-3 col-md-2">
+					<label class="label-item single-overflow pull-left" title="手机号">手机号:</label>
+					<form:input path="phone" htmlEscape="false" maxlength="11"  class=" form-control input-sm" placeholder="请输入手机号搜索"/>
+				</div>
+				<div class="col-xs-12 col-sm-3 col-md-2">
 					<label class="label-item single-overflow pull-left" title="打卡状态:">打卡状态:</label>
 					<form:select path="punchStatus" class="form-control input-sm">
 						<form:option value="" label="请选择"/>
 						<form:options items="${fns:getDictList('punch_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
 					</form:select>
 				</div>
-				 <div class="col-xs-12 col-sm-3 col-md-2">
-					 <div class="form-group">
-						 <label class="label-item single-overflow pull-left" title="上班时间:">&nbsp;上班时间:</label>
-						 <div class="col-xs-12">
-							 <div class='input-group date' id='startPunchClock' >
-								 <input type='text'  name="startPunchClock" class="form-control input-sm"  placeholder="上班时间搜索"/>
-								 <span class="input-group-addon">
-			                       <span class="glyphicon glyphicon-calendar"></span>
-			                   </span>
-							 </div>
-						 </div>
-					 </div>
-				</div>
+				<div class="col-xs-12 col-sm-5 col-md-5" style="margin-left:6px">
+						<div class="form-group">
+							<label class="label-item single-overflow pull-left" title="上班时间:">上班时间:</label>
+							<div class="col-xs-12">
+								<div class="col-xs-12 col-sm-5">
+									<div class='input-group date' id='startPunchClock' style="left: -10px;" >
+										<input type='text'  name="startPunchClock" class="form-control input-sm"  placeholder="开始时间" value=""/>
+										<span class="input-group-addon">
+					                       <span class="glyphicon glyphicon-calendar"></span>
+					                   </span>
+									</div>
+								</div>
+								<div class="col-xs-12 col-sm-1">
+									~
+								</div>
+								<div class="col-xs-12 col-sm-5">
+									<div class='input-group date' id='endPunchClock' style="left: -10px;" >
+										<input type='text' name="endPunchClock" class="form-control input-sm" placeholder="结束时间"/>
+										<span class="input-group-addon">
+					                       <span class="glyphicon glyphicon-calendar"></span>
+					                   </span>
+									</div>
+								</div>
+							</div>
+						</div>
+					</div>
+
 				<div class="col-xs-12 col-sm-3 col-md-2">
 					<label class="label-item single-overflow pull-left" title="企业id:">企业:</label>
 					<form:input path="companyName" htmlEscape="false" maxlength="11"  class=" form-control input-sm" placeholder="请输入企业关键词搜索"/>

+ 9 - 0
happy-job-module-hpjob/src/main/java/com/jeeplus/modules/wspunch/mapper/xml/WsPunchClockMapper.xml

@@ -49,9 +49,18 @@
 				<if test="dbName == 'mssql'">'%'+#{companyName}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{companyName},'%')</if>
 			</if>
+			<if test="userName != null and userName != ''">
+				AND hpm.real_name = #{userName}
+			</if>
+			<if test="phone != null and phone != ''">
+				AND hpm.phone = #{phone}
+			</if>
 			<if test="startPunchClock != null and startPunchClock != ''">
 				AND a.start_punch_clock &gt;= #{startPunchClock}
 			</if>
+			<if test="endPunchClock != null and endPunchClock != ''">
+				AND DATE_SUB(a.start_punch_clock, INTERVAL 1 DAY) &lt; date(#{endPunchClock})
+			</if>
 			<if test="memberId != null and memberId != ''">
 				AND a.member_id = #{memberId}
 			</if>