Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
b1d72671
Commit
b1d72671
authored
Jun 24, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
340b3168
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
3 deletions
+41
-3
AccidentTypeController.java
.../amos/fas/business/controller/AccidentTypeController.java
+3
-0
CommonPageInfoParam.java
.../yeejoin/amos/fas/business/param/CommonPageInfoParam.java
+16
-0
FireEquipmentParam.java
...m/yeejoin/amos/fas/business/param/FireEquipmentParam.java
+2
-2
WaterResourceParam.java
...m/yeejoin/amos/fas/business/param/WaterResourceParam.java
+1
-1
ExcelServiceImpl.java
...join/amos/fas/business/service/impl/ExcelServiceImpl.java
+17
-0
dbTemplate_accident_type.xml
...src/main/resources/db/mapper/dbTemplate_accident_type.xml
+2
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/AccidentTypeController.java
View file @
b1d72671
...
...
@@ -45,6 +45,9 @@ public class AccidentTypeController extends BaseController {
public
CommonResponse
queryRiskLevelPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
param
.
setOrgCode
(
orgCode
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iAccidentTypeService
.
queryAccidentTypePage
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
list
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/CommonPageInfoParam.java
View file @
b1d72671
...
...
@@ -57,6 +57,8 @@ public class CommonPageInfoParam extends CommonPageable {
*/
private
Long
riskSourceId
;
private
String
orgCode
;
public
String
getEquipType
()
{
return
equipType
;
}
...
...
@@ -146,4 +148,18 @@ public class CommonPageInfoParam extends CommonPageable {
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
/**
* @return the orgCode
*/
public
String
getOrgCode
()
{
return
orgCode
;
}
/**
* @param orgCode the orgCode to set
*/
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/FireEquipmentParam.java
View file @
b1d72671
...
...
@@ -15,7 +15,7 @@ public class FireEquipmentParam {
@Excel
(
name
=
"装备分类(设备类_0,耗材类_1,视频监控_2,灭火器材_3)"
,
replace
=
{
"设备类_0"
,
"耗材类_1"
,
"视频监控_2"
,
"灭火器材_3"
},
orderNum
=
"2"
)
private
Integer
equipClassify
;
@Excel
(
name
=
"装备类型"
,
orderNum
=
"3"
)
@Excel
(
name
=
"装备类型
(必填)
"
,
orderNum
=
"3"
)
private
String
equipType
;
@Excel
(
name
=
"三维坐标"
,
orderNum
=
"4"
)
...
...
@@ -27,7 +27,7 @@ public class FireEquipmentParam {
@Excel
(
name
=
"是否室内(必填 0/1)"
,
replace
=
{
"否_0"
,
"是_1"
},
orderNum
=
"6"
)
private
Integer
isIndoor
;
@Excel
(
name
=
"装备名称"
,
orderNum
=
"7"
)
@Excel
(
name
=
"装备名称
(必填)
"
,
orderNum
=
"7"
)
private
String
name
;
@Excel
(
name
=
"保养周期"
,
orderNum
=
"8"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/WaterResourceParam.java
View file @
b1d72671
...
...
@@ -9,7 +9,7 @@ public class WaterResourceParam {
@Excel
(
name
=
"编号(必填)"
,
width
=
20
)
private
String
code
;
@Excel
(
name
=
"名称"
,
orderNum
=
"1"
,
width
=
20
)
@Excel
(
name
=
"名称
(必填)
"
,
orderNum
=
"1"
,
width
=
20
)
private
String
name
;
@Excel
(
name
=
"类型(消火栓_1,消防水池_2,喷淋_3)"
,
replace
=
{
"消火栓_1"
,
"消防水池_2"
,
"喷淋_3"
},
orderNum
=
"3"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ExcelServiceImpl.java
View file @
b1d72671
...
...
@@ -14,6 +14,7 @@ import com.yeejoin.amos.fas.business.param.FireEquipmentPointParam;
import
com.yeejoin.amos.fas.business.param.WaterResourceParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IExcelService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
...
...
@@ -60,6 +61,12 @@ public class ExcelServiceImpl implements IExcelService {
List
<
FireEquipmentParam
>
saveList
=
Lists
.
newArrayList
();
List
<
FireEquipmentParam
>
updateList
=
Lists
.
newArrayList
();
list
.
forEach
(
fireEquipment
->
{
if
(!
StringUtil
.
isNotEmpty
(
fireEquipment
.
getEquipType
())
||
!
StringUtil
.
isNotEmpty
(
fireEquipment
.
getName
())
||
!
StringUtil
.
isNotEmpty
(
fireEquipment
.
getCode
()))
{
throw
new
YeeException
(
"请检查必填项是否为空!"
);
}
String
code
=
fireEquipment
.
getCode
();
String
riskSourceCode
=
fireEquipment
.
getRiskSourceCode
();
Optional
<
RiskSource
>
riskSourceOptional
=
riskSourceDao
.
findByCode
(
riskSourceCode
);
...
...
@@ -68,6 +75,12 @@ public class ExcelServiceImpl implements IExcelService {
}
else
{
throw
new
YeeException
(
"编号: ["
+
riskSourceCode
+
"] 风险区域不存在!"
);
}
if
(
fireEquipment
.
getMaintenanceCycle
()
==
null
)
{
fireEquipment
.
setMaintenanceCycle
(
0
);
}
if
(
fireEquipment
.
getNumber
()
==
null
)
{
fireEquipment
.
setNumber
(
0
);
}
FireEquipmentEntity
fireEquipmentEntity
=
equipmentMap
.
get
(
code
);
if
(
fireEquipmentEntity
==
null
)
{
saveList
.
add
(
fireEquipment
);
...
...
@@ -147,6 +160,10 @@ public class ExcelServiceImpl implements IExcelService {
List
<
WaterResourceParam
>
saveList
=
Lists
.
newArrayList
();
List
<
WaterResourceParam
>
updateList
=
Lists
.
newArrayList
();
list
.
forEach
(
warerRes
->
{
if
(!
StringUtil
.
isNotEmpty
(
warerRes
.
getName
())
||
!
StringUtil
.
isNotEmpty
(
warerRes
.
getCode
()))
{
throw
new
YeeException
(
"请检查必填项是否为空!"
);
}
String
riskSourceCode
=
warerRes
.
getRiskSourceCode
();
Optional
<
RiskSource
>
riskSourceOptional
=
riskSourceDao
.
findByCode
(
riskSourceCode
);
if
(
riskSourceOptional
.
isPresent
())
{
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_accident_type.xml
View file @
b1d72671
...
...
@@ -10,6 +10,7 @@
f_accident_type a
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"orgCode!=null"
>
and (a.org_code like concat(#{orgCode},'%') OR a.org_code = #{orgCode})
</if>
</trim>
</select>
<!--分页查询 -->
...
...
@@ -51,6 +52,7 @@
left join f_evaluation_model fem on fem.id = a.evaluation_sid
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"orgCode!=null"
>
and (a.org_code like concat(#{orgCode},'%') OR a.org_code = #{orgCode})
</if>
</trim>
order by a.id
<choose>
...
...
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