Commit 708e1728 by lal Committed by chenzg

提交

parent 84698311
...@@ -37,6 +37,7 @@ import cn.timer.api.bean.jxgl.JxglBasicSetting; ...@@ -37,6 +37,7 @@ import cn.timer.api.bean.jxgl.JxglBasicSetting;
import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance; import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules; import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRulesT; import cn.timer.api.bean.kqmk.KqglAssoLeaveRulesT;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
import cn.timer.api.bean.qyxx.CmsContent; import cn.timer.api.bean.qyxx.CmsContent;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso; import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin; import cn.timer.api.bean.qyzx.QyzxEmpLogin;
...@@ -602,6 +603,9 @@ public class LoginController { ...@@ -602,6 +603,9 @@ public class LoginController {
} }
} }
//加班基础设置
KqglAssoOvertimeBasics.builder().minimumUnit(3).modifyUserid(999).modifyTime(new Date().getTime()).orgCode(qyzxEntInfoM.getId());
// 绩效设置初始化 // 绩效设置初始化
JxglBasicSetting bS = jxglService.selectAT(qyId); JxglBasicSetting bS = jxglService.selectAT(qyId);
......
...@@ -391,6 +391,7 @@ public class ClockInController { ...@@ -391,6 +391,7 @@ public class ClockInController {
if (effectiveDate1) {//在范围内就打卡 if (effectiveDate1) {//在范围内就打卡
if(dkmc.getSbdk1() != null) { if(dkmc.getSbdk1() != null) {
sbdkkd = true;//打卡无效 sbdkkd = true;//打卡无效
atttype = 1;
}else { }else {
atttype = 1; atttype = 1;
} }
...@@ -414,6 +415,7 @@ public class ClockInController { ...@@ -414,6 +415,7 @@ public class ClockInController {
if (effectiveDate3) {//在范围内就打卡 if (effectiveDate3) {//在范围内就打卡
if(dkmc.getSbdk2() != null) { if(dkmc.getSbdk2() != null) {
sbdkkd = true;// sbdkkd = true;//
atttype = 3;
}else { }else {
atttype = 3; atttype = 3;
} }
...@@ -440,6 +442,7 @@ public class ClockInController { ...@@ -440,6 +442,7 @@ public class ClockInController {
if (effectiveDate5) {//在范围内就打卡 if (effectiveDate5) {//在范围内就打卡
if(dkmc.getSbdk2() != null) { if(dkmc.getSbdk2() != null) {
sbdkkd = true;// sbdkkd = true;//
atttype = 5;
}else { }else {
atttype = 5; atttype = 5;
} }
...@@ -926,8 +929,9 @@ public class ClockInController { ...@@ -926,8 +929,9 @@ public class ClockInController {
//第二次未超过应上班打卡时间 打卡为无效 //第二次未超过应上班打卡时间 打卡为无效
if(sbdkkd) { if(sbdkkd) {
status = 0; status = 2;
atttype = 0; atttype = 0;
msg = "已有最优的打卡记录存在";
} }
long attime; long attime;
......
...@@ -2641,8 +2641,13 @@ public class TimeCardController { ...@@ -2641,8 +2641,13 @@ public class TimeCardController {
if(!("0").equals(rul.getWorkThree())) { if(!("0").equals(rul.getWorkThree())) {
CompensateDto com3 = CompensateDto.builder().build(); CompensateDto com3 = CompensateDto.builder().build();
com3.setId(3); com3.setId(3);
com3.setValue("调休/加班费"); com3.setValue("调休");
coms.add(com3); coms.add(com3);
CompensateDto com4 = CompensateDto.builder().build();
com4.setId(4);
com4.setValue("加班费");
coms.add(com4);
} }
} }
}else if(id == 2) { }else if(id == 2) {
...@@ -2662,8 +2667,13 @@ public class TimeCardController { ...@@ -2662,8 +2667,13 @@ public class TimeCardController {
if(!("0").equals(rul.getRestThree())) { if(!("0").equals(rul.getRestThree())) {
CompensateDto com3 = CompensateDto.builder().build(); CompensateDto com3 = CompensateDto.builder().build();
com3.setId(3); com3.setId(3);
com3.setValue("调休/加班费"); com3.setValue("调休");
coms.add(com3); coms.add(com3);
CompensateDto com4 = CompensateDto.builder().build();
com4.setId(4);
com4.setValue("加班费");
coms.add(com4);
} }
} }
}else { }else {
...@@ -2683,8 +2693,13 @@ public class TimeCardController { ...@@ -2683,8 +2693,13 @@ public class TimeCardController {
if(!("0").equals(rul.getHolidaysThree())) { if(!("0").equals(rul.getHolidaysThree())) {
CompensateDto com3 = CompensateDto.builder().build(); CompensateDto com3 = CompensateDto.builder().build();
com3.setId(3); com3.setId(3);
com3.setValue("调休/加班费"); com3.setValue("调休");
coms.add(com3); coms.add(com3);
CompensateDto com4 = CompensateDto.builder().build();
com4.setId(4);
com4.setValue("加班费");
coms.add(com4);
} }
} }
} }
......
...@@ -104,12 +104,10 @@ public class AttendanceTaskTiming{ ...@@ -104,12 +104,10 @@ public class AttendanceTaskTiming{
* @throws ParseException * @throws ParseException
*/ */
//3.添加定时任务 每天下午七点执行一次 //3.添加定时任务 每四小时执行一次
@Scheduled(cron = "0 11 10 * * ?") @Scheduled(cron = "0 0 */4 * * ?")
//或直接指定时间间隔,例如:5秒
//@Scheduled(fixedRate=5000)
// @Scheduled(cron = "0/5 * * * * ?") // 测试:5秒执行一次 0 0 19 * * ? // @Scheduled(cron = "0 */5 * * * ?") // 测试:5秒执行一次 0 0 19 * * ?
public void AttendanceTask() throws ParseException { public void AttendanceTask() throws ParseException {
// boolean implement = false; // boolean implement = false;
...@@ -514,48 +512,53 @@ public class AttendanceTaskTiming{ ...@@ -514,48 +512,53 @@ public class AttendanceTaskTiming{
} }
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(overtimes), num) >= 0) {//加班 // if(Arrays.binarySearch(ClockInTool.deleteArrayNull(overtimes), num) >= 0) {//加班
if(ClockInTool.contains(ClockInTool.deleteArrayNull(overtimes),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(overtimes),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1));
// KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1));
String company = "未知",method = "无";//加班单位、加班补偿方式 String company = "未知",method = "无";//加班单位、加班补偿方式
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
KqglAssoOvertimeBasics basics = KqglAssoOvertimeBasics.builder().build().selectOne(new QueryWrapper<KqglAssoOvertimeBasics>().lambda().eq(KqglAssoOvertimeBasics::getOrgCode, org_code)); List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1));
if(basics.getMinimumUnit() == 1) { company = "分钟"; } for(KqglAssoRelationSummary lea : leas) {
else if(basics.getMinimumUnit() == 2) { company = "半小时";} //最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
else if(basics.getMinimumUnit() == 3) { company = "小时";} KqglAssoOvertimeBasics basics = KqglAssoOvertimeBasics.builder().build().selectOne(new QueryWrapper<KqglAssoOvertimeBasics>().lambda().eq(KqglAssoOvertimeBasics::getOrgCode, org_code));
else if(basics.getMinimumUnit() == 4) { company = "半天";} if(basics.getMinimumUnit() == 1) { company = "分钟"; }
else if(basics.getMinimumUnit() == 5) { company = "天";} else if(basics.getMinimumUnit() == 2) { company = "半小时";}
//1:转调休;2:转加班费;3:转调休或加班费 else if(basics.getMinimumUnit() == 3) { company = "小时";}
if(lea.getCompensateId() == 1) { method="转调休"; } else if(basics.getMinimumUnit() == 4) { company = "半天";}
else if(lea.getCompensateId() == 2) { method="转加班费"; } else if(basics.getMinimumUnit() == 5) { company = "天";}
else {method="转调休或加班费";} //1:转调休;2:转加班费;3:转调休或加班费
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"加班"+lea.getDuration()+company+"["+method+"]"); if(lea.getCompensateId() == 1) { method="转调休"; }
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费 else if(lea.getCompensateId() == 2) { method="转加班费"; }
//工作日 else {method="转调休或加班费";}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) >= 0) { rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"加班"+lea.getDuration()+company+"["+method+"]");
if(ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num)) { //加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
if(lea.getCompensateId() == 1) { //工作日
workingturncompenleave++; // if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) >= 0) {
}else if(lea.getCompensateId() == 2) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num)) {
workingtransferovertime++; if(lea.getCompensateId() == 1) {
workingturncompenleave++;
}else if(lea.getCompensateId() == 2) {
workingtransferovertime++;
}
} }
} //休息日
//休息日 // if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) >= 0) {
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) >= 0) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) {
if(ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) { if(lea.getCompensateId() == 1) {
if(lea.getCompensateId() == 1) { restturncompenleave++;
restturncompenleave++; }else if(lea.getCompensateId() == 2) {
}else if(lea.getCompensateId() == 2) { resttransferovertime++;
resttransferovertime++; }
} }
} // if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) < 0) {
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) < 0) { if(!ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num) && !ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) {
if(!ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num) && !ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) { if(lea.getCompensateId() == 1) {
if(lea.getCompensateId() == 1) { holidayturncompenleave++;
holidayturncompenleave++; }else if(lea.getCompensateId() == 2) {
}else if(lea.getCompensateId() == 2) { holidaytransferovertime++;
holidaytransferovertime++; }
} }
} }
} }
/* /*
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0) * else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
......
...@@ -17,6 +17,7 @@ import cn.timer.api.bean.kqmk.KqglAssoDkmx; ...@@ -17,6 +17,7 @@ import cn.timer.api.bean.kqmk.KqglAssoDkmx;
import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance; import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance;
import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance; import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules; import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRulesT;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRange; import cn.timer.api.bean.kqmk.KqglAssoOvertimeRange;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules; import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules;
import cn.timer.api.bean.kqmk.KqglAssoRelationSummary; import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
...@@ -73,8 +74,16 @@ public class KqglServiceImpl implements KqglService { ...@@ -73,8 +74,16 @@ public class KqglServiceImpl implements KqglService {
if(balan != null) { if(balan != null) {
modifynumber = balan.getModifyNumber()+1; modifynumber = balan.getModifyNumber()+1;
} }
String mse = "考勤请假审批";
KqglAssoLeaveRulesT rult = KqglAssoLeaveRulesT.builder().build().selectOne(new QueryWrapper<KqglAssoLeaveRulesT>().lambda().eq(KqglAssoLeaveRulesT::getId, leaveappr.getLeavetype()));
if(rult != null) {
mse = "考勤"+rult.getName()+"审批";
}
KqglAssoLeaveBalance.builder().leaveRulesId(leaveappr.getLeavetype()).userid(leaveappr.getUserid()).modifyAction(2).balanceDays("-"+leaveappr.getDuration()) KqglAssoLeaveBalance.builder().leaveRulesId(leaveappr.getLeavetype()).userid(leaveappr.getUserid()).modifyAction(2).balanceDays("-"+leaveappr.getDuration())
.reason("系统按照规则自动").modifyUserid(emp.getEmpNum()).modifyTimer(new Date().getTime()).orgCode(emp.getOrgCode()).isAutomatic(1).modifyNumber(modifynumber).build().insert();//员工假期余额 .reason(mse).modifyUserid(emp.getEmpNum()).modifyTimer(new Date().getTime()).orgCode(emp.getOrgCode()).isAutomatic(1).modifyNumber(modifynumber).build().insert();//员工假期余额
//查询员工假期余额表中所对应的假期id //查询员工假期余额表中所对应的假期id
...@@ -114,7 +123,8 @@ public class KqglServiceImpl implements KqglService { ...@@ -114,7 +123,8 @@ public class KqglServiceImpl implements KqglService {
//查询当前公司调休的id //查询当前公司调休的id
KqglAssoLeaveRules learul = KqglAssoLeaveRules.builder().build().selectOne(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, emp.getOrgCode()).eq(KqglAssoLeaveRules::getRulesType, 2)); KqglAssoLeaveRules learul = KqglAssoLeaveRules.builder().build().selectOne(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, emp.getOrgCode()).eq(KqglAssoLeaveRules::getRulesType, 2));
if(overappr.getCompensate() == 1) { //
if(overappr.getCompensate() == 1 || overappr.getCompensate() == 3) {
double duration = 0l;// double duration = 0l;//
...@@ -134,7 +144,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -134,7 +144,7 @@ public class KqglServiceImpl implements KqglService {
//1:工作日加班;2:休息日加班;3:节假日加班 //1:工作日加班;2:休息日加班;3:节假日加班
if(overappr.getOvertimetype() == 1) { if(overappr.getOvertimetype() == 1) {
if(rul.getIsWorkovertime() == 1) { if(rul.getIsWorkovertime() == 1) {
if(rul.getWork() == 1) { if(rul.getWork() == 1) {//1:调休 2:加班费 3:调休/加班费
duration = Double.valueOf(rul.getWorkOne()) * overappr.getDuration(); duration = Double.valueOf(rul.getWorkOne()) * overappr.getDuration();
}else if(rul.getWork() == 3) { }else if(rul.getWork() == 3) {
duration = Double.valueOf(rul.getWorkThree()) * overappr.getDuration(); duration = Double.valueOf(rul.getWorkThree()) * overappr.getDuration();
...@@ -162,7 +172,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -162,7 +172,7 @@ public class KqglServiceImpl implements KqglService {
} }
KqglAssoLeaveBalance.builder().leaveRulesId(learul.getId()).userid(overappr.getUserid()).modifyAction(2).balanceDays("+"+duration) KqglAssoLeaveBalance.builder().leaveRulesId(learul.getId()).userid(overappr.getUserid()).modifyAction(2).balanceDays("+"+duration)
.reason("系统按照审批自动(加班)").modifyUserid(emp.getEmpNum()).modifyTimer(overappr.getStarttime()).orgCode(emp.getOrgCode()).isAutomatic(1).modifyNumber(modifynumber).build().insert();//员工假期余额 .reason("考勤加班审批").modifyUserid(emp.getEmpNum()).modifyTimer(overappr.getStarttime()).orgCode(emp.getOrgCode()).isAutomatic(1).modifyNumber(modifynumber).build().insert();//员工假期余额
//查询员工假期余额表中所对应的假期id //查询员工假期余额表中所对应的假期id
......
...@@ -52,7 +52,8 @@ public class AppraisalDetail implements Serializable{ ...@@ -52,7 +52,8 @@ public class AppraisalDetail implements Serializable{
private String appraisalExplain; private String appraisalExplain;
@ApiModelProperty(value = "总分", example = "0") @ApiModelProperty(value = "总分", example = "0")
private Integer total; private String total;
// private Integer total;
@ApiModelProperty(value = "等级", example = "0") @ApiModelProperty(value = "等级", example = "0")
private String level; private String level;
......
...@@ -36,6 +36,6 @@ public class AttOvertimeApprovalDto { ...@@ -36,6 +36,6 @@ public class AttOvertimeApprovalDto {
@ApiModelProperty(value = "时长", example = "") @ApiModelProperty(value = "时长", example = "")
private double duration; private double duration;
@ApiModelProperty(value = "加班补偿方式", example = "1:转调休;2:转加班费;3:转调休或加班费") @ApiModelProperty(value = "加班补偿方式", example = "1:转调休;2:转加班费;(3:转调休 4:加班费)")
private int compensate; private int compensate;
} }
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