Commit a18b3cf1 authored by KeYong's avatar KeYong

修改bug

parent 4ffaaaa0
...@@ -95,7 +95,7 @@ public interface View3dMapper extends BaseMapper { ...@@ -95,7 +95,7 @@ public interface View3dMapper extends BaseMapper {
* @param orgCode * @param orgCode
* @return * @return
*/ */
List<HashMap<String, Object>> getStatisticsCheck(String orgCode); HashMap<String, Object> getStatisticsCheck(@Param("orgCode") String orgCode);
/** /**
* 风险异常显示最新5条 * 风险异常显示最新5条
......
package com.yeejoin.amos.fas.business.feign; package com.yeejoin.amos.fas.business.feign;
import com.yeejoin.amos.fas.business.jpush.PushMsgParam;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.ResponseModel; import com.yeejoin.amos.fas.core.util.ResponseModel;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List; import java.util.List;
...@@ -34,7 +35,7 @@ public interface JcsFeign { ...@@ -34,7 +35,7 @@ public interface JcsFeign {
* 查询当前值班人信息列表 * 查询当前值班人信息列表
* @return * @return
*/ */
@RequestMapping(value = "/jcs/common/duty-person/person/on_duty/list", method = RequestMethod.GET,consumes = "application/json") @RequestMapping(value = "/jcs/common/duty-person/duty/list", method = RequestMethod.GET,consumes = "application/json")
ResponseModel dutyPersonList(); ResponseModel dutyPersonList();
......
...@@ -423,20 +423,19 @@ public class View3dServiceImpl implements IView3dService { ...@@ -423,20 +423,19 @@ public class View3dServiceImpl implements IView3dService {
@Override @Override
public List<Map<String, Object>> getStatisticsCheck(String orgCode) { public List<Map<String, Object>> getStatisticsCheck(String orgCode) {
List<HashMap<String, Object>> statisticsCheck = view3dMapper.getStatisticsCheck(orgCode); HashMap<String, Object> statisticsCheck = view3dMapper.getStatisticsCheck(orgCode);
List<Map<String, Object>> stateList = PlanTaskDetailStatusEnum.getEnumList(); List<Map<String, Object>> stateList = PlanTaskDetailStatusEnum.getEnumList();
stateList.forEach(s -> { stateList.forEach(s -> {
if (statisticsCheck != null) { if (statisticsCheck != null) {
Long value = 0L; if ("未开始".equals(String.valueOf(s.get("name")))) {
for (HashMap<String, Object> sc : statisticsCheck) { s.put("value", statisticsCheck.get("notStart_num"));
String typeString = sc.get("type").toString(); } else if ("合格".equals(String.valueOf(s.get("name")))) {
String enumType = s.get("type").toString(); s.put("value", statisticsCheck.get("ok_num"));
if (typeString.equals(enumType)) { } else if ("不合格".equals(String.valueOf(s.get("name")))) {
value = (Long) sc.get("value"); s.put("value", statisticsCheck.get("notOk_num"));
break; } else if ("漏检".equals(String.valueOf(s.get("name")))) {
} s.put("value", statisticsCheck.get("miss_num"));
} }
s.put("value", value);
} }
}); });
return stateList; return stateList;
......
...@@ -126,20 +126,67 @@ ...@@ -126,20 +126,67 @@
<select id="getStatisticsCheck" resultType="java.util.HashMap"> <select id="getStatisticsCheck" resultType="java.util.HashMap">
<![CDATA[ <![CDATA[
SELECT IFNULL(d.STATUS,'') AS type, count(1) as value SELECT
FROM p_plan_task_detail d (
left JOIN p_plan_task t on t.id=d.task_no SELECT
WHERE ifnull( sum( `p_plan_task`.`point_num` ), 0 )
DATEDIFF(t.begin_time,CURRENT_DATE) <= 0 AND DATEDIFF(t.end_time,CURRENT_DATE) >= 0 FROM
AND (t.org_code like CONCAT(#{orgCode},'-%') OR t.org_code = #{orgCode}) `p_plan_task`
AND d.status = 0 WHERE
UNION ALL (
select `p_plan_task`.`check_date` LIKE concat( curdate(), '%' ))) AS `point_num`,(
is_ok as type,count(1) as value SELECT
from p_check a ifnull( sum( `p_plan_task`.`point_num` ), 0 )
where (a.org_code like CONCAT(#{orgCode},'-%') OR a.org_code = #{orgCode}) FROM
and TO_DAYS(a.check_time) = TO_DAYS(CURRENT_DATE) `p_plan_task`
GROUP BY a.is_ok WHERE
((
`p_plan_task`.`finish_status` = 3
)
AND (
`p_plan_task`.`check_date` LIKE concat( curdate(), '%' )))) AS `miss_num`,(
SELECT
count( 1 ) AS `total_num`
FROM
(
SELECT
`b`.`id` AS `id`
FROM
`p_plan_task_detail` `b`
LEFT JOIN `p_plan_task` `a` ON `a`.`id` = `b`.`task_no`
LEFT JOIN `p_point` `d` ON `d`.`id` = `b`.`point_id`
LEFT JOIN p_check c ON c.plan_task_detail_id = b.id
WHERE
`b`.`is_finish` = 1 AND c.is_ok = 1 AND `a`.`check_date` = curdate()
ORDER BY
`b`.`id`
) `t` ) AS `ok_num`,(
SELECT
count( 1 ) AS `total_num`
FROM
(
SELECT
`b`.`id` AS `id`
FROM
`p_plan_task_detail` `b`
LEFT JOIN `p_plan_task` `a` ON `a`.`id` = `b`.`task_no`
LEFT JOIN `p_point` `d` ON `d`.`id` = `b`.`point_id`
LEFT JOIN p_check c ON c.plan_task_detail_id = b.id
WHERE
`b`.`is_finish` = 1 AND c.is_ok = 2 AND `a`.`check_date` = curdate()
ORDER BY
`b`.`id`
) `t` ) AS `notOk_num`,(
SELECT
ifnull( sum( `p_plan_task`.`point_num` ), 0 )
FROM
`p_plan_task`
WHERE
((
`p_plan_task`.`finish_status` = 0
)
AND (
`p_plan_task`.`check_date` LIKE concat( curdate(), '%' )))) AS `notStart_num`
]]> ]]>
</select> </select>
...@@ -213,9 +260,9 @@ ...@@ -213,9 +260,9 @@
<select id="getEquipStatusTop5" resultType="com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"> <select id="getEquipStatusTop5" resultType="com.yeejoin.amos.fas.business.bo.SafetyExecuteBo">
SELECT SELECT
wlesi.id, wlesi.id,
wlesi.`value` STATUS, wlesi.`value` `status`,
wlesi.update_date changeDate, wlesi.update_date changeDate,
CONCAT(ed. NAME, ' ', wlei. NAME,IF((ISNULL(ws.full_name) AND ISNULL(sd.description)),'',CONCAT( CONCAT(ed.NAME, ' ', wlei.NAME,IF((ISNULL(ws.full_name) AND ISNULL(sd.description)),'',CONCAT(
'【', '【',
IFNULL(ws.full_name, ''), IFNULL(ws.full_name, ''),
' ', ' ',
...@@ -230,15 +277,10 @@ ...@@ -230,15 +277,10 @@
LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = wles.id LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = wles.id
LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id
WHERE WHERE
wlei.type_code != 'FIREALARM' wlei.is_alarm = false
AND (
wlesi.`value` = 'true'
OR wlesi.`value` = 'false'
)
ORDER BY ORDER BY
wlesi.update_date DESC wlesi.update_date DESC
LIMIT 0, LIMIT 0,5
5
</select> </select>
<select id="initViewErrorNode" resultType="com.yeejoin.amos.fas.business.vo.View3dNodeVo"> <select id="initViewErrorNode" resultType="com.yeejoin.amos.fas.business.vo.View3dNodeVo">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment