Commit 98dc5831 by leialin

Merge branch 'lal' into 'develop'

Lal

See merge request 8timerv2/8timerapiv200!274
parents 67594341 322d5ae5
......@@ -37,6 +37,7 @@ import cn.timer.api.bean.jxgl.JxglBasicSetting;
import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
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.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
......@@ -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);
......
......@@ -391,6 +391,7 @@ public class ClockInController {
if (effectiveDate1) {//在范围内就打卡
if(dkmc.getSbdk1() != null) {
sbdkkd = true;//打卡无效
atttype = 1;
}else {
atttype = 1;
}
......@@ -414,6 +415,7 @@ public class ClockInController {
if (effectiveDate3) {//在范围内就打卡
if(dkmc.getSbdk2() != null) {
sbdkkd = true;//
atttype = 3;
}else {
atttype = 3;
}
......@@ -440,6 +442,7 @@ public class ClockInController {
if (effectiveDate5) {//在范围内就打卡
if(dkmc.getSbdk2() != null) {
sbdkkd = true;//
atttype = 5;
}else {
atttype = 5;
}
......@@ -926,8 +929,9 @@ public class ClockInController {
//第二次未超过应上班打卡时间 打卡为无效
if(sbdkkd) {
status = 0;
status = 2;
atttype = 0;
msg = "已有最优的打卡记录存在";
}
long attime;
......
......@@ -2641,8 +2641,13 @@ public class TimeCardController {
if(!("0").equals(rul.getWorkThree())) {
CompensateDto com3 = CompensateDto.builder().build();
com3.setId(3);
com3.setValue("调休/加班费");
com3.setValue("调休");
coms.add(com3);
CompensateDto com4 = CompensateDto.builder().build();
com4.setId(4);
com4.setValue("加班费");
coms.add(com4);
}
}
}else if(id == 2) {
......@@ -2662,8 +2667,13 @@ public class TimeCardController {
if(!("0").equals(rul.getRestThree())) {
CompensateDto com3 = CompensateDto.builder().build();
com3.setId(3);
com3.setValue("调休/加班费");
com3.setValue("调休");
coms.add(com3);
CompensateDto com4 = CompensateDto.builder().build();
com4.setId(4);
com4.setValue("加班费");
coms.add(com4);
}
}
}else {
......@@ -2683,8 +2693,13 @@ public class TimeCardController {
if(!("0").equals(rul.getHolidaysThree())) {
CompensateDto com3 = CompensateDto.builder().build();
com3.setId(3);
com3.setValue("调休/加班费");
com3.setValue("调休");
coms.add(com3);
CompensateDto com4 = CompensateDto.builder().build();
com4.setId(4);
com4.setValue("加班费");
coms.add(com4);
}
}
}
......
......@@ -104,12 +104,10 @@ public class AttendanceTaskTiming{
* @throws ParseException
*/
//3.添加定时任务 每天下午七点执行一次
@Scheduled(cron = "0 11 10 * * ?")
//或直接指定时间间隔,例如:5秒
//@Scheduled(fixedRate=5000)
//3.添加定时任务 每四小时执行一次
@Scheduled(cron = "0 0 */4 * * ?")
// @Scheduled(cron = "0/5 * * * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?") // 测试:5秒执行一次 0 0 19 * * ?
public void AttendanceTask() throws ParseException {
// boolean implement = false;
......@@ -514,9 +512,12 @@ public class AttendanceTaskTiming{
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(overtimes), num) >= 0) {//加班
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 = "无";//加班单位、加班补偿方式
List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1));
for(KqglAssoRelationSummary lea : leas) {
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
KqglAssoOvertimeBasics basics = KqglAssoOvertimeBasics.builder().build().selectOne(new QueryWrapper<KqglAssoOvertimeBasics>().lambda().eq(KqglAssoOvertimeBasics::getOrgCode, org_code));
if(basics.getMinimumUnit() == 1) { company = "分钟"; }
......@@ -557,6 +558,8 @@ public class AttendanceTaskTiming{
}
}
}
}
/*
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
* { rowData.add("上班缺卡"); }else
......
......@@ -17,6 +17,7 @@ import cn.timer.api.bean.kqmk.KqglAssoDkmx;
import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance;
import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance;
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.KqglAssoOvertimeRules;
import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
......@@ -73,8 +74,16 @@ public class KqglServiceImpl implements KqglService {
if(balan != null) {
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())
.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
......@@ -114,7 +123,8 @@ public class KqglServiceImpl implements KqglService {
//查询当前公司调休的id
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;//
......@@ -134,7 +144,7 @@ public class KqglServiceImpl implements KqglService {
//1:工作日加班;2:休息日加班;3:节假日加班
if(overappr.getOvertimetype() == 1) {
if(rul.getIsWorkovertime() == 1) {
if(rul.getWork() == 1) {
if(rul.getWork() == 1) {//1:调休 2:加班费 3:调休/加班费
duration = Double.valueOf(rul.getWorkOne()) * overappr.getDuration();
}else if(rul.getWork() == 3) {
duration = Double.valueOf(rul.getWorkThree()) * overappr.getDuration();
......@@ -162,7 +172,7 @@ public class KqglServiceImpl implements KqglService {
}
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
......
......@@ -52,7 +52,8 @@ public class AppraisalDetail implements Serializable{
private String appraisalExplain;
@ApiModelProperty(value = "总分", example = "0")
private Integer total;
private String total;
// private Integer total;
@ApiModelProperty(value = "等级", example = "0")
private String level;
......
......@@ -36,6 +36,6 @@ public class AttOvertimeApprovalDto {
@ApiModelProperty(value = "时长", example = "")
private double duration;
@ApiModelProperty(value = "加班补偿方式", example = "1:转调休;2:转加班费;3:转调休或加班费")
@ApiModelProperty(value = "加班补偿方式", example = "1:转调休;2:转加班费;(3:转调休 4:加班费)")
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