Commit 414ffd28 authored by 廖旭伟's avatar 廖旭伟

添加一个临时接口来找回因事假bug丢失的考勤绩效数据

parent 22f26ca7
......@@ -21,4 +21,11 @@ public interface AttendanceLeaveRecordService extends ICRUDService<AttendanceLea
Rest<String> syncLeaveRecord(AttendanceLeaveRecordQuery query, Context context);
/**
* 从新生成因事假bug导致缺失的绩效考勤数据
* @param id
* @param context
*/
void doCreatPerformAttend(Long id, Context context);
}
\ No newline at end of file
......@@ -344,4 +344,13 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
return recordEntity;
}
@Override
public void doCreatPerformAttend(Long id, Context context){
AttendanceLeaveRecordEntity temp = this.get(id);
if(temp!=null){
if(AppealResultEnum.通过.getValue() == temp.getAuditResult() && LeaveTypeEnum.事假.getValue() == temp.getLeaveType()){
creatPerformAttend(temp, context);
}
}
}
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.unit.DataUnit;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.util.DateUtils;
......@@ -28,10 +29,7 @@ import com.mortals.xhx.module.workman.service.WorkmanService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -158,4 +156,18 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
entity.setEndTime(DateUtils.StrToDateTime(dateStr+" 17:00:00","yyyy-MM-dd HH:mm:ss"));
model.put("entity",entity);
}
@RequestMapping(value = {"doCreatPerformAttend"},method = {RequestMethod.POST, RequestMethod.GET})
public String doCreatPerformAttend(Long id) {
String msg="操作成功";
try {
this.service.doCreatPerformAttend(id,this.getContext());
}catch (Exception e) {
msg=e.getMessage();
}
JSONObject ret = new JSONObject();
ret.put("code", 1);
ret.put("msg", msg);
return ret.toJSONString();
}
}
\ No newline at end of file
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