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
ae827ad7
Commit
ae827ad7
authored
Jan 31, 2024
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改详情值覆盖问题
parent
16df5d51
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
8 deletions
+61
-8
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+58
-6
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+3
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
ae827ad7
...
@@ -5,13 +5,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -5,13 +5,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -45,7 +49,7 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -45,7 +49,7 @@ public class JgUseRegistrationController extends BaseController {
@PostMapping
(
value
=
"/flowExecute"
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgUseRegistrationServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)));
jgUseRegistrationServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
...
@@ -86,12 +90,12 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -86,12 +90,12 @@ public class JgUseRegistrationController extends BaseController {
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
ReginParams
info
=
getSelectedOrgInfo
();
ReginParams
info
=
getSelectedOrgInfo
();
dto
.
setCurrentUserId
(
info
.
getUserModel
().
getUserId
());
dto
.
setCurrentUserId
(
info
.
getUserModel
().
getUserId
());
if
(
info
.
getCompany
().
getLevel
().
equals
(
BaseController
.
COMPANY_TYPE_COMPANY
)){
if
(
info
.
getCompany
().
getLevel
().
equals
(
BaseController
.
COMPANY_TYPE_COMPANY
))
{
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_COMPANY
);
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_COMPANY
);
}
else
{
}
else
{
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_SUPERVISION
);
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_SUPERVISION
);
}
}
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getList
(
dto
,
page
,
dto
.
getRoleIds
()));
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getList
(
dto
,
page
,
dto
.
getRoleIds
()));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -141,8 +145,56 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -141,8 +145,56 @@ public class JgUseRegistrationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/export"
)
@GetMapping
(
value
=
"/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出使用登记证"
,
notes
=
"导出使用登记证"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出使用登记证"
,
notes
=
"导出使用登记证"
)
public
void
exportImageZip
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
){
public
void
exportImageZip
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
)
{
jgUseRegistrationServiceImpl
.
exportUseRegistrationCertificate
(
sequenceNbr
,
response
);
jgUseRegistrationServiceImpl
.
exportUseRegistrationCertificate
(
sequenceNbr
,
response
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getRegion"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
""
,
notes
=
""
)
public
ResponseModel
<
Map
<
String
,
Object
>>
exportImageZip
(
@RequestParam
(
"code"
)
String
code
)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(!
ObjectUtils
.
isEmpty
(
code
))
{
String
[]
data
=
code
.
split
(
"_"
);
FeignClientResult
<
CompanyModel
>
result
=
Privilege
.
companyClient
.
queryByCompanyCode
(
data
[
0
]);
if
(!
ObjectUtils
.
isEmpty
(
result
))
{
CompanyModel
result1
=
result
.
getResult
();
if
(!
ObjectUtils
.
isEmpty
(
result1
.
getRegionSeq
()))
{
FeignClientResult
<
Collection
<
RegionModel
>>
region
=
Systemctl
.
regionClient
.
queryForParent
(
Long
.
valueOf
(
result1
.
getRegionSeq
()));
Collection
<
RegionModel
>
result2
=
region
.
getResult
();
List
<
RegionModel
>
list
=
new
ArrayList
<>(
Arrays
.
asList
(
result2
.
toArray
(
new
RegionModel
[
0
])));
RegionModel
region1
=
list
.
get
(
0
);
changeData
(
map
,
region1
);
}
}
}
return
ResponseHelper
.
buildResponse
(
map
);
}
private
HashMap
<
String
,
Object
>
changeData
(
HashMap
<
String
,
Object
>
map
,
RegionModel
regionModel
)
{
if
(!
ObjectUtils
.
isEmpty
(
regionModel
.
getChildren
()))
{
Collection
<
RegionModel
>
children
=
regionModel
.
getChildren
();
List
<
RegionModel
>
list
=
new
ArrayList
<>(
Arrays
.
asList
(
children
.
toArray
(
new
RegionModel
[
0
])));
RegionModel
region
=
list
.
get
(
0
);
if
(
map
.
containsKey
(
"region"
))
{
map
.
put
(
"region"
,
String
.
valueOf
(
map
.
get
(
"region"
))
+
region
.
getRegionCode
()
+
","
);
map
.
put
(
"regionAll"
,
String
.
valueOf
(
map
.
get
(
"regionAll"
))
+
region
.
getRegionCode
()
+
"_"
+
region
.
getRegionName
()
+
","
);
}
else
{
map
.
put
(
"regionAll"
,
region
.
getRegionCode
()
+
"_"
+
region
.
getRegionName
()
+
","
);
map
.
put
(
"region"
,
region
.
getRegionCode
()
+
","
);
}
if
(!
ObjectUtils
.
isEmpty
(
region
.
getChildren
()))
{
Collection
<
RegionModel
>
regionChildren
=
regionModel
.
getChildren
();
List
<
RegionModel
>
regionChildrenList
=
new
ArrayList
<>(
Arrays
.
asList
(
regionChildren
.
toArray
(
new
RegionModel
[
0
])));
changeData
(
map
,
regionChildrenList
.
get
(
0
));
}
}
return
map
;
}
}
}
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/JgUseRegistrationServiceImpl.java
View file @
ae827ad7
...
@@ -118,7 +118,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -118,7 +118,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
map
.
remove
(
"status"
);
map
.
remove
(
"status"
);
map
.
remove
(
"instanceId"
);
map
.
remove
(
"instanceId"
);
// 安全管理员
// 安全管理员
if
(
map
.
containsKey
(
"safetyManagerName"
)){
if
(
map
.
containsKey
(
"safetyManagerName"
))
{
map
.
put
(
"safetyManager"
,
map
.
get
(
"safetyManagerName"
));
map
.
put
(
"safetyManager"
,
map
.
get
(
"safetyManagerName"
));
}
}
IdxBizJgUseInfo
useInfo
=
new
IdxBizJgUseInfo
();
IdxBizJgUseInfo
useInfo
=
new
IdxBizJgUseInfo
();
...
@@ -177,7 +177,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -177,7 +177,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
public
void
updateHistory
(
JSONObject
map
,
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
public
void
updateHistory
(
JSONObject
map
,
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
JgRegistrationHistory
jgRegistrationHistory
=
new
JgRegistrationHistory
();
JgRegistrationHistory
jgRegistrationHistory
=
new
JgRegistrationHistory
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
// lambda.eq(JgRegistrationHistory::getEquId, equipId);
// lambda.eq(JgRegistrationHistory::getEquId, equipId);
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
lambda
.
eq
(
JgRegistrationHistory:
:
getRegistrationClass
,
"使用登记"
);
lambda
.
eq
(
JgRegistrationHistory:
:
getRegistrationClass
,
"使用登记"
);
Integer
integer
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectCount
(
lambda
);
Integer
integer
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectCount
(
lambda
);
...
@@ -606,6 +606,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -606,6 +606,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
detail
.
put
(
"designStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designStandard"
))));
detail
.
put
(
"designStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designStandard"
))));
detail
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
detail
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
detail
.
put
(
"longitudeLatitude"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"longitudeLatitude"
))));
detail
.
put
(
"longitudeLatitude"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"longitudeLatitude"
))));
detail
.
put
(
"province"
,
"610000"
);
return
detail
;
return
detail
;
}
}
...
...
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