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
85e85860
Commit
85e85860
authored
Jun 27, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg):新增加接口,将已办理的使用单位单位办理的压力管道中的管道长度数值从mm变成m
parent
d651ab28
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
2 deletions
+57
-2
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+1
-1
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+8
-0
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+2
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+45
-0
EquipTechParamPipeline.java
...os/boot/module/ymt/api/entity/EquipTechParamPipeline.java
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
85e85860
...
...
@@ -386,7 +386,7 @@
pp."PIPELINE_NUMBER" pipelineNumber,
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness,
ROUND(pp."PIPE_LENGTH" / 1000.0, 4)
pipeLength,
pp."PIPE_LENGTH"
pipeLength,
pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature,
pp."MEDIUM" medium,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
85e85860
...
...
@@ -575,4 +575,12 @@ public class CommonController extends BaseController {
commonService
.
updateUnitTypeCache
(
getSelectedOrgInfo
(),
unitType
,
selectedRoleSeqs
);
return
ResponseHelper
.
buildResponse
(
"success"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/historicalDataProcessingOfPressurePipeline"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"更新压力管道按照单位办理的使用登记历史单子中,管道长度从mm变成m"
,
notes
=
"更新压力管道按照单位办理的使用登记历史单子中,管道长度从mm变成m"
)
public
ResponseModel
<
String
>
historicalDataProcessingOfPressurePipeline
(){
commonService
.
historicalDataProcessingOfPressurePipeline
();
return
ResponseHelper
.
buildResponse
(
"success"
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
85e85860
...
...
@@ -210,4 +210,6 @@ public interface ICommonService {
* @param unitType 单位类型
*/
void
updateUnitTypeCache
(
ReginParams
reginParams
,
String
unitType
,
String
selectedRoleSeqs
);
void
historicalDataProcessingOfPressurePipeline
();
}
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 @
85e85860
...
...
@@ -27,6 +27,7 @@ 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.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.enums.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService
;
...
...
@@ -43,10 +44,12 @@ import com.yeejoin.amos.boot.module.jg.biz.utils.JsonUtils;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.PrivilegeFeginService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.TaskV2FeignService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipTechParamPipeline
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
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.EquipTechParamPipelineMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgSupervisionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper
;
...
...
@@ -90,6 +93,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.*
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Modifier
;
import
java.math.BigDecimal
;
import
java.net.URLEncoder
;
import
java.nio.file.Files
;
import
java.util.*
;
...
...
@@ -232,6 +236,8 @@ public class CommonServiceImpl implements ICommonService {
private
TaskV2FeignService
taskV2FeignService
;
@Autowired
private
Configuration
configuration
;
@Autowired
EquipTechParamPipelineMapper
equipTechParamPipelineMapper
;
public
static
byte
[]
file2byte
(
File
file
)
{
try
{
...
...
@@ -1988,4 +1994,42 @@ public class CommonServiceImpl implements ICommonService {
redisUtils
.
set
(
getSelectedRoleRedisKey
(),
selectedRoleSeqs
,
redisRegionTimeSecond
);
redisUtils
.
set
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()),
JSONObject
.
toJSONString
(
reginParams
),
redisRegionTimeSecond
);
}
@Override
public
void
historicalDataProcessingOfPressurePipeline
()
{
LambdaQueryWrapper
<
JgUseRegistration
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgUseRegistration:
:
getManageType
,
"unit"
);
queryWrapper
.
eq
(
JgUseRegistration:
:
getIsDelete
,
0
);
List
<
JgUseRegistration
>
jgUseRegistrations
=
jgUseRegistrationServiceImpl
.
getBaseMapper
().
selectList
(
queryWrapper
);
// 对应的历史表
jgUseRegistrations
.
forEach
(
x
->{
LambdaQueryWrapper
<
JgRegistrationHistory
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
x
.
getSequenceNbr
());
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
wrapper
);
try
{
if
(
jgRegistrationHistory
.
getChangeData
().
contains
(
"8300"
)){
JSONObject
mapData
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
if
(!
ValidationUtil
.
isEmpty
(
mapData
.
get
(
"equipmentLists"
))){
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
mapData
.
get
(
"equipmentLists"
);
// 遍历 equipmentLists,将 pipeLength 从毫米转换为米
equipmentLists
.
forEach
(
equ
->
{
String
record
=(
String
)
equ
.
get
(
"record"
);
EquipTechParamPipeline
equipTechParamPipeline
=
equipTechParamPipelineMapper
.
queryTechParamInUse
(
record
);
BigDecimal
pipeLengthInM
=
Optional
.
ofNullable
(
equipTechParamPipeline
)
.
map
(
EquipTechParamPipeline:
:
getPipeLength
)
.
orElse
(
new
BigDecimal
(
"0"
));
equ
.
put
(
"pipeLength"
,
pipeLengthInM
);
});
}
jgRegistrationHistory
.
setChangeData
(
JSONObject
.
toJSONString
(
mapData
));
jgRegistrationHistoryService
.
getBaseMapper
().
updateById
(
jgRegistrationHistory
);
}
}
catch
(
Exception
e
){
log
.
error
(
"更新压力管道出现错误:{}"
,
e
.
getMessage
());
e
.
printStackTrace
();
}
});
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/EquipTechParamPipeline.java
View file @
85e85860
...
...
@@ -89,7 +89,7 @@ public class EquipTechParamPipeline extends AbstractEquipBaseEntity {
@TableField
(
value
=
"\"WALL_THICKNESS\""
)
private
BigDecimal
wallThickness
;
/**
* * 管道长度
* * 管道长度
(单位:m)
*/
@TableField
(
value
=
"\"PIPE_LENGTH\""
)
...
...
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