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
4350eccd
Commit
4350eccd
authored
Jul 25, 2024
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
维修告知编辑接口修改
parent
303bb239
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
4 deletions
+30
-4
IJgMaintainNoticeService.java
.../boot/module/jg/api/service/IJgMaintainNoticeService.java
+1
-1
JgMaintainNoticeController.java
.../module/jg/biz/controller/JgMaintainNoticeController.java
+2
-2
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+27
-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/service/IJgMaintainNoticeService.java
View file @
4350eccd
...
...
@@ -33,7 +33,7 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> {
* @param noticeDto 维修告知
* @param op 操作类型
*/
JgMaintainNoticeDto
updateMaintainNotice
(
String
submitType
,
JgMaintainNoticeDto
noticeDto
,
String
op
);
JgMaintainNoticeDto
updateMaintainNotice
(
String
submitType
,
JgMaintainNoticeDto
noticeDto
,
String
op
,
ReginParams
reginParams
);
/**
* 分页查询
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintainNoticeController.java
View file @
4350eccd
...
...
@@ -11,7 +11,6 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgMaintainNoticeService;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
jdk.nashorn.api.scripting.JSObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -70,7 +69,8 @@ public class JgMaintainNoticeController extends BaseController {
Object
o1
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
TABLE_PAGE_ID
)).
get
(
"powerOfAttorneyList"
);
maintainInfo
.
setConstructionContractList
((
List
<
Map
<
String
,
Object
>>)
o
);
maintainInfo
.
setPowerOfAttorneyList
((
List
<
Map
<
String
,
Object
>>)
o1
);
return
ResponseHelper
.
buildResponse
(
iJgMaintainNoticeService
.
updateMaintainNotice
(
submitType
,
maintainInfo
,
op
));
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
ResponseHelper
.
buildResponse
(
iJgMaintainNoticeService
.
updateMaintainNotice
(
submitType
,
maintainInfo
,
op
,
reginParams
));
}
/**
...
...
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/JgMaintainNoticeServiceImpl.java
View file @
4350eccd
...
...
@@ -285,7 +285,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
@Override
@SuppressWarnings
({
"rawtypes"
,
"Duplicates"
})
@Transactional
public
JgMaintainNoticeDto
updateMaintainNotice
(
String
submitType
,
JgMaintainNoticeDto
noticeDto
,
String
op
)
{
public
JgMaintainNoticeDto
updateMaintainNotice
(
String
submitType
,
JgMaintainNoticeDto
noticeDto
,
String
op
,
ReginParams
reginParams
)
{
try
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
...
...
@@ -293,6 +293,18 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
// 字段转换
this
.
convertField
(
noticeDto
);
// 获取告知设备列表
List
<
Map
<
String
,
Object
>>
deviceList
=
noticeDto
.
getDeviceList
();
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
throw
new
BadRequest
(
"请选择设备"
);
}
// 提交时对设备状态进行校验(处理并发问题,一个未被使用的设备同时被多个使用这打开,同时提交发起申请)
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
this
.
repeatUsedEquipCheck
(
deviceList
,
reginParams
.
getCompany
().
getCompanyCode
());
}
JgMaintainNotice
notice
=
jgMaintainNoticeMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
this
.
checkRepeatUsed
(
submitType
,
notice
);
// submitType=1为流程提交否则仅为保存业务数据
...
...
@@ -395,6 +407,20 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgMaintainNoticeMapper
.
updateById
(
bean
);
}
LambdaQueryWrapper
<
JgMaintainNoticeEq
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
();
lambdaQueryWrapper
.
eq
(
JgMaintainNoticeEq:
:
getEquipTransferId
,
noticeDto
.
getSequenceNbr
());
jgMaintainNoticeEqMapper
.
delete
(
lambdaQueryWrapper
);
List
<
JgMaintainNoticeEq
>
equipList
=
new
ArrayList
<>();
deviceList
.
forEach
(
obj
->
{
JgMaintainNoticeEq
jgRelationEquip
=
new
JgMaintainNoticeEq
();
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
noticeDto
.
getSequenceNbr
().
toString
());
jgRelationEquip
.
setEquCode
(
ObjectUtils
.
isEmpty
(
obj
.
get
(
"EQU_CODE"
))?
null
:
String
.
valueOf
(
obj
.
get
(
"EQU_CODE"
)));
jgRelationEquip
.
setEquListCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_LIST_CODE"
)));
jgRelationEquip
.
setEquCategoryCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_CATEGORY_CODE"
)));
equipList
.
add
(
jgRelationEquip
);
});
jgMaintainNoticeEqMapper
.
insertBatchSomeColumn
(
equipList
);
return
noticeDto
;
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
...
...
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