Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
7edd5f25
Commit
7edd5f25
authored
Jan 15, 2025
by
chenyuxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 给移动端临时提供的接口
parent
a6559fe8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
13 deletions
+66
-13
TInsuranceUnpurchaseApplyController.java
...alary/controller/TInsuranceUnpurchaseApplyController.java
+64
-7
TInsuranceUnpurchaseApplyService.java
...yifu/salary/service/TInsuranceUnpurchaseApplyService.java
+1
-1
TInsuranceUnpurchaseApplyServiceImpl.java
...ry/service/impl/TInsuranceUnpurchaseApplyServiceImpl.java
+1
-5
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TInsuranceUnpurchaseApplyController.java
View file @
7edd5f25
...
...
@@ -147,6 +147,23 @@ public class TInsuranceUnpurchaseApplyController {
return
R
.
ok
(
tInsuranceUnpurchaseApplyService
.
getAuditPage
(
page
,
unpurchaseApplySearchVo
,
userId
,
type
));
}
/**
* 审核分页查询(小程序)
*
* @param page 分页对象
* @param unpurchaseApplySearchVo 不购买申请查询信息
* @param type 0待审核、1已处理、2抄送我
*
* @return R
*/
@Operation
(
description
=
"审核分页查询(小程序临时)"
)
@GetMapping
(
"/getAuditPageTemp"
)
public
R
<
IPage
<
TInsuranceUnpurchaseApply
>>
getAuditPageTemp
(
Page
<
TInsuranceUnpurchaseApply
>
page
,
TInsuranceUnpurchaseApplySearchVo
unpurchaseApplySearchVo
,
String
type
,
String
userId
)
{
return
R
.
ok
(
tInsuranceUnpurchaseApplyService
.
getAuditPage
(
page
,
unpurchaseApplySearchVo
,
userId
,
type
));
}
/**
* 审核数量
*
...
...
@@ -154,12 +171,12 @@ public class TInsuranceUnpurchaseApplyController {
*/
@Operation
(
description
=
"审核数量查询"
)
@GetMapping
(
"/getAuditCount"
)
public
R
<
Map
<
String
,
Integer
>>
getAuditCount
()
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
){
return
R
.
failed
(
ResultConstants
.
NO_USER
);
}
String
userId
=
String
.
valueOf
(
user
.
getId
());
public
R
<
Map
<
String
,
Integer
>>
getAuditCount
(
String
userId
)
{
//
YifuUser user = SecurityUtils.getUser();
//
if(null == user){
//
return R.failed(ResultConstants.NO_USER);
//
}
//
String userId = String.valueOf(user.getId());
return
R
.
ok
(
tInsuranceUnpurchaseApplyService
.
getAuditCount
(
userId
));
}
...
...
@@ -186,7 +203,7 @@ public class TInsuranceUnpurchaseApplyController {
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
if
(
Common
.
isNotKong
(
requestId
))
{
R
<
String
>
saveR
=
tInsuranceUnpurchaseApplyService
.
commitOne
(
id
);
R
<
String
>
saveR
=
tInsuranceUnpurchaseApplyService
.
commitOne
(
id
,
user
);
//主动释放锁
RedisDistributedLock
.
unlock
(
redisKey
,
requestId
);
return
saveR
;
...
...
@@ -237,6 +254,46 @@ public class TInsuranceUnpurchaseApplyController {
tAuditRecord
.
getApprovalOpinion
(),
user
);
}
return
R
.
failed
(
ResultConstants
.
REQUEST_LOCK_FAIL
);
}
/**
* 审核(小程序临时)
* @param tAuditRecord 审批信息
* @return R<String>
**/
@Operation
(
description
=
"审核(小程序临时)"
)
@SysLog
(
"审核(小程序临时)"
)
@PostMapping
(
"/auditTemp"
)
public
R
<
String
>
auditTemp
(
@RequestBody
TAuditRecord
tAuditRecord
)
{
if
(
Common
.
isEmpty
(
tAuditRecord
.
getApprovalResult
()))
{
return
R
.
failed
(
"审核结果不能为空!"
);
}
if
(
Common
.
isNotNull
(
tAuditRecord
.
getApprovalOpinion
())
&&
tAuditRecord
.
getApprovalOpinion
().
length
()>
100
)
{
return
R
.
failed
(
"审核意见不能超过100个字"
);
}
if
(
Common
.
isEmpty
(
tAuditRecord
.
getDomainId
()))
{
return
R
.
failed
(
"id不能为空!"
);
}
// YifuUser user = SecurityUtils.getUser();
// if (Common.isEmpty(user)){
// return R.failed(CommonConstants.USER_FAIL);
// }
TInsuranceUnpurchaseApply
insuranceUnpurchaseApply
=
tInsuranceUnpurchaseApplyService
.
getById
(
tAuditRecord
.
getDomainId
());
if
(
Common
.
isEmpty
(
insuranceUnpurchaseApply
)){
return
R
.
failed
(
"该实体信息不存在!"
);
}
String
requestId
;
String
redisKey
=
CacheConstants
.
INSURANCEUNPURCHASE_PROCESS_CACHE
.
concat
(
tAuditRecord
.
getDomainId
());
try
{
requestId
=
RedisDistributedLock
.
tryLockAndTime
(
redisKey
,
"10"
);
}
catch
(
Exception
e
)
{
return
R
.
failed
(
ResultConstants
.
REQUEST_LOCK_FAIL
);
}
if
(
Common
.
isNotKong
(
requestId
))
{
return
R
.
ok
(
"审核完毕"
);
}
return
R
.
failed
(
ResultConstants
.
REQUEST_LOCK_FAIL
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TInsuranceUnpurchaseApplyService.java
View file @
7edd5f25
...
...
@@ -54,7 +54,7 @@ public interface TInsuranceUnpurchaseApplyService extends IService<TInsuranceUnp
* @param id 实体id
* @return R<String>
**/
R
<
String
>
commitOne
(
String
id
)
throws
CheckedException
;
R
<
String
>
commitOne
(
String
id
,
YifuUser
user
)
throws
CheckedException
;
/**
* 审核
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TInsuranceUnpurchaseApplyServiceImpl.java
View file @
7edd5f25
...
...
@@ -418,11 +418,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
**/
@Transactional
@Override
public
R
<
String
>
commitOne
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
public
R
<
String
>
commitOne
(
String
id
,
YifuUser
user
)
{
TInsuranceUnpurchaseApply
entity
=
this
.
getById
(
id
);
if
(
entity
==
null
){
return
R
.
failed
(
ResultConstants
.
FAIL_INFO_NO_MODEL
);
...
...
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