Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
b008bb61
Commit
b008bb61
authored
Dec 21, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改报检申请删除接口
parent
20a52dcf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
IJyjcInspectionApplicationService.java
...e/jyjc/api/service/IJyjcInspectionApplicationService.java
+1
-1
JyjcInspectionApplicationController.java
...c/biz/controller/JyjcInspectionApplicationController.java
+2
-5
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+10
-5
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/service/IJyjcInspectionApplicationService.java
View file @
b008bb61
...
@@ -11,6 +11,6 @@ import java.util.List;
...
@@ -11,6 +11,6 @@ import java.util.List;
* @date 2023-12-14
* @date 2023-12-14
*/
*/
public
interface
IJyjcInspectionApplicationService
{
public
interface
IJyjcInspectionApplicationService
{
void
deleteBatchData
(
List
<
Long
>
sequenceNbr
);
Boolean
deleteBatchData
(
List
<
Long
>
sequenceNbr
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionApplicationController.java
View file @
b008bb61
...
@@ -94,12 +94,9 @@ public class JyjcInspectionApplicationController extends BaseController {
...
@@ -94,12 +94,9 @@ public class JyjcInspectionApplicationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
List
<
Long
>
sequenceNbr
){
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@RequestParam
List
<
Long
>
sequenceNbr
){
jyjcInspectionApplicationServiceImpl
.
deleteBatchData
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
deleteBatchData
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
deleteBatchSeq
(
sequenceNbr
));
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
b008bb61
...
@@ -148,6 +148,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -148,6 +148,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jyjcInspectionApplicationEquipService
.
getBaseMapper
().
deleteByApplicationSeq
(
model
.
getSequenceNbr
());
List
<
JyjcInspectionApplicationEquip
>
equipInfos
=
new
ArrayList
<>();
List
<
JyjcInspectionApplicationEquip
>
equipInfos
=
new
ArrayList
<>();
if
(
null
!=
model
.
getEquip
()
&&
model
.
getEquip
().
size
()
>
0
)
{
if
(
null
!=
model
.
getEquip
()
&&
model
.
getEquip
().
size
()
>
0
)
{
List
<
JyjcInspectionApplicationEquipDto
>
equips
=
JSONObject
.
parseArray
(
JSON
.
toJSONString
(
model
.
getEquip
()),
JyjcInspectionApplicationEquipDto
.
class
);
List
<
JyjcInspectionApplicationEquipDto
>
equips
=
JSONObject
.
parseArray
(
JSON
.
toJSONString
(
model
.
getEquip
()),
JyjcInspectionApplicationEquipDto
.
class
);
...
@@ -172,7 +174,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -172,7 +174,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
jyjcInspectionApplicationEquipService
.
getBaseMapper
().
deleteByApplicationSeq
(
model
.
getSequenceNbr
());
//保存报检装备监管码
//保存报检装备监管码
for
(
JyjcInspectionApplicationEquip
equipInfo
:
equipInfos
)
{
for
(
JyjcInspectionApplicationEquip
equipInfo
:
equipInfos
)
{
equipInfo
.
setApplicationSeq
(
model
.
getSequenceNbr
());
equipInfo
.
setApplicationSeq
(
model
.
getSequenceNbr
());
...
@@ -252,13 +254,16 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -252,13 +254,16 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
public
void
deleteBatchData
(
List
<
Long
>
sequenceNbr
)
{
public
Boolean
deleteBatchData
(
List
<
Long
>
sequenceNbr
)
{
List
<
JyjcInspectionApplication
>
jyjcInspectionApplications
=
this
.
getBaseMapper
().
selectBatchIds
(
sequenceNbr
);
List
<
JyjcInspectionApplication
>
jyjcInspectionApplications
=
this
.
getBaseMapper
().
selectBatchIds
(
sequenceNbr
);
long
count
=
jyjcInspectionApplications
.
stream
().
filter
(
e
->
!
e
.
getStatus
().
equals
(
"已撤销"
)
&&
!
e
.
getStatus
().
equals
(
"已撤回"
)).
count
();
long
count
=
jyjcInspectionApplications
.
stream
().
filter
(
e
->
e
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
())
||
e
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
())
).
count
();
if
(
count
>
0
)
{
if
(
count
>
0
)
{
throw
new
BadRequest
(
"存在
非已撤销、已退回
状态的报检单 不可删除!"
);
throw
new
BadRequest
(
"存在
已完成、待受理
状态的报检单 不可删除!"
);
}
}
...
@@ -268,7 +273,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -268,7 +273,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
jyjcInspectionApplicationAttachmentService
.
getBaseMapper
().
deleteByApplicationSeq
(
seq
);
jyjcInspectionApplicationAttachmentService
.
getBaseMapper
().
deleteByApplicationSeq
(
seq
);
jyjcInspectionApplicationPushLogService
.
getBaseMapper
().
deleteByApplicationSeq
(
seq
);
jyjcInspectionApplicationPushLogService
.
getBaseMapper
().
deleteByApplicationSeq
(
seq
);
}
}
return
true
;
}
}
...
...
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