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
bcb3ed48
Commit
bcb3ed48
authored
Jan 17, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix:
1、压力管道使用单位新增装置修改
parent
728a3cb2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
22 deletions
+19
-22
TmCylinderFillingExamineService.java
...openapi/face/service/TmCylinderFillingExamineService.java
+6
-6
FileDeleteUtil.java
...ava/com/yeejoin/amos/api/openapi/util/FileDeleteUtil.java
+6
-1
IdxBizJgProjectContraptionController.java
.../biz/controller/IdxBizJgProjectContraptionController.java
+1
-1
IdxBizJgProjectContraptionServiceImpl.java
...z/service/impl/IdxBizJgProjectContraptionServiceImpl.java
+6
-14
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TmCylinderFillingExamineService.java
View file @
bcb3ed48
...
...
@@ -15,12 +15,10 @@ import com.yeejoin.amos.api.openapi.util.MultiFieldKey;
import
org.apache.commons.compress.utils.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -45,7 +43,6 @@ public class TmCylinderFillingExamineService extends MyBaseServiceImpl<TmCylinde
private
EventPublisher
eventPublisher
;
@DSTransactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
createCylinderFillingExamine
(
List
<
TmCylinderFillingExamineModel
>
model
)
{
if
(
ValidationUtil
.
isEmpty
(
model
))
throw
new
BadRequest
(
"液化气体气瓶充装信息审核为空."
);
...
...
@@ -87,11 +84,14 @@ public class TmCylinderFillingExamineService extends MyBaseServiceImpl<TmCylinde
if
(!
ValidationUtil
.
isEmpty
(
oldList
))
{
List
<
String
>
fileUrlList
=
Lists
.
newArrayList
();
oldList
.
forEach
(
old
->
{
if
(
old
.
getFillingAuditUrl
()
!=
null
)
{
fileUrlList
.
add
All
(
Arrays
.
asList
(
ValidationUtil
.
isEmpty
(
old
.
getFillingAuditUrl
())
?
new
String
[
0
]
:
old
.
getFillingAuditUrl
().
split
(
","
)
));
if
(
!
ValidationUtil
.
isEmpty
(
old
.
getFillingAuditUrl
())
)
{
fileUrlList
.
add
(
old
.
getFillingAuditUrl
(
));
}
});
eventPublisher
.
publish
(
new
FileToBeDeleteEvent
(
this
,
FileDeleteUtil
.
extractFileNames
(
fileUrlList
)));
List
<
String
>
fileNameList
=
FileDeleteUtil
.
extractFileNames
(
fileUrlList
);
if
(!
ValidationUtil
.
isEmpty
(
fileNameList
))
{
eventPublisher
.
publish
(
new
FileToBeDeleteEvent
(
this
,
fileNameList
));
}
}
}
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/util/FileDeleteUtil.java
View file @
bcb3ed48
...
...
@@ -32,6 +32,11 @@ public class FileDeleteUtil {
List
<
String
>
fileUrls
=
Lists
.
newArrayList
();
if
(!
ValidationUtil
.
isEmpty
(
jsonStr
))
{
try
{
log
.
debug
(
"jsonStr:{}"
,
jsonStr
);
if
(!
JSONObject
.
isValid
(
jsonStr
))
{
fileUrls
.
add
(
jsonStr
);
return
fileUrls
;
}
Object
json
=
JSONObject
.
parse
(
jsonStr
);
if
(
json
instanceof
JSONArray
)
{
JSONArray
jsonArray
=
JSONObject
.
parseArray
(
jsonStr
);
...
...
@@ -57,7 +62,7 @@ public class FileDeleteUtil {
}
return
fileUrls
;
}
catch
(
Exception
e
)
{
log
.
info
(
"Error parsing JSON: {}"
,
jsonStr
);
log
.
error
(
"Error parsing JSON: {}"
,
jsonStr
);
System
.
err
.
println
(
"Error parsing JSON: "
+
e
.
getMessage
());
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/IdxBizJgProjectContraptionController.java
View file @
bcb3ed48
...
...
@@ -43,7 +43,7 @@ public class IdxBizJgProjectContraptionController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增管道工程装置表"
,
notes
=
"新增管道工程装置表"
)
public
ResponseModel
<
Boolea
n
>
save
(
@RequestBody
IdxBizJgProjectContraptionDto
model
)
{
public
ResponseModel
<
IdxBizJgProjectContraptio
n
>
save
(
@RequestBody
IdxBizJgProjectContraptionDto
model
)
{
return
ResponseHelper
.
buildResponse
(
idxBizJgProjectContraptionServiceImpl
.
saveFirstMergeProjectContraption
(
model
));
}
...
...
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/IdxBizJgProjectContraptionServiceImpl.java
View file @
bcb3ed48
...
...
@@ -2,8 +2,6 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -13,19 +11,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
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.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.jg.api.converter.DictParamsConverter
;
import
com.yeejoin.amos.boot.module.jg.api.dto.InspectConclusionConverter
;
import
com.yeejoin.amos.boot.module.jg.api.dto.InspectTypeConverter
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipingExcelDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgProjectContraptionService
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper
;
...
...
@@ -38,7 +29,6 @@ import org.apache.commons.io.IOUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -60,6 +50,7 @@ import java.util.stream.IntStream;
import
java.util.stream.Stream
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
/**
* 管道工程装置表服务实现类
...
...
@@ -507,7 +498,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
}
}
public
boolea
n
saveFirstMergeProjectContraption
(
IdxBizJgProjectContraptionDto
model
)
{
public
IdxBizJgProjectContraptio
n
saveFirstMergeProjectContraption
(
IdxBizJgProjectContraptionDto
model
)
{
// 单位类型
Map
<
String
,
Object
>
companyInfoMap
=
jgInstallationNoticeService
.
getCompanyType
();
IdxBizJgProjectContraption
projectContraption
=
JSON
.
parseObject
(
toJSONString
(
model
),
IdxBizJgProjectContraption
.
class
);
...
...
@@ -515,7 +506,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
String
equCategoryName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
(
model
.
getEquCategoryCode
());
String
equDefineName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
(
model
.
getEquDefineCode
());
projectContraption
.
setDataSource
(
"jg"
);
projectContraption
.
setIsIntoManagement
(
tru
e
);
projectContraption
.
setIsIntoManagement
(
fals
e
);
projectContraption
.
setProvinceName
(
"陕西省"
);
projectContraption
.
setEquList
(
model
.
getEquListCode
());
projectContraption
.
setEquCategory
(
model
.
getEquCategoryCode
());
...
...
@@ -526,7 +517,8 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
projectContraption
.
setPipelineLength
(
0.0
);
projectContraption
.
setUseUnitName
(
companyInfoMap
.
get
(
"companyName"
).
toString
());
projectContraption
.
setUseUnitCreditCode
(
companyInfoMap
.
get
(
"creditCode"
).
toString
());
return
this
.
saveOrUpdateData
(
projectContraption
);
this
.
saveOrUpdateData
(
projectContraption
);
return
projectContraption
;
}
@Override
...
...
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