Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
fad1753f
Commit
fad1753f
authored
Feb 02, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加用户钉钉主动拉取请假记录
parent
bca80897
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
14 deletions
+23
-14
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/ApiWebPerformController.java
...com/mortals/xhx/busiz/h5/web/ApiWebPerformController.java
+21
-11
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/InspectApiController.java
...va/com/mortals/xhx/busiz/h5/web/InspectApiController.java
+0
-1
attendance-performance-manager/src/test/java/com/mortals/httpclient/system.http
...-manager/src/test/java/com/mortals/httpclient/system.http
+2
-2
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/ApiWebPerformController.java
View file @
fad1753f
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
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/InspectApiController.java
View file @
fad1753f
...
@@ -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
()))
{
...
...
attendance-performance-manager/src/test/java/com/mortals/httpclient/system.http
View file @
fad1753f
...
@@ -109,8 +109,8 @@ Authorization: {{authToken}}
...
@@ -109,8 +109,8 @@ Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
"startTimeStart":"2023-1
1
-01",
"startTimeStart":"2023-1
0
-01",
"endTimeEnd":"2023-1
1
-10"
"endTimeEnd":"2023-1
0
-10"
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment