Commit 9a96849e authored by zhangjianqian's avatar zhangjianqian

大屏 基本信息以及任务完成数据对接

parent 0715ba09
......@@ -133,4 +133,11 @@ public class TWorkOrderController extends BaseController
{
return toAjax(tWorkOrderService.deleteTWorkOrderByIds(workIds));
}
@GetMapping("/selectWorkOrderNum")
public AjaxResult selectWorkOrderNum(String enterpriseId)
{
return AjaxResult.success(tWorkOrderService.selectWorkOrderNum(enterpriseId));
}
}
package com.zehong.system.mapper;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.vo.HomepageVo;
import org.apache.ibatis.annotations.Param;
/**
* 燃气任务Mapper接口
......@@ -66,4 +69,11 @@ public interface TWorkOrderMapper
* @return 结果
*/
public int deleteTWorkOrderByIds(Long[] workIds);
/**
* 查询任务完成率
* @param enterpriseId
* @return
*/
public Map<String,Object> selectWorkOrderNum(@Param("enterpriseIds")String[] enterpriseIds);
}
package com.zehong.system.service;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.vo.HomepageVo;
......@@ -66,4 +68,6 @@ public interface ITWorkOrderService
* @return 结果
*/
public int deleteTWorkOrderById(Long workId);
public Map<String,Object> selectWorkOrderNum(String enterpriseId);
}
......@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 燃气任务Service业务层处理
......@@ -132,4 +133,15 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
{
return tWorkOrderMapper.deleteTWorkOrderById(workId);
}
/**
*
* @param enterpriseId
* @return
*/
@Override
public Map<String,Object> selectWorkOrderNum(String enterpriseId){
return tWorkOrderMapper.selectWorkOrderNum(enterpriseId.split(","));
}
}
......@@ -208,4 +208,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{workId}
</foreach>
</delete>
<select id="selectWorkOrderNum" resultType="java.util.HashMap">
SELECT IFNULL(SUM(IF(work_status=3 AND work_type=1,1,0))/SUM(IF(work_type=1,1,0)),0) AS typeOne,
IFNULL(SUM(IF(work_status=3 AND work_type=2,1,0))/SUM(IF(work_type=2,1,0)),0) AS typeTwo,
IFNULL(SUM(IF(work_status=3 AND work_type=3,1,0))/SUM(IF(work_type=3,1,0)),0) AS typeThree,
IFNULL(SUM(IF(work_status=3 AND work_type=4,1,0))/SUM(IF(work_type=4,1,0)),0) AS typeFor,
(SELECT COUNT(employed_people_id) FROM t_employed_people_info WHERE is_del = 0
AND beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
) AS peopleNum,
(SELECT CAST(SUM(pipe_length) AS DECIMAL(20,0)) FROM t_pipe_info WHERE is_del = 0
AND beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
)AS allPipeLength
FROM t_work_order WHERE is_del = 0
AND work_assign_enterprose_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
</select>
</mapper>
\ No newline at end of file
......@@ -50,4 +50,12 @@ export function exportOrder(query) {
method: 'get',
params: query
})
}
\ No newline at end of file
}
export function selectWorkOrderNum(query) {
return request({
url: '/system/order/selectWorkOrderNum',
method: 'get',
params: query
})
}
......@@ -313,7 +313,7 @@ export default {
this.currentTime();
this.$refs.mychild.choice(0);
this.$refs.mychild2.choice(0);
this.$refs.mychild2.choice(this.selarr);
},
methods: {
...mapActions({
......@@ -387,6 +387,7 @@ export default {
this.map.allfilter(this.selarr, this.selarr1);
this.map.infowindowClose();
this.show = false;
this.$refs.mychild2.choice(this.selarr);
},
sel(index, item) {
this.map.infowindowClose();
......@@ -408,6 +409,7 @@ export default {
}
// this.map.companyFilter(this.selarr);
this.map.allfilter(this.selarr, this.selarr1);
this.$refs.mychild2.choice(this.selarr);
},
sel1(index, item) {
......
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