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
66796549
Commit
66796549
authored
Mar 19, 2025
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
35359 超设计使用年限后端详情,删除,保存,撤回接口开发
parent
4ded1b4c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
6 deletions
+63
-6
JgOverDesignServiceLife.java
...os/boot/module/jg/api/entity/JgOverDesignServiceLife.java
+1
-1
JgOverDesignServiceLifeEq.java
.../boot/module/jg/api/entity/JgOverDesignServiceLifeEq.java
+1
-1
JgOverDesignServiceLifeController.java
.../jg/biz/controller/JgOverDesignServiceLifeController.java
+13
-3
JgOverDesignServiceLifeServiceImpl.java
.../biz/service/impl/JgOverDesignServiceLifeServiceImpl.java
+48
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgOverDesignServiceLife.java
View file @
66796549
...
...
@@ -2,7 +2,7 @@ package com.yeejoin.amos.boot.module.jg.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
org.typroject.tyboot.core.rdbms.orm
.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common
.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgOverDesignServiceLifeEq.java
View file @
66796549
...
...
@@ -2,7 +2,7 @@ package com.yeejoin.amos.boot.module.jg.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
org.typroject.tyboot.core.rdbms.orm
.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common
.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgOverDesignServiceLifeController.java
View file @
66796549
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.*;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgOverDesignServiceLife
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
java.util.Collections
;
import
java.util.List
;
/**
...
...
@@ -66,10 +69,17 @@ public class JgOverDesignServiceLifeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
jgOverDesignServiceLifeServiceImpl
.
removeById
(
sequenceNbr
));
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
jgOverDesignServiceLifeServiceImpl
.
deleteBatchBySequenceNbrs
(
Collections
.
singletonList
(
sequenceNbr
)
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestBody
JSONObject
map
){
List
<
Long
>
ids
=
(
List
<
Long
>)
map
.
get
(
"ids"
);
return
ResponseHelper
.
buildResponse
(
jgOverDesignServiceLifeServiceImpl
.
deleteBatchBySequenceNbrs
(
ids
));
}
/**
* 根据sequenceNbr查询
*
...
...
@@ -80,7 +90,7 @@ public class JgOverDesignServiceLifeController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
JgOverDesignServiceLife
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgOverDesignServiceLifeServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jgOverDesignServiceLifeServiceImpl
.
detail
(
sequenceNbr
));
}
/**
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgOverDesignServiceLifeServiceImpl.java
View file @
66796549
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgOverDesignServiceLife
;
import
cn.hutool.core.collection.CollUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgOverDesignServiceLifeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgOverDesignServiceLifeService
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
import
java.util.Objects
;
/**
* 服务实现类
...
...
@@ -16,6 +23,12 @@ import java.util.List;
*/
@Service
public
class
JgOverDesignServiceLifeServiceImpl
extends
BaseService
<
JgOverDesignServiceLife
,
JgOverDesignServiceLife
,
JgOverDesignServiceLifeMapper
>
implements
IJgOverDesignServiceLifeService
{
@Autowired
private
CommonServiceImpl
commonService
;
@Autowired
private
JgOverDesignServiceLifeEqServiceImpl
jgOverDesignServiceLifeEqService
;
@Autowired
private
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
/**
* 分页查询
*/
...
...
@@ -29,4 +42,37 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
public
List
<
JgOverDesignServiceLife
>
queryForJgOverDesignServiceLifeList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
deleteBatchBySequenceNbrs
(
List
<
Long
>
sequenceNbrs
)
{
if
(
CollUtil
.
isNotEmpty
(
sequenceNbrs
))
{
for
(
Long
sequenceNbr
:
sequenceNbrs
)
{
JgOverDesignServiceLife
overDesignServiceLife
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
// 删除代办 + 中止流程
commonService
.
deleteTaskModel
(
String
.
valueOf
(
sequenceNbr
),
overDesignServiceLife
.
getInstanceId
());
// 删除单子
LambdaUpdateWrapper
<
JgOverDesignServiceLife
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
JgOverDesignServiceLife:
:
getSequenceNbr
,
sequenceNbr
).
set
(
JgOverDesignServiceLife:
:
getIsDelete
,
true
);
this
.
update
(
updateWrapper
);
// 更新 eq 对应数据的 isDelete 字段为true(逻辑删除)
LambdaUpdateWrapper
<
JgOverDesignServiceLifeEq
>
overDesignServiceLifeEqWrapper
=
new
LambdaUpdateWrapper
<
JgOverDesignServiceLifeEq
>()
.
eq
(
JgOverDesignServiceLifeEq:
:
getEquId
,
sequenceNbr
)
.
set
(
JgOverDesignServiceLifeEq:
:
getIsDelete
,
true
);
jgOverDesignServiceLifeEqService
.
getBaseMapper
().
update
(
null
,
overDesignServiceLifeEqWrapper
);
// 删除单子对应历史表数据
jgRegistrationHistoryService
.
getBaseMapper
().
update
(
null
,
new
LambdaUpdateWrapper
<
JgRegistrationHistory
>()
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
overDesignServiceLife
.
getApplyNo
())
.
set
(
JgRegistrationHistory:
:
getIsDelete
,
true
)
);
}
}
return
Boolean
.
TRUE
;
}
public
JgOverDesignServiceLife
detail
(
Long
sequenceNbr
)
{
return
null
;
}
}
\ 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