Commit 8b6bd037 by lal Committed by chenzg

提交

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