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
d4d4bbc5
Commit
d4d4bbc5
authored
Jun 07, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
a7a24f41
89040646
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
37 deletions
+42
-37
ESEquipmentCategoryDto.java
.../amos/boot/module/tzs/api/dto/ESEquipmentCategoryDto.java
+21
-24
EquipmentCategoryDataDto.java
...mos/boot/module/tzs/api/dto/EquipmentCategoryDataDto.java
+2
-2
EquipmentCategoryData.java
...mos/boot/module/tzs/api/entity/EquipmentCategoryData.java
+2
-2
EquipmentCategoryMapper.xml
...api/src/main/resources/mapper/EquipmentCategoryMapper.xml
+1
-1
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+16
-8
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/ESEquipmentCategoryDto.java
View file @
d4d4bbc5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.annotation.Id
;
...
@@ -24,56 +23,54 @@ public class ESEquipmentCategoryDto {
...
@@ -24,56 +23,54 @@ public class ESEquipmentCategoryDto {
@Id
@Id
private
String
SEQUENCE_NBR
;
private
String
SEQUENCE_NBR
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
ORG_BRANCH_NAME
;
private
String
ORG_BRANCH_NAME
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
ORG_BRANCH_CODE
;
private
String
ORG_BRANCH_CODE
;
@Field
(
type
=
FieldType
.
Text
)
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
private
String
USE_UNIT_NAME
;
private
String
USE_UNIT_NAME
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
USE_UNIT_CREDIT_CODE
;
private
String
USE_UNIT_CREDIT_CODE
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
EQU_LIST_CODE
;
private
String
EQU_LIST_CODE
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
EQU_LIST
;
private
String
EQU_LIST
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
EQU_CATEGORY
;
private
String
EQU_CATEGORY
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
USE_ORG_CODE
;
private
String
USE_ORG_CODE
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
CODE96333
;
private
String
CODE96333
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
EQU_CODE
;
private
String
EQU_CODE
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
SUPERVISORY_CODE
;
private
String
SUPERVISORY_CODE
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
USE_PLACE
;
private
String
USE_PLACE
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
ADDRESS
;
private
String
ADDRESS
;
@Field
(
type
=
FieldType
.
Integer
)
@Field
(
type
=
FieldType
.
Integer
)
private
Integer
EQU_STATE
;
private
Integer
EQU_STATE
;
@Field
(
type
=
FieldType
.
Text
,
searchAnalyzer
=
"ik_max_word"
,
analyzer
=
"ik_max_word"
)
@Field
(
type
=
FieldType
.
Text
)
private
String
STATUS
;
private
String
STATUS
;
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
basic_date_time
,
index
=
false
)
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
basic_date_time
,
index
=
false
)
private
Date
REC_DATE
;
private
Date
REC_DATE
;
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/EquipmentCategoryDataDto.java
View file @
d4d4bbc5
...
@@ -18,8 +18,8 @@ public class EquipmentCategoryDataDto extends BaseDto {
...
@@ -18,8 +18,8 @@ public class EquipmentCategoryDataDto extends BaseDto {
/**
/**
* 管辖分局组织机构代码
* 管辖分局组织机构代码
*/
*/
@TableField
(
"org_code"
)
@TableField
(
"org_
branch_
code"
)
private
String
org
C
ode
;
private
String
org
_branch_c
ode
;
/**
/**
* 单位统一信用代码
* 单位统一信用代码
...
...
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/EquipmentCategoryData.java
View file @
d4d4bbc5
...
@@ -19,8 +19,8 @@ public class EquipmentCategoryData extends BaseEntity {
...
@@ -19,8 +19,8 @@ public class EquipmentCategoryData extends BaseEntity {
/**
/**
* 管辖分局组织机构代码
* 管辖分局组织机构代码
*/
*/
@TableField
(
"org_code"
)
@TableField
(
"org_
branch_
code"
)
private
String
orgCode
;
private
String
org
Branch
Code
;
/**
/**
* 单位统一信用代码
* 单位统一信用代码
...
...
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/EquipmentCategoryMapper.xml
View file @
d4d4bbc5
...
@@ -194,7 +194,7 @@
...
@@ -194,7 +194,7 @@
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
</if>
<if
test=
"level != 'company'"
>
<if
test=
"level != 'company'"
>
bjecd."org_code" LIKE CONCAT('%',#{orgCode},'%')
bjecd."org_
branch_
code" LIKE CONCAT('%',#{orgCode},'%')
</if>
</if>
</select>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
d4d4bbc5
...
@@ -783,11 +783,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -783,11 +783,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override
@Override
public
List
<
EquipmentCategoryData
>
createEquipmentCategoryData
(
String
unitCode
)
{
public
List
<
EquipmentCategoryData
>
createEquipmentCategoryData
(
String
unitCode
)
{
equipmentCategoryDataService
.
remove
(
new
QueryWrapper
<>());
List
<
EquipmentCategoryData
>
list
=
new
ArrayList
<>();
List
<
EquipmentCategoryData
>
list
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
allUnitList
=
equipmentCategoryMapper
.
getAllUnit
(
unitCode
);
List
<
Map
<
String
,
Object
>>
allUnitList
=
equipmentCategoryMapper
.
getAllUnit
(
unitCode
);
for
(
Map
<
String
,
Object
>
map
:
allUnitList
)
{
for
(
Map
<
String
,
Object
>
map
:
allUnitList
)
{
EquipmentCategoryData
equipmentCategoryData
=
new
EquipmentCategoryData
();
EquipmentCategoryData
equipmentCategoryData
=
new
EquipmentCategoryData
();
equipmentCategoryData
.
setOrgCode
(
map
.
get
(
"supervise_org_code"
).
toString
());
equipmentCategoryData
.
setOrg
Branch
Code
(
map
.
get
(
"supervise_org_code"
).
toString
());
equipmentCategoryData
.
setUnitCode
(
map
.
get
(
"use_code"
).
toString
());
equipmentCategoryData
.
setUnitCode
(
map
.
get
(
"use_code"
).
toString
());
List
<
Map
<
String
,
Object
>>
listMap
=
equipmentCategoryMapper
.
getCategoryCount
(
"company"
,
null
,
map
.
get
(
"use_code"
).
toString
());
List
<
Map
<
String
,
Object
>>
listMap
=
equipmentCategoryMapper
.
getCategoryCount
(
"company"
,
null
,
map
.
get
(
"use_code"
).
toString
());
for
(
Map
<
String
,
Object
>
dataMap
:
listMap
)
{
for
(
Map
<
String
,
Object
>
dataMap
:
listMap
)
{
...
@@ -823,9 +824,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -823,9 +824,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
break
;
break
;
}
}
}
}
boolean
b
=
equipmentCategoryDataService
.
saveOrUpdate
(
equipmentCategoryData
,
EquipmentCategoryData
categoryData
=
equipmentCategoryDataMapper
.
selectOne
(
new
QueryWrapper
<
EquipmentCategoryData
>().
eq
(
"unit_code"
,
equipmentCategoryData
.
getUnitCode
()));
new
QueryWrapper
<
EquipmentCategoryData
>().
eq
(
"unit_code"
,
equipmentCategoryData
.
getUnitCode
()));
int
res
=
0
;
if
(
b
)
{
if
(
ObjectUtils
.
isEmpty
(
categoryData
))
{
res
=
equipmentCategoryDataMapper
.
insert
(
equipmentCategoryData
);
}
else
{
res
=
equipmentCategoryDataMapper
.
update
(
equipmentCategoryData
,
new
QueryWrapper
<
EquipmentCategoryData
>().
eq
(
"unit_code"
,
equipmentCategoryData
.
getUnitCode
()));
}
if
(
0
!=
res
)
{
list
.
add
(
equipmentCategoryData
);
list
.
add
(
equipmentCategoryData
);
}
}
}
}
...
@@ -906,7 +913,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -906,7 +913,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
superviseInfoMapper
.
update
(
superviseInfo
,
new
QueryWrapper
<
SuperviseInfo
>().
eq
(
"RECORD"
,
map
.
get
(
"SEQUENCE_NBR"
).
toString
()));
superviseInfoMapper
.
update
(
superviseInfo
,
new
QueryWrapper
<
SuperviseInfo
>().
eq
(
"RECORD"
,
map
.
get
(
"SEQUENCE_NBR"
).
toString
()));
}
}
return
save
;
return
save
;
}
}
public
Page
<
JSONObject
>
queryByKeys
(
JSONObject
map
)
{
public
Page
<
JSONObject
>
queryByKeys
(
JSONObject
map
)
{
//根据当前登录人查询
//根据当前登录人查询
...
@@ -1020,9 +1026,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1020,9 +1026,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
query
.
must
(
QueryBuilders
.
matchQuery
(
"ADDRESS"
,
"*"
+
map
.
getString
(
"ADDRESS"
)
+
"*"
));
query
.
must
(
QueryBuilders
.
matchQuery
(
"ADDRESS"
,
"*"
+
map
.
getString
(
"ADDRESS"
)
+
"*"
));
boolMust
.
must
(
query
);
boolMust
.
must
(
query
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_STATE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_STATE"
))
&&
!(
"所有设备状态"
).
equals
(
map
.
getString
(
"EQU_STATE"
).
toString
())
)
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"EQU_STATE"
,
map
.
getString
(
"EQU_STATE"
)));
Integer
equState
=
EquimentEnum
.
getCode
.
get
(
map
.
getString
(
"EQU_STATE"
));
meBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"EQU_STATE"
,
equState
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"STATUS"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"STATUS"
)))
{
...
@@ -1049,7 +1056,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1049,7 +1056,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
list
.
add
(
dto2
);
list
.
add
(
dto2
);
}
}
totle
=
getCount
(
"idx_biz_view_jg_all"
,
esClient
)
;
totle
=
response
.
getInternalResponse
().
hits
().
getTotalHits
().
value
;
result
.
setRecords
(
list
);
result
.
setRecords
(
list
);
result
.
setTotal
(
totle
);
result
.
setTotal
(
totle
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
...
@@ -1063,6 +1070,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1063,6 +1070,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
return
result
;
return
result
;
}
}
//es统计总记录数
//es统计总记录数
public
Long
getCount
(
String
indexs
,
RestHighLevelClient
esClient
)
{
public
Long
getCount
(
String
indexs
,
RestHighLevelClient
esClient
)
{
Long
totle
=
0L
;
Long
totle
=
0L
;
...
...
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