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
46e43c55
Commit
46e43c55
authored
Jan 23, 2024
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加使用地点地址字段,调整es设备信息同步
parent
5214be9e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
15 deletions
+65
-15
JgUseRegistration.java
...oin/amos/boot/module/jg/api/entity/JgUseRegistration.java
+3
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+7
-3
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+55
-12
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/entity/JgUseRegistration.java
View file @
46e43c55
...
@@ -186,4 +186,7 @@ public class JgUseRegistration extends BaseEntity {
...
@@ -186,4 +186,7 @@ public class JgUseRegistration extends BaseEntity {
@TableField
(
value
=
"is_xixian"
)
@TableField
(
value
=
"is_xixian"
)
private
String
isXixian
;
private
String
isXixian
;
@TableField
(
value
=
"use_address"
)
private
String
useAddress
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
46e43c55
...
@@ -19,7 +19,8 @@
...
@@ -19,7 +19,8 @@
jri.PRODUCT_NAME as productName,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME,use.CITY_NAME,use.COUNTY_NAME) as place,
-- concat(use.PROVINCE_NAME,use.CITY_NAME,use.COUNTY_NAME) as place,
ur.use_address as place,
ur.instance_id as instanceId,
ur.instance_id as instanceId,
re.equ_id as equipId,
re.equ_id as equipId,
ur.apply_no as applyNo,
ur.apply_no as applyNo,
...
@@ -125,7 +126,9 @@
...
@@ -125,7 +126,9 @@
PROVINCE as province,
PROVINCE as province,
CITY as city,
CITY as city,
COUNTY as county,
COUNTY as county,
USE_INNER_CODE as useInnerCode
USE_INNER_CODE as useInnerCode,
LONGITUDE_LATITUDE as longitudeLatitude,
FACTORY_USE_SITE_STREET as factoryUseSiteStreet
FROM "idx_biz_jg_use_info" where RECORD = #{id}
FROM "idx_biz_jg_use_info" where RECORD = #{id}
</select>
</select>
<select
id=
"getEquipListPage"
resultType=
"java.util.Map"
>
<select
id=
"getEquipListPage"
resultType=
"java.util.Map"
>
...
@@ -178,7 +181,8 @@
...
@@ -178,7 +181,8 @@
jri.PRODUCT_NAME as productName,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME, use.CITY_NAME, use.COUNTY_NAME) as place,
-- concat(use.PROVINCE_NAME, use.CITY_NAME, use.COUNTY_NAME) as place,
ur.use_address as place,
ur.instance_id as instanceId,
ur.instance_id as instanceId,
re.equ_id as equipId,
re.equ_id as equipId,
ur.apply_no as applyNo,
ur.apply_no as applyNo,
...
...
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 @
46e43c55
...
@@ -28,10 +28,7 @@ import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
...
@@ -28,10 +28,7 @@ import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
...
@@ -63,7 +60,7 @@ import java.util.*;
...
@@ -63,7 +60,7 @@ import java.util.*;
public
class
JgUseRegistrationServiceImpl
extends
BaseService
<
JgUseRegistrationDto
,
JgUseRegistration
,
JgUseRegistrationMapper
>
implements
IJgUseRegistrationService
{
public
class
JgUseRegistrationServiceImpl
extends
BaseService
<
JgUseRegistrationDto
,
JgUseRegistration
,
JgUseRegistrationMapper
>
implements
IJgUseRegistrationService
{
@Autowired
@Autowired
private
UseInfoMapper
useInfoMapper
;
private
IdxBizJg
UseInfoMapper
useInfoMapper
;
@Autowired
@Autowired
private
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
private
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
@Autowired
@Autowired
...
@@ -109,13 +106,16 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -109,13 +106,16 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"CITY"
);
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"CITY"
);
// 区
// 区
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"REGION"
);
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"REGION"
);
// 街道
List
<
LinkedHashMap
>
street
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"STREET"
);
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambdaSelect
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambdaSelect
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambdaSelect
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
lambdaSelect
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambdaSelect
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambdaSelect
);
JSONObject
map
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
JSONObject
map
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
map
.
remove
(
"status"
);
map
.
remove
(
"status"
);
UseInfo
useInfo
=
new
UseInfo
();
IdxBizJgUseInfo
useInfo
=
new
IdxBizJg
UseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
BeanUtil
.
copyProperties
(
map
,
useInfo
);
// 城市
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"city"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"city"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
city
.
forEach
(
item
->
{
city
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"city"
))))
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"city"
))))
{
...
@@ -123,6 +123,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -123,6 +123,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
});
});
}
}
// 区县
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"county"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"county"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
region
.
forEach
(
item
->
{
region
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"county"
))))
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"county"
))))
{
...
@@ -130,10 +131,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -130,10 +131,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
});
});
}
}
// 街道
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"factoryUseSiteStreet"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
street
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"factoryUseSiteStreet"
))))
{
useInfo
.
setStreetName
(
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
useInfo
.
setProvince
(
"610000"
);
useInfo
.
setProvince
(
"610000"
);
useInfo
.
setProvinceName
(
"陕西省"
);
useInfo
.
setProvinceName
(
"陕西省"
);
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJg
UseInfo
>().
lambda
();
lambda
.
eq
(
UseInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
lambda
.
eq
(
IdxBizJg
UseInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
// 更新使用信息
// 更新使用信息
useInfoMapper
.
update
(
useInfo
,
lambda
);
useInfoMapper
.
update
(
useInfo
,
lambda
);
InspectionDetectionInfo
inspectionDetectionInfo
=
new
InspectionDetectionInfo
();
InspectionDetectionInfo
inspectionDetectionInfo
=
new
InspectionDetectionInfo
();
...
@@ -146,7 +155,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -146,7 +155,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 更新设备使用登记证
// 更新设备使用登记证
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
useOrgCode
);
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
useOrgCode
);
// 更新es
// 更新es
createCode
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
map
,
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
());
createCode
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
map
,
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
+
useInfo
.
getStreetName
()
);
}
}
public
void
updateHistory
(
JSONObject
map
,
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
public
void
updateHistory
(
JSONObject
map
,
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
...
@@ -205,8 +214,41 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -205,8 +214,41 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"isXixian"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"isXixian"
)))
{
jgUseRegistration
.
setIsXixian
(
String
.
valueOf
(
map
.
get
(
"isXixian"
)));
jgUseRegistration
.
setIsXixian
(
String
.
valueOf
(
map
.
get
(
"isXixian"
)));
}
}
// 使用地点
// 市
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"CITY"
);
// 区
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"REGION"
);
// 街道
List
<
LinkedHashMap
>
street
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"STREET"
);
jgUseRegistration
.
setUseAddress
(
"陕西省"
);
// 城市
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"city"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
city
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"city"
))))
{
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
// 区县
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"county"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
region
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"county"
))))
{
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
// 街道
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"factoryUseSiteStreet"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
street
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"factoryUseSiteStreet"
))))
{
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
map
.
get
(
"address"
));
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
jgUseRegistration
.
setUseUnitCreditCode
(
null
);
jgUseRegistration
.
setUseUnitCreditCode
(
null
);
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
...
@@ -539,6 +581,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -539,6 +581,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
detail
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
detail
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
detail
.
put
(
"designStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designStandard"
))));
detail
.
put
(
"designStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designStandard"
))));
detail
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
detail
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
detail
.
put
(
"longitudeLatitude"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"longitudeLatitude"
))));
return
detail
;
return
detail
;
}
}
...
@@ -685,9 +728,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -685,9 +728,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
lambdaOth
);
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
lambdaOth
);
if
(
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
if
(
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
// 使用信息
// 使用信息
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJg
UseInfo
>().
lambda
();
lambda
.
eq
(
UseInfo:
:
getRecord
,
record
);
lambda
.
eq
(
IdxBizJg
UseInfo:
:
getRecord
,
record
);
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
lambda
);
IdxBizJg
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
lambda
);
// 注册信息
// 注册信息
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
lambdaReg
=
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
lambdaReg
=
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
lambda
();
lambdaReg
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
);
lambdaReg
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
);
...
...
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