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
9129635c
Commit
9129635c
authored
Jan 08, 2024
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
浙江省设备平台右屏接口代码提交
parent
1de45ba6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
177 additions
and
0 deletions
+177
-0
FireBussForEquPlatformController.java
...ipmanage/controller/FireBussForEquPlatformController.java
+49
-0
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+6
-0
IEquipmentSpecificSerivce.java
...eejoin/equipmanage/service/IEquipmentSpecificSerivce.java
+7
-0
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+13
-0
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+102
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireBussForEquPlatformController.java
0 → 100644
View file @
9129635c
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author litw
* @date 2024-01-05
*/
@RestController
@Api
(
tags
=
"浙江省设备平台右屏接口"
)
@RequestMapping
(
value
=
"/fire-buss-platform"
)
@Slf4j
public
class
FireBussForEquPlatformController
{
@Autowired
IEquipmentSpecificSerivce
equipmentSpecificSerivce
;
@RequestMapping
(
value
=
"/patrol"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"消防巡查"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getPatrolInfo
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
){
List
<
Map
<
String
,
Object
>>
map
=
equipmentSpecificSerivce
.
getZJPatrolStatics
(
bizOrgCode
);
return
CommonResponseUtil
.
success
(
map
);
}
@RequestMapping
(
value
=
"/scrap"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"消防报废信息"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getScrapInfo
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
){
List
<
Map
<
String
,
Object
>>
map
=
equipmentSpecificSerivce
.
getZJScrapStatics
(
bizOrgCode
);
return
CommonResponseUtil
.
success
(
map
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
9129635c
...
@@ -321,4 +321,10 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
...
@@ -321,4 +321,10 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
void
updateEquipQrCode
(
List
<
String
>
ids
,
String
status
);
void
updateEquipQrCode
(
List
<
String
>
ids
,
String
status
);
String
selectEquipRealtimeSignal
(
@Param
(
value
=
"id"
)
long
id
);
String
selectEquipRealtimeSignal
(
@Param
(
value
=
"id"
)
long
id
);
List
<
Map
<
String
,
Object
>>
getPatrolInfo
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getZJScrapStatics
(
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificSerivce.java
View file @
9129635c
...
@@ -301,4 +301,11 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
...
@@ -301,4 +301,11 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
EquipmentSpecific
getEquipSpecificEntityByCode
(
String
code
);
EquipmentSpecific
getEquipSpecificEntityByCode
(
String
code
);
void
updateCarQrCode
(
List
<
Map
<
String
,
String
>>
carIds
,
String
status
);
void
updateCarQrCode
(
List
<
Map
<
String
,
String
>>
carIds
,
String
status
);
List
<
Map
<
String
,
Object
>>
getZJPatrolStatics
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getZJScrapStatics
(
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
9129635c
...
@@ -2180,4 +2180,17 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -2180,4 +2180,17 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
public
void
updateCarQrCode
(
List
<
Map
<
String
,
String
>>
carIds
,
String
status
)
{
public
void
updateCarQrCode
(
List
<
Map
<
String
,
String
>>
carIds
,
String
status
)
{
carService
.
updateCarQrCode
(
carIds
,
status
);
carService
.
updateCarQrCode
(
carIds
,
status
);
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
getZJPatrolStatics
(
String
bizOrgCode
)
{
return
equipmentSpecificMapper
.
getPatrolInfo
(
bizOrgCode
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
getZJScrapStatics
(
String
bizOrgCode
)
{
return
equipmentSpecificMapper
.
getZJScrapStatics
(
bizOrgCode
);
}
}
}
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
9129635c
...
@@ -2706,5 +2706,106 @@
...
@@ -2706,5 +2706,106 @@
esi.update_date DESC
esi.update_date DESC
LIMIT 1
LIMIT 1
</select>
</select>
<select
id=
"getPatrolInfo"
resultType=
"java.util.Map"
>
SELECT
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
'个' AS unit,
'今日应巡查' AS `name`,
'currentDayTotal' AS `indexKey`,
'xfxc' AS type,
'1' AS `key`
FROM
`p_plan_task`
WHERE
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
'个' AS unit,
'执行进度' AS `name`,
'zxjd' AS `indexKey`,
'xfxc' AS type,
'2' AS `key`
FROM
`p_plan_task`
WHERE
`finish_status` = 2
AND DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
'个' AS unit,
'今日漏查点位' AS `name`,
'currentDayMiss' AS `indexKey`,
'xfxc' AS type,
'3' AS `key`
FROM
`p_plan_task`
WHERE
`finish_status` = 3
AND DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
</select>
<select
id=
"getZJScrapStatics"
resultType=
"java.util.Map"
>
SELECT
'超期未维修' AS `name`,
(
SELECT
count( es.id )
FROM
wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON ed.id = es.equipment_detail_id
LEFT JOIN wl_equipment e ON ed.equipment_id = e.id
LEFT JOIN wl_stock_detail sd ON sd.equipment_detail_id = ed.id
WHERE
ed.production_date IS NOT NULL
AND ( (sd.`status` != 3) or (sd.`status` is null) or (sd.`status` = ''))
AND e.expiry_date IS NOT NULL
AND es.biz_org_code LIKE concat(#{bizOrgCode}, '%')
AND 0 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE )
) AS `value` UNION ALL
SELECT
'超期未报废' AS `name`,
(
SELECT
count( es.id )
FROM
wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON ed.id = es.equipment_detail_id
LEFT JOIN wl_equipment e ON ed.equipment_id = e.id
LEFT JOIN wl_stock_detail sd ON sd.equipment_detail_id = ed.id
WHERE
ed.production_date IS NOT NULL
AND ( (sd.`status` != 7) or (sd.`status` is null) or (sd.`status` = ''))
AND e.expiry_date IS NOT NULL
AND es.biz_org_code LIKE concat(#{bizOrgCode}, '%')
AND 0 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE )
) AS `value` UNION ALL
SELECT
'近1月临期设备' AS `name`,
(
SELECT
count( es.id )
FROM
wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON ed.id = es.equipment_detail_id
LEFT JOIN wl_equipment e ON ed.equipment_id = e.id
LEFT JOIN wl_stock_detail sd ON sd.equipment_detail_id = ed.id
WHERE
ed.production_date IS NOT NULL
AND ( (sd.`status` != 7) or (sd.`status` is null) or (sd.`status` = ''))
AND e.expiry_date IS NOT NULL
AND es.biz_org_code LIKE concat(#{bizOrgCode}, '%')
AND 30 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE )
) AS `value`
</select>
</mapper>
</mapper>
\ No newline at end of file
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