Commit fad1753f authored by 赵啸非's avatar 赵啸非

添加用户钉钉主动拉取请假记录

parent bca80897
package com.mortals.xhx.busiz.h5.web; package com.mortals.xhx.busiz.h5.web;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -9,6 +10,7 @@ import com.mortals.framework.common.Rest; ...@@ -9,6 +10,7 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.xhx.busiz.h5.req.*; import com.mortals.xhx.busiz.h5.req.*;
import com.mortals.xhx.common.code.SubMethodEnum; import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.perform.model.*; import com.mortals.xhx.module.perform.model.*;
import com.mortals.xhx.module.perform.service.*; import com.mortals.xhx.module.perform.service.*;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
...@@ -168,26 +170,34 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -168,26 +170,34 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
@PostMapping("effect/save") @PostMapping("effect/save")
@UnAuth @UnAuth
public Rest<Void> effectSave(@RequestBody EffectSaveReq req) { public Rest<Void> effectSave(@RequestBody EffectSaveReq req) {
// log.info("web Api req==>{}", JSON.toJSONString(req));
// log.info("web Api req==>{}", JSON.toJSONString(req));
String busiDesc = "外部效能新增"; String busiDesc = "外部效能新增";
Rest rest = Rest.ok(busiDesc + "成功!"); Rest rest = Rest.ok(busiDesc + "成功!");
try { try {
//如果手机号码为空 将当前记录保存到临时表中,人工手动处理 boolean isMobile = Validator.isMobile(req.getPhone());
if (!isMobile) {
effectErrorSave(req);
rest = Rest.fail("手机号码不正确!");
}
if (ObjectUtils.isEmpty(req.getPhone())) { if (ObjectUtils.isEmpty(req.getPhone())) {
//保存异常数据 //保存异常数据/
effectErrorSave(req); effectErrorSave(req);
rest = Rest.fail("手机号码为空!"); rest = Rest.fail("手机号码为空!");
} else { }
if (ObjectUtils.isEmpty(req.getRuleCode())) { //如果手机号码为空 将当前记录保存到临时表中,人工手动处理
throw new AppException("绩效规则编码不能为空!");
} else { if (ObjectUtils.isEmpty(req.getRuleCode())) {
effect(req); //保存异常数据/
} effectErrorSave(req);
rest = Rest.fail("绩效规则编码不能为空!");
}
if (YesNoEnum.YES.getValue() == rest.getCode()) {
effect(req);
} }
//if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!"); //if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!");
//if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!"); //if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!");
// boolean bool = effect(req); // boolean bool = effect(req);
// if (bool) throw new AppException(busiDesc + "失败!"); // if (bool) throw new AppException(busiDesc + "失败!");
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
......
...@@ -258,7 +258,6 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -258,7 +258,6 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(req)); log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(req));
Rest<PerformAttendAppealEntity> rest = Rest.ok(busiDesc + " 【成功】"); Rest<PerformAttendAppealEntity> rest = Rest.ok(busiDesc + " 【成功】");
Context context = this.getContext(); Context context = this.getContext();
// req.setStaffId(context.getUser().getCustomerId());
try { try {
//根据状态 查询 当前是否已经存在正在进行的申诉 //根据状态 查询 当前是否已经存在正在进行的申诉
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) { if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
......
...@@ -109,8 +109,8 @@ Authorization: {{authToken}} ...@@ -109,8 +109,8 @@ Authorization: {{authToken}}
Content-Type: application/json Content-Type: application/json
{ {
"startTimeStart":"2023-11-01", "startTimeStart":"2023-10-01",
"endTimeEnd":"2023-11-10" "endTimeEnd":"2023-10-10"
} }
......
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