Commit c490a256 by ilal Committed by chenzg

提交

parent f950ce7d
......@@ -96,7 +96,7 @@ public class AttendanceTaskTiming{
//typeid:1-员工 2-考勤组
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 38 14 * * ?")
// @Scheduled(cron = "0 16 17 * * ?")
@Scheduled(cron = "0 0 8,12,16,20 * * ?")//每天上午8、12点,下午16点,20点 执行
public void AttendanceTask() throws ParseException {
......@@ -494,7 +494,9 @@ public class AttendanceTaskTiming{
//遍历目前为止所有日期 结合该用户发起的审批进行结合
//1:加班 2:请假 3:出差 4:外出 5:补卡
int u = 0;
int p = 1;
for(String num : range) {
String sjs = "",qinjia = "",chuaca = "",waichu = "",buka = "",jiaban = "";
if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts),num)) {
rowData.add("休息并打卡");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num)){
......@@ -543,24 +545,30 @@ public class AttendanceTaskTiming{
else { company = "小时"; }
}
}
rowData.remove(u);
rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company);
qinjia = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company;
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company);
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3));
rowData.remove(u);
rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天");
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天");
chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天";
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4));
rowData.remove(u);
rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天");
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天");
waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天";
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5));
rowData.remove(u);
rowData.add(u,"已补卡:"+(lea.getStartTime()).substring(5, 16));
// rowData.remove(u);
// rowData.add(u,"已补卡:"+(lea.getStartTime()).substring(5, 16));
buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16);
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(overtimes),num)) {
......@@ -581,8 +589,9 @@ public class AttendanceTaskTiming{
else if(lea.getCompensateId() == 2) { method="转加班费"; }
else {method="转调休或加班费";}
rowData.remove(u);
rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]");
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]");
jiaban = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]";
//防止多运算
if(lea.getOrdernum() == lea.getTotals()) {
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
......@@ -621,6 +630,18 @@ public class AttendanceTaskTiming{
}
}
if(rowData.size() == p) {
sjs = "";
if(("").equals(qinjia) && ("").equals(chuaca) && ("").equals(waichu) && ("").equals(buka) && ("").equals(jiaban)) {
sjs = rowData.get(u);
}else {
sjs = rowData.get(u)+";";
}
}
rowData.remove(u);
rowData.add(u,sjs + qinjia+chuaca+waichu+buka+jiaban);
/****/
////////
......@@ -680,6 +701,7 @@ public class AttendanceTaskTiming{
u++;
p++;
}
}else {
for (String num2 : range) {
......
......@@ -88,7 +88,7 @@ public class LastMonthtimingExport {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
// @Scheduled(cron = "0 10 17 * * ?")
@Scheduled(cron = "0 0 4,20 * * ?")//每天上午4点,下午20点 执行
public void LastMonthtimingAttendanceTask() throws ParseException {
......@@ -483,8 +483,9 @@ public class LastMonthtimingExport {
// List<String> rowData = new ArrayList<String>();
//遍历目前为止所有日期 结合该用户发起的审批进行结合
//1:加班 2:请假 3:出差 4:外出 5:补卡
int u = 0;
int u = 0,p=1;
for(String num : range) {
String sjs = "",qinjia = "",chuaca = "",waichu = "",buka = "",jiaban = "";
if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts),num)) {
rowData.add("休息并打卡");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num)){
......@@ -533,24 +534,32 @@ public class LastMonthtimingExport {
else { company = "小时"; }
}
}
rowData.remove(u);
rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company);
qinjia = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company;
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company);
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3));
rowData.remove(u);
rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天");
chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天";
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天");
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4));
rowData.remove(u);
rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天");
waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天";
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天");
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5));
rowData.remove(u);
rowData.add(u,"已补卡:"+(lea.getStartTime()).substring(5, 16));
// rowData.remove(u);
// rowData.add(u,"已补卡:"+(lea.getStartTime()).substring(5, 16));
buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16);
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(overtimes),num)) {
......@@ -571,8 +580,10 @@ public class LastMonthtimingExport {
else if(lea.getCompensateId() == 2) { method="转加班费"; }
else {method="转调休或加班费";}
rowData.remove(u);
rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]");
jiaban = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]";
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]");
//防止多运算
if(lea.getOrdernum() == lea.getTotals()) {
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
......@@ -611,6 +622,19 @@ public class LastMonthtimingExport {
}
}
if(rowData.size() == p) {
sjs = "";
if(("").equals(qinjia) && ("").equals(chuaca) && ("").equals(waichu) && ("").equals(buka) && ("").equals(jiaban)) {
sjs = rowData.get(u);
}else {
sjs = rowData.get(u)+";";
}
}
rowData.remove(u);
rowData.add(u,sjs + qinjia+chuaca+waichu+buka+jiaban);
/****/
////////
......@@ -670,6 +694,7 @@ public class LastMonthtimingExport {
u++;
p++;
}
}else {
for (String num2 : range) {
......
......@@ -386,6 +386,8 @@
where dkjl.attime &gt;= #{start}
and dkjl.attime &lt;= #{end}
and dkjl.user_id = #{userId,jdbcType=INTEGER}
and dkjl.`status` != 0
and dkjl.sort != 0
ORDER BY dkjl.id ASC
</select>
......
......@@ -133,7 +133,7 @@
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
where emp.org_code = #{orgcode}
<!-- and emp.emp_num = 12 -->
<!-- and emp.emp_num = 100083 -->
<!-- and emp.job_status != 3 -->
</select>
......
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