Commit 34e81a4d by zhengxj

finish pc端指派技工--技工列表 on 20191021 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@24390 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 0eb0f1d8
...@@ -27,7 +27,7 @@ public interface SysMechanicMapper { ...@@ -27,7 +27,7 @@ public interface SysMechanicMapper {
SysMechanic selectByUserId(Integer userId); SysMechanic selectByUserId(Integer userId);
List<MechanicBusiness> getMechanicList(@Param("serviceId") Integer serviceId, @Param("keyWord") String keyWord); List<MechanicBusiness> getMechanicList(@Param("keyWord") String keyWord);
MechanicBusiness getMechanicOrderCountAndTimeliness(@Param("mechanicId") Integer mechanicId); MechanicBusiness getMechanicOrderCountAndTimeliness(@Param("mechanicId") Integer mechanicId);
} }
\ No newline at end of file \ No newline at end of file
...@@ -3620,7 +3620,7 @@ public class OrderServiceImpl implements IOrderService { ...@@ -3620,7 +3620,7 @@ public class OrderServiceImpl implements IOrderService {
SysOrder order = selectByPrimaryKey(orderId); SysOrder order = selectByPrimaryKey(orderId);
int serviceId = order.getMerchantId(); int serviceId = order.getMerchantId();
Integer district = order.getDistrict(); Integer district = order.getDistrict();
List<MechanicBusiness> list = sysMechanicDao.getMechanicList(serviceId, keyWord); List<MechanicBusiness> list = sysMechanicDao.getMechanicList(keyWord);
GlobalCoordinates source = null; GlobalCoordinates source = null;
if (!list.isEmpty()) { if (!list.isEmpty()) {
for (MechanicBusiness mechanicBusiness : list) { for (MechanicBusiness mechanicBusiness : list) {
......
...@@ -206,33 +206,28 @@ ...@@ -206,33 +206,28 @@
</select> </select>
<select id="getMechanicList" resultType="com.glsx.ordercenter.dto.MechanicBusiness"> <select id="getMechanicList" resultType="com.glsx.ordercenter.dto.MechanicBusiness">
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
<bind name="keyWord" value="'%' + keyWord + '%'" /> <bind name="keyWord" value="'%' + keyWord + '%'" />
</if> </if>
select * from select * from (
( select select u.id, u.name, u.phone_number as phone,
u.id mechanicId, u.name, u.phone_number as phone, m.work_status AS workStatus, CONCAT_WS('', sa2.area_name, sa1.area_name, sa.area_name, m.address) AS address
m.work_status AS workStatus, CONCAT_WS('', sa2.area_name, sa1.area_name, FROM sys_mechanic m
sa.area_name, m.address) AS address LEFT JOIN sys_user u on m.user_id = u.id
FROM sys_service_mechanic sm
LEFT JOIN sys_user u on sm.mechanic_id = u.id
LEFT JOIN sys_mechanic m on sm.mechanic_id = m.user_id
LEFT JOIN sys_area sa on m.district=sa.id LEFT JOIN sys_area sa on m.district=sa.id
LEFT JOIN sys_area sa1 ON sa.parent_id = sa1.id LEFT JOIN sys_area sa1 ON sa.parent_id = sa1.id
LEFT JOIN sys_area sa2 ON LEFT JOIN sys_area sa2 ON sa1.parent_id = sa2.id
sa1.parent_id = sa2.id where m.send_type = 2
<where> and u.user_status = 'sys_user_status_normal'
and sm.service_id = #{serviceId} and m.mechanic_status = 'sys_user_status_pass_check'
and u.user_status = 'sys_user_status_normal'
and m.mechanic_status = 'sys_user_status_pass_check'
</where>
GROUP BY u.id GROUP BY u.id
ORDER BY m.work_status ASC, u.create_time DESC, u.id DESC ORDER BY m.work_status ASC, u.create_time DESC, u.id DESC
) d ) d
<where> <where>
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and (d.name like #{keyWord} or d.phone like #{keyWord} or address and (d.name like #{keyWord} or d.phone like #{keyWord} or
address
like #{keyWord}) like #{keyWord})
</if> </if>
</where> </where>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!