Commit 0bd9710a by sdif

用户端代码提交

parent 3de7e35e
...@@ -238,6 +238,7 @@ public class EmployeesServiceImpl implements IEmployeesService { ...@@ -238,6 +238,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
@Override @Override
public EmployeesVo queryByApp(Integer id) { public EmployeesVo queryByApp(Integer id) {
EmployeesVo employeesVo = baseMapper.selectEmployeesById(id); EmployeesVo employeesVo = baseMapper.selectEmployeesById(id);
if(null != employeesVo){
List<TotalOrderVo> totalOrder = totalOrderMapper.selectVoList(Wrappers.<TotalOrder>lambdaQuery() List<TotalOrderVo> totalOrder = totalOrderMapper.selectVoList(Wrappers.<TotalOrder>lambdaQuery()
.eq(TotalOrder::getEmId, employeesVo.getId()) .eq(TotalOrder::getEmId, employeesVo.getId())
.eq(TotalOrder::getIsSatisfaction, 1) .eq(TotalOrder::getIsSatisfaction, 1)
...@@ -251,6 +252,7 @@ public class EmployeesServiceImpl implements IEmployeesService { ...@@ -251,6 +252,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
} }
} }
employeesVo.setTotalOrderVo(totalOrder); employeesVo.setTotalOrderVo(totalOrder);
}
return employeesVo; return employeesVo;
} }
......
...@@ -102,20 +102,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -102,20 +102,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEmployeesById" resultType="com.pz.merchant.domain.vo.EmployeesVo"> <select id="selectEmployeesById" resultType="com.pz.merchant.domain.vo.EmployeesVo">
SELECT e.id, SELECT e.id,
s.avatar, s.avatar,
e.start_year,
e.working_hours,
e.name, e.name,
e.working_hours, e.working_hours,
ifnull(round((sum(if(o.is_satisfaction = 1, 1, 0)) / count(o.id)) * 100, 2), 0) AS satisfaction_rate ifnull(round((sum(if(o.is_satisfaction = 1, 1, 0)) / count(o.id)) * 100, 2), 0) AS satisfaction_rate
FROM employees e FROM employees e
INNER join total_order o on o.em_id = e.id left join total_order o on o.em_id = e.id
left join company c on c.id = e.company_id left join company c on c.id = e.company_id
left join sys_user s on s.user_id = e.uid left join sys_user s on s.user_id = e.uid
WHERE e.`status` = 1 WHERE e.`status` = 1
and e.now_type = 1
and e.del_flag = 0 and e.del_flag = 0
and e.id = #{id} and e.id = #{id}
GROUP BY e.id, GROUP BY e.id,
e.`name` e.`name`
HAVING satisfaction_rate >= #{favorableRate};
</select> </select>
<select id="selectOrder" resultType="com.pz.merchant.domain.vo.OrderInfoVO"> <select id="selectOrder" resultType="com.pz.merchant.domain.vo.OrderInfoVO">
......
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