Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
35a7ff23
Commit
35a7ff23
authored
Dec 21, 2024
by
龙于生
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复审批移除bug
parent
f15558f5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
6 deletions
+68
-6
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
+21
-1
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+27
-5
src/main/java/cn/timer/api/dao/spmk/SpmkApproveExecuteRecordMapper.java
+2
-0
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordMapper.xml
+18
-0
No files found.
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
View file @
35a7ff23
...
@@ -411,13 +411,15 @@ public class CmsController {
...
@@ -411,13 +411,15 @@ public class CmsController {
qyxxQueryDto
.
getCurrentPage
()
==
null
?
1
:
qyxxQueryDto
.
getCurrentPage
(),
qyxxQueryDto
.
getCurrentPage
()
==
null
?
1
:
qyxxQueryDto
.
getCurrentPage
(),
qyxxQueryDto
.
getTotalPage
()
==
null
?
10
:
qyxxQueryDto
.
getTotalPage
());
qyxxQueryDto
.
getTotalPage
()
==
null
?
10
:
qyxxQueryDto
.
getTotalPage
());
Integer
userType
=
userBean
.
getQyzxEmpLogin
().
getUserType
();
QueryWrapper
<
CmsContent
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
CmsContent
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"organization_id"
,
userBean
.
getOrgCode
())
queryWrapper
.
eq
(
"organization_id"
,
userBean
.
getOrgCode
())
.
eq
(
"modularid"
,
7
).
eq
(
r
!=
null
&&
r
>
-
1
,
"releasestate"
,
r
)
.
eq
(
"modularid"
,
7
).
eq
(
r
!=
null
&&
r
>
-
1
,
"releasestate"
,
r
)
.
between
(!
StrUtil
.
hasBlank
(
s
)
&&
!
StrUtil
.
hasBlank
(
e
),
"releasetime"
,
.
between
(!
StrUtil
.
hasBlank
(
s
)
&&
!
StrUtil
.
hasBlank
(
e
),
"releasetime"
,
!
StrUtil
.
hasBlank
(
s
)
?
s
:
"1000-01-01 00:00:00"
,
!
StrUtil
.
hasBlank
(
s
)
?
s
:
"1000-01-01 00:00:00"
,
!
StrUtil
.
hasBlank
(
e
)
?
e
:
"9999-01-01 00:00:00"
)
!
StrUtil
.
hasBlank
(
e
)
?
e
:
"9999-01-01 00:00:00"
)
.
and
(
wq
->
wq
.
eq
(
"publisher"
,
userBean
.
getEmpNum
()).
or
().
eq
(
"author"
,
userBean
.
getUserInfo
().
getName
()).
or
().
inSql
(
"id"
,
"select cms_content_id from cms_content_read where user_id ="
+
userBean
.
getEmpNum
()))
.
and
(
wq
->
wq
.
eq
(
"publisher"
,
userBean
.
getEmpNum
()).
or
().
eq
(
"author"
,
userBean
.
getUserInfo
().
getName
())
.
or
(
wp1
->
wp1
.
eq
(
userType
==
2
,
"releasestate"
,
0
).
inSql
(
"id"
,
"select cms_content_id from cms_content_read where user_id ="
+
userBean
.
getEmpNum
())))
.
orderByDesc
(
"addeddate"
);
.
orderByDesc
(
"addeddate"
);
IPage
<
CmsContent
>
cmsContentPage
=
CmsContent
.
builder
().
build
().
selectPage
(
page
,
queryWrapper
);
IPage
<
CmsContent
>
cmsContentPage
=
CmsContent
.
builder
().
build
().
selectPage
(
page
,
queryWrapper
);
...
@@ -785,4 +787,22 @@ public class CmsController {
...
@@ -785,4 +787,22 @@ public class CmsController {
return
ResultUtil
.
success
(
"删除附件成功"
);
return
ResultUtil
.
success
(
"删除附件成功"
);
}
}
@PostMapping
(
value
=
"/addContentReadUsers"
)
@ApiOperation
(
value
=
"addContentReadUsers"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
addContentReadUsers
(
@CurrentUser
UserBean
userBean
,
@RequestBody
CmsContentDto
cmsContentDto
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
empNum
=
userBean
.
getEmpNum
();
if
(!
CollectionUtils
.
isEmpty
(
cmsContentDto
.
getCmsContentReads
()))
{
for
(
CmsContentRead
entity
:
cmsContentDto
.
getCmsContentReads
())
{
entity
.
setCmsContentId
(
cmsContentDto
.
getId
());
entity
.
setOrgCode
(
orgCode
);
entity
.
setReadStatus
(
0
);
entity
.
setDeleteFlag
(
0
);
entity
.
insert
();
}
}
return
ResultUtil
.
success
(
"成功"
);
}
}
}
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
35a7ff23
...
@@ -802,6 +802,13 @@ public class SpmkController {
...
@@ -802,6 +802,13 @@ public class SpmkController {
// @BindingResultCtrol(title = "审批人审批")
// @BindingResultCtrol(title = "审批人审批")
public
Result
<
Object
>
approving
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ApprovingDto
approvingDto
)
throws
Exception
{
public
Result
<
Object
>
approving
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ApprovingDto
approvingDto
)
throws
Exception
{
if
(
approvingDto
.
getSts
()
==
2
&&
StringUtils
.
isEmpty
(
approvingDto
.
getOpinion
())){
approvingDto
.
setOpinion
(
"同意"
);
}
else
if
(
approvingDto
.
getSts
()
==
3
&&
StringUtils
.
isEmpty
(
approvingDto
.
getOpinion
())){
approvingDto
.
setOpinion
(
"拒绝"
);
}
else
if
(
approvingDto
.
getSts
()
==
4
&&
StringUtils
.
isEmpty
(
approvingDto
.
getOpinion
())){
approvingDto
.
setOpinion
(
"转派"
);
}
/*判断是否有权限转派*/
/*判断是否有权限转派*/
if
(
approvingDto
.
getSts
()
==
4
)
{
if
(
approvingDto
.
getSts
()
==
4
)
{
...
@@ -1540,12 +1547,17 @@ public class SpmkController {
...
@@ -1540,12 +1547,17 @@ public class SpmkController {
if
(
spmkApproveDetailDto
.
getApproveExecuteRecordId
()!=
null
)
{
if
(
spmkApproveDetailDto
.
getApproveExecuteRecordId
()!=
null
)
{
spmkApproveExecuteRecord
=
SpmkApproveExecuteRecord
.
builder
().
id
(
spmkApproveDetailDto
.
getApproveExecuteRecordId
()).
build
().
selectById
();
spmkApproveExecuteRecord
=
SpmkApproveExecuteRecord
.
builder
().
id
(
spmkApproveDetailDto
.
getApproveExecuteRecordId
()).
build
().
selectById
();
}
else
{
}
else
{
spmkApproveExecuteRecord
=
spmkApproveExecuteRecordMapper
.
selectExecuteRecordById
(
Integer
.
parseInt
(
currentUser
.
getId
()),
spmkApproveDetailSummary
.
getApproveSummaryId
());
List
<
SpmkApproveExecuteRecord
>
spmkApproveExecuteRecords
=
spmkApproveExecuteRecordMapper
.
selectExecuteRecordListById
(
Integer
.
parseInt
(
currentUser
.
getId
()),
spmkApproveDetailSummary
.
getApproveSummaryId
());
spmkApproveExecuteRecord
=
spmkApproveExecuteRecords
.
get
(
spmkApproveDetailDto
.
getIndex
());
// spmkApproveExecuteRecord = spmkApproveExecuteRecordMapper.selectExecuteRecordById(Integer.parseInt(currentUser.getId()), spmkApproveDetailSummary.getApproveSummaryId());
}
}
//删除操作人记录
//删除操作人记录
if
(
spmkApproveExecuteRecord
!=
null
)
{
if
(
spmkApproveExecuteRecord
!=
null
)
{
SpmkExecutor
spmkExecutor
=
SpmkExecutor
.
builder
().
build
().
selectOne
(
new
LambdaQueryWrapper
<
SpmkExecutor
>()
// SpmkExecutor spmkExecutor = SpmkExecutor.builder().build().selectOne(new LambdaQueryWrapper<SpmkExecutor>()
.
eq
(
SpmkExecutor:
:
getApproveExecuteRecordId
,
spmkApproveExecuteRecord
.
getId
()).
eq
(
SpmkExecutor:
:
getEmpNum
,
currentUser
.
getId
()));
// .eq(SpmkExecutor::getApproveExecuteRecordId, spmkApproveExecuteRecord.getId()).eq(SpmkExecutor::getEmpNum, currentUser.getId()));
List
<
SpmkExecutor
>
spmkExecutors
=
SpmkExecutor
.
builder
().
build
().
selectList
(
new
LambdaQueryWrapper
<
SpmkExecutor
>()
.
eq
(
SpmkExecutor:
:
getApproveExecuteRecordId
,
spmkApproveExecuteRecord
.
getId
()));
SpmkExecutor
spmkExecutor
=
spmkExecutors
.
get
(
spmkApproveDetailDto
.
getUserIndex
());
if
(
onlyOne
)
{
if
(
onlyOne
)
{
if
(
spmkExecutor
.
getSts
()
!=
4
)
{
if
(
spmkExecutor
.
getSts
()
!=
4
)
{
spmkApproveExecuteRecordMapper
.
delExecuteRecordByRecordIds
(
spmkApproveExecuteRecord
.
getId
(),
Integer
.
parseInt
(
currentUser
.
getId
()));
spmkApproveExecuteRecordMapper
.
delExecuteRecordByRecordIds
(
spmkApproveExecuteRecord
.
getId
(),
Integer
.
parseInt
(
currentUser
.
getId
()));
...
@@ -1786,7 +1798,8 @@ public class SpmkController {
...
@@ -1786,7 +1798,8 @@ public class SpmkController {
public
Result
<
Object
>
addFiles
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ApprovingDto
approvingDto
)
{
public
Result
<
Object
>
addFiles
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ApprovingDto
approvingDto
)
{
QyzxEmpEntAsso
ent
=
QyzxEmpEntAsso
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
QyzxEmpEntAsso
ent
=
QyzxEmpEntAsso
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
if
(
ent
!=
null
)
{
if
(
ent
!=
null
)
{
if
(
ent
.
getUserType
()
==
2
)
{
System
.
out
.
println
(!
ent
.
getEmpNum
().
equals
(
userBean
.
getEmpNum
()));
if
(
ent
.
getUserType
()
==
2
&&
!
ent
.
getEmpNum
().
equals
(
userBean
.
getEmpNum
()))
{
return
ResultUtil
.
error
(
"暂无权限"
);
return
ResultUtil
.
error
(
"暂无权限"
);
}
}
}
}
...
@@ -1814,7 +1827,7 @@ public class SpmkController {
...
@@ -1814,7 +1827,7 @@ public class SpmkController {
public
Result
<
Object
>
delFileList
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ApprovingDto
approvingDto
)
{
public
Result
<
Object
>
delFileList
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ApprovingDto
approvingDto
)
{
QyzxEmpEntAsso
ent
=
QyzxEmpEntAsso
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
QyzxEmpEntAsso
ent
=
QyzxEmpEntAsso
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
if
(
ent
!=
null
)
{
if
(
ent
!=
null
)
{
if
(
ent
.
getUserType
()
==
2
)
{
if
(
ent
.
getUserType
()
==
2
&&
!
ent
.
getEmpNum
().
equals
(
userBean
.
getEmpNum
())
)
{
return
ResultUtil
.
error
(
"暂无权限"
);
return
ResultUtil
.
error
(
"暂无权限"
);
}
}
}
}
...
@@ -1847,4 +1860,13 @@ public class SpmkController {
...
@@ -1847,4 +1860,13 @@ public class SpmkController {
return
ResultUtil
.
data
(
"更新成功"
);
return
ResultUtil
.
data
(
"更新成功"
);
}
}
@PostMapping
(
value
=
"/is_current_execute"
)
@ApiOperation
(
value
=
"查询是否当前审批人"
,
httpMethod
=
"POST"
,
notes
=
"查询是否当前审批人"
)
@Log
(
title
=
"查询是否当前审批人"
,
businessType
=
BusinessType
.
OTHER
)
public
Result
<
Object
>
isCurrentExecute
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SpmkApproveDetailDto
sq
)
{
SpmkApproveExecuteRecord
spmkApproveExecuteRecord
=
spmkApproveExecuteRecordMapper
.
selectExecuteRecordBySts1
(
userBean
.
getEmpNum
(),
sq
.
getApproveSummaryId
());
return
ResultUtil
.
data
(
spmkApproveExecuteRecord
);
}
}
}
src/main/java/cn/timer/api/dao/spmk/SpmkApproveExecuteRecordMapper.java
View file @
35a7ff23
...
@@ -21,7 +21,9 @@ public interface SpmkApproveExecuteRecordMapper extends BaseMapper<SpmkApproveEx
...
@@ -21,7 +21,9 @@ public interface SpmkApproveExecuteRecordMapper extends BaseMapper<SpmkApproveEx
List
<
SpmkApproveExecuteRecord
>
selectListByAsId
(
@Param
(
"id"
)
Integer
id
);
List
<
SpmkApproveExecuteRecord
>
selectListByAsId
(
@Param
(
"id"
)
Integer
id
);
int
delExecuteRecord
(
@Param
(
"recordId"
)
Integer
recordId
,
@Param
(
"approveSummaryId"
)
Integer
approveSummaryId
);
int
delExecuteRecord
(
@Param
(
"recordId"
)
Integer
recordId
,
@Param
(
"approveSummaryId"
)
Integer
approveSummaryId
);
SpmkApproveExecuteRecord
selectExecuteRecordById
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"approveSummaryId"
)
Integer
approveSummaryId
);
SpmkApproveExecuteRecord
selectExecuteRecordById
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"approveSummaryId"
)
Integer
approveSummaryId
);
List
<
SpmkApproveExecuteRecord
>
selectExecuteRecordListById
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"approveSummaryId"
)
Integer
approveSummaryId
);
int
delExecuteRecordByRecordIds
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"uid"
)
Integer
uid
);
int
delExecuteRecordByRecordIds
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"uid"
)
Integer
uid
);
SpmkApproveExecuteRecord
selectExecuteRecordReoId
(
@Param
(
"reoId"
)
Integer
reoId
,
@Param
(
"approveSummaryId"
)
Integer
approveSummaryId
);
SpmkApproveExecuteRecord
selectExecuteRecordReoId
(
@Param
(
"reoId"
)
Integer
reoId
,
@Param
(
"approveSummaryId"
)
Integer
approveSummaryId
);
SpmkApproveExecuteRecord
selectExecuteRecordBySts1
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"approveSummaryId"
)
Integer
approveSummaryId
);
}
}
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordMapper.xml
View file @
35a7ff23
...
@@ -172,6 +172,12 @@
...
@@ -172,6 +172,12 @@
WHERE sr.approve_summary_id = #{approveSummaryId} and se.emp_num = #{userId}
WHERE sr.approve_summary_id = #{approveSummaryId} and se.emp_num = #{userId}
</select>
</select>
<select
id=
"selectExecuteRecordListById"
resultType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecord"
>
SELECT sr.id,sr.sts FROM spmk_approve_execute_record sr
LEFT JOIN spmk_executor se ON se.approve_execute_record_id=sr.id
WHERE sr.approve_summary_id = #{approveSummaryId}
</select>
<select
id=
"selectExecuteRecordReoId"
resultType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecord"
>
<select
id=
"selectExecuteRecordReoId"
resultType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecord"
>
SELECT sr.id FROM spmk_approve_execute_record sr
SELECT sr.id FROM spmk_approve_execute_record sr
LEFT JOIN spmk_executor se ON se.approve_execute_record_id=sr.id
LEFT JOIN spmk_executor se ON se.approve_execute_record_id=sr.id
...
@@ -190,4 +196,16 @@
...
@@ -190,4 +196,16 @@
WHERE sr.id =#{id} and se.emp_num =#{uid}
WHERE sr.id =#{id} and se.emp_num =#{uid}
</delete>
</delete>
<select
id=
"selectExecuteRecordBySts1"
resultType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecord"
>
SELECT
*
FROM
spmk_approve_execute_record ser
LEFT JOIN spmk_executor se ON ser.id = se.approve_execute_record_id
WHERE
ser.approve_summary_id = #{approveSummaryId}
AND se.sts = 1
AND se.emp_num = #{userId}
</select>
</mapper>
</mapper>
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