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
ea54fc9e
Commit
ea54fc9e
authored
Aug 19, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://39.100.92.250:5000/moa/amos-boot-biz
into develop_tzs_register
parents
df685018
910769cb
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
237 additions
and
68 deletions
+237
-68
JYJCBusinessTypeEnum.java
...os/boot/module/common/api/enums/JYJCBusinessTypeEnum.java
+1
-0
JgCertificateChangeRecordEqMapper.java
...dule/jg/api/mapper/JgCertificateChangeRecordEqMapper.java
+2
-2
JgUseRegistrationEqMapper.java
.../boot/module/jg/api/mapper/JgUseRegistrationEqMapper.java
+2
-1
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+2
-2
DataHandlerController.java
.../boot/module/jg/biz/controller/DataHandlerController.java
+18
-0
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+1
-0
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+78
-2
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+1
-0
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+15
-17
JgUseRegistrationEqServiceImpl.java
...e/jg/biz/service/impl/JgUseRegistrationEqServiceImpl.java
+4
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+44
-26
ZLDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
+16
-9
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+31
-5
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+1
-1
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+21
-3
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/JYJCBusinessTypeEnum.java
View file @
ea54fc9e
...
...
@@ -6,6 +6,7 @@ import java.util.HashMap;
import
java.util.List
;
public
enum
JYJCBusinessTypeEnum
{
DQRBI
(
"DQRBI"
,
"基于风险RBI"
),
DQJY
(
"DQJY"
,
"定期检验"
),
SCJY
(
"SCJY"
,
"首次检验"
),
WTJY
(
"WTJY"
,
"委托检验"
),
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgCertificateChangeRecordEqMapper.java
View file @
ea54fc9e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.CustomBaseMapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateChangeRecordEq
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* Mapper 接口
...
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @date 2024-07-05
*/
public
interface
JgCertificateChangeRecordEqMapper
extends
BaseMapper
<
JgCertificateChangeRecordEq
>
{
public
interface
JgCertificateChangeRecordEqMapper
extends
Custom
BaseMapper
<
JgCertificateChangeRecordEq
>
{
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationEqMapper.java
View file @
ea54fc9e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.CustomBaseMapper
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationEqDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -13,7 +14,7 @@ import java.util.List;
* @author system_generator
* @date 2023-12-18
*/
public
interface
JgUseRegistrationEqMapper
extends
BaseMapper
<
JgUseRegistrationEq
>
{
public
interface
JgUseRegistrationEqMapper
extends
Custom
BaseMapper
<
JgUseRegistrationEq
>
{
@Update
(
"update tzs_jg_use_registration_eq set is_invalid = 1 where equ_id = #{equipId} and equip_transfer_id != #{currentDocumentId} "
)
void
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
@Param
(
"equipId"
)
String
equipId
,
@Param
(
"currentDocumentId"
)
String
currentDocumentId
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
ea54fc9e
...
...
@@ -411,7 +411,6 @@
project_contraption_id
FROM tzs_jg_use_registration
WHERE is_delete = 0
AND status
<![CDATA[<>]]>
'使用单位待提交'
<!-- 公共主表过滤条件 -->
<if
test=
"dto.status != null and dto.status != ''"
>
AND status = #{dto.status}
...
...
@@ -457,6 +456,7 @@
AND supervision_org_code LIKE CONCAT(#{dto.supervisionOrgCode}, '%')
</otherwise>
</choose>
AND status
<![CDATA[<>]]>
'使用单位待提交'
</if>
<if
test=
"dto.dataType == 'company' "
>
AND (use_unit_credit_code = #{dto.unitCode}
...
...
@@ -584,7 +584,6 @@
LEFT JOIN idx_biz_jg_register_info jri ON re.equ_id = jri."RECORD"
LEFT JOIN idx_biz_jg_other_info other ON re.equ_id = other."RECORD"
WHERE ur.is_delete = 0
AND ur.status
<![CDATA[<>]]>
'使用单位待提交'
<!-- 统一设备过滤条件 -->
<if
test=
"dto.equList != null and dto.equList != ''"
>
AND jri."EQU_LIST" = #{dto.equList}
...
...
@@ -653,6 +652,7 @@
AND ur.supervision_org_code LIKE CONCAT(#{dto.supervisionOrgCode}, '%')
</otherwise>
</choose>
AND ur.status
<![CDATA[<>]]>
'使用单位待提交'
</if>
<if
test=
"dto.dataType == 'company' "
>
AND (ur.use_unit_credit_code = #{dto.unitCode}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/DataHandlerController.java
View file @
ea54fc9e
...
...
@@ -14,6 +14,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
/**
* 用于业务变更过程中历史数据处理的控制层
...
...
@@ -319,4 +320,20 @@ public class DataHandlerController extends BaseController {
public
ResponseModel
<
Integer
>
modifySupervisionOrgBranchCode
(
@RequestParam
(
value
=
"isModify"
,
defaultValue
=
"false"
)
boolean
isModify
)
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
modifySupervisionOrgBranchCode
(
isModify
));
}
/**
* @apiNote 删除导入管道未纳管的数据
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"删除导入管道未纳管的数据"
,
notes
=
"删除导入管道未纳管的数据"
)
@PutMapping
(
value
=
"/equip/deleteImportedPipelineData"
)
public
ResponseModel
<
Integer
>
deleteImportedPipelineData
(
@RequestParam
(
value
=
"uscUnitCreditCode"
)
String
uscUnitCreditCode
,
@RequestParam
(
value
=
"projectContraption"
)
String
projectContraption
,
@RequestParam
(
value
=
"dataSource"
,
defaultValue
=
"jg_pl"
)
String
dataSource
,
@RequestParam
(
value
=
"isDelete"
,
defaultValue
=
"false"
)
boolean
isDelete
)
throws
IOException
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
deleteImportedPipelineData
(
uscUnitCreditCode
,
projectContraption
,
dataSource
,
isDelete
));
}
}
\ No newline at end of file
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/DataDockServiceImpl.java
View file @
ea54fc9e
...
...
@@ -2093,6 +2093,7 @@ public class DataDockServiceImpl {
factoryInfo
.
setRecord
(
record
);
factoryInfo
.
setRecDate
(
new
Date
());
factoryInfo
.
setSequenceNbr
(
null
);
factoryInfo
.
setFactoryIsComplete
(
"2"
);
factoryInfoList
.
add
(
factoryInfo
);
// 施工信息
...
...
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/DataHandlerServiceImpl.java
View file @
ea54fc9e
...
...
@@ -53,8 +53,14 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.lucene.queryparser.classic.QueryParser
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.client.RequestOptions
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -63,7 +69,7 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.util.StopWatch
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.io.IOException
;
import
java.lang.reflect.Method
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
...
...
@@ -76,7 +82,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgInstallationNoticeServiceImpl
.
CONSTRUCTION_TYPE
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgInstallationNoticeServiceImpl
.
CONSTRUCTION_TYPE_NAME
;
...
...
@@ -161,6 +166,8 @@ public class DataHandlerServiceImpl {
private
final
IdxBizJgOtherInfoMapper
otherInfoMapper
;
private
final
RestHighLevelClient
restHighLevelClient
;
/**
* 安装告知压力管道历史数据修复-详情中的设备列表修改为汇总表格式
...
...
@@ -2056,4 +2063,73 @@ public class DataHandlerServiceImpl {
log
.
info
(
"==========>record,{},orgBranchCode,{},orgBranchName,{}"
,
dto
.
getSEQUENCE_NBR
(),
dto
.
getORG_BRANCH_CODE
(),
dto
.
getORG_BRANCH_NAME
());
return
map
;
}
public
Integer
deleteImportedPipelineData
(
String
uscUnitCreditCode
,
String
projectContraption
,
String
dataSource
,
boolean
isDelete
)
throws
IOException
{
List
<
String
>
records
=
this
.
queryImportedPipelineRecords
(
uscUnitCreditCode
,
projectContraption
,
dataSource
);
if
(
records
.
isEmpty
())
{
return
0
;
}
if
(
isDelete
)
{
superviseInfoMapper
.
deleteDataAll
(
records
);
deleteFromEs
(
records
);
}
return
records
.
size
();
}
/**
* 查询需要删除的设备
*/
private
List
<
String
>
queryImportedPipelineRecords
(
String
uscUnitCreditCode
,
String
projectContraption
,
String
dataSource
)
throws
IOException
{
BoolQueryBuilder
boolQuery
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
termQuery
(
"DATA_SOURCE.keyword"
,
dataSource
))
.
must
(
QueryBuilders
.
termQuery
(
"IS_INTO_MANAGEMENT"
,
false
))
.
must
(
QueryBuilders
.
termQuery
(
"PROJECT_CONTRAPTION.keyword"
,
projectContraption
))
.
must
(
QueryBuilders
.
wildcardQuery
(
"USC_UNIT_CREDIT_CODE"
,
"*"
+
QueryParser
.
escape
(
uscUnitCreditCode
.
toLowerCase
())
+
"*"
))
.
must
(
QueryBuilders
.
termQuery
(
"STATUS"
,
"已认领"
));
SearchSourceBuilder
sourceBuilder
=
new
SearchSourceBuilder
()
.
query
(
boolQuery
)
.
fetchSource
(
new
String
[]{
"SEQUENCE_NBR"
},
null
)
.
size
(
10000
);
SearchRequest
request
=
new
SearchRequest
(
IDX_BIZ_VIEW_JG_ALL
).
source
(
sourceBuilder
);
SearchResponse
response
=
restHighLevelClient
.
search
(
request
,
RequestOptions
.
DEFAULT
);
return
Arrays
.
stream
(
response
.
getHits
().
getHits
())
.
map
(
hit
->
(
String
)
hit
.
getSourceAsMap
().
get
(
"SEQUENCE_NBR"
))
.
filter
(
Objects:
:
nonNull
)
.
collect
(
Collectors
.
toList
());
}
/**
* 删除ES中的数据(两个索引)
*/
private
void
deleteFromEs
(
List
<
String
>
records
)
{
List
<
ESEquipmentCategoryDto
>
esDtoList
=
buildEsCategoryDtos
(
records
);
List
<
ESEquipmentInfo
>
esNewDtoList
=
buildEsInfoDtos
(
records
);
if
(!
esDtoList
.
isEmpty
())
{
esEquipmentCategory
.
deleteAll
(
esDtoList
);
}
if
(!
esNewDtoList
.
isEmpty
())
{
esEquipmentDao
.
deleteAll
(
esNewDtoList
);
}
}
private
List
<
ESEquipmentCategoryDto
>
buildEsCategoryDtos
(
List
<
String
>
records
)
{
return
records
.
stream
().
map
(
v
->
{
ESEquipmentCategoryDto
dto
=
new
ESEquipmentCategoryDto
();
dto
.
setSEQUENCE_NBR
(
v
);
return
dto
;
}).
collect
(
Collectors
.
toList
());
}
private
List
<
ESEquipmentInfo
>
buildEsInfoDtos
(
List
<
String
>
records
)
{
return
records
.
stream
().
map
(
v
->
{
ESEquipmentInfo
dto
=
new
ESEquipmentInfo
();
dto
.
setSEQUENCE_NBR
(
v
);
return
dto
;
}).
collect
(
Collectors
.
toList
());
}
}
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/IdxBizJgRegisterInfoServiceImpl.java
View file @
ea54fc9e
...
...
@@ -4333,6 +4333,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.
map
(
d
->
DateUtil
.
parse
(
d
,
"yyyy-MM-dd"
))
.
ifPresent
(
factoryInfo:
:
setProduceDate
);
factoryInfo
.
setImported
(
Optional
.
ofNullable
(
data
.
getImported
()).
orElse
(
"0"
));
factoryInfo
.
setFactoryIsComplete
(
"2"
);
factoryInfoList
.
add
(
factoryInfo
);
// 注册登记
...
...
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 @
ea54fc9e
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
...
...
@@ -174,26 +175,23 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
else
{
// 完成的显示历史表的数据
JSONArray
objects
=
commonService
.
queryHistoryDataObj
(
dto
.
getSequenceNbr
());
// 兼容老数据
if
(
objects
.
isEmpty
())
{
List
<
Map
<
String
,
Object
>>
list
=
maintenanceContractMapper
.
selectEquipList
(
sequenceNbr
);
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
vo
.
setEquipmentLists
(
list
);
}
List
<
Map
<
String
,
Object
>>
equipmentList
;
if
(
objects
==
null
||
objects
.
isEmpty
())
{
equipmentList
=
Optional
.
ofNullable
(
maintenanceContractMapper
.
selectEquipList
(
sequenceNbr
))
.
orElse
(
Collections
.
emptyList
());
}
else
{
//如果EQU_DEFINE是数字进行转换
for
(
int
i
=
0
;
i
<
objects
.
size
();
i
++)
{
JSONObject
currentObject
=
objects
.
getJSONObject
(
i
);
String
equDefineCode
=
currentObject
.
getString
(
"EQU_DEFINE"
);
if
(
equDefineCode
.
chars
().
anyMatch
(
Character:
:
isDigit
))
{
currentObject
.
put
(
"EQU_DEFINE"
,
maintenanceContractMapper
.
getNameByEquDefine
(
equDefineCode
));
// 遍历 JSONArray,如果 EQU_DEFINE 包含数字,则进行转换
objects
.
forEach
(
obj
->
{
JSONObject
json
=
(
JSONObject
)
obj
;
String
equDefineCode
=
json
.
getString
(
"EQU_DEFINE"
);
if
(
equDefineCode
!=
null
&&
equDefineCode
.
chars
().
anyMatch
(
Character:
:
isDigit
))
{
String
name
=
maintenanceContractMapper
.
getNameByEquDefine
(
equDefineCode
);
json
.
put
(
"EQU_DEFINE"
,
name
);
}
});
equipmentList
=
JSONObject
.
parseObject
(
objects
.
toJSONString
(),
new
TypeReference
<
List
<
Map
<
String
,
Object
>>>()
{});
}
List
equList
=
objects
.
toJavaList
(
Map
.
class
);
vo
.
setEquipmentLists
(
equList
);
}
vo
.
setEquipmentLists
(
equipmentList
);
}
// 对象转换 填充登录人单位类型 权限
JSONObject
re
=
BeanUtil
.
copyProperties
(
vo
,
JSONObject
.
class
);
...
...
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/JgUseRegistrationEqServiceImpl.java
View file @
ea54fc9e
...
...
@@ -44,4 +44,7 @@ public class JgUseRegistrationEqServiceImpl extends BaseService<JgUseRegistratio
return
list
(
queryWrapper
);
}
public
int
saveBatch
(
List
<
JgUseRegistrationEq
>
registrationEqList
)
{
return
this
.
baseMapper
.
insertBatchSomeColumn
(
registrationEqList
,
1000
);
}
}
\ No newline at end of file
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 @
ea54fc9e
...
...
@@ -37,10 +37,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.JYJCResultEnum;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationManageMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
...
...
@@ -129,7 +126,6 @@ import java.util.stream.IntStream;
import
java.util.stream.Stream
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
import
static
java
.
util
.
stream
.
Collectors
.
toList
;
import
static
java
.
util
.
stream
.
Collectors
.
toSet
;
...
...
@@ -148,6 +144,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
static
final
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);;
private
static
final
int
BATCH_SIZE
=
1000
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
);
private
final
List
<
String
>
NOT_FLOWING_STATE_FINISH
=
new
ArrayList
<
String
>(
NOT_FLOWING_STATE
)
{{
add
(
"已完成"
);
...
...
@@ -242,6 +239,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
@Autowired
private
JgCertificateChangeRecordEqServiceImpl
certificateChangeRecordEqService
;
@Autowired
private
JgCertificateChangeRecordEqMapper
jgCertificateChangeRecordEqMapper
;
@Autowired
private
JgUseRegistrationManageServiceImpl
jgUseRegistrationManageService
;
@Autowired
private
IdxBizJgConstructionInfoServiceImpl
idxBizJgConstructionInfoService
;
...
...
@@ -1270,15 +1269,29 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
List
<
String
>
records
=
new
ArrayList
<>();
List
<
JgResumeInfoDto
>
resumeList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
equipmentLists
))
{
// 装置更新管道的技术参数、设计信息、安装信息
if
(
jgProjectContraption
!=
null
)
{
updatePieLineTechAndInspection
(
equipmentLists
);
jgResumeInfoService
.
createWithModel
(
JgResumeInfoDto
.
builder
()
resumeList
.
add
(
JgResumeInfoDto
.
builder
()
.
applyNo
(
jgUseRegistration
.
getApplyNo
())
.
businessType
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
())
.
businessId
(
String
.
valueOf
(
jgUseRegistration
.
getSequenceNbr
()))
.
equId
(
String
.
valueOf
(
jgProjectContraption
.
getSequenceNbr
()))
.
approvalUnit
(
jgUseRegistration
.
getReceiveOrgName
())
.
approvalUnitCode
(
jgUseRegistration
.
getReceiveCompanyCode
())
.
changeContent
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
()
+
"业务办理"
)
.
status
(
"正常"
)
.
routePath
(
taskV2Model
.
getRoutePath
())
.
build
());
}
else
{
for
(
Map
<
String
,
Object
>
equipmentMap
:
equipmentLists
)
{
resumeList
.
add
(
JgResumeInfoDto
.
builder
()
.
applyNo
(
jgUseRegistration
.
getApplyNo
())
.
businessType
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
())
.
businessId
(
jgUseRegistration
.
getSequenceNbr
()
+
""
)
.
equId
(
jgProjectContraption
.
getSequenceNbr
()
+
""
)
.
equId
(
Objects
.
toString
(
equipmentMap
.
get
(
"equipId"
),
""
)
)
.
approvalUnit
(
jgUseRegistration
.
getReceiveOrgName
())
.
approvalUnitCode
(
jgUseRegistration
.
getReceiveCompanyCode
())
.
changeContent
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
()
+
"业务办理"
)
...
...
@@ -1286,6 +1299,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
.
routePath
(
taskV2Model
.
getRoutePath
())
.
build
());
}
}
// 批量收集的结果
HashMap
<
String
,
Map
<
String
,
Object
>>
allEsData
=
new
HashMap
<>();
List
<
JgCertificateChangeRecordEq
>
jgCertificateChangeRecordEqBatchList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
equipmentLists
.
size
();
i
++)
{
Map
<
String
,
Object
>
equipment
=
equipmentLists
.
get
(
i
);
// 设备ID
...
...
@@ -1310,8 +1327,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// equipment.put("inspectOrgName", mapData.getOrDefault("inspectOrgName", ""));
// equipment.put("inspectConclusion", inspectConclusionName);
// 更新设备信息 && 生成使用登记证编号 && 同步es
this
.
processMapData
(
sequenceNbr
,
mapData
,
jgUseRegistration
,
jgRegistrationHistory
,
registerInfo
,
otherInfo
,
taskV2Model
,
HashMap
<
String
,
Map
<
String
,
Object
>>
esDataMap
=
this
.
processMapData
(
sequenceNbr
,
mapData
,
jgUseRegistration
,
jgRegistrationHistory
,
registerInfo
,
otherInfo
,
taskV2Model
,
jsonObject
,
flag
.
get
(),
useRegistrationCode
,
equipment
,
isMerge
);
allEsData
.
putAll
(
esDataMap
);
// 查询设备制造信息
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>
factoryInfoWrapper
=
new
LambdaQueryWrapper
<>();
factoryInfoWrapper
.
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
equId
);
...
...
@@ -1322,7 +1340,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
changeRecordEq
.
setChangeRecordId
(
String
.
valueOf
(
changeRecordId
));
//登记证记录主键
changeRecordEq
.
setEquId
(
registerInfo
.
getRecord
());
//设备主键
changeRecordEq
.
setProductCode
(
idxBizJgFactoryInfo
.
getFactoryNum
());
//产品编号
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
jgCertificateChangeRecordEqBatchList
.
add
(
changeRecordEq
);
}
// 循环结束后,统一批量更新ES
if
(!
allEsData
.
isEmpty
())
{
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
allEsData
);
}
if
(!
jgCertificateChangeRecordEqBatchList
.
isEmpty
()){
jgCertificateChangeRecordEqMapper
.
insertBatchSomeColumn
(
jgCertificateChangeRecordEqBatchList
,
BATCH_SIZE
);
}
if
(!
resumeList
.
isEmpty
())
{
jgResumeInfoService
.
saveBatchResume
(
resumeList
);
}
}
// 更新工程装置信息
...
...
@@ -1762,9 +1790,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 更新代办
TaskV2Model
taskV2Model
=
updateAgency
(
jgUseRegistration
);
processMapData
(
sequenceNbr
,
mapData
,
jgUseRegistration
,
jgRegistrationHistory
,
registerInfo
,
otherInfo
,
taskV2Model
,
HashMap
<
String
,
Map
<
String
,
Object
>>
esDataMap
=
processMapData
(
sequenceNbr
,
mapData
,
jgUseRegistration
,
jgRegistrationHistory
,
registerInfo
,
otherInfo
,
taskV2Model
,
jsonObject
,
Boolean
.
FALSE
,
null
,
mapData
,
Boolean
.
FALSE
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
esDataMap
);
Optional
.
ofNullable
(
registerInfo
).
ifPresent
(
info
->
{
// 生成证书管理表记录
generateRegistrationManage
(
jgUseRegistration
,
registerInfo
,
Boolean
.
FALSE
,
null
);
...
...
@@ -1789,7 +1817,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
jgUseRegistration
;
}
private
void
processMapData
(
Long
sequenceNbr
,
JSONObject
mapData
,
JgUseRegistration
jgUseRegistration
,
private
HashMap
<
String
,
Map
<
String
,
Object
>>
processMapData
(
Long
sequenceNbr
,
JSONObject
mapData
,
JgUseRegistration
jgUseRegistration
,
JgRegistrationHistory
jgRegistrationHistory
,
IdxBizJgRegisterInfo
registerInfo
,
IdxBizJgOtherInfo
otherInfo
,
TaskV2Model
taskV2Model
,
JSONObject
jsonObject
,
Boolean
flag
,
String
useRegistrationCode
,
Map
<
String
,
Object
>
equipment
,
boolean
isMerge
)
{
...
...
@@ -1837,17 +1865,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
this
.
justGenerateEquCode
(
lambda
,
registerInfo
,
jgUseRegistration
.
getReceiveCompanyCode
(),
mapData
,
jgRegistrationHistory
);
idxBizJgRegisterInfoService
.
update
(
lambda
);
}
jgResumeInfoService
.
createWithModel
(
JgResumeInfoDto
.
builder
()
.
applyNo
(
jgUseRegistration
.
getApplyNo
())
.
businessType
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
())
.
businessId
(
jgUseRegistration
.
getSequenceNbr
()
+
""
)
.
equId
((
String
)
mapData
.
get
(
"equipId"
))
.
approvalUnit
(
jgUseRegistration
.
getReceiveOrgName
())
.
approvalUnitCode
(
jgUseRegistration
.
getReceiveCompanyCode
())
.
changeContent
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
()
+
"业务办理"
)
.
status
(
"正常"
)
.
routePath
(
taskV2Model
.
getRoutePath
())
.
build
());
}
// 使用信息
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgUseInfo
>().
lambda
();
...
...
@@ -1860,7 +1877,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useInfo
.
setUSC_UNIT_NAME
(
""
);
useInfoMapper
.
updateById
(
useInfo
);
// 更新es
updateEsData
(
usePlace
,
mapData
,
otherInfo
,
useInfo
,
jgUseRegistration
,
jsonObject
);
return
updateEsData
(
usePlace
,
mapData
,
otherInfo
,
useInfo
,
jgUseRegistration
,
jsonObject
);
}
/**
...
...
@@ -1949,7 +1966,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
codeUtil
.
generateEquipmentCode
(
codeGenerateDto
);
}
public
void
updateEsData
(
String
usePlace
,
JSONObject
dataMap
,
IdxBizJgOtherInfo
otherInfo
,
IdxBizJgUseInfo
useInfo
,
public
HashMap
<
String
,
Map
<
String
,
Object
>>
updateEsData
(
String
usePlace
,
JSONObject
dataMap
,
IdxBizJgOtherInfo
otherInfo
,
IdxBizJgUseInfo
useInfo
,
JgUseRegistration
jgUseRegistration
,
JSONObject
jsonObject
)
{
// 更新es
HashMap
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
...
...
@@ -1983,7 +2000,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
param
.
put
(
"CAR_NUMBER"
,
dataMap
.
get
(
"carNumber"
));
}
objMap
.
put
((
String
)
dataMap
.
get
(
"equipId"
),
param
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
// tzsServiceFeignClient.commonUpdateEsDataByIds(objMap);
return
objMap
;
}
public
void
updateEsData2
(
String
usePlace
,
JSONObject
dataMap
,
IdxBizJgOtherInfo
otherInfo
,
IdxBizJgUseInfo
useInfo
,
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
View file @
ea54fc9e
...
...
@@ -20,6 +20,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.CylinderTypeEnum;
import
com.yeejoin.amos.boot.module.common.api.enums.UnitTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.UserPostEnum
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.QueryBuilderUtils
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.InformationManageTypeEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.AlertStatisticsMapper
;
...
...
@@ -755,11 +756,15 @@ public class ZLDPStatisticsServiceImpl {
.
filter
(
region
->
!
"西咸新区"
.
equals
(
region
.
getRegionName
()))
.
map
(
region
->
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
region
.
getRegionCode
().
toString
());
Long
equipIsManageNum
=
staticsCenterMapCountDataForEquipIsManage
(
orgCode
,
paramDto
);
Long
equipTotal
=
getEquipTotalForCode
(
paramDto
.
getTreeValue
(),
region
.
getRegionCode
().
toString
());
BoolQueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
();
queryBuilder
.
must
(
QueryBuilders
.
existsQuery
(
"SUPERVISORY_CODE"
));
queryBuilder
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
"null"
));
Long
equipIsManageNum
=
staticsCenterMapCountDataForEquipIsManage
(
queryBuilder
,
orgCode
,
paramDto
);
Long
equipTotal
=
staticsCenterMapCountDataForEquipIsManage
(
null
,
orgCode
,
paramDto
);
CountDto
dto
=
new
CountDto
();
dto
.
setLongValue
(
equipTotal
);
dto
.
setStrValue
(
calculateClaimRate
(
equipTotal
,
equipIsManageNum
,
decimalFormat
));
dto
.
setKeyStr
(
orgCode
);
return
dto
;
}).
collect
(
Collectors
.
toList
());
}
...
...
@@ -812,17 +817,19 @@ public class ZLDPStatisticsServiceImpl {
return
decimalFormat
.
format
(
claimRate
);
}
private
Long
staticsCenterMapCountDataForEquipIsManage
(
String
orgCode
,
DPFilterParamForDetailDto
paramDto
)
{
private
Long
staticsCenterMapCountDataForEquipIsManage
(
BoolQueryBuilder
queryBuilder
,
String
orgCode
,
DPFilterParamForDetailDto
paramDto
)
{
long
num
=
0
;
CountRequest
request
=
new
CountRequest
();
request
.
indices
(
"idx_biz_
view_jg_all
"
);
request
.
indices
(
"idx_biz_
equipment_info
"
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
if
(!
ObjectUtils
.
isEmpty
(
queryBuilder
))
{
boolMust
=
QueryBuilderUtils
.
copyBoolQuery
(
queryBuilder
);
}
// 按照管辖机构区域信息模糊查询
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
orgCode
)
+
"*"
));
boolMust
.
must
(
QueryBuilders
.
existsQuery
(
"SUPERVISORY_CODE"
));
boolMust
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
"null"
));
String
[]
status
=
{
"草稿"
,
"已拒领"
,
"待认领"
};
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"STATUS"
,
Arrays
.
asList
(
status
)));
boolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"ORG_BRANCH_CODE"
,
orgCode
));
String
[]
status
=
{
"草稿"
,
"已拒领"
,
"待认领"
};
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"STATUS"
,
Arrays
.
asList
(
status
)));
String
[]
equCategoryCode
=
{
"2300"
};
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"EQU_CATEGORY_CODE"
,
Arrays
.
asList
(
equCategoryCode
)));
String
[]
equListCode
=
{
"8000"
};
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
ea54fc9e
...
...
@@ -270,10 +270,36 @@
update tz_base_enterprise_info
set org_code = replace(org_code, #{oldOrgCode}, #{newOrgCode})
where org_code like concat(#{oldOrgCode}, '%');
--三项制度因为会定时生成统计数据(刚好在层级调整后生成了统计数据,此时再单位层级树再调整会原有,根据该表的唯一约束会提示更新冲突),所以需要特殊处理(如果目标数据存在则不更新,并删除旧的统计数据)
WITH update_data AS (
SELECT
ctid,
REPLACE(supervisory_unit_org_code, #{oldOrgCode}, #{newOrgCode}) AS new_code,
plan_type,
check_date
FROM tzs_three_systems
WHERE supervisory_unit_org_code LIKE concat(#{oldOrgCode}, '%')
),
conflicts AS (
SELECT u.ctid
FROM update_data u
JOIN tzs_three_systems t ON
t.supervisory_unit_org_code = u.new_code
AND t.plan_type = u.plan_type
AND t.check_date = u.check_date
),
updated AS (
UPDATE tzs_three_systems t
SET supervisory_unit_org_code = REPLACE(t.supervisory_unit_org_code, #{oldOrgCode}, #{newOrgCode})
FROM update_data u
WHERE t.ctid = u.ctid
AND t.ctid NOT IN (SELECT ctid FROM conflicts)
RETURNING t.ctid
)
DELETE FROM tzs_three_systems
WHERE supervisory_unit_org_code LIKE concat(#{oldOrgCode}, '%')
AND ctid NOT IN (SELECT ctid FROM updated);
update tzs_three_systems
set supervisory_unit_org_code = replace(supervisory_unit_org_code, #{oldOrgCode}, #{newOrgCode})
where supervisory_unit_org_code like concat(#{oldOrgCode}, '%');
update tzs_two_staffing
set supervisory_unit_orgcode = replace(supervisory_unit_orgcode, #{oldOrgCode}, #{newOrgCode})
where supervisory_unit_orgcode like concat(#{oldOrgCode}, '%');
...
...
@@ -345,8 +371,8 @@
where supervision_org_code like concat(#{oldOrgCode}, '%');
update tzs_safety_problem_tracing
set governing_body_
code = replace(governing_body
_code, #{oldOrgCode}, #{newOrgCode})
where governing_body_code like concat(#{oldOrgCode}, '%');
set governing_body_
org_code = replace(governing_body_org
_code, #{oldOrgCode}, #{newOrgCode})
where governing_body_
org_
code like concat(#{oldOrgCode}, '%');
update tz_alert_called
set biz_org_code = replace(biz_org_code, #{oldOrgCode}, #{newOrgCode})
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
ea54fc9e
...
...
@@ -1215,7 +1215,7 @@ public class TzBaseEnterpriseInfoServiceImpl
return
userInfoService
.
personalInfoUpdateById
((
Map
<
String
,
Object
>)
map
.
get
(
"raw"
));
}
private
void
updateCompanyInfo
(
TzBaseEnterpriseInfo
tzBaseEnterpriseInfo
,
CompanyModel
updateModel
)
{
public
void
updateCompanyInfo
(
TzBaseEnterpriseInfo
tzBaseEnterpriseInfo
,
CompanyModel
updateModel
)
{
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
update
(
updateModel
,
updateModel
.
getSequenceNbr
());
if
(
companyResult
==
null
||
companyResult
.
getStatus
()
!=
200
)
{
log
.
error
(
"更新单位错误: {}"
,
companyResult
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
ea54fc9e
...
...
@@ -2439,7 +2439,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if
(!
ValidationUtil
.
isEmpty
(
baseEnterpriseInfoDto
))
{
individuality
=
individualityMapper
.
getIndividualityInfo
(
baseEnterpriseInfoDto
.
getSequenceNbr
());
individuality
.
setPhone
(
baseEnterpriseInfoDto
.
getContactPhone
());
individuality
.
setGoverningBody
(
baseEnterpriseInfoDto
.
get
GoverningBody
());
individuality
.
setGoverningBody
(
baseEnterpriseInfoDto
.
get
SuperviseOrgCode
()
+
"_"
+
baseEnterpriseInfoDto
.
getSuperviseOrgName
());
individuality
.
setAddress
(
baseEnterpriseInfoDto
.
getAddress
());
}
return
individuality
;
...
...
@@ -2450,9 +2450,15 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
public
TzIndividualityDto
personalInfoUpdateById
(
Map
<
String
,
Object
>
map
)
{
TzsBaseIndividuality
individuality
=
individualityMapper
.
selectById
(
Long
.
valueOf
(
map
.
get
(
"sequenceNbr"
).
toString
()));
TzBaseEnterpriseInfo
baseEnterpriseInfo
=
baseEnterpriseInfoService
.
getBaseMapper
().
selectById
(
individuality
.
getEnterpriseId
());
String
governingBody
=
ObjectUtils
.
isEmpty
(
map
.
get
(
"governingBody"
))
?
null
:
(
String
)
map
.
get
(
"governingBody"
);
String
[]
governingBodySpilt
=
null
;
if
(
governingBody
!=
null
&&
governingBody
.
split
(
"_"
).
length
>
1
)
{
governingBodySpilt
=
governingBody
.
split
(
"_"
);
baseEnterpriseInfo
.
setGoverningBody
(
governingBodySpilt
[
1
]);
baseEnterpriseInfo
.
setSuperviseOrgCode
(
governingBodySpilt
[
0
]);
baseEnterpriseInfo
.
setSuperviseOrgName
(
governingBodySpilt
[
1
]);
}
baseEnterpriseInfo
.
setContactPhone
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"phone"
))
?
null
:
(
String
)
map
.
get
(
"phone"
));
baseEnterpriseInfo
.
setGoverningBody
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"governingBody"
))
?
null
:
(
String
)
map
.
get
(
"governingBody"
));
baseEnterpriseInfo
.
setAddress
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"address"
))
?
null
:
(
String
)
map
.
get
(
"address"
));
individuality
.
setRealName
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"name"
))
?
null
:
(
String
)
map
.
get
(
"name"
));
individuality
.
setExpirationDateStart
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"expirationDateStart"
))
?
null
:
(
String
)
map
.
get
(
"expirationDateStart"
));
...
...
@@ -2467,6 +2473,18 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
TzIndividualityDto
individualityDto
=
new
TzIndividualityDto
();
BeanUtils
.
copyProperties
(
individuality
,
individualityDto
);
if
(
governingBodySpilt
!=
null
)
{
TzBaseEnterpriseInfo
tzBaseEnterpriseInfo
=
new
TzBaseEnterpriseInfo
();
tzBaseEnterpriseInfo
.
setSequenceNbr
(
individuality
.
getEnterpriseId
());
CompanyModel
updateModel
=
Privilege
.
companyClient
.
queryByCompanyCode
(
baseEnterpriseInfo
.
getUseCode
()).
getResult
();
HashMap
<
String
,
Object
>
parentMessage
=
(
HashMap
<
String
,
Object
>)
Privilege
.
companyClient
.
queryByOrgcode
(
baseEnterpriseInfo
.
getSuperviseOrgCode
()).
getResult
();
// 目前平台返回key为compnay(存在拼写错误)
CompanyModel
parentModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
parentMessage
.
get
(
"compnay"
)),
CompanyModel
.
class
);
updateModel
.
setParentId
(
parentModel
.
getSequenceNbr
());
// 更新单位的上下级
baseEnterpriseInfoService
.
updateCompanyInfo
(
tzBaseEnterpriseInfo
,
updateModel
);
}
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
individualityDto
.
getEnterpriseId
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
return
individualityDto
;
}
...
...
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