Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
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
王飞
vehicle-quality-review
Commits
329111dc
Commit
329111dc
authored
Mar 19, 2024
by
高滢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gaoying' into 'dev'
Gaoying See merge request
!204
parents
4a6edec8
46fe8a1f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
TaskSampleRelationMapper.java
.../main/java/com/ruoyi/mapper/TaskSampleRelationMapper.java
+2
-0
SampleManagementController.java
...c/main/java/com/ruoyi/web/SampleManagementController.java
+9
-0
TaskSampleRelationMapper.xml
...ew/src/main/resources/mapper/TaskSampleRelationMapper.xml
+8
-0
No files found.
quality-review/src/main/java/com/ruoyi/mapper/TaskSampleRelationMapper.java
View file @
329111dc
...
...
@@ -22,4 +22,6 @@ public interface TaskSampleRelationMapper extends BaseMapper<TaskSampleRelation>
/**
* 根据样品id查询*/
List
<
SampleTaskVo
>
selectTaskBysampleId
(
@Param
(
"idList"
)
List
<
Long
>
idList
);
public
int
selectTaskSumBySampleId
(
@Param
(
"sampleId"
)
Long
sampleId
);
}
quality-review/src/main/java/com/ruoyi/web/SampleManagementController.java
View file @
329111dc
...
...
@@ -3,7 +3,9 @@ package com.ruoyi.web;
import
java.util.List
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.mapper.TaskSampleRelationMapper
;
import
com.ruoyi.service.SampleManagementService
;
import
com.ruoyi.web.request.SampleManagementGetInfoRequest
;
import
com.ruoyi.web.request.SampleManagementRequest
;
...
...
@@ -35,6 +37,9 @@ public class SampleManagementController extends BaseController
@Autowired
private
SampleManagementService
sampleManagementService
;
@Autowired
private
TaskSampleRelationMapper
taskSampleRelationMapper
;
/**
* 查询样品管理列表
*/
...
...
@@ -99,6 +104,10 @@ public class SampleManagementController extends BaseController
@PostMapping
(
"/del"
)
public
AjaxResult
remove
(
@Validated
@RequestBody
SampleManagementGetInfoRequest
request
)
{
int
num
=
taskSampleRelationMapper
.
selectTaskSumBySampleId
(
request
.
getId
());
if
(
num
>
0
){
throw
new
ServiceException
(
"已有相关任务,不允许删除"
);
}
return
toAjax
(
sampleManagementService
.
removeById
(
request
.
getId
()));
}
...
...
quality-review/src/main/resources/mapper/TaskSampleRelationMapper.xml
View file @
329111dc
...
...
@@ -39,4 +39,12 @@
#{id}
</foreach>
</select>
<select
id=
"selectTaskSumBySampleId"
>
select
count(task_id)
FROM
t_task_sample_relation
where sample_id = #{sampleId}
</select>
</mapper>
\ No newline at end of file
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