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
4facf5e0
Commit
4facf5e0
authored
Jul 17, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register_to_0715' of…
Merge branch 'develop_tzs_register_to_0715' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_tzs_register_to_0715
parents
52cdf642
1054a9c8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
199 additions
and
25 deletions
+199
-25
JgChangeRegistrationUnitMapper.java
.../module/jg/api/mapper/JgChangeRegistrationUnitMapper.java
+5
-5
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+2
-0
JgChangeRegistrationUnitMapper.xml
.../main/resources/mapper/JgChangeRegistrationUnitMapper.xml
+9
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+29
-8
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+7
-0
ChangeUnitEquipUsedCheckImpl.java
...ule/jg/biz/service/impl/ChangeUnitEquipUsedCheckImpl.java
+54
-0
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+15
-1
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+72
-8
EquipmentCategoryController.java
...odule/ymt/biz/controller/EquipmentCategoryController.java
+6
-3
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/mapper/JgChangeRegistrationUnitMapper.java
View file @
4facf5e0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationUnitDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationUnitDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationUnit
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationUnit
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -33,8 +31,8 @@ public interface JgChangeRegistrationUnitMapper extends CustomBaseMapper<JgChang
...
@@ -33,8 +31,8 @@ public interface JgChangeRegistrationUnitMapper extends CustomBaseMapper<JgChang
@Param
(
"sort"
)
SortVo
sortMap
,
@Param
(
"sort"
)
SortVo
sortMap
,
@Param
(
"param"
)
JgChangeRegistrationUnitDto
model
,
@Param
(
"param"
)
JgChangeRegistrationUnitDto
model
,
@Param
(
"type"
)
String
type
,
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"currentUserId"
)
String
currentUserId
);
@Param
(
"currentUserId"
)
String
currentUserId
);
/**
/**
...
@@ -46,4 +44,6 @@ public interface JgChangeRegistrationUnitMapper extends CustomBaseMapper<JgChang
...
@@ -46,4 +44,6 @@ public interface JgChangeRegistrationUnitMapper extends CustomBaseMapper<JgChang
List
<
Map
<
String
,
Object
>>
queryEquipInformation
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
queryEquipInformation
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
String
queryEquipIdBySeq
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
String
queryEquipIdBySeq
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
List
<
CompanyEquipCountDto
>
queryForFlowingEquipList
();
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
View file @
4facf5e0
...
@@ -40,6 +40,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
...
@@ -40,6 +40,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Map
<
String
,
Object
>
getDesDetail
(
@Param
(
"id"
)
String
id
);
Map
<
String
,
Object
>
getDesDetail
(
@Param
(
"id"
)
String
id
);
Map
<
String
,
Object
>
getInspectDetailByRecord
(
@Param
(
"id"
)
String
id
);
Page
<
Map
<
String
,
Object
>>
getEquipListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"factoryNum"
)
String
factoryNum
,
@Param
(
"equList"
)
String
equList
,
@Param
(
"equCategory"
)
String
equCategory
);
Page
<
Map
<
String
,
Object
>>
getEquipListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"factoryNum"
)
String
factoryNum
,
@Param
(
"equList"
)
String
equList
,
@Param
(
"equCategory"
)
String
equCategory
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationUnitMapper.xml
View file @
4facf5e0
...
@@ -125,4 +125,13 @@
...
@@ -125,4 +125,13 @@
where
where
unit_change_registration_id = #{sequenceNbr}
unit_change_registration_id = #{sequenceNbr}
</select>
</select>
<select
id=
"queryForFlowingEquipList"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto"
>
select a.use_unit_credit_code as companyCode,
group_concat(b.equ_id) as records
from tzs_jg_change_registration_unit a,
tzs_jg_change_registration_unit_eq b
where a.sequence_nbr = b.unit_change_registration_id
and a.status in ('三级待受理', '二级待受理', '一级待受理')
GROUP BY a.use_unit_credit_code
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
4facf5e0
...
@@ -127,6 +127,9 @@
...
@@ -127,6 +127,9 @@
SELECT
SELECT
jri.RECORD as equipId,
jri.RECORD as equipId,
jri.EQU_CODE as equCode,
jri.EQU_CODE as equCode,
jri.USE_ORG_CODE as useOrgCode,
jri.ORGANIZATION_CODE as organizationCode,
jri.ORGANIZATION_NAME as organizationName,
jri.EQU_CATEGORY as equCategory,
jri.EQU_CATEGORY as equCategory,
jri.EQU_LIST as equList,
jri.EQU_LIST as equList,
jri.EQU_DEFINE as equDefine,
jri.EQU_DEFINE as equDefine,
...
@@ -246,6 +249,18 @@
...
@@ -246,6 +249,18 @@
from idx_biz_jg_design_info
from idx_biz_jg_design_info
where RECORD = #{id}
where RECORD = #{id}
</select>
</select>
<select
id=
"getInspectDetailByRecord"
resultType=
"java.util.Map"
>
SELECT
INSPECT_ORG_CODE as inspectOrgCode,
INSPECT_ORG_NAME as inspectOrgName,
INSPECT_CONCLUSION as inspectConclusion,
INSPECT_TYPE as inspectType,
INSPECT_DATE as inspectDate,
INSPECT_STAFF as inspectStaff,
NEXT_INSPECT_DATE as nextInspectDate,
INSPECT_REPORT as inspectReport
FROM "idx_biz_jg_inspection_detection_info" where RECORD = #{id}
</select>
<select
id=
"getDetailById"
resultType=
"java.util.Map"
>
<select
id=
"getDetailById"
resultType=
"java.util.Map"
>
select ur.sequence_nbr as sequenceNbr,
select ur.sequence_nbr as sequenceNbr,
ur.audit_status as auditStatus,
ur.audit_status as auditStatus,
...
@@ -322,7 +337,9 @@
...
@@ -322,7 +337,9 @@
ibjui."STREET_NAME" as installStreet,
ibjui."STREET_NAME" as installStreet,
ibjui."PROVINCE_NAME" as installProvince,
ibjui."PROVINCE_NAME" as installProvince,
ibjui."CITY_NAME" as installCity,
ibjui."CITY_NAME" as installCity,
ibjui."COUNTY_NAME" as installCounty
ibjui."COUNTY_NAME" as installCounty,
ibjci."USC_UNIT_CREDIT_CODE" as uscUnitCreditCode,
ibjci."USC_UNIT_NAME" as uscUnitName
FROM "idx_biz_jg_construction_info" AS ibjci
FROM "idx_biz_jg_construction_info" AS ibjci
left join "idx_biz_jg_use_info" as ibjui on ibjui."RECORD" = ibjci."RECORD"
left join "idx_biz_jg_use_info" as ibjui on ibjui."RECORD" = ibjci."RECORD"
WHERE ibjci."RECORD" = #{id}
WHERE ibjci."RECORD" = #{id}
...
@@ -366,13 +383,17 @@
...
@@ -366,13 +383,17 @@
<select
id=
"getMaintenanceDetailByIdx"
resultType=
"java.util.Map"
>
<select
id=
"getMaintenanceDetailByIdx"
resultType=
"java.util.Map"
>
SELECT ibjmri."ME_UNIT_NAME" as maintenanceUnitName,
SELECT ibjmri."ME_UNIT_NAME" as maintenanceUnitName,
ibjui."USE_UNIT_NAME" as maintenanceUseUnitName,
ibjui."USE_UNIT_NAME" as maintenanceUseUnitName,
-- ibjmri."ME_MASTER" as maintenanceManagerName,
ibjmri."ME_MASTER" as maintenanceManagerOneName,
-- ibjmri."ME_MASTER_PHONE" as maintenanceManagerPhone,
ibjmri."ME_MASTER_PHONE" as maintenanceManagerOnePhone,
ibjmri."ME_MASTER" as maintenanceManagerOneName,
ibjmri."ME_MASTER_ID" as maintenanceManagerOneID,
ibjmri."ME_MASTER_PHONE" as maintenanceManagerOnePhone,
ibjmri."ME_MASTER1" as maintenanceManagerTwoName,
ibjmri."ME_MASTER1" as maintenanceManagerTwoName,
ibjmri."ME_MASTER1_PHONE" as maintenanceManagerTwoPhone,
ibjmri."ME_MASTER1_PHONE" as maintenanceManagerTwoPhone,
ibjmri."REPAIR_INFORM" as maintenanceContract,
ibjmri."REPAIR_INFORM" as maintenanceContract
ibjmri."ME_MASTER1_ID" as maintenanceManagerTwoID,
ibjmri."INFORM_START" as informStart,
ibjmri."INFORM_END" as informEnd,
ibjmri."ME_UNIT_CREDIT_CODE" as meUnitCreditCode,
ibjmri."ME_UNIT_NAME" as meUnitName
FROM "idx_biz_jg_maintenance_record_info" as ibjmri
FROM "idx_biz_jg_maintenance_record_info" as ibjmri
left join "idx_biz_jg_use_info" as ibjui on ibjui."RECORD" = ibjmri."RECORD"
left join "idx_biz_jg_use_info" as ibjui on ibjui."RECORD" = ibjmri."RECORD"
WHERE ibjmri."RECORD" = #{id}
WHERE ibjmri."RECORD" = #{id}
...
...
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 @
4facf5e0
...
@@ -136,6 +136,13 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -136,6 +136,13 @@ public class JgUseRegistrationController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"从一码通的表中查询详情"
,
notes
=
"从一码通的表中查询详情"
)
@GetMapping
(
value
=
"/getDetailByIdx"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetailByIdx
(
@RequestParam
(
value
=
"record"
)
String
record
)
{
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getDetailByIdx
(
record
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/getMessage"
)
@GetMapping
(
value
=
"/getMessage"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getMessage
()
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getMessage
()
{
...
...
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/ChangeUnitEquipUsedCheckImpl.java
0 → 100644
View file @
4facf5e0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationUnitMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.redisson.api.RBucket
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.stereotype.Component
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* @author Administrator
*/
@Component
@Slf4j
public
class
ChangeUnitEquipUsedCheckImpl
extends
BaseEquipUsedCheckService
{
private
RedissonClient
redissonClient
;
private
String
bizType
=
"unitChange"
;
private
JgChangeRegistrationUnitMapper
changeRegistrationUnitMapper
;
public
ChangeUnitEquipUsedCheckImpl
(
RedissonClient
redissonClient
,
JgChangeRegistrationUnitMapper
changeRegistrationUnitMapper
)
{
this
.
redissonClient
=
redissonClient
;
this
.
changeRegistrationUnitMapper
=
changeRegistrationUnitMapper
;
}
@Override
public
RedissonClient
getRedisClient
()
{
return
redissonClient
;
}
@Override
public
String
getApplyBizType
()
{
return
bizType
;
}
@Override
public
void
init
()
{
// 初始化已经完成或者在流程中安装告知的设备数据
List
<
CompanyEquipCountDto
>
companyEquipCountDtos
=
changeRegistrationUnitMapper
.
queryForFlowingEquipList
();
companyEquipCountDtos
.
forEach
(
c
->
{
RBucket
<
Set
<
String
>>
rBucket
=
redissonClient
.
getBucket
(
getFlowingEquipRedisKey
(
c
.
getCompanyCode
(),
bizType
));
rBucket
.
set
(
Arrays
.
stream
(
c
.
getRecords
().
split
(
","
)).
collect
(
Collectors
.
toSet
()));
});
}
}
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/JgChangeRegistrationUnitServiceImpl.java
View file @
4facf5e0
...
@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
...
@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationUnitService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationUnitService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
...
@@ -520,6 +521,13 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -520,6 +521,13 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
}
}
}
}
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
CompanyBo
company
)
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
// 流程中或已完成
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
"useRegister"
).
equipRepeatUsedCheck
(
map
.
get
(
"equipId"
).
toString
(),
company
.
getCompanyCode
());
}
}
@Override
@Override
// @Transactional(rollbackFor = Exception.class)
// @Transactional(rollbackFor = Exception.class)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -545,15 +553,21 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -545,15 +553,21 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
registrationNoList
.
add
(
objectMap
.
get
(
"useRegistrationCode"
).
toString
());
registrationNoList
.
add
(
objectMap
.
get
(
"useRegistrationCode"
).
toString
());
}
}
}
}
// 获取单位变更设备列表
if
(
CollectionUtils
.
isEmpty
(
registrationIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
registrationIdList
))
{
throw
new
BadRequest
(
"使用登记证不能为空"
);
throw
new
BadRequest
(
"使用登记证不能为空"
);
}
}
List
<
JSONObject
>
deviceList
=
registrationManageService
.
queryEquByCertificateSeqList
(
registrationIdList
);
List
<
JSONObject
>
deviceList
=
registrationManageService
.
queryEquByCertificateSeqList
(
registrationIdList
);
// 获取单位变更设备列表
// 获取单位变更设备列表
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
throw
new
BadRequest
(
"使用登记证下无设备"
);
throw
new
BadRequest
(
"使用登记证下无设备"
);
}
}
for
(
JSONObject
jsonObject
:
deviceList
)
{
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
.
equipRepeatUsedCheck
(
String
.
valueOf
(
jsonObject
.
get
(
"SEQUENCE_NBR"
)),
reginParams
.
getCompany
().
getCompanyCode
());
}
// 获取单位变更单号
// 获取单位变更单号
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
DWBG
.
getCode
(),
1
);
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
DWBG
.
getCode
(),
1
);
List
<
String
>
applyNoList
=
listResponseModel
.
getResult
();
List
<
String
>
applyNoList
=
listResponseModel
.
getResult
();
...
...
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 @
4facf5e0
...
@@ -1645,6 +1645,70 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1645,6 +1645,70 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
detail
;
return
detail
;
}
}
public
Map
<
String
,
Object
>
getDetailByIdx
(
String
record
)
{
// 基本信息 + 制造信息
Map
<
String
,
Object
>
detail
=
this
.
baseMapper
.
getDetail
(
record
);
if
(!
ObjectUtils
.
isEmpty
(
detail
)
&&
!
StringUtils
.
isEmpty
(
detail
.
get
(
"organizationCode"
))
&&
!
StringUtils
.
isEmpty
(
detail
.
get
(
"organizationName"
)))
{
String
receiveOrgCode
=
(
String
)
detail
.
get
(
"organizationCode"
);
String
receiveOrgName
=
(
String
)
detail
.
get
(
"organizationName"
);
detail
.
put
(
"receiveOrgCode"
,
receiveOrgCode
+
"_"
+
receiveOrgName
);
}
// 监督管理信息
Map
<
String
,
Object
>
supervisionInfo
=
this
.
baseMapper
.
getSupervisionInfoDetail
(
record
);
// 检验信息
Map
<
String
,
Object
>
inspectDetail
=
this
.
baseMapper
.
getInspectDetailByRecord
(
record
);
// 使用信息
Map
<
String
,
Object
>
useDetail
=
this
.
baseMapper
.
getUseDetail
(
record
);
// 设计信息
Map
<
String
,
Object
>
desDetail
=
this
.
baseMapper
.
getDesDetail
(
record
);
// 安装信息
Map
<
String
,
Object
>
installDetail
=
this
.
baseMapper
.
getiInstallDetailByIdx
(
record
);
if
(!
ObjectUtils
.
isEmpty
(
installDetail
)
&&
!
StringUtils
.
isEmpty
(
installDetail
.
get
(
"uscUnitCreditCode"
))
&&
!
StringUtils
.
isEmpty
(
installDetail
.
get
(
"uscUnitName"
)))
{
String
uscUnitCreditCode
=
(
String
)
installDetail
.
get
(
"uscUnitCreditCode"
);
String
uscUnitName
=
(
String
)
installDetail
.
get
(
"uscUnitName"
);
installDetail
.
put
(
"uscUnitCodeAndName"
,
uscUnitCreditCode
+
"_"
+
uscUnitName
);
}
// 维保信息
Map
<
String
,
Object
>
maintenanceDetail
=
this
.
baseMapper
.
getMaintenanceDetailByIdx
(
record
);
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
)
&&
!
StringUtils
.
isEmpty
(
maintenanceDetail
.
get
(
"meUnitCreditCode"
))
&&
!
StringUtils
.
isEmpty
(
maintenanceDetail
.
get
(
"meUnitName"
)))
{
String
meUnitCreditCode
=
(
String
)
maintenanceDetail
.
get
(
"meUnitCreditCode"
);
String
meUnitName
=
(
String
)
maintenanceDetail
.
get
(
"meUnitName"
);
maintenanceDetail
.
put
(
"meUnitName"
,
meUnitCreditCode
+
"_"
+
meUnitName
);
}
if
(!
ObjectUtils
.
isEmpty
(
inspectDetail
))
{
detail
.
putAll
(
inspectDetail
);
}
if
(!
ObjectUtils
.
isEmpty
(
useDetail
))
{
detail
.
putAll
(
useDetail
);
}
if
(!
ObjectUtils
.
isEmpty
(
desDetail
))
{
detail
.
putAll
(
desDetail
);
}
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
))
{
detail
.
putAll
(
maintenanceDetail
);
}
if
(!
ObjectUtils
.
isEmpty
(
installDetail
))
{
detail
.
putAll
(
installDetail
);
}
if
(!
ObjectUtils
.
isEmpty
(
supervisionInfo
)
&&
!
StringUtils
.
isEmpty
(
supervisionInfo
.
get
(
"orgBranchCode"
)))
{
String
orgBranchCode
=
(
String
)
supervisionInfo
.
get
(
"orgBranchCode"
);
String
orgBranchName
=
(
String
)
supervisionInfo
.
get
(
"orgBranchName"
);
supervisionInfo
.
put
(
"orgBranchCode"
,
orgBranchCode
+
"_"
+
orgBranchName
);
supervisionInfo
.
put
(
"hasOrgBranchCode"
,
true
);
detail
.
putAll
(
supervisionInfo
);
}
// 附件解析
commonServiceImpl
.
convertStringToJsonobject
(
detail
,
jsonFields
);
detail
.
put
(
"province"
,
"610000"
);
return
detail
;
}
private
String
setDefaultRecord
(
JgUseRegistration
jgUseRegistration
,
String
record
)
{
private
String
setDefaultRecord
(
JgUseRegistration
jgUseRegistration
,
String
record
)
{
if
(
StringUtils
.
isEmpty
(
record
))
{
if
(
StringUtils
.
isEmpty
(
record
))
{
JgUseRegistrationEq
jgUseRegistrationEq
=
jgUseRegistrationEqService
.
getOne
(
new
LambdaQueryWrapper
<
JgUseRegistrationEq
>().
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
jgUseRegistration
.
getSequenceNbr
()));
JgUseRegistrationEq
jgUseRegistrationEq
=
jgUseRegistrationEqService
.
getOne
(
new
LambdaQueryWrapper
<
JgUseRegistrationEq
>().
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
jgUseRegistration
.
getSequenceNbr
()));
...
@@ -2582,7 +2646,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2582,7 +2646,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setAuditPassDate
(
new
Date
());
jgUseRegistration
.
setAuditPassDate
(
new
Date
());
jgUseRegistration
.
setAuditStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jgUseRegistration
.
setAuditStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jgUseRegistration
.
setStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jgUseRegistration
.
setStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jgUseRegistration
.
setUseRegistrationCode
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"use
RegistrationCode"
))
?
""
:
String
.
valueOf
(
map
.
get
(
"useRegistration
Code"
)));
jgUseRegistration
.
setUseRegistrationCode
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"use
OrgCode"
))
?
""
:
String
.
valueOf
(
map
.
get
(
"useOrg
Code"
)));
jgUseRegistration
.
setRegType
(
"1"
);
//历史登记
jgUseRegistration
.
setRegType
(
"1"
);
//历史登记
this
.
save
(
jgUseRegistration
);
this
.
save
(
jgUseRegistration
);
jgRelationEquip
.
setEquipTransferId
(
jgUseRegistration
.
getSequenceNbr
().
toString
());
jgRelationEquip
.
setEquipTransferId
(
jgUseRegistration
.
getSequenceNbr
().
toString
());
...
@@ -2682,12 +2746,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2682,12 +2746,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(!
ValidationUtil
.
isEmpty
(
info
.
getSequenceNbr
()))
{
if
(!
ValidationUtil
.
isEmpty
(
info
.
getSequenceNbr
()))
{
info
.
setMeUnitName
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"meUnitName"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"meUnitName"
)).
split
(
"_"
)[
1
]);
info
.
setMeUnitName
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"meUnitName"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"meUnitName"
)).
split
(
"_"
)[
1
]);
info
.
setMeUnitCreditCode
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"meUnitName"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"meUnitName"
)).
split
(
"_"
)[
0
]);
info
.
setMeUnitCreditCode
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"meUnitName"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"meUnitName"
)).
split
(
"_"
)[
0
]);
info
.
setMeMaster
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
eMaster"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"meMaster
"
)));
info
.
setMeMaster
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
aintenanceManagerOneName"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"maintenanceManagerOneName
"
)));
info
.
setMeMasterPhone
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
eMasterPhone"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"meMaster
Phone"
)));
info
.
setMeMasterPhone
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
aintenanceManagerOnePhone"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"maintenanceManagerOne
Phone"
)));
info
.
setMeMasterId
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
eMasterId"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"meMasterId
"
)));
info
.
setMeMasterId
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
aintenanceManagerOneID"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"maintenanceManagerOneID
"
)));
info
.
setMeMaster1
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
eMaster1"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"meMaster1
"
)));
info
.
setMeMaster1
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
aintenanceManagerTwoName"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"maintenanceManagerTwoName
"
)));
info
.
setMeMaster1Phone
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
eMaster1Phone"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"meMaster1
Phone"
)));
info
.
setMeMaster1Phone
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
aintenanceManagerTwoPhone"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"maintenanceManagerTwo
Phone"
)));
info
.
setMeMaster1Id
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
eMaster1Id"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"meMaster1Id
"
)));
info
.
setMeMaster1Id
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"m
aintenanceManagerTwoID"
))
?
null
:
String
.
valueOf
(
map
.
get
(
"maintenanceManagerTwoID
"
)));
try
{
try
{
info
.
setInformStart
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"informStart"
))
?
null
:
format
.
parse
(
String
.
valueOf
(
map
.
get
(
"informStart"
))));
info
.
setInformStart
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"informStart"
))
?
null
:
format
.
parse
(
String
.
valueOf
(
map
.
get
(
"informStart"
))));
info
.
setInformEnd
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"informEnd"
))
?
null
:
format
.
parse
(
String
.
valueOf
(
map
.
get
(
"informEnd"
))));
info
.
setInformEnd
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"informEnd"
))
?
null
:
format
.
parse
(
String
.
valueOf
(
map
.
get
(
"informEnd"
))));
...
@@ -2695,7 +2759,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2695,7 +2759,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
exception
.
printStackTrace
();
exception
.
printStackTrace
();
log
.
info
(
"date转化失败"
);
log
.
info
(
"date转化失败"
);
}
}
info
.
setRepairInform
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"
repairInform"
))
?
null
:
JSONObject
.
toJSONString
(
map
.
get
(
"repairInform
"
)));
info
.
setRepairInform
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"
maintenanceContract"
))
?
null
:
JSONObject
.
toJSONString
(
map
.
get
(
"maintenanceContract
"
)));
idxBizJgMaintenanceRecordInfoService
.
getBaseMapper
().
updateById
(
info
);
idxBizJgMaintenanceRecordInfoService
.
getBaseMapper
().
updateById
(
info
);
}
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/controller/EquipmentCategoryController.java
View file @
4facf5e0
...
@@ -175,14 +175,17 @@ public class EquipmentCategoryController extends BaseController {
...
@@ -175,14 +175,17 @@ public class EquipmentCategoryController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备类别下是否有设备品种"
,
notes
=
"设备类别下是否有设备品种"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备类别下是否有设备品种"
,
notes
=
"设备类别下是否有设备品种"
)
@GetMapping
(
value
=
"/haveTree"
)
@GetMapping
(
value
=
"/haveTree"
)
public
ResponseModel
<
String
>
haveTree
(
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
{
public
ResponseModel
<
Object
>
haveTree
(
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"count"
,
"0"
);
if
(
ObjectUtils
.
isEmpty
(
code
))
{
if
(
ObjectUtils
.
isEmpty
(
code
))
{
return
ResponseHelper
.
buildResponse
(
"0"
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
}
QueryWrapper
<
EquipmentCategory
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
EquipmentCategory
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
likeRight
(
"code"
,
code
.
replaceAll
(
"0+$"
,
""
));
queryWrapper
.
likeRight
(
"code"
,
code
.
replaceAll
(
"0+$"
,
""
));
int
count
=
equipmentCategoryServiceImpl
.
count
(
queryWrapper
);
int
count
=
equipmentCategoryServiceImpl
.
count
(
queryWrapper
);
return
ResponseHelper
.
buildResponse
(
count
+
""
);
jsonObject
.
put
(
"count"
,
(
count
-
1
)
+
""
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
}
/**
/**
...
...
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