Commit d303d7c7 by lal

提交

parent f592bbfc
...@@ -655,7 +655,7 @@ public class LoginController { ...@@ -655,7 +655,7 @@ public class LoginController {
} }
//加班基础设置 //加班基础设置
KqglAssoOvertimeBasics.builder().minimumUnit(3).modifyUserid(999).modifyTime(new Date().getTime()).orgCode(qyzxEntInfoM.getId()); KqglAssoOvertimeBasics.builder().minimumUnit(3).modifyUserid(999).modifyTime(new Date().getTime()).orgCode(qyzxEntInfoM.getId()).build().insert();
// 绩效设置初始化 // 绩效设置初始化
......
...@@ -115,9 +115,11 @@ public class AttendanceTaskTiming{ ...@@ -115,9 +115,11 @@ public class AttendanceTaskTiming{
//3.添加定时任务 每四小时执行一次 //3.添加定时任务 每四小时执行一次
// @Scheduled(cron = "0 0 */4 * * ?") // @Scheduled(cron = "0 0 */4 * * ?")
// @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ? //typeid:1-员工 2-考勤组
// @Scheduled(cron = "0 37 18 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")
@Scheduled(cron = "0 30 19 * * ?") // @Scheduled(cron = "0 30 19 * * ?")
public void AttendanceTask() throws ParseException { public void AttendanceTask() throws ParseException {
// boolean implement = false; // boolean implement = false;
...@@ -139,8 +141,6 @@ public class AttendanceTaskTiming{ ...@@ -139,8 +141,6 @@ public class AttendanceTaskTiming{
//逻辑 //逻辑
if(implement) { if(implement) {
// System.err.println("时间:" + dateFormat.format(new Date()));
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
c.add(Calendar.MONTH, 0); c.add(Calendar.MONTH, 0);
c.set(Calendar.DAY_OF_MONTH,1);//设置为1号,当前日期既为本月第一天 c.set(Calendar.DAY_OF_MONTH,1);//设置为1号,当前日期既为本月第一天
...@@ -165,14 +165,24 @@ public class AttendanceTaskTiming{ ...@@ -165,14 +165,24 @@ public class AttendanceTaskTiming{
int year = Calendar.getInstance().get(Calendar.YEAR); int year = Calendar.getInstance().get(Calendar.YEAR);
int month = Calendar.getInstance().get(Calendar.MONTH) + 1; int month = Calendar.getInstance().get(Calendar.MONTH) + 1;
int summaryid = 0;//汇总id
for(int t = 0;t<orgcodelist.size();t++){ for(int t = 0;t<orgcodelist.size();t++){
int org_code = orgcodelist.get(t).getId();//企业组织代码 int org_code = orgcodelist.get(t).getId();//企业组织代码
KqglAssoMonthPunchSummary.builder().build().delete(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getBelongYear, year)
.eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
List<AdditionalDto> userlist = kqglassoleavebalancemapper.selectAdditionalList(org_code); List<AdditionalDto> userlist = kqglassoleavebalancemapper.selectAdditionalList(org_code);
for(AdditionalDto user : userlist) { for(AdditionalDto user : userlist) {
// KqglAssoMonthPunchSummary.builder().build().delete(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getBelongYear, year)
// .eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
KqglAssoMonthPunchSummary sum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getOrgCode, org_code)
.eq(KqglAssoMonthPunchSummary::getBelongYear, year).eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()));
if(sum != null) {
summaryid = sum.getId();
}
double traveltotal = 0,egresstotal = 0,overtimetotal = 0; double traveltotal = 0,egresstotal = 0,overtimetotal = 0;
//出差总时长 //出差总时长
KqglAssoRelationSummary travel = kqglassorelationsummarymapper.SecondaryValue(user.getEmpnum(), 3, ttstr); KqglAssoRelationSummary travel = kqglassorelationsummarymapper.SecondaryValue(user.getEmpnum(), 3, ttstr);
...@@ -545,31 +555,8 @@ public class AttendanceTaskTiming{ ...@@ -545,31 +555,8 @@ public class AttendanceTaskTiming{
rowData.add("正常"); rowData.add("正常");
} }
} }
/*
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
* { rowData.add("上班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班缺卡,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0) {
* rowData.add("上班迟到"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("上班迟到,下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班迟到,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("下班早退"); }else { rowData.add("正常"); } }
*/
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2));
String leavetype = "未知";//请假类型 String leavetype = "未知";//请假类型
...@@ -739,6 +726,8 @@ public class AttendanceTaskTiming{ ...@@ -739,6 +726,8 @@ public class AttendanceTaskTiming{
position = user.getPosition(); position = user.getPosition();
} }
KqglAssoMonthPunchSummary summary = KqglAssoMonthPunchSummary.builder().name(user.getEmpname()).num(user.getEmpnum()).dept(department) KqglAssoMonthPunchSummary summary = KqglAssoMonthPunchSummary.builder().name(user.getEmpname()).num(user.getEmpnum()).dept(department)
.post(position).attGroup(attgroid).shift(answer).build(); .post(position).attGroup(attgroid).shift(answer).build();
summary.setDaysOnDuty(daysOnDuty);//应出勤天数 summary.setDaysOnDuty(daysOnDuty);//应出勤天数
...@@ -803,7 +792,12 @@ public class AttendanceTaskTiming{ ...@@ -803,7 +792,12 @@ public class AttendanceTaskTiming{
summary.setDay29(noticesArray[28]); summary.setDay29(noticesArray[28]);
summary.setDay30(noticesArray[29]); summary.setDay30(noticesArray[29]);
summary.setDay31(noticesArray[30]); summary.setDay31(noticesArray[30]);
summary.insert();
if(summaryid > 0) {
summary.setId(summaryid);
}
summary.insertOrUpdate();
} }
} }
......
...@@ -156,7 +156,8 @@ public class RouterUtils { ...@@ -156,7 +156,8 @@ public class RouterUtils {
router.setExecute(EXECUTING); router.setExecute(EXECUTING);
// if (r != null && RELATION_TYPE_USERS.equals(r.getType())) { if(router.getRelation().size() > 0) {
// if (r != null && RELATION_TYPE_USERS.equals(r.getType())) {
List<User> listUser = router.getRelation().get(0).getUsers(); List<User> listUser = router.getRelation().get(0).getUsers();
user: user:
for (int i = 0; i < listUser.size(); i++) { for (int i = 0; i < listUser.size(); i++) {
...@@ -174,7 +175,10 @@ public class RouterUtils { ...@@ -174,7 +175,10 @@ public class RouterUtils {
} }
} }
// } // }
}else {
throw new Exception("审批人为空");
}
} }
NextNode(router.getChildren(), obj , isFirse, isAuditNext); NextNode(router.getChildren(), obj , isFirse, isAuditNext);
......
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