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
835a9013
Commit
835a9013
authored
Jan 24, 2024
by
王果
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
ea0daa39
282b98de
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
274 additions
and
100 deletions
+274
-100
JgChangeRegistrationTransferDto.java
...ot/module/jg/api/dto/JgChangeRegistrationTransferDto.java
+3
-0
JgChangeRegistrationTransfer.java
...ot/module/jg/api/entity/JgChangeRegistrationTransfer.java
+7
-0
JgUseRegistration.java
...oin/amos/boot/module/jg/api/entity/JgUseRegistration.java
+3
-0
IJgMaintainNoticeService.java
.../boot/module/jg/api/service/IJgMaintainNoticeService.java
+2
-0
JgChangeRegistrationTransferMapper.xml
...n/resources/mapper/JgChangeRegistrationTransferMapper.xml
+1
-1
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+6
-1
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+7
-3
JgMaintainNoticeController.java
.../module/jg/biz/controller/JgMaintainNoticeController.java
+1
-1
IIdxBizJgUseInfoService.java
...s/boot/module/jg/biz/service/IIdxBizJgUseInfoService.java
+4
-0
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+61
-18
IdxBizJgUseInfoServiceImpl.java
...odule/jg/biz/service/impl/IdxBizJgUseInfoServiceImpl.java
+10
-1
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+91
-56
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+2
-0
JgInstallationNoticeEqServiceImpl.java
...g/biz/service/impl/JgInstallationNoticeEqServiceImpl.java
+2
-2
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+4
-3
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+13
-0
JgUseRegistrationEqServiceImpl.java
...e/jg/biz/service/impl/JgUseRegistrationEqServiceImpl.java
+2
-2
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/dto/JgChangeRegistrationTransferDto.java
View file @
835a9013
...
...
@@ -124,4 +124,7 @@ public class JgChangeRegistrationTransferDto extends BaseDto {
@ApiModelProperty
(
value
=
"下一节点可执行人"
)
private
String
nextExecuteUserIds
;
@ApiModelProperty
(
value
=
"设备移装完整详细地址"
)
private
String
fullAddress
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgChangeRegistrationTransfer.java
View file @
835a9013
...
...
@@ -239,4 +239,11 @@ public class JgChangeRegistrationTransfer extends BaseEntity {
@TableField
(
value
=
"next_execute_user_ids"
)
private
String
nextExecuteUserIds
;
/**
* 设备移装完整详细地址
*/
@TableField
(
value
=
"full_address"
)
private
String
fullAddress
;
}
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 @
835a9013
...
...
@@ -186,4 +186,7 @@ public class JgUseRegistration extends BaseEntity {
@TableField
(
value
=
"is_xixian"
)
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/java/com/yeejoin/amos/boot/module/jg/api/service/IJgMaintainNoticeService.java
View file @
835a9013
...
...
@@ -65,4 +65,6 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> {
* @return pdf文件路径
*/
String
generateMaintainNoticeReport
(
Long
sequenceNbr
);
boolean
deleteBySequenceNbr
(
Long
[]
sequenceNbr
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationTransferMapper.xml
View file @
835a9013
...
...
@@ -22,12 +22,12 @@
crt.use_registration_code as useRegistrationCode,
crt.next_execute_user_ids as nextExecuteUserIds,
crt.create_user_id as createUserId,
crt.full_address as allAddress,
use.USE_UNIT_NAME as useUnitName,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME,'-',use.CITY_NAME,'-',use.COUNTY_NAME) as allAddress,
crteq.equ_id as equipId
from tzs_jg_change_registration_transfer crt
LEFT JOIN tzs_jg_change_registration_transfer_eq crteq on crt.sequence_nbr = crteq.equip_transfer_id
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
835a9013
...
...
@@ -8,7 +8,12 @@
</update>
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice"
>
select isn.* FROM tzs_jg_maintain_notice isn
select
isn.*,
concat(use."PROVINCE_NAME", '', use."CITY_NAME", '', use."COUNTY_NAME", '', use."STREET_NAME", '', use."ADDRESS") as fullAddress
FROM tzs_jg_maintain_notice isn
left join tzs_jg_maintain_notice_eq isneq on isn.sequence_nbr = isneq.equip_transfer_id
LEFT JOIN idx_biz_jg_use_info use on isneq.equ_id = use.RECORD
<where>
isn.is_delete = 0
<if
test=
"param != null "
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
835a9013
...
...
@@ -19,7 +19,8 @@
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
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,
re.equ_id as equipId,
ur.apply_no as applyNo,
...
...
@@ -125,7 +126,9 @@
PROVINCE as province,
CITY as city,
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}
</select>
<select
id=
"getEquipListPage"
resultType=
"java.util.Map"
>
...
...
@@ -178,7 +181,8 @@
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
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,
re.equ_id as equipId,
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/controller/JgMaintainNoticeController.java
View file @
835a9013
...
...
@@ -81,7 +81,7 @@ public class JgMaintainNoticeController extends BaseController {
@DeleteMapping
(
value
=
"/delete"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除维修告知"
,
notes
=
"根据sequenceNbr删除维修告知"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
[]
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
iJgMaintainNoticeService
.
removeById
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
iJgMaintainNoticeService
.
deleteBySequenceNbr
(
sequenceNbr
));
}
/**
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgUseInfoService.java
View file @
835a9013
...
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
java.util.List
;
/**
* 使用信息表接口类
*
...
...
@@ -14,4 +16,6 @@ public interface IIdxBizJgUseInfoService {
boolean
saveOrUpdateData
(
IdxBizJgUseInfo
useInfo
);
IdxBizJgUseInfo
getOneData
(
String
record
);
List
<
IdxBizJgUseInfo
>
getUseInfoListByEquIds
(
List
<
String
>
equIds
);
}
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 @
835a9013
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
...
...
@@ -12,9 +11,8 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.ConstructionEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto
;
...
...
@@ -142,8 +140,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
JgInstallationNoticeEqServiceImpl
jgInstallationNoticeEqServiceImpl
;
@Autowired
private
JgUseRegistrationEqServiceImpl
jgUseRegistrationEqServiceImpl
;
@Autowired
private
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
/**
* 设备注册信息
...
...
@@ -1072,19 +1070,50 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String
status
=
ConstructionEnum
.
getName
.
get
(
integer
);
dto2
.
put
(
CONSTRUCTIONTYPE
,
status
);
}
//查询设备是否正在使用
//设备的使用标识是,安装告知和使用登记中有使用记录。
String
equId
=
(
String
)
dto2
.
get
(
"SEQUENCE_NBR"
);
dto2
.
put
(
"record"
,
equId
);
List
<
JgInstallationNoticeEq
>
installationNoticeEqList
=
jgInstallationNoticeEqServiceImpl
.
getListByEquId
(
equId
);
List
<
JgUseRegistrationEq
>
useRegistrationEqList
=
jgUseRegistrationEqServiceImpl
.
getListByEquId
(
equId
);
if
(!
ValidationUtil
.
isEmpty
(
installationNoticeEqList
)
||
!
ValidationUtil
.
isEmpty
(
useRegistrationEqList
)){
dto2
.
put
(
"IS_USE"
,
true
);
}
else
{
dto2
.
put
(
"IS_USE"
,
false
);
}
dto2
.
put
(
"record"
,
dto2
.
get
(
"SEQUENCE_NBR"
));
list
.
add
(
dto2
);
}
// 获取所有设备的Id
List
<
String
>
equIds
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
list
)){
equIds
=
list
.
stream
().
map
(
item
->
item
.
get
(
"SEQUENCE_NBR"
).
toString
()).
collect
(
Collectors
.
toList
());
}
//查询设备是否正在使用
//设备的使用标识是,安装告知和使用登记中有使用记录。
List
<
JgInstallationNoticeEq
>
installationNoticeEqList
=
jgInstallationNoticeEqServiceImpl
.
getListByEquIds
(
equIds
);
List
<
JgUseRegistrationEq
>
useRegistrationEqList
=
jgUseRegistrationEqServiceImpl
.
getListByEquIds
(
equIds
);
Map
<
String
,
Boolean
>
equIsUseMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
installationNoticeEqList
)
){
equIsUseMap
.
putAll
(
installationNoticeEqList
.
stream
().
collect
(
Collectors
.
toMap
(
JgInstallationNoticeEq:
:
getEquId
,
obj
->
true
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
if
(!
ValidationUtil
.
isEmpty
(
useRegistrationEqList
)){
equIsUseMap
.
putAll
(
useRegistrationEqList
.
stream
().
collect
(
Collectors
.
toMap
(
JgUseRegistrationEq:
:
getEquId
,
obj
->
true
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
// 查询设备地址
List
<
IdxBizJgUseInfo
>
useInfoListByEquIds
=
idxBizJgUseInfoService
.
getUseInfoListByEquIds
(
equIds
);
Map
<
String
,
String
>
equAddressMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
useInfoListByEquIds
)){
equAddressMap
=
useInfoListByEquIds
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizJgUseInfo:
:
getRecord
,
useInfo
->
{
String
fulladdress
=
""
;
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getProvinceName
()))
fulladdress
+=
useInfo
.
getProvinceName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCityName
()))
fulladdress
+=
useInfo
.
getCityName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCountyName
()))
fulladdress
+=
useInfo
.
getCountyName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getStreetName
()))
fulladdress
+=
useInfo
.
getStreetName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getAddress
()))
fulladdress
+=
useInfo
.
getAddress
();
return
fulladdress
;
}
)
);
}
// 更新设备使用情况和设备地址
for
(
JSONObject
item
:
list
){
Boolean
isUse
=
equIsUseMap
.
get
(
item
.
getString
(
"SEQUENCE_NBR"
));
String
fullAddress
=
equAddressMap
.
get
(
item
.
getString
(
"SEQUENCE_NBR"
));
item
.
put
(
"IS_USE"
,
!
ValidationUtil
.
isEmpty
(
isUse
)
?
isUse
?
isUse
:
false
:
false
);
item
.
put
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
}
totle
=
response
.
getInternalResponse
().
hits
().
getTotalHits
().
value
;
result
.
setRecords
(
list
);
result
.
setTotal
(
totle
);
...
...
@@ -1129,11 +1158,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String
operateType
=
ValidationUtil
.
isEmpty
(
equipmentInfoForm
.
get
(
"SEQUENCE_NBR"
))
?
OPERATESAVE
:
OPERATEEDIT
;
record
=
OPERATESAVE
.
equals
(
operateType
)
?
UUID
.
randomUUID
().
toString
()
:
equipmentInfoForm
.
get
(
"RECORD"
).
toString
();
// 单位类型
Map
<
String
,
Object
>
companyType
=
jgInstallationNoticeService
.
getCompanyType
();
String
companyTypeStr
=
companyType
.
get
(
"companyType"
).
toString
();
//使用信息
IdxBizJgUseInfo
useInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgUseInfo
.
class
);
useInfo
.
setRecord
(
record
);
useInfo
.
setRecDate
(
date
);
useInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"USEINFO_SEQ"
)));
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
USE
.
getCode
()))
{
useInfo
.
setUseUnitCreditCode
(
companyType
.
get
(
"creditCode"
).
toString
());
useInfo
.
setUseUnitName
(
companyType
.
get
(
"companyTypeName"
).
toString
());
}
idxBizJgUseInfoService
.
saveOrUpdateData
(
useInfo
);
//设计制造
...
...
@@ -1158,8 +1197,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
IdxBizJgConstructionInfo
constructionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgConstructionInfo
.
class
);
constructionInfo
.
setRecord
(
record
);
constructionInfo
.
setRecDate
(
date
);
constructionInfo
.
setUscUnitCreditCode
(
companyCode
);
constructionInfo
.
setUscUnitName
(
companyName
);
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
CONSTRUCTION
.
getCode
()))
{
constructionInfo
.
setUscUnitCreditCode
(
companyCode
);
constructionInfo
.
setUscUnitName
(
companyName
);
}
constructionInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"CONSTRUCTIONINFO_SEQ"
)));
iIdxBizJgConstructionInfoService
.
saveOrUpdateData
(
constructionInfo
);
...
...
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/IdxBizJgUseInfoServiceImpl.java
View file @
835a9013
...
...
@@ -3,12 +3,13 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgUseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
* 使用信息表服务实现类
*
...
...
@@ -26,4 +27,11 @@ public class IdxBizJgUseInfoServiceImpl extends BaseService<IdxBizJgUseInfoDto,I
public
IdxBizJgUseInfo
getOneData
(
String
record
)
{
return
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
"RECORD"
,
record
));
}
@Override
public
List
<
IdxBizJgUseInfo
>
getUseInfoListByEquIds
(
List
<
String
>
equIds
)
{
QueryWrapper
<
IdxBizJgUseInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
in
(
IdxBizJgUseInfo:
:
getRecord
,
equIds
);
return
list
(
queryWrapper
);
}
}
\ 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/JgChangeRegistrationTransferServiceImpl.java
View file @
835a9013
This diff is collapsed.
Click to expand it.
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/JgEnableDisableServiceImpl.java
View file @
835a9013
...
...
@@ -589,6 +589,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
LambdaQueryWrapper
<
JgEnableDisableEq
>
lambda
=
new
QueryWrapper
<
JgEnableDisableEq
>().
lambda
();
lambda
.
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
sequenceNbr
);
jgEnableDisableEqService
.
getBaseMapper
().
delete
(
lambda
);
// 删除暂存时生成的待办
commonService
.
deleteTaskModel
(
sequenceNbr
+
""
);
}
public
Map
<
String
,
Object
>
getDetail
(
Long
sequenceNbr
)
{
...
...
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/JgInstallationNoticeEqServiceImpl.java
View file @
835a9013
...
...
@@ -32,9 +32,9 @@ public class JgInstallationNoticeEqServiceImpl extends BaseService<JgInstallatio
return
this
.
queryForList
(
""
,
false
);
}
public
List
<
JgInstallationNoticeEq
>
getListByEquId
(
String
equId
)
{
public
List
<
JgInstallationNoticeEq
>
getListByEquId
s
(
List
<
String
>
equIds
)
{
QueryWrapper
<
JgInstallationNoticeEq
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
JgInstallationNoticeEq:
:
getEquId
,
equId
);
queryWrapper
.
lambda
().
in
(
JgInstallationNoticeEq:
:
getEquId
,
equIds
);
queryWrapper
.
lambda
().
eq
(
JgInstallationNoticeEq:
:
getIsDelete
,
false
);
return
list
(
queryWrapper
);
}
...
...
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/JgInstallationNoticeServiceImpl.java
View file @
835a9013
...
...
@@ -617,6 +617,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
dto
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setEquAddress
(
obj
.
getOrDefault
(
"ADDRESS"
,
""
).
toString
());
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
});
...
...
@@ -731,9 +732,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
model
.
setInstallLeaderName
(
leaderList
[
1
]);
}
}
StringBuffer
buffer
=
new
StringBuffer
();
buffer
.
append
(
model
.
getProvinceName
()).
append
(
model
.
getCityName
()).
append
(
model
.
getCountyName
()).
append
(
model
.
getStreetName
()).
append
(
model
.
getAddress
());
model
.
setEquAddress
(
buffer
.
toString
());
//
StringBuffer buffer = new StringBuffer();
//
buffer.append(model.getProvinceName()).append(model.getCityName()).append(model.getCountyName()).append(model.getStreetName()).append(model.getAddress());
//
model.setEquAddress(buffer.toString());
}
...
...
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/JgMaintainNoticeServiceImpl.java
View file @
835a9013
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
...
...
@@ -16,6 +17,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskMessageDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisableEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
...
...
@@ -400,6 +402,17 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
@Override
public
boolean
deleteBySequenceNbr
(
Long
[]
sequenceNbr
)
{
this
.
baseMapper
.
deleteById
(
sequenceNbr
);
LambdaQueryWrapper
<
JgMaintainNoticeEq
>
lambda
=
new
QueryWrapper
<
JgMaintainNoticeEq
>().
lambda
();
lambda
.
eq
(
JgMaintainNoticeEq:
:
getEquipTransferId
,
sequenceNbr
);
jgMaintainNoticeEqMapper
.
delete
(
lambda
);
// 删除暂存时生成的待办
commonService
.
deleteTaskModel
(
sequenceNbr
+
""
);
return
true
;
}
@Override
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
JgMaintainNotice
>
saveNotice
(
String
submitType
,
Map
<
String
,
Object
>
jgMaintainNoticeDtoMap
,
ReginParams
reginParams
)
{
...
...
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 @
835a9013
...
...
@@ -33,9 +33,9 @@ public class JgUseRegistrationEqServiceImpl extends BaseService<JgUseRegistratio
}
public
List
<
JgUseRegistrationEq
>
getListByEquId
(
String
equId
)
{
public
List
<
JgUseRegistrationEq
>
getListByEquId
s
(
List
<
String
>
equIds
)
{
QueryWrapper
<
JgUseRegistrationEq
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
JgUseRegistrationEq:
:
getEquId
,
equId
);
queryWrapper
.
lambda
().
in
(
JgUseRegistrationEq:
:
getEquId
,
equIds
);
queryWrapper
.
lambda
().
eq
(
JgUseRegistrationEq:
:
getIsDelete
,
false
);
return
list
(
queryWrapper
);
}
...
...
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 @
835a9013
...
...
@@ -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.enums.ApplicationFormTypeEnum
;
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.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.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
...
...
@@ -63,7 +60,7 @@ import java.util.*;
public
class
JgUseRegistrationServiceImpl
extends
BaseService
<
JgUseRegistrationDto
,
JgUseRegistration
,
JgUseRegistrationMapper
>
implements
IJgUseRegistrationService
{
@Autowired
private
UseInfoMapper
useInfoMapper
;
private
IdxBizJg
UseInfoMapper
useInfoMapper
;
@Autowired
private
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
@Autowired
...
...
@@ -109,13 +106,16 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"CITY"
);
// 区
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"REGION"
);
// 街道
List
<
LinkedHashMap
>
street
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"STREET"
);
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambdaSelect
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambdaSelect
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambdaSelect
);
JSONObject
map
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
map
.
remove
(
"status"
);
UseInfo
useInfo
=
new
UseInfo
();
IdxBizJgUseInfo
useInfo
=
new
IdxBizJg
UseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
// 城市
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"city"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
city
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"city"
))))
{
...
...
@@ -123,6 +123,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
});
}
// 区县
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"county"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
region
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"county"
))))
{
...
...
@@ -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
.
setProvinceName
(
"陕西省"
);
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
lambda
.
eq
(
UseInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJg
UseInfo
>().
lambda
();
lambda
.
eq
(
IdxBizJg
UseInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
// 更新使用信息
useInfoMapper
.
update
(
useInfo
,
lambda
);
InspectionDetectionInfo
inspectionDetectionInfo
=
new
InspectionDetectionInfo
();
...
...
@@ -146,7 +155,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 更新设备使用登记证
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
useOrgCode
);
// 更新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
)
{
...
...
@@ -205,8 +214,41 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(!
ObjectUtils
.
isEmpty
(
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"
))))
{
jgUseRegistration
.
setUseUnitCreditCode
(
null
);
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
...
...
@@ -539,6 +581,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
detail
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
detail
.
put
(
"designStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designStandard"
))));
detail
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
detail
.
put
(
"longitudeLatitude"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"longitudeLatitude"
))));
return
detail
;
}
...
...
@@ -685,9 +728,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
lambdaOth
);
if
(
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
// 使用信息
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
lambda
.
eq
(
UseInfo:
:
getRecord
,
record
);
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
lambda
);
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJg
UseInfo
>().
lambda
();
lambda
.
eq
(
IdxBizJg
UseInfo:
:
getRecord
,
record
);
IdxBizJg
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
lambda
);
// 注册信息
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
lambdaReg
=
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
lambda
();
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