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
39ff9f72
Commit
39ff9f72
authored
Feb 27, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg && 96333):bug修改,维保过后的设备在进行96333应急管理时,带出俩维保负责人信息
parent
3e7cf358
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
MaintenanceUnitController.java
...le/elevator/biz/controller/MaintenanceUnitController.java
+19
-19
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+0
-0
No files found.
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/controller/MaintenanceUnitController.java
View file @
39ff9f72
...
...
@@ -8,12 +8,10 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.elevator.api.dto.*
;
import
com.yeejoin.amos.boot.module.elevator.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.elevator.api.entity.EnterpriseInfo
;
import
com.yeejoin.amos.boot.module.elevator.api.entity.MaintenanceUnit
;
import
com.yeejoin.amos.boot.module.elevator.api.service.IEnterpriseInfoService
;
import
com.yeejoin.amos.boot.module.elevator.api.service.IMaintenanceUnitService
;
import
com.yeejoin.amos.boot.module.elevator.api.service.ITzBaseEnterpriseInfoService
;
import
com.yeejoin.amos.boot.module.elevator.biz.service.impl.ElevatorServiceImpl
;
import
com.yeejoin.amos.boot.module.elevator.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
...
...
@@ -30,7 +28,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -131,6 +128,7 @@ public class MaintenanceUnitController extends BaseController {
Map
<
String
,
Object
>
objectMap
=
iMaintenanceUnitService
.
selectMessage
(
id
);
return
ResponseHelper
.
buildResponse
(
objectMap
);
}
/**
* 列表分页查询
*
...
...
@@ -256,9 +254,9 @@ public class MaintenanceUnitController extends BaseController {
}
String
orgCode
=
companyModels
.
get
(
0
).
getOrgCode
();
if
(
"50*18667"
.
equals
(
orgCode
))
{
enterpriseInfoQueryWrapper
.
likeRight
(
"supervise_org_code"
,
"50*52"
).
or
().
likeRight
(
"supervise_org_code"
,
"50*73"
);
enterpriseInfoQueryWrapper
.
likeRight
(
"supervise_org_code"
,
"50*52"
).
or
().
likeRight
(
"supervise_org_code"
,
"50*73"
);
}
else
{
enterpriseInfoQueryWrapper
.
likeRight
(
"supervise_org_code"
,
orgCode
);
enterpriseInfoQueryWrapper
.
likeRight
(
"supervise_org_code"
,
orgCode
);
}
Class
<?
extends
EnterpriseInfo
>
aClass
=
enterpriseInfo
.
getClass
();
...
...
@@ -268,7 +266,7 @@ public class MaintenanceUnitController extends BaseController {
Object
o
=
field
.
get
(
enterpriseInfo
);
if
(
o
!=
null
)
{
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
"city"
.
equalsIgnoreCase
(
name
)
)
{
if
(
"city"
.
equalsIgnoreCase
(
name
))
{
String
fileValue
=
(
String
)
o
;
enterpriseInfoQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
"credit_level"
.
equalsIgnoreCase
(
name
))
{
...
...
@@ -318,7 +316,7 @@ public class MaintenanceUnitController extends BaseController {
Object
o
=
field
.
get
(
enterpriseInfo
);
if
(
o
!=
null
)
{
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
"city"
.
equalsIgnoreCase
(
name
)
)
{
if
(
"city"
.
equalsIgnoreCase
(
name
))
{
String
fileValue
=
(
String
)
o
;
enterpriseInfoQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
"credit_level"
.
equalsIgnoreCase
(
name
))
{
...
...
@@ -342,18 +340,19 @@ public class MaintenanceUnitController extends BaseController {
logger
.
error
(
e
.
getMessage
());
}
});
if
(!
ObjectUtils
.
isEmpty
(
enterpriseInfoDto
.
getIds
())){
enterpriseInfoQueryWrapper
.
lambda
().
in
(
EnterpriseInfo
::
getSequenceNbr
,
enterpriseInfo
.
getIds
());
if
(!
ObjectUtils
.
isEmpty
(
enterpriseInfoDto
.
getIds
()))
{
enterpriseInfoQueryWrapper
.
lambda
().
in
(
EnterpriseInfo
:
:
getSequenceNbr
,
enterpriseInfo
.
getIds
());
}
ArrayList
<
EnterpriseInfoExportDto
>
list
=
new
ArrayList
<>();
List
<
EnterpriseInfo
>
enterpriseInfos
=
iEnterpriseInfoService
.
getBaseMapper
().
selectList
(
enterpriseInfoQueryWrapper
);
enterpriseInfos
.
forEach
(
item
->{
enterpriseInfos
.
forEach
(
item
->
{
EnterpriseInfoExportDto
dto
=
new
EnterpriseInfoExportDto
();
BeanUtils
.
copyProperties
(
item
,
dto
);
list
.
add
(
dto
);
});
ExcelUtil
.
createTemplate
(
response
,
"单位信息"
,
"单位信息"
,
list
,
EnterpriseInfoExportDto
.
class
,
null
,
false
);
}
/**
* 根据名称查询维保单位列表
*
...
...
@@ -367,7 +366,7 @@ public class MaintenanceUnitController extends BaseController {
false
)
String
unitName
)
{
QueryWrapper
<
EnterpriseInfo
>
enterpriseInfoQueryWrapper
=
new
QueryWrapper
<>();
enterpriseInfoQueryWrapper
.
select
(
"distinct sequence_nbr,use_unit"
).
like
(
StringUtils
.
isNotEmpty
(
unitName
),
"use_unit"
,
unitName
).
like
(
"unit_type"
,
"安装改造维修单位"
);
"use_unit"
,
unitName
).
like
(
"unit_type"
,
"安装改造维修单位"
);
Page
<
EnterpriseInfo
>
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
IPage
<
EnterpriseInfo
>
page
=
iEnterpriseInfoService
.
page
(
pageBean
,
enterpriseInfoQueryWrapper
);
IPage
<
MaintenanceUnitNameDto
>
maintenanceUnitVoIPage
=
BeanDtoVoUtils
.
iPageVoStream
(
page
,
...
...
@@ -377,6 +376,7 @@ public class MaintenanceUnitController extends BaseController {
/**
* 根据警情id 查找设备维保单位信息
*
* @param alertId
* @return
*/
...
...
@@ -385,32 +385,32 @@ public class MaintenanceUnitController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id 查找设备维保单位信息"
,
notes
=
"根据警情id 查找设备维保单位信息"
)
public
ResponseModel
<
MaintenanceUnitDto
>
selectByAlertId
(
@PathVariable
Long
alertId
)
{
// 获取根据警情获取电梯信息
Map
<
String
,
Object
>
map
=
elevatorServiceImpl
.
selectByAlertId
(
alertId
);
Map
<
String
,
Object
>
map
=
elevatorServiceImpl
.
selectByAlertId
(
alertId
);
if
(
ObjectUtils
.
isEmpty
(
map
))
{
throw
new
BadRequest
(
"设备未找到"
);
}
// 根据设备使用id 获取维保单位信息
List
<
Map
<
String
,
Object
>>
list
=
elevatorServiceImpl
.
selectMtByAlertId
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
)));
List
<
Map
<
String
,
Object
>>
list
=
elevatorServiceImpl
.
selectMtByAlertId
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
)));
if
(
ObjectUtils
.
isEmpty
(
list
))
{
throw
new
BadRequest
(
"维保单位未找到"
);
}
MaintenanceUnitDto
maintenanceUnitVo
=
new
MaintenanceUnitDto
();
maintenanceUnitVo
.
setUnitName
(
ObjectUtils
.
isEmpty
(
list
.
get
(
0
).
get
(
"unitName"
))
?
null
:
String
.
valueOf
(
list
.
get
(
0
).
get
(
"unitName"
)));
maintenanceUnitVo
.
setAddress
(
ObjectUtils
.
isEmpty
(
list
.
get
(
0
).
get
(
"address"
))
?
null
:
String
.
valueOf
(
list
.
get
(
0
).
get
(
"address"
)));
maintenanceUnitVo
.
setUnitName
(
ObjectUtils
.
isEmpty
(
list
.
get
(
0
).
get
(
"unitName"
))
?
null
:
String
.
valueOf
(
list
.
get
(
0
).
get
(
"unitName"
)));
maintenanceUnitVo
.
setAddress
(
ObjectUtils
.
isEmpty
(
list
.
get
(
0
).
get
(
"address"
))
?
null
:
String
.
valueOf
(
list
.
get
(
0
).
get
(
"address"
)));
maintenanceUnitVo
.
setId
(
ObjectUtils
.
isEmpty
(
list
.
get
(
0
).
get
(
"sequenceNbr"
))
?
null
:
String
.
valueOf
(
list
.
get
(
0
).
get
(
"sequenceNbr"
)));
maintenanceUnitVo
.
setSocialCreditCode
(
ObjectUtils
.
isEmpty
(
list
.
get
(
0
).
get
(
"useCode"
))
?
null
:
String
.
valueOf
(
list
.
get
(
0
).
get
(
"useCode"
)));
List
<
DutyPersonDto
>
dutyPersonList
=
new
ArrayList
<
DutyPersonDto
>();
DutyPersonDto
principal
=
new
DutyPersonDto
();
principal
.
setDeptName
(
"主要负责人1"
);
principal
.
setPhone
(
ObjectUtils
.
isEmpty
(
list
.
get
(
0
).
get
(
"phone"
))
?
null
:
String
.
valueOf
(
list
.
get
(
0
).
get
(
"phone"
)));
principal
.
setPhone
(
ObjectUtils
.
isEmpty
(
list
.
get
(
0
).
get
(
"phone"
))
?
null
:
String
.
valueOf
(
list
.
get
(
0
).
get
(
"phone"
)));
principal
.
setUserId
(
null
);
principal
.
setUserName
(
ObjectUtils
.
isEmpty
(
list
.
get
(
0
).
get
(
"userName"
))
?
null
:
String
.
valueOf
(
list
.
get
(
0
).
get
(
"userName"
)));
dutyPersonList
.
add
(
principal
);
DutyPersonDto
manager
=
new
DutyPersonDto
();
manager
.
setDeptName
(
"主要负责人2"
);
//
manager.setPhone(list.size() == 2 ? String.valueOf(list.get(0).get("phone")) : null);
//
manager.setUserId(null);
//
manager.setUserName(list.size() == 2 ? String.valueOf(list.get(0).get("userName")) : null);
manager
.
setPhone
(
list
.
size
()
==
2
?
String
.
valueOf
(
list
.
get
(
0
).
get
(
"phone"
))
:
null
);
manager
.
setUserId
(
null
);
manager
.
setUserName
(
list
.
size
()
==
2
?
String
.
valueOf
(
list
.
get
(
0
).
get
(
"userName"
))
:
null
);
dutyPersonList
.
add
(
manager
);
maintenanceUnitVo
.
setDutyPersonList
(
dutyPersonList
);
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
39ff9f72
This diff is collapsed.
Click to expand it.
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