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
54455033
Commit
54455033
authored
Apr 30, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(JG):气瓶导入功能开发,压力容器参数修改
parent
b6b44366
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
23 deletions
+28
-23
PressureVesselListener.java
...mos/boot/module/jg/biz/config/PressureVesselListener.java
+23
-9
IdxBizJqEquipmentRegisterController.java
...g/biz/controller/IdxBizJqEquipmentRegisterController.java
+2
-10
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+3
-4
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/config/PressureVesselListener.java
View file @
54455033
...
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Component
;
...
...
@@ -157,6 +158,9 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
useInnerCodeList
.
add
(
data
.
getUseInnerCode
());
equCodeList
.
add
(
data
.
getEquCode
());
factoryNumList
.
add
(
"0"
.
equals
(
data
.
getWhetherVehicleCylinder
())
?
data
.
getFactoryNum
()
:
null
);
String
equListCode
=
(
String
)
paramMap
.
get
(
"EQU_LIST"
);
String
equCategoryCode
=
(
String
)
paramMap
.
get
(
"EQU_CATEGORY"
);
String
equDefineCode
=
(
String
)
paramMap
.
get
(
"EQU_DEFINE"
);
Date
date
=
new
Date
();
String
record
=
UUID
.
randomUUID
().
toString
();
...
...
@@ -193,9 +197,9 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
BeanUtils
.
copyProperties
(
data
,
registerInfo
);
registerInfo
.
setRecord
(
record
);
registerInfo
.
setRecDate
(
date
);
registerInfo
.
setEquCategory
(
(
String
)
paramMap
.
get
(
"EQU_CATEGORY_CODE"
)
);
registerInfo
.
setEquDefine
(
(
String
)
paramMap
.
get
(
"EQU_DEFINE_CODE"
)
);
registerInfo
.
setEquList
(
(
String
)
paramMap
.
get
(
"EQU_LIST_CODE"
)
);
registerInfo
.
setEquCategory
(
equCategoryCode
);
registerInfo
.
setEquDefine
(
equDefineCode
);
registerInfo
.
setEquList
(
equListCode
);
registerInfo
.
setRegisterState
(
idxBizJgRegisterInfoService
.
getRegCode
());
registerInfoList
.
add
(
registerInfo
);
...
...
@@ -224,6 +228,10 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
paramsVesselList
.
add
(
paramsVessel
);
ESEquipmentCategoryDto
dto
=
JSON
.
parseObject
(
toJSONString
(
data
),
ESEquipmentCategoryDto
.
class
);
List
<
EquipmentCategory
>
equList
=
commonService
.
getEquipmentCategoryList
(
equListCode
,
null
);
List
<
EquipmentCategory
>
equCategory
=
commonService
.
getEquipmentCategoryList
(
equCategoryCode
,
null
);
List
<
EquipmentCategory
>
equDefine
=
commonService
.
getEquipmentCategoryList
(
equDefineCode
,
null
);
// 使用单位信息
dto
.
setDATA_SOURCE
(
useInfo
.
getDataSource
());
dto
.
setNEXT_INSPECT_DATE
(
inspectionDetectionInfo
.
getNextInspectDate
()
+
""
);
...
...
@@ -231,12 +239,18 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
dto
.
setSEQUENCE_NBR
(
record
);
dto
.
setFACTORY_NUM
(
factoryInfo
.
getFactoryNum
());
dto
.
setUSE_INNER_CODE
(
useInfo
.
getUseInnerCode
());
dto
.
setEQU_CATEGORY
((
String
)
paramMap
.
get
(
"EQU_CATEGORY"
));
dto
.
setEQU_CATEGORY_CODE
((
String
)
paramMap
.
get
(
"EQU_CATEGORY_CODE"
));
dto
.
setEQU_LIST
((
String
)
paramMap
.
get
(
"EQU_LIST"
));
dto
.
setEQU_LIST_CODE
((
String
)
paramMap
.
get
(
"EQU_LIST_CODE"
));
dto
.
setEQU_DEFINE
((
String
)
paramMap
.
get
(
"EQU_DEFINE"
));
dto
.
setEQU_DEFINE_CODE
((
String
)
paramMap
.
get
(
"EQU_DEFINE_CODE"
));
dto
.
setEQU_CATEGORY_CODE
(
equCategoryCode
);
if
(
CollectionUtils
.
isNotEmpty
(
equCategory
))
{
dto
.
setEQU_CATEGORY
(
equCategory
.
get
(
0
).
getName
());
}
dto
.
setEQU_LIST_CODE
(
equListCode
);
if
(
CollectionUtils
.
isNotEmpty
(
equList
))
{
dto
.
setEQU_LIST
(
equList
.
get
(
0
).
getName
());
}
dto
.
setEQU_DEFINE_CODE
(
equDefineCode
);
if
(
CollectionUtils
.
isNotEmpty
(
equDefine
))
{
dto
.
setEQU_DEFINE
(
equDefine
.
get
(
0
).
getName
());
}
dto
.
setUSE_UNIT_CREDIT_CODE
(
company
.
getCompanyCode
());
dto
.
setUSE_UNIT_NAME
(
company
.
getCompanyName
());
esEquipmentCategoryList
.
add
(
dto
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/IdxBizJqEquipmentRegisterController.java
View file @
54455033
...
...
@@ -151,16 +151,8 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
@PostMapping
(
"/importPressureVesselData"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"压力容器设备批量导入"
)
public
ResponseModel
<
String
>
importPressureVesselData
(
@RequestParam
(
value
=
"file"
)
MultipartFile
file
,
@RequestParam
Map
<
String
,
Object
>
paramMap
)
{
HashMap
<
String
,
Object
>
colorMap
=
new
HashMap
<>();
colorMap
.
put
(
"EQU_LIST_CODE"
,
"2000"
);
colorMap
.
put
(
"EQU_LIST"
,
"压力容器"
);
colorMap
.
put
(
"EQU_CATEGORY"
,
"气瓶"
);
colorMap
.
put
(
"EQU_CATEGORY_CODE"
,
"2300"
);
colorMap
.
put
(
"EQU_DEFINE"
,
"特种气瓶(内装填料气瓶、纤维缠绕气瓶、低温绝热气瓶)"
);
colorMap
.
put
(
"EQU_DEFINE_CODE"
,
"23T0"
);
return
ResponseHelper
.
buildResponse
(
idxBizJgRegisterInfoService
.
importPressureVesselData
(
file
,
colorMap
));
public
ResponseModel
<
String
>
importPressureVesselData
(
@RequestBody
MultipartFile
file
,
@RequestBody
Map
<
String
,
Object
>
paramMap
)
{
return
ResponseHelper
.
buildResponse
(
idxBizJgRegisterInfoService
.
importPressureVesselData
(
file
,
paramMap
));
}
...
...
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 @
54455033
...
...
@@ -60,13 +60,11 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.io.IOException
;
import
java.lang.reflect.Field
;
import
java.sql.Timestamp
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
...
...
@@ -1901,10 +1899,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
@Override
public
String
importPressureVesselData
(
MultipartFile
file
,
Map
<
String
,
Object
>
paramMap
)
{
public
String
importPressureVesselData
(
MultipartFile
file
,
Map
<
String
,
Object
>
paramMap
)
{
try
{
PressureVesselListener
pressureVesselListener
=
new
PressureVesselListener
();
injectDependencies
(
pressureVesselListener
,
paramMap
);
LinkedHashMap
equipmentInfoForm
=
(
LinkedHashMap
)
checkAndCast
(
paramMap
.
get
(
EQUIP_INFO_FORM_ID
));
injectDependencies
(
pressureVesselListener
,
equipmentInfoForm
);
EasyExcel
.
read
(
file
.
getInputStream
(),
EquipInfoCylinderExcelDto
.
class
,
pressureVesselListener
)
.
headRowNumber
(
4
)
.
sheet
()
...
...
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