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
58b2d773
Commit
58b2d773
authored
May 21, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(大编辑):代码重构
1.产权单位由信用代码调整为主键后,适配调整 2.装置编辑,增加可编辑使用地点信息字段 3.使用信息表,在前端使用信息regionCode更新后,同步更新表里冗余的name
parent
d7c100f1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
215 additions
and
27 deletions
+215
-27
ProjectContraptionChangeDataDto.java
...ot/module/jg/api/dto/ProjectContraptionChangeDataDto.java
+39
-0
CommonMapper.java
.../yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
+6
-0
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+13
-0
BizDataChangeController.java
...oot/module/jg/biz/controller/BizDataChangeController.java
+14
-4
BizDataChangeServiceImpl.java
...mos/boot/module/jg/biz/edit/BizDataChangeServiceImpl.java
+5
-0
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+7
-0
PieLineDataChangeServiceImpl.java
.../biz/edit/process/equip/PieLineDataChangeServiceImpl.java
+17
-6
SingleEquipChangeProcess.java
...e/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
+59
-6
SingleProjectEquipChangeProcess.java
...z/edit/process/equip/SingleProjectEquipChangeProcess.java
+38
-4
IEquipChangeDataProcessStrategy.java
...ocess/equip/strategy/IEquipChangeDataProcessStrategy.java
+5
-5
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+11
-1
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+1
-1
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/ProjectContraptionChangeDataDto.java
View file @
58b2d773
...
@@ -47,4 +47,43 @@ public class ProjectContraptionChangeDataDto extends BaseChangeDataDto {
...
@@ -47,4 +47,43 @@ public class ProjectContraptionChangeDataDto extends BaseChangeDataDto {
@FieldDisplayDefine
(
value
=
"产品质量合格证明"
,
type
=
JSON
.
class
)
@FieldDisplayDefine
(
value
=
"产品质量合格证明"
,
type
=
JSON
.
class
)
private
String
productQualificationCertificate
;
private
String
productQualificationCertificate
;
@FieldDisplayDefine
(
value
=
"使用地点代码_省"
)
private
String
province
;
@FieldDisplayDefine
(
value
=
"使用地点代码_市"
)
private
String
city
;
@FieldDisplayDefine
(
value
=
"使用地点代码_区(县)"
)
private
String
county
;
@FieldDisplayDefine
(
value
=
"使用地点代码_街道(镇)"
)
private
String
street
;
@FieldDisplayDefine
(
value
=
"使用详细地址"
)
private
String
address
;
@FieldDisplayDefine
(
value
=
"使用地点_市名称"
)
private
String
cityName
;
@FieldDisplayDefine
(
value
=
"使用地点_区名称"
)
private
String
countyName
;
@FieldDisplayDefine
(
value
=
" 使用地点_街道名称"
)
private
String
streetName
;
@FieldDisplayDefine
(
value
=
" 装置起始位置"
,
type
=
JSON
.
class
)
private
String
startLatitudeLongitude
;
@FieldDisplayDefine
(
value
=
" 装置结束位置"
,
type
=
JSON
.
class
)
private
String
endLatitudeLongitude
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
View file @
58b2d773
...
@@ -46,6 +46,10 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
...
@@ -46,6 +46,10 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
String
getCompanyNameByOrgCode
(
String
orgCode
);
String
getCompanyNameByOrgCode
(
String
orgCode
);
CompanyBo
queryCompanyByOrgCode
(
String
orgCode
);
CompanyBo
queryCompanyByCode
(
String
companyCode
);
String
selectBusinessData
(
String
tableName
,
String
instanceId
);
String
selectBusinessData
(
String
tableName
,
String
instanceId
);
String
selectPromoterData
(
String
tableName
,
String
instanceId
);
String
selectPromoterData
(
String
tableName
,
String
instanceId
);
...
@@ -295,5 +299,7 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
...
@@ -295,5 +299,7 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
String
queryUnitInfoByCreditCode
(
String
unitCreditCode
);
String
queryUnitInfoByCreditCode
(
String
unitCreditCode
);
List
<
Map
<
String
,
Object
>>
getUnitInfoListByType
(
String
type
);
List
<
Map
<
String
,
Object
>>
getUnitInfoListByType
(
String
type
);
String
queryUnitCreditCodeBySeq
(
String
unitSeq
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
58b2d773
...
@@ -113,6 +113,9 @@
...
@@ -113,6 +113,9 @@
<select
id=
"getCompanyNameByOrgCode"
resultType=
"java.lang.String"
>
<select
id=
"getCompanyNameByOrgCode"
resultType=
"java.lang.String"
>
select company_name from privilege_company where org_code = #{orgCode} limit 1
select company_name from privilege_company where org_code = #{orgCode} limit 1
</select>
</select>
<select
id=
"queryCompanyByOrgCode"
resultType=
"com.yeejoin.amos.boot.biz.common.bo.CompanyBo"
>
select sequence_nbr, org_code, company_name, company_code from privilege_company where org_code = #{orgCode} limit 1
</select>
<select
id=
"selectBusinessData"
resultType=
"java.lang.String"
>
<select
id=
"selectBusinessData"
resultType=
"java.lang.String"
>
...
@@ -2791,4 +2794,14 @@
...
@@ -2791,4 +2794,14 @@
<select
id=
"queryUnitInfoByCreditCode"
resultType=
"java.lang.String"
>
<select
id=
"queryUnitInfoByCreditCode"
resultType=
"java.lang.String"
>
select sequence_nbr seq from tz_base_enterprise_info where use_unit_code = #{unitCreditCode}
select sequence_nbr seq from tz_base_enterprise_info where use_unit_code = #{unitCreditCode}
</select>
</select>
<select
id=
"queryCompanyByCode"
resultType=
"com.yeejoin.amos.boot.biz.common.bo.CompanyBo"
>
select sequence_nbr, org_code, company_name, company_code from privilege_company where company_code = #{companyCode} limit 1
</select>
<select
id=
"queryUnitCreditCodeBySeq"
resultType=
"java.lang.String"
>
select
use_unit_code
from
tz_base_enterprise_info
where sequence_nbr = #{unitSeq}
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/BizDataChangeController.java
View file @
58b2d773
...
@@ -2,11 +2,13 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
...
@@ -2,11 +2,13 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.RequestChangeData
;
import
com.yeejoin.amos.boot.module.jg.api.dto.RequestChangeData
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.BizDataChangeServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.BizDataChangeServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.SingleManageEquipEditHandleImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.SingleManageEquipEditHandleImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -66,22 +68,30 @@ public class BizDataChangeController extends BaseController {
...
@@ -66,22 +68,30 @@ public class BizDataChangeController extends BaseController {
@GetMapping
(
value
=
"/v2/{bizType}/sub-detail"
)
@GetMapping
(
value
=
"/v2/{bizType}/sub-detail"
)
@ApiOperation
(
value
=
"编辑二级页面详情查询--通用"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"编辑二级页面详情查询--通用"
,
httpMethod
=
"GET"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getSubDetailV2
(
@ApiParam
(
value
=
"设备或者装置唯一标识"
)
@RequestParam
String
bizId
,
public
ResponseModel
<
Map
<
String
,
Object
>>
getSubDetailV2
(
@ApiParam
(
value
=
"设备或者装置唯一标识"
)
@RequestParam
String
bizId
,
@ApiParam
(
value
=
"单据编号,装置时需要"
)
@RequestParam
(
required
=
false
)
String
applyNo
,
@ApiParam
(
value
=
"单据编号,装置时需要"
)
@RequestParam
(
required
=
false
)
String
applyNo
,
@ApiParam
(
value
=
"详情类型:设备、装置"
)
@RequestParam
DetailType
type
,
@ApiParam
(
value
=
"详情类型:设备、装置"
)
@RequestParam
DetailType
type
,
@ApiParam
(
value
=
"业务类型"
)
@PathVariable
String
bizType
)
{
@ApiParam
(
value
=
"业务类型"
)
@PathVariable
String
bizType
)
{
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
querySubDetail
(
applyNo
,
bizId
,
bizType
,
type
,
getSelectedOrgInfo
()));
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
querySubDetail
(
applyNo
,
bizId
,
bizType
,
type
,
getSelectedOrgInfo
()));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/v2/{bizType}/save"
)
@PostMapping
(
value
=
"/v2/{bizType}/save"
)
@ApiOperation
(
value
=
"编辑保存--通用"
,
httpMethod
=
"POST"
)
@ApiOperation
(
value
=
"编辑保存--通用"
,
httpMethod
=
"POST"
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
sourceField
=
"ESTATE_UNIT_CREDIT_CODE"
,
paramIndex
=
4
,
targetField
=
"ESTATE_UNIT_CREDIT_CODE"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditCodeBySeq"
)
})
public
ResponseModel
<
String
>
saveV2
(
@ApiParam
(
value
=
"设备或者装置唯一标识"
)
@RequestParam
String
bizId
,
public
ResponseModel
<
String
>
saveV2
(
@ApiParam
(
value
=
"设备或者装置唯一标识"
)
@RequestParam
String
bizId
,
@ApiParam
(
required
=
true
,
value
=
"单据编号或者record"
)
@RequestParam
String
applyNo
,
@ApiParam
(
required
=
true
,
value
=
"单据编号或者record"
)
@RequestParam
String
applyNo
,
@ApiParam
(
required
=
true
,
value
=
"业务类型"
)
@PathVariable
String
bizType
,
@ApiParam
(
required
=
true
,
value
=
"业务类型"
)
@PathVariable
String
bizType
,
@ApiParam
(
required
=
true
,
value
=
"设备处理器类型"
)
@RequestParam
IBizDataChangeHandleStrategy
.
ModelType
modelType
,
@ApiParam
(
required
=
true
,
value
=
"设备处理器类型"
)
@RequestParam
IBizDataChangeHandleStrategy
.
ModelType
modelType
,
@RequestBody
RequestChangeData
changeData
)
{
@RequestBody
RequestChangeData
changeData
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
// 基础数据校验
// 基础数据校验
changeData
.
validated
(
reginParams
);
changeData
.
validated
(
reginParams
);
bizDataChangeService
.
save
(
bizId
,
applyNo
,
bizType
,
modelType
,
changeData
,
reginParams
);
bizDataChangeService
.
save
(
bizId
,
applyNo
,
bizType
,
modelType
,
changeData
,
reginParams
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/BizDataChangeServiceImpl.java
View file @
58b2d773
...
@@ -2,12 +2,14 @@ package com.yeejoin.amos.boot.module.jg.biz.edit;
...
@@ -2,12 +2,14 @@ package com.yeejoin.amos.boot.module.jg.biz.edit;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.RequestChangeData
;
import
com.yeejoin.amos.boot.module.jg.api.dto.RequestChangeData
;
import
com.yeejoin.amos.boot.module.jg.biz.context.BizDataHandleStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.BizDataHandleStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.controller.BizDataChangeController
;
import
com.yeejoin.amos.boot.module.jg.biz.controller.BizDataChangeController
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingCompanyTypeForCurrentUser
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingCompanyTypeForCurrentUser
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -40,6 +42,9 @@ public class BizDataChangeServiceImpl {
...
@@ -40,6 +42,9 @@ public class BizDataChangeServiceImpl {
return
handleStrategy
.
getDetail
(
applyNo
,
type
,
searchParams
);
return
handleStrategy
.
getDetail
(
applyNo
,
type
,
searchParams
);
}
}
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"ESTATE_UNIT_CREDIT_CODE"
,
targetField
=
"ESTATE_UNIT_CREDIT_CODE"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
)
})
public
Map
<
String
,
Object
>
querySubDetail
(
String
applyNo
,
String
bizId
,
String
bizType
,
BizDataChangeController
.
DetailType
type
,
ReginParams
selectedOrgInfo
)
{
public
Map
<
String
,
Object
>
querySubDetail
(
String
applyNo
,
String
bizId
,
String
bizType
,
BizDataChangeController
.
DetailType
type
,
ReginParams
selectedOrgInfo
)
{
IBizDataChangeHandleStrategy
handleStrategy
=
BizDataHandleStrategyContext
.
getStrategy
(
bizType
);
IBizDataChangeHandleStrategy
handleStrategy
=
BizDataHandleStrategyContext
.
getStrategy
(
bizType
);
// 装饰器模式增强结果
// 装饰器模式增强结果
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/CommonEquipDataProcessService.java
View file @
58b2d773
...
@@ -15,9 +15,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -15,9 +15,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData
;
import
com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData
;
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.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl
;
...
@@ -110,6 +112,10 @@ public class CommonEquipDataProcessService {
...
@@ -110,6 +112,10 @@ public class CommonEquipDataProcessService {
private
final
CommonServiceImpl
commonService
;
private
final
CommonServiceImpl
commonService
;
private
final
RedisUtils
redisUtils
;
private
final
CommonMapper
commonMapper
;
public
static
final
String
BASE_COLUMN_REC_DATE
=
"\"REC_DATE\""
;
public
static
final
String
BASE_COLUMN_REC_DATE
=
"\"REC_DATE\""
;
public
static
final
String
BASE_COLUMN_REC_USERID
=
"\"REC_USER_ID\""
;
public
static
final
String
BASE_COLUMN_REC_USERID
=
"\"REC_USER_ID\""
;
...
@@ -513,6 +519,7 @@ public class CommonEquipDataProcessService {
...
@@ -513,6 +519,7 @@ public class CommonEquipDataProcessService {
fieldChangeMeta
.
setColumnFamily
(
group
.
value
());
fieldChangeMeta
.
setColumnFamily
(
group
.
value
());
fieldChangeMeta
.
setColumnLabel
(
fieldName
);
fieldChangeMeta
.
setColumnLabel
(
fieldName
);
fieldChangeMeta
.
setChangeId
(
changeId
);
fieldChangeMeta
.
setChangeId
(
changeId
);
fieldChangeMeta
.
setColumnType
(
displayDefine
.
type
().
getSimpleName
());
Object
oV
=
field
.
get
(
beanData
);
Object
oV
=
field
.
get
(
beanData
);
if
(
oV
instanceof
String
)
{
if
(
oV
instanceof
String
)
{
String
value
=
(
String
)
field
.
get
(
beanData
);
String
value
=
(
String
)
field
.
get
(
beanData
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/PieLineDataChangeServiceImpl.java
View file @
58b2d773
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContrapti
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContrapti
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
@Component
@Component
...
@@ -31,20 +32,30 @@ public class PieLineDataChangeServiceImpl {
...
@@ -31,20 +32,30 @@ public class PieLineDataChangeServiceImpl {
public
void
update
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDtoNew
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
void
update
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDtoNew
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
// 原有对象行转列
// 原有对象行转列
ProjectContraptionChangeDataDto
projectContraptionChangeDataDtoOld
=
getOldProjectContraptionData
(
projectContraptionChangeDataDtoNew
);
ProjectContraptionChangeDataDto
projectContraptionChangeDataDtoOld
=
getOldProjectContraptionData
(
projectContraptionChangeDataDtoNew
);
List
<
FieldChangeMeta
>
newProjectContraptionChangeData
=
c
ommonEquipDataProcessService
.
convertBeanField2Column2
(
projectContraptionChangeDataDtoNew
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionId
());
List
<
FieldChangeMeta
>
newProjectContraptionChangeData
=
C
ommonEquipDataProcessService
.
convertBeanField2Column2
(
projectContraptionChangeDataDtoNew
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionId
());
// 新对象构造行转列
// 新对象构造行转列
List
<
FieldChangeMeta
>
oldProjectContraptionChangeData
=
c
ommonEquipDataProcessService
.
convertBeanField2Column2
(
projectContraptionChangeDataDtoOld
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionId
());
List
<
FieldChangeMeta
>
oldProjectContraptionChangeData
=
C
ommonEquipDataProcessService
.
convertBeanField2Column2
(
projectContraptionChangeDataDtoOld
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionId
());
// 数据比对记录变化字段列表
// 数据比对记录变化字段列表
allChangeColumns
.
addAll
(
c
ommonEquipDataProcessService
.
mergeChangeFields
(
newProjectContraptionChangeData
,
oldProjectContraptionChangeData
));
allChangeColumns
.
addAll
(
C
ommonEquipDataProcessService
.
mergeChangeFields
(
newProjectContraptionChangeData
,
oldProjectContraptionChangeData
));
// 数据入库
// 数据入库
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionId
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCity
,
projectContraptionChangeDataDtoNew
.
getCity
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCityName
,
projectContraptionChangeDataDtoNew
.
getCityName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCounty
,
projectContraptionChangeDataDtoNew
.
getCounty
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCountyName
,
projectContraptionChangeDataDtoNew
.
getCountyName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getStreet
,
projectContraptionChangeDataDtoNew
.
getStreet
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getStreetName
,
projectContraptionChangeDataDtoNew
.
getStreetName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getAddress
,
projectContraptionChangeDataDtoNew
.
getAddress
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getStartLatitudeLongitude
,
projectContraptionChangeDataDtoNew
.
getStartLatitudeLongitude
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getEndLatitudeLongitude
,
projectContraptionChangeDataDtoNew
.
getEndLatitudeLongitude
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProjectContraption
,
projectContraptionChangeDataDtoNew
.
getProjectContraption
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProjectContraption
,
projectContraptionChangeDataDtoNew
.
getProjectContraption
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProjectContraptionNo
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionNo
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProjectContraptionNo
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionNo
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getPipelineLength
,
projectContraptionChangeDataDtoNew
.
getPipelineLength
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getPipelineLength
,
projectContraptionChangeDataDtoNew
.
getPipelineLength
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProductPhoto
,
projectContraptionChangeDataDtoNew
.
getProductPhoto
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProductPhoto
,
projectContraptionChangeDataDtoNew
.
getProductPhoto
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getOtherAccessories
,
projectContraptionChangeDataDtoNew
.
getOtherAccessories
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getOtherAccessories
,
projectContraptionChangeDataDtoNew
.
getOtherAccessories
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProductQualificationCertificate
,
projectContraptionChangeDataDtoNew
.
getProductQualificationCertificate
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProductQualificationCertificate
,
projectContraptionChangeDataDtoNew
.
getProductQualificationCertificate
());
updateWrapper
.
set
(
BaseEntity:
:
getRecDate
,
new
Date
());
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
projectContraptionChangeDataDtoNew
.
getProjectContraptionId
());
idxBizJgProjectContraptionServiceImpl
.
update
(
null
,
updateWrapper
);
idxBizJgProjectContraptionServiceImpl
.
update
(
null
,
updateWrapper
);
}
}
...
@@ -57,10 +68,10 @@ public class PieLineDataChangeServiceImpl {
...
@@ -57,10 +68,10 @@ public class PieLineDataChangeServiceImpl {
// 1.记录变化的数据对象
// 1.记录变化的数据对象
PieLineDesignChangeDataDto
pieLineDesignChangeDataDto
=
BeanUtil
.
copyProperties
(
pipelineChangeItemDto
,
PieLineDesignChangeDataDto
.
class
);
PieLineDesignChangeDataDto
pieLineDesignChangeDataDto
=
BeanUtil
.
copyProperties
(
pipelineChangeItemDto
,
PieLineDesignChangeDataDto
.
class
);
// 构造新对象行转列
// 构造新对象行转列
List
<
FieldChangeMeta
>
designInfoNew
=
c
ommonEquipDataProcessService
.
convertBeanField2Column2
(
pieLineDesignChangeDataDto
,
record
);
List
<
FieldChangeMeta
>
designInfoNew
=
C
ommonEquipDataProcessService
.
convertBeanField2Column2
(
pieLineDesignChangeDataDto
,
record
);
// 老数据查询行转列
// 老数据查询行转列
List
<
FieldChangeMeta
>
designInfoOld
=
commonEquipDataProcessService
.
buildDesignInfoOld
(
record
);
List
<
FieldChangeMeta
>
designInfoOld
=
commonEquipDataProcessService
.
buildDesignInfoOld
(
record
);
allChangeColumns
.
addAll
(
c
ommonEquipDataProcessService
.
mergeChangeFields
(
designInfoNew
,
designInfoOld
));
allChangeColumns
.
addAll
(
C
ommonEquipDataProcessService
.
mergeChangeFields
(
designInfoNew
,
designInfoOld
));
// 2.更新管道的设计单位名称
// 2.更新管道的设计单位名称
equipChangeDataUpdateServiceImpl
.
updatePieLineDesignData
(
record
,
pieLineDesignChangeDataDto
);
equipChangeDataUpdateServiceImpl
.
updatePieLineDesignData
(
record
,
pieLineDesignChangeDataDto
);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
View file @
58b2d773
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.equip;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.equip;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
...
@@ -10,14 +11,13 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataCha
...
@@ -10,14 +11,13 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataCha
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 单个维护设备-策略实现类
* 单个维护设备-策略实现类
...
@@ -38,6 +38,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -38,6 +38,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
IdxBizJgUseInfo
useInfoNew
=
BeanUtil
.
copyProperties
(
useInfoOld
,
IdxBizJgUseInfo
.
class
);
IdxBizJgUseInfo
useInfoNew
=
BeanUtil
.
copyProperties
(
useInfoOld
,
IdxBizJgUseInfo
.
class
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
useInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
useInfoNew
);
useInfoNew
.
setSequenceNbr
(
useInfoOld
.
getSequenceNbr
());
useInfoNew
.
setSequenceNbr
(
useInfoOld
.
getSequenceNbr
());
this
.
setNameByCode2UseInfo
(
useInfoNew
);
IdxBizJgRegisterInfo
registerInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgRegisterInfoService
().
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
));
IdxBizJgRegisterInfo
registerInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgRegisterInfoService
().
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
));
IdxBizJgRegisterInfo
registerInfoNew
=
BeanUtil
.
copyProperties
(
registerInfoOld
,
IdxBizJgRegisterInfo
.
class
);
IdxBizJgRegisterInfo
registerInfoNew
=
BeanUtil
.
copyProperties
(
registerInfoOld
,
IdxBizJgRegisterInfo
.
class
);
...
@@ -61,11 +62,12 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -61,11 +62,12 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
IdxBizJgOtherInfo
otherInfoNew
=
BeanUtil
.
copyProperties
(
otherInfoOld
,
IdxBizJgOtherInfo
.
class
);
IdxBizJgOtherInfo
otherInfoNew
=
BeanUtil
.
copyProperties
(
otherInfoOld
,
IdxBizJgOtherInfo
.
class
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
otherInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
otherInfoNew
);
otherInfoNew
.
setSequenceNbr
(
otherInfoOld
.
getSequenceNbr
());
otherInfoNew
.
setSequenceNbr
(
otherInfoOld
.
getSequenceNbr
());
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgSupervisionInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>().
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
record
));
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgSupervisionInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>().
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
record
));
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfoNew
=
BeanUtil
.
copyProperties
(
idxBizJgSupervisionInfoOld
,
IdxBizJgSupervisionInfo
.
class
);
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfoNew
=
BeanUtil
.
copyProperties
(
idxBizJgSupervisionInfoOld
,
IdxBizJgSupervisionInfo
.
class
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
idxBizJgSupervisionInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
idxBizJgSupervisionInfoNew
);
idxBizJgSupervisionInfoNew
.
setSequenceNbr
(
idxBizJgSupervisionInfoOld
.
getSequenceNbr
());
idxBizJgSupervisionInfoNew
.
setSequenceNbr
(
idxBizJgSupervisionInfoOld
.
getSequenceNbr
());
this
.
setNameByCode2SupervisionInfo
(
idxBizJgSupervisionInfoNew
);
String
jySeq
=
changeJson
.
getString
(
"jySeq"
);
String
jySeq
=
changeJson
.
getString
(
"jySeq"
);
String
maintenanceSeq
=
changeJson
.
getString
(
"maintenanceSeq"
);
String
maintenanceSeq
=
changeJson
.
getString
(
"maintenanceSeq"
);
...
@@ -129,12 +131,63 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -129,12 +131,63 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
return
allChangeColumns
;
return
allChangeColumns
;
}
}
private
void
setNameByCode2SupervisionInfo
(
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfo
)
{
// 按照org_code查询
if
(
StringUtils
.
isNotEmpty
(
idxBizJgSupervisionInfo
.
getOrgBranchCode
()))
{
CompanyBo
companyBo
=
commonEquipDataProcessService
.
getCommonMapper
().
queryCompanyByOrgCode
(
idxBizJgSupervisionInfo
.
getOrgBranchCode
());
idxBizJgSupervisionInfo
.
setOrgBranchCode
(
companyBo
.
getOrgCode
());
idxBizJgSupervisionInfo
.
setOrgBranchName
(
companyBo
.
getCompanyName
());
idxBizJgSupervisionInfo
.
setCompanyOrgBranchCode
(
companyBo
.
getCompanyCode
());
}
}
private
void
setNameByCode2UseInfo
(
IdxBizJgUseInfo
useInfoNew
)
{
// 1.使用地点name冗余
// 市
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
commonEquipDataProcessService
.
getRedisUtils
().
get
(
"CITY"
);
// 区
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
commonEquipDataProcessService
.
getRedisUtils
().
get
(
"REGION"
);
// 街道
List
<
LinkedHashMap
>
street
=
(
List
<
LinkedHashMap
>)
commonEquipDataProcessService
.
getRedisUtils
().
get
(
"STREET"
);
// 城市
if
(
StringUtils
.
isNotEmpty
(
useInfoNew
.
getCity
())
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
city
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
useInfoNew
.
getCity
()))
{
useInfoNew
.
setCityName
(
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
// 区县
if
(
StringUtils
.
isNotEmpty
(
useInfoNew
.
getCounty
())
&&
!
ObjectUtils
.
isEmpty
(
region
))
{
region
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
useInfoNew
.
getCounty
()))
{
useInfoNew
.
setCountyName
(
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
// 街道
if
(
StringUtils
.
isNotEmpty
(
useInfoNew
.
getFactoryUseSiteStreet
())
&&
!
ObjectUtils
.
isEmpty
(
street
))
{
street
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
useInfoNew
.
getFactoryUseSiteStreet
()))
{
useInfoNew
.
setStreetName
(
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
// 2.产权单位名称冗余
// 产权单位信息
if
(
StringUtils
.
isNotEmpty
(
useInfoNew
.
getEstateUnitCreditCode
()))
{
CompanyBo
companyBo
=
commonEquipDataProcessService
.
getCommonMapper
().
queryCompanyByCode
(
useInfoNew
.
getEstateUnitCreditCode
());
Optional
.
ofNullable
(
companyBo
).
ifPresent
(
item
->
useInfoNew
.
setEstateUnitName
(
companyBo
.
getCompanyName
()));
}
}
private
void
beforeCheckForUseOrgCode
(
IdxBizJgUseInfo
useInfoOld
,
IdxBizJgRegisterInfo
registerInfoNew
)
{
private
void
beforeCheckForUseOrgCode
(
IdxBizJgUseInfo
useInfoOld
,
IdxBizJgRegisterInfo
registerInfoNew
)
{
// 1.使用登记证编辑时重复性校验
// 1.使用登记证编辑时重复性校验
if
(!
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
registerInfoNew
.
getEquCategory
()))
{
// 非气瓶逻辑,所有设备不能重复
if
(!
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
registerInfoNew
.
getEquCategory
()))
{
// 非气瓶逻辑,所有设备不能重复
if
(
useInfoOld
.
getDataSource
().
equals
(
"jg_his"
)
&&
StringUtils
.
isNotEmpty
(
registerInfoNew
.
getUseOrgCode
()))
{
if
(
useInfoOld
.
getDataSource
().
equals
(
"jg_his"
)
&&
StringUtils
.
isNotEmpty
(
registerInfoNew
.
getUseOrgCode
()))
{
Boolean
isUsed
=
commonEquipDataProcessService
.
getCommonService
().
useRegistrationCertificateAccountUnique
(
registerInfoNew
.
getUseOrgCode
(),
useInfoOld
.
getRecord
());
Boolean
isUsed
=
commonEquipDataProcessService
.
getCommonService
().
useRegistrationCertificateAccountUnique
(
registerInfoNew
.
getUseOrgCode
(),
useInfoOld
.
getRecord
());
if
(
isUsed
)
{
if
(
isUsed
)
{
throw
new
BadRequest
(
"使用登记证编号已存在!"
);
throw
new
BadRequest
(
"使用登记证编号已存在!"
);
}
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/SingleProjectEquipChangeProcess.java
View file @
58b2d773
...
@@ -13,13 +13,12 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChange
...
@@ -13,13 +13,12 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChange
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 单个装置维护-策略实现类
* 单个装置维护-策略实现类
...
@@ -52,6 +51,7 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
...
@@ -52,6 +51,7 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
}
}
// 2.装置基本信息校验、保存(前端返回的装置信息为大写 需注意)
// 2.装置基本信息校验、保存(前端返回的装置信息为大写 需注意)
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
=
CommonEquipDataProcessService
.
castMap2Bean
(
changeData
,
ProjectContraptionChangeDataDto
.
class
);
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
=
CommonEquipDataProcessService
.
castMap2Bean
(
changeData
,
ProjectContraptionChangeDataDto
.
class
);
this
.
setNameForDictKey
(
projectContraptionChangeDataDto
);
this
.
calTotalPieLineLength
(
projectContraptionChangeDataDto
,
items
);
this
.
calTotalPieLineLength
(
projectContraptionChangeDataDto
,
items
);
pieLineDataChangeService
.
update
(
projectContraptionChangeDataDto
,
allChangeColumns
);
pieLineDataChangeService
.
update
(
projectContraptionChangeDataDto
,
allChangeColumns
);
// 3.管道信息入库保存
// 3.管道信息入库保存
...
@@ -73,6 +73,40 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
...
@@ -73,6 +73,40 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
return
allChangeColumns
;
return
allChangeColumns
;
}
}
private
void
setNameForDictKey
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
)
{
// 1.使用地点name冗余
// 市
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
commonEquipDataProcessService
.
getRedisUtils
().
get
(
"CITY"
);
// 区
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
commonEquipDataProcessService
.
getRedisUtils
().
get
(
"REGION"
);
// 街道
List
<
LinkedHashMap
>
street
=
(
List
<
LinkedHashMap
>)
commonEquipDataProcessService
.
getRedisUtils
().
get
(
"STREET"
);
// 城市
if
(
StringUtils
.
isNotEmpty
(
projectContraptionChangeDataDto
.
getCity
())
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
city
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
projectContraptionChangeDataDto
.
getCity
()))
{
projectContraptionChangeDataDto
.
setCityName
(
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
// 区县
if
(
StringUtils
.
isNotEmpty
(
projectContraptionChangeDataDto
.
getCounty
())
&&
!
ObjectUtils
.
isEmpty
(
region
))
{
region
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
projectContraptionChangeDataDto
.
getCounty
()))
{
projectContraptionChangeDataDto
.
setCountyName
(
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
// 街道
if
(
StringUtils
.
isNotEmpty
(
projectContraptionChangeDataDto
.
getStreet
())
&&
!
ObjectUtils
.
isEmpty
(
street
))
{
street
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
projectContraptionChangeDataDto
.
getStreet
()))
{
projectContraptionChangeDataDto
.
setStreetName
(
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
}
private
void
calTotalPieLineLength
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
PipelineChangeItemDto
>
items
)
{
private
void
calTotalPieLineLength
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
PipelineChangeItemDto
>
items
)
{
projectContraptionChangeDataDto
.
setPipelineLength
(
items
.
stream
().
filter
(
i
->
i
.
getPipeLength
()
!=
null
).
mapToDouble
(
TechParamsPipelineChangeFieldDto:
:
getPipeLength
).
sum
());
projectContraptionChangeDataDto
.
setPipelineLength
(
items
.
stream
().
filter
(
i
->
i
.
getPipeLength
()
!=
null
).
mapToDouble
(
TechParamsPipelineChangeFieldDto:
:
getPipeLength
).
sum
());
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/strategy/IEquipChangeDataProcessStrategy.java
View file @
58b2d773
...
@@ -12,14 +12,14 @@ import java.util.Map;
...
@@ -12,14 +12,14 @@ import java.util.Map;
public
interface
IEquipChangeDataProcessStrategy
{
public
interface
IEquipChangeDataProcessStrategy
{
/**
/**
* 处理
*/
List
<
FieldChangeMeta
>
handle
(
Map
<
String
,
Object
>
changeData
,
String
defaultChangeId
);
/**
* 可处理类型
* 可处理类型
*
*
* @return 可处理的类型
* @return 可处理的类型
*/
*/
IBizDataChangeHandleStrategy
.
ModelType
canHandleMode
();
IBizDataChangeHandleStrategy
.
ModelType
canHandleMode
();
/**
* 处理
*/
List
<
FieldChangeMeta
>
handle
(
Map
<
String
,
Object
>
changeData
,
String
defaultChangeId
);
}
}
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/CommonServiceImpl.java
View file @
58b2d773
...
@@ -3054,13 +3054,23 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -3054,13 +3054,23 @@ public class CommonServiceImpl implements ICommonService {
}
}
/**
/**
* 根据单位ID查询单位的信用代码--发射使用勿调整
* @param unitSeq 单位seq
* @return 单位信用代码_单位名称
*/
public
String
queryUnitCreditCodeBySeq
(
String
unitSeq
)
{
return
commonMapper
.
queryUnitCreditCodeBySeq
(
unitSeq
);
}
/**
* 根据单位信息查询单位seq
* 根据单位信息查询单位seq
* @param unitInfo 单位信息
* @param unitInfo 单位信息
* @return 单位seq
* @return 单位seq
*/
*/
public
String
queryUnitInfoByCreditCode
(
String
unitInfo
)
{
public
String
queryUnitInfoByCreditCode
(
String
unitInfo
)
{
if
(
StringUtils
.
isBlank
(
unitInfo
))
{
if
(
StringUtils
.
isBlank
(
unitInfo
))
{
return
""
;
return
unitInfo
;
}
}
String
unitCreditCode
=
unitInfo
.
split
(
"_"
)[
0
];
String
unitCreditCode
=
unitInfo
.
split
(
"_"
)[
0
];
return
commonMapper
.
queryUnitInfoByCreditCode
(
unitCreditCode
);
return
commonMapper
.
queryUnitInfoByCreditCode
(
unitCreditCode
);
...
...
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/JgReformNoticeServiceImpl.java
View file @
58b2d773
...
@@ -143,7 +143,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -143,7 +143,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@ResultFieldMapping
({
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"useUnitCreditCode"
,
targetField
=
"useUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
),
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"useUnitCreditCode"
,
targetField
=
"useUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
),
})
})
public
Map
<
String
,
Object
>
queryBySequenceNbrWithAuth
(
Long
sequenceNbr
,
CompanyBo
companyBo
)
{
public
Map
<
String
,
Object
>
queryBySequenceNbrWithAuth
(
Long
sequenceNbr
,
CompanyBo
companyBo
)
{
Map
<
String
,
Object
>
re
=
this
.
queryBySequenceNbr
(
sequenceNbr
);
Map
<
String
,
Object
>
re
=
this
.
queryBySequenceNbr
(
sequenceNbr
);
...
...
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