Commit 8b6bd037 by lal Committed by chenzg

提交

parent 9b460b98
......@@ -257,7 +257,8 @@ public class AttendanceTaskTiming{
appmaps[d1] = spe.getTsrq();
d1++;
}
List<AttendanceWeeklySch> atwek = attendanceweeklyschmapper.selectAttendanceMadeByUserid(user.getEmpnum());
//应打卡周期时间
List<AttendanceWeeklySch> atwek = attendanceweeklyschmapper.selectAttendanceMadeByUserid(user.getEmpnum(),org_code);
String[] week= new String[atwek.size()];
String[] needfig = new String[atwek.size()];//应打卡周期时间
int e = 0;
......@@ -281,6 +282,7 @@ public class AttendanceTaskTiming{
}
}
}
//全月时间 - 应打卡时间 - 必须打卡时间 + 无需打卡时间
int xiuxi = ClockInTool.getDaysByYearMonth(year,month) - q - bxdk + wxdk.size();
daysOff = xiuxi;
daysOnDuty = y+bxdk;
......@@ -288,27 +290,47 @@ public class AttendanceTaskTiming{
// int zjgzts = 0;//目前为止应该出勤的天数
//目前为止应出勤天数
int w = 0,x=0;
int zj = 6;
for(String num : range) {
if(Arrays.binarySearch(needfig, String.valueOf(ClockInTool.dateToWeek(num))) >= 0) {//对比排班应打卡时间
ycqts[w] = num;
String[] ycqtst = new String[ycqts.length + zj];
System.arraycopy(ycqts, 0, ycqtst, 0, ycqts.length);
ycqtst[w] = num;
ycqts = ycqtst;
//ycqts[w] = num;
w++;
zjgzts++;
}else {
xxts[x] = num;
String[] xxtst = new String[xxts.length + zj];
System.arraycopy(xxts, 0, xxtst, 0, xxts.length);
xxtst[x] = num;
xxts = xxtst;
//xxts[x] = num;
x++;
}
if(Arrays.binarySearch(bxdkss, num) >= 0) {//检查是否存在 必须打卡名单中
ycqts[w] = num;
String[] ycqtst = new String[ycqts.length + zj];
System.arraycopy(ycqts, 0, ycqtst, 0, ycqts.length);
ycqtst[w] = num;
ycqts = ycqtst;
//ycqts[w] = num;
w++;
zjgzts++;
if(user.getEmpnum() == 257) {
ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(xxts), num);//为必须上班的话从休息日期中去除
}
xxts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(xxts), num);//为必须上班的话从休息日期中去除
}
if(Arrays.binarySearch(appmaps, num) >= 0) {//检查是否存在 无需打卡名单中
ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
ycqts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
zjgzts = zjgzts - 1;
xxts[x] = num;
String[] xxtst = new String[xxts.length + zj];
System.arraycopy(xxts, 0, xxtst, 0, xxts.length);
xxtst[x] = num;
//xxts[x] = num;
xxts = xxtst;
x++;
}
}
......@@ -345,7 +367,7 @@ public class AttendanceTaskTiming{
}
}
}else{
List<AttendanceWeeklySch> atwek = attendanceweeklyschmapper.selectAttendanceMadeByUserid(user.getEmpnum());
List<AttendanceWeeklySch> atwek = attendanceweeklyschmapper.selectAttendanceMadeByUserid(user.getEmpnum(),org_code);
String[] week= new String[atwek.size()];
int e = 0;
String[] ziyoupb = new String[atwek.size()];
......
......@@ -25,7 +25,7 @@ public interface AttendanceWeeklySchMapper {
List<AttendanceWeeklySch> selectAttWeeklySchByKqzid(Integer kqzid);
List<AttendanceWeeklySch> selectAttendanceMadeByUserid(Integer userid);
List<AttendanceWeeklySch> selectAttendanceMadeByUserid(Integer userid,Integer qyid);
AttendanceWeeklySch selectZhouDetail(Integer kqzid,Integer type);
......
......@@ -142,7 +142,8 @@
end as wekmc
from kqgl_asso_zhoupaiban zpb
where zpb.kqzid = (select yhkqz.kqzid from kqgl_asso_yhkqz yhkqz
where yhkqz.userid = #{userid})
where yhkqz.userid = #{userid} and yhkqz.qyid = #{qyid})
and zpb.bcid != 0
</select>
<select id="selectZhouDetail" resultMap="BaseResultMap">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment