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
e9e6c1f2
Commit
e9e6c1f2
authored
Aug 19, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_register
parents
a78da737
d4ca4d97
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
184 additions
and
60 deletions
+184
-60
JgCertificateChangeRecordEqMapper.java
...dule/jg/api/mapper/JgCertificateChangeRecordEqMapper.java
+2
-2
JgUseRegistrationEqMapper.java
.../boot/module/jg/api/mapper/JgUseRegistrationEqMapper.java
+2
-1
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
+45
-27
ZLDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
+16
-9
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+2
-2
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/JgCertificateChangeRecordEqMapper.java
View file @
e9e6c1f2
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
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.yeejoin.amos.boot.module.jg.api.entity.JgCertificateChangeRecordEq
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
/**
* Mapper 接口
* Mapper 接口
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @author system_generator
* @date 2024-07-05
* @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 @
e9e6c1f2
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
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.dto.JgUseRegistrationEqDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
@@ -13,7 +14,7 @@ import java.util.List;
...
@@ -13,7 +14,7 @@ import java.util.List;
* @author system_generator
* @author system_generator
* @date 2023-12-18
* @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} "
)
@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
);
void
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
@Param
(
"equipId"
)
String
equipId
,
@Param
(
"currentDocumentId"
)
String
currentDocumentId
);
...
...
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 @
e9e6c1f2
...
@@ -14,6 +14,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -14,6 +14,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
/**
/**
* 用于业务变更过程中历史数据处理的控制层
* 用于业务变更过程中历史数据处理的控制层
...
@@ -319,4 +320,20 @@ public class DataHandlerController extends BaseController {
...
@@ -319,4 +320,20 @@ public class DataHandlerController extends BaseController {
public
ResponseModel
<
Integer
>
modifySupervisionOrgBranchCode
(
@RequestParam
(
value
=
"isModify"
,
defaultValue
=
"false"
)
boolean
isModify
)
{
public
ResponseModel
<
Integer
>
modifySupervisionOrgBranchCode
(
@RequestParam
(
value
=
"isModify"
,
defaultValue
=
"false"
)
boolean
isModify
)
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
modifySupervisionOrgBranchCode
(
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 @
e9e6c1f2
...
@@ -2093,6 +2093,7 @@ public class DataDockServiceImpl {
...
@@ -2093,6 +2093,7 @@ public class DataDockServiceImpl {
factoryInfo
.
setRecord
(
record
);
factoryInfo
.
setRecord
(
record
);
factoryInfo
.
setRecDate
(
new
Date
());
factoryInfo
.
setRecDate
(
new
Date
());
factoryInfo
.
setSequenceNbr
(
null
);
factoryInfo
.
setSequenceNbr
(
null
);
factoryInfo
.
setFactoryIsComplete
(
"2"
);
factoryInfoList
.
add
(
factoryInfo
);
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 @
e9e6c1f2
...
@@ -53,8 +53,14 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
...
@@ -53,8 +53,14 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
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.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -63,7 +69,7 @@ import org.springframework.util.ObjectUtils;
...
@@ -63,7 +69,7 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.util.StopWatch
;
import
org.springframework.util.StopWatch
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.io.IOException
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
...
@@ -76,7 +82,6 @@ import java.util.concurrent.atomic.AtomicInteger;
...
@@ -76,7 +82,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
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
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgInstallationNoticeServiceImpl
.
CONSTRUCTION_TYPE_NAME
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgInstallationNoticeServiceImpl
.
CONSTRUCTION_TYPE_NAME
;
...
@@ -161,6 +166,8 @@ public class DataHandlerServiceImpl {
...
@@ -161,6 +166,8 @@ public class DataHandlerServiceImpl {
private
final
IdxBizJgOtherInfoMapper
otherInfoMapper
;
private
final
IdxBizJgOtherInfoMapper
otherInfoMapper
;
private
final
RestHighLevelClient
restHighLevelClient
;
/**
/**
* 安装告知压力管道历史数据修复-详情中的设备列表修改为汇总表格式
* 安装告知压力管道历史数据修复-详情中的设备列表修改为汇总表格式
...
@@ -2056,4 +2063,73 @@ public class DataHandlerServiceImpl {
...
@@ -2056,4 +2063,73 @@ public class DataHandlerServiceImpl {
log
.
info
(
"==========>record,{},orgBranchCode,{},orgBranchName,{}"
,
dto
.
getSEQUENCE_NBR
(),
dto
.
getORG_BRANCH_CODE
(),
dto
.
getORG_BRANCH_NAME
());
log
.
info
(
"==========>record,{},orgBranchCode,{},orgBranchName,{}"
,
dto
.
getSEQUENCE_NBR
(),
dto
.
getORG_BRANCH_CODE
(),
dto
.
getORG_BRANCH_NAME
());
return
map
;
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 @
e9e6c1f2
...
@@ -4333,6 +4333,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -4333,6 +4333,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.
map
(
d
->
DateUtil
.
parse
(
d
,
"yyyy-MM-dd"
))
.
map
(
d
->
DateUtil
.
parse
(
d
,
"yyyy-MM-dd"
))
.
ifPresent
(
factoryInfo:
:
setProduceDate
);
.
ifPresent
(
factoryInfo:
:
setProduceDate
);
factoryInfo
.
setImported
(
Optional
.
ofNullable
(
data
.
getImported
()).
orElse
(
"0"
));
factoryInfo
.
setImported
(
Optional
.
ofNullable
(
data
.
getImported
()).
orElse
(
"0"
));
factoryInfo
.
setFactoryIsComplete
(
"2"
);
factoryInfoList
.
add
(
factoryInfo
);
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 @
e9e6c1f2
...
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
...
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
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.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
...
@@ -174,26 +175,23 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -174,26 +175,23 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
else
{
}
else
{
// 完成的显示历史表的数据
// 完成的显示历史表的数据
JSONArray
objects
=
commonService
.
queryHistoryDataObj
(
dto
.
getSequenceNbr
());
JSONArray
objects
=
commonService
.
queryHistoryDataObj
(
dto
.
getSequenceNbr
());
// 兼容老数据
List
<
Map
<
String
,
Object
>>
equipmentList
;
if
(
objects
.
isEmpty
())
{
if
(
objects
==
null
||
objects
.
isEmpty
())
{
List
<
Map
<
String
,
Object
>>
list
=
maintenanceContractMapper
.
selectEquipList
(
sequenceNbr
);
equipmentList
=
Optional
.
ofNullable
(
maintenanceContractMapper
.
selectEquipList
(
sequenceNbr
))
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
.
orElse
(
Collections
.
emptyList
());
vo
.
setEquipmentLists
(
list
);
}
}
else
{
}
else
{
//如果EQU_DEFINE是数字进行转换
// 遍历 JSONArray,如果 EQU_DEFINE 包含数字,则进行转换
for
(
int
i
=
0
;
i
<
objects
.
size
();
i
++)
{
objects
.
forEach
(
obj
->
{
JSONObject
json
=
(
JSONObject
)
obj
;
JSONObject
currentObject
=
objects
.
getJSONObject
(
i
);
String
equDefineCode
=
json
.
getString
(
"EQU_DEFINE"
);
String
equDefineCode
=
currentObject
.
getString
(
"EQU_DEFINE"
);
if
(
equDefineCode
!=
null
&&
equDefineCode
.
chars
().
anyMatch
(
Character:
:
isDigit
))
{
String
name
=
maintenanceContractMapper
.
getNameByEquDefine
(
equDefineCode
);
if
(
equDefineCode
.
chars
().
anyMatch
(
Character:
:
isDigit
))
{
json
.
put
(
"EQU_DEFINE"
,
name
);
currentObject
.
put
(
"EQU_DEFINE"
,
maintenanceContractMapper
.
getNameByEquDefine
(
equDefineCode
));
}
}
}
});
List
equList
=
objects
.
toJavaList
(
Map
.
class
);
equipmentList
=
JSONObject
.
parseObject
(
objects
.
toJSONString
(),
new
TypeReference
<
List
<
Map
<
String
,
Object
>>>()
{});
vo
.
setEquipmentLists
(
equList
);
}
}
vo
.
setEquipmentLists
(
equipmentList
);
}
}
// 对象转换 填充登录人单位类型 权限
// 对象转换 填充登录人单位类型 权限
JSONObject
re
=
BeanUtil
.
copyProperties
(
vo
,
JSONObject
.
class
);
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 @
e9e6c1f2
...
@@ -44,4 +44,7 @@ public class JgUseRegistrationEqServiceImpl extends BaseService<JgUseRegistratio
...
@@ -44,4 +44,7 @@ public class JgUseRegistrationEqServiceImpl extends BaseService<JgUseRegistratio
return
list
(
queryWrapper
);
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 @
e9e6c1f2
...
@@ -37,10 +37,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.JYJCResultEnum;
...
@@ -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.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
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.enums.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
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.service.IJgUseRegistrationService
;
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.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
...
@@ -129,7 +126,6 @@ import java.util.stream.IntStream;
...
@@ -129,7 +126,6 @@ import java.util.stream.IntStream;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
import
java.util.zip.ZipOutputStream
;
import
static
java
.
util
.
stream
.
Collectors
.
toList
;
import
static
java
.
util
.
stream
.
Collectors
.
toList
;
import
static
java
.
util
.
stream
.
Collectors
.
toSet
;
import
static
java
.
util
.
stream
.
Collectors
.
toSet
;
...
@@ -148,6 +144,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -148,6 +144,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
static
final
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);;
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
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
);
private
final
List
<
String
>
NOT_FLOWING_STATE_FINISH
=
new
ArrayList
<
String
>(
NOT_FLOWING_STATE
)
{{
private
final
List
<
String
>
NOT_FLOWING_STATE_FINISH
=
new
ArrayList
<
String
>(
NOT_FLOWING_STATE
)
{{
add
(
"已完成"
);
add
(
"已完成"
);
...
@@ -242,6 +239,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -242,6 +239,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
@Autowired
@Autowired
private
JgCertificateChangeRecordEqServiceImpl
certificateChangeRecordEqService
;
private
JgCertificateChangeRecordEqServiceImpl
certificateChangeRecordEqService
;
@Autowired
@Autowired
private
JgCertificateChangeRecordEqMapper
jgCertificateChangeRecordEqMapper
;
@Autowired
private
JgUseRegistrationManageServiceImpl
jgUseRegistrationManageService
;
private
JgUseRegistrationManageServiceImpl
jgUseRegistrationManageService
;
@Autowired
@Autowired
private
IdxBizJgConstructionInfoServiceImpl
idxBizJgConstructionInfoService
;
private
IdxBizJgConstructionInfoServiceImpl
idxBizJgConstructionInfoService
;
...
@@ -1270,22 +1269,40 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1270,22 +1269,40 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
}
}
List
<
String
>
records
=
new
ArrayList
<>();
List
<
String
>
records
=
new
ArrayList
<>();
List
<
JgResumeInfoDto
>
resumeList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
equipmentLists
))
{
if
(!
CollectionUtils
.
isEmpty
(
equipmentLists
))
{
// 装置更新管道的技术参数、设计信息、安装信息
// 装置更新管道的技术参数、设计信息、安装信息
if
(
jgProjectContraption
!=
null
)
{
if
(
jgProjectContraption
!=
null
)
{
updatePieLineTechAndInspection
(
equipmentLists
);
updatePieLineTechAndInspection
(
equipmentLists
);
jgResumeInfoService
.
createWithModel
(
JgResumeInfoDto
.
builder
()
resumeList
.
add
(
JgResumeInfoDto
.
builder
()
.
applyNo
(
jgUseRegistration
.
getApplyNo
())
.
applyNo
(
jgUseRegistration
.
getApplyNo
())
.
businessType
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
())
.
businessType
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
())
.
businessId
(
jgUseRegistration
.
getSequenceNbr
()
+
""
)
.
businessId
(
String
.
valueOf
(
jgUseRegistration
.
getSequenceNbr
())
)
.
equId
(
jgProjectContraption
.
getSequenceNbr
()
+
""
)
.
equId
(
String
.
valueOf
(
jgProjectContraption
.
getSequenceNbr
())
)
.
approvalUnit
(
jgUseRegistration
.
getReceiveOrgName
())
.
approvalUnit
(
jgUseRegistration
.
getReceiveOrgName
())
.
approvalUnitCode
(
jgUseRegistration
.
getReceiveCompanyCode
())
.
approvalUnitCode
(
jgUseRegistration
.
getReceiveCompanyCode
())
.
changeContent
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
()
+
"业务办理"
)
.
changeContent
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
()
+
"业务办理"
)
.
status
(
"正常"
)
.
status
(
"正常"
)
.
routePath
(
taskV2Model
.
getRoutePath
())
.
routePath
(
taskV2Model
.
getRoutePath
())
.
build
());
.
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
(
Objects
.
toString
(
equipmentMap
.
get
(
"equipId"
),
""
))
.
approvalUnit
(
jgUseRegistration
.
getReceiveOrgName
())
.
approvalUnitCode
(
jgUseRegistration
.
getReceiveCompanyCode
())
.
changeContent
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
()
+
"业务办理"
)
.
status
(
"正常"
)
.
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
++)
{
for
(
int
i
=
0
;
i
<
equipmentLists
.
size
();
i
++)
{
Map
<
String
,
Object
>
equipment
=
equipmentLists
.
get
(
i
);
Map
<
String
,
Object
>
equipment
=
equipmentLists
.
get
(
i
);
// 设备ID
// 设备ID
...
@@ -1310,8 +1327,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1310,8 +1327,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// equipment.put("inspectOrgName", mapData.getOrDefault("inspectOrgName", ""));
// equipment.put("inspectOrgName", mapData.getOrDefault("inspectOrgName", ""));
// equipment.put("inspectConclusion", inspectConclusionName);
// equipment.put("inspectConclusion", inspectConclusionName);
// 更新设备信息 && 生成使用登记证编号 && 同步es
// 更新设备信息 && 生成使用登记证编号 && 同步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
);
jsonObject
,
flag
.
get
(),
useRegistrationCode
,
equipment
,
isMerge
);
allEsData
.
putAll
(
esDataMap
);
// 查询设备制造信息
// 查询设备制造信息
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>
factoryInfoWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>
factoryInfoWrapper
=
new
LambdaQueryWrapper
<>();
factoryInfoWrapper
.
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
equId
);
factoryInfoWrapper
.
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
equId
);
...
@@ -1322,7 +1340,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1322,7 +1340,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
changeRecordEq
.
setChangeRecordId
(
String
.
valueOf
(
changeRecordId
));
//登记证记录主键
changeRecordEq
.
setChangeRecordId
(
String
.
valueOf
(
changeRecordId
));
//登记证记录主键
changeRecordEq
.
setEquId
(
registerInfo
.
getRecord
());
//设备主键
changeRecordEq
.
setEquId
(
registerInfo
.
getRecord
());
//设备主键
changeRecordEq
.
setProductCode
(
idxBizJgFactoryInfo
.
getFactoryNum
());
//产品编号
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
...
@@ -1762,9 +1790,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 更新代办
// 更新代办
TaskV2Model
taskV2Model
=
updateAgency
(
jgUseRegistration
);
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
);
jsonObject
,
Boolean
.
FALSE
,
null
,
mapData
,
Boolean
.
FALSE
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
esDataMap
);
Optional
.
ofNullable
(
registerInfo
).
ifPresent
(
info
->
{
Optional
.
ofNullable
(
registerInfo
).
ifPresent
(
info
->
{
// 生成证书管理表记录
// 生成证书管理表记录
generateRegistrationManage
(
jgUseRegistration
,
registerInfo
,
Boolean
.
FALSE
,
null
);
generateRegistrationManage
(
jgUseRegistration
,
registerInfo
,
Boolean
.
FALSE
,
null
);
...
@@ -1789,7 +1817,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1789,7 +1817,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
jgUseRegistration
;
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
,
JgRegistrationHistory
jgRegistrationHistory
,
IdxBizJgRegisterInfo
registerInfo
,
IdxBizJgOtherInfo
otherInfo
,
TaskV2Model
taskV2Model
,
JSONObject
jsonObject
,
Boolean
flag
,
String
useRegistrationCode
,
TaskV2Model
taskV2Model
,
JSONObject
jsonObject
,
Boolean
flag
,
String
useRegistrationCode
,
Map
<
String
,
Object
>
equipment
,
boolean
isMerge
)
{
Map
<
String
,
Object
>
equipment
,
boolean
isMerge
)
{
...
@@ -1837,17 +1865,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1837,17 +1865,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
this
.
justGenerateEquCode
(
lambda
,
registerInfo
,
jgUseRegistration
.
getReceiveCompanyCode
(),
mapData
,
jgRegistrationHistory
);
this
.
justGenerateEquCode
(
lambda
,
registerInfo
,
jgUseRegistration
.
getReceiveCompanyCode
(),
mapData
,
jgRegistrationHistory
);
idxBizJgRegisterInfoService
.
update
(
lambda
);
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
();
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgUseInfo
>().
lambda
();
...
@@ -1860,7 +1877,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1860,7 +1877,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useInfo
.
setUSC_UNIT_NAME
(
""
);
useInfo
.
setUSC_UNIT_NAME
(
""
);
useInfoMapper
.
updateById
(
useInfo
);
useInfoMapper
.
updateById
(
useInfo
);
// 更新es
// 更新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
...
@@ -1949,7 +1966,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
codeUtil
.
generateEquipmentCode
(
codeGenerateDto
);
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
)
{
JgUseRegistration
jgUseRegistration
,
JSONObject
jsonObject
)
{
// 更新es
// 更新es
HashMap
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
HashMap
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
...
@@ -1983,7 +2000,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1983,7 +2000,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
param
.
put
(
"CAR_NUMBER"
,
dataMap
.
get
(
"carNumber"
));
param
.
put
(
"CAR_NUMBER"
,
dataMap
.
get
(
"carNumber"
));
}
}
objMap
.
put
((
String
)
dataMap
.
get
(
"equipId"
),
param
);
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
,
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 @
e9e6c1f2
...
@@ -20,6 +20,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.CylinderTypeEnum;
...
@@ -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.UnitTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.UserPostEnum
;
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.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.enums.InformationManageTypeEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.statistics.api.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.AlertStatisticsMapper
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.AlertStatisticsMapper
;
...
@@ -755,11 +756,15 @@ public class ZLDPStatisticsServiceImpl {
...
@@ -755,11 +756,15 @@ public class ZLDPStatisticsServiceImpl {
.
filter
(
region
->
!
"西咸新区"
.
equals
(
region
.
getRegionName
()))
.
filter
(
region
->
!
"西咸新区"
.
equals
(
region
.
getRegionName
()))
.
map
(
region
->
{
.
map
(
region
->
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
region
.
getRegionCode
().
toString
());
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
region
.
getRegionCode
().
toString
());
Long
equipIsManageNum
=
staticsCenterMapCountDataForEquipIsManage
(
orgCode
,
paramDto
);
BoolQueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
();
Long
equipTotal
=
getEquipTotalForCode
(
paramDto
.
getTreeValue
(),
region
.
getRegionCode
().
toString
());
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
();
CountDto
dto
=
new
CountDto
();
dto
.
setLongValue
(
equipTotal
);
dto
.
setLongValue
(
equipTotal
);
dto
.
setStrValue
(
calculateClaimRate
(
equipTotal
,
equipIsManageNum
,
decimalFormat
));
dto
.
setStrValue
(
calculateClaimRate
(
equipTotal
,
equipIsManageNum
,
decimalFormat
));
dto
.
setKeyStr
(
orgCode
);
return
dto
;
return
dto
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
...
@@ -812,17 +817,19 @@ public class ZLDPStatisticsServiceImpl {
...
@@ -812,17 +817,19 @@ public class ZLDPStatisticsServiceImpl {
return
decimalFormat
.
format
(
claimRate
);
return
decimalFormat
.
format
(
claimRate
);
}
}
private
Long
staticsCenterMapCountDataForEquipIsManage
(
String
orgCode
,
DPFilterParamForDetailDto
paramDto
)
{
private
Long
staticsCenterMapCountDataForEquipIsManage
(
BoolQueryBuilder
queryBuilder
,
String
orgCode
,
DPFilterParamForDetailDto
paramDto
)
{
long
num
=
0
;
long
num
=
0
;
CountRequest
request
=
new
CountRequest
();
CountRequest
request
=
new
CountRequest
();
request
.
indices
(
"idx_biz_
view_jg_all
"
);
request
.
indices
(
"idx_biz_
equipment_info
"
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
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
.
prefixQuery
(
"ORG_BRANCH_CODE"
,
orgCode
));
boolMust
.
must
(
QueryBuilders
.
existsQuery
(
"SUPERVISORY_CODE"
));
String
[]
status
=
{
"草稿"
,
"已拒领"
,
"待认领"
};
boolMust
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
"null"
));
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"STATUS"
,
Arrays
.
asList
(
status
)));
String
[]
status
=
{
"草稿"
,
"已拒领"
,
"待认领"
};
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"STATUS"
,
Arrays
.
asList
(
status
)));
String
[]
equCategoryCode
=
{
"2300"
};
String
[]
equCategoryCode
=
{
"2300"
};
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"EQU_CATEGORY_CODE"
,
Arrays
.
asList
(
equCategoryCode
)));
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"EQU_CATEGORY_CODE"
,
Arrays
.
asList
(
equCategoryCode
)));
String
[]
equListCode
=
{
"8000"
};
String
[]
equListCode
=
{
"8000"
};
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
e9e6c1f2
...
@@ -345,8 +345,8 @@
...
@@ -345,8 +345,8 @@
where supervision_org_code like concat(#{oldOrgCode}, '%');
where supervision_org_code like concat(#{oldOrgCode}, '%');
update tzs_safety_problem_tracing
update tzs_safety_problem_tracing
set governing_body_
code = replace(governing_body
_code, #{oldOrgCode}, #{newOrgCode})
set governing_body_
org_code = replace(governing_body_org
_code, #{oldOrgCode}, #{newOrgCode})
where governing_body_code like concat(#{oldOrgCode}, '%');
where governing_body_
org_
code like concat(#{oldOrgCode}, '%');
update tz_alert_called
update tz_alert_called
set biz_org_code = replace(biz_org_code, #{oldOrgCode}, #{newOrgCode})
set biz_org_code = replace(biz_org_code, #{oldOrgCode}, #{newOrgCode})
...
...
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