Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
on-site-service
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
external
on-site-service
Commits
75f237fd
Commit
75f237fd
authored
Jul 26, 2022
by
shangtx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 维修工管理
parent
3df471f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
PageServiceWorkerDTO.java
...ce/admin/controller/service/dto/PageServiceWorkerDTO.java
+1
-1
ServiceWorkerService.java
...teservice/admin/service/service/ServiceWorkerService.java
+7
-2
ServiceWorkerBizMapper.xml
.../main/resources/mapper/service/ServiceWorkerBizMapper.xml
+7
-1
No files found.
admin/src/main/java/com/onsiteservice/admin/controller/service/dto/PageServiceWorkerDTO.java
View file @
75f237fd
...
...
@@ -14,5 +14,5 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
PageServiceWorkerDTO
extends
PageParams
{
private
String
name
;
}
admin/src/main/java/com/onsiteservice/admin/service/service/ServiceWorkerService.java
View file @
75f237fd
...
...
@@ -21,6 +21,7 @@ import com.onsiteservice.dao.common.page.PageInfoVO;
import
com.onsiteservice.dao.mapper.service.ServiceWorkerAssignMapper
;
import
com.onsiteservice.dao.mapper.service.ServiceWorkerMapper
;
import
com.onsiteservice.dao.mapper.user.UserMapper
;
import
com.onsiteservice.entity.service.ServiceValuatorAssign
;
import
com.onsiteservice.entity.service.ServiceWorker
;
import
com.onsiteservice.entity.service.ServiceWorkerAssign
;
import
com.onsiteservice.entity.user.User
;
...
...
@@ -102,8 +103,12 @@ public class ServiceWorkerService extends AbstractMapper<ServiceWorker> {
public
int
delete
(
Long
id
,
Long
userId
)
{
log
.
info
(
"worker delete id: {}, userId: {}"
,
id
,
userId
);
// checkAuth(userId);
var
condition
=
new
ServiceWorkerAssign
();
condition
.
setWorkerId
(
id
);
int
assignCount
=
serviceWorkerAssignMapper
.
selectCount
(
condition
);
if
(
assignCount
>
0
)
{
throw
new
ServiceException
(
"不允许删除已经指派过的维修工"
);
}
return
this
.
deleteByPrimaryKey
(
id
);
}
...
...
admin/src/main/resources/mapper/service/ServiceWorkerBizMapper.xml
View file @
75f237fd
...
...
@@ -4,7 +4,13 @@
<select
id=
"selectServiceWorkerPage"
resultType=
"com.onsiteservice.entity.service.ServiceWorker"
>
select * from service_worker order by create_time asc
select * from service_worker
<where>
<if
test=
"name != null"
>
and name like "%"#{name}"%"
</if>
</where>
order by create_time asc
</select>
</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