Commit a94ec1e6 authored by 徐州's avatar 徐州

排班列表提交

parent e84ecf56
...@@ -39,6 +39,7 @@ import org.springside.modules.web.Servlets; ...@@ -39,6 +39,7 @@ import org.springside.modules.web.Servlets;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* 账户控制器<br> * 账户控制器<br>
...@@ -1148,4 +1149,20 @@ public class UserController extends BaseController { ...@@ -1148,4 +1149,20 @@ public class UserController extends BaseController {
} }
return result; return result;
} }
@RequestMapping(value = "pblist", method = RequestMethod.GET)
public String pbList( HttpServletRequest request, Model model) {
//共多少条数据,今日新增多少条
String cityCode = (String) request.getSession().getAttribute(SessionConstants.SESSION_CITY_KEY);
List<UserEntity> users = this.user.getDutyUserByCity(cityCode);
List<UserVo> collect = users.stream().map(i -> {
UserVo userVo = new UserVo();
userVo.setEntity(i);
return userVo;
}).collect(Collectors.toList());
model.addAttribute("users", collect);
return getAutoUrl("pblist");
}
} }
...@@ -299,6 +299,10 @@ ...@@ -299,6 +299,10 @@
<shiro:hasPermission name="PLZYKH"> <shiro:hasPermission name="PLZYKH">
<li><a href="${ctx}/transfercustomer">批量转移客户</a></li> <li><a href="${ctx}/transfercustomer">批量转移客户</a></li>
</shiro:hasPermission> </shiro:hasPermission>
<%-- <shiro:hasPermission name="PBGL">--%>
<shiro:hasPermission name="PLZYKH">
<li><a href="${ctx}/user/pblist">排班管理</a></li>
</shiro:hasPermission>
</ul> </ul>
</li> </li>
......
...@@ -134,6 +134,8 @@ public interface IUser extends IService { ...@@ -134,6 +134,8 @@ public interface IUser extends IService {
List<DutyStaffEntity> getOndutyById(Integer uid); List<DutyStaffEntity> getOndutyById(Integer uid);
List<UserEntity> getDutyUserByCity(String cityCodes);
List<UserEntity> getManagerByPid(Integer uid, String managername); List<UserEntity> getManagerByPid(Integer uid, String managername);
UserEntity getLimitLoginById(String name); UserEntity getLimitLoginById(String name);
......
...@@ -25,6 +25,8 @@ public interface UserMapper { ...@@ -25,6 +25,8 @@ public interface UserMapper {
List<DutyStaffEntity> getStaffDutyList(); List<DutyStaffEntity> getStaffDutyList();
List<UserEntity> getDutyUserByCity(Map<String, Object> map);
UserEntity getLimitLoginById(String name); UserEntity getLimitLoginById(String name);
void updateDutyStaff(DutyStaffEntity staff); void updateDutyStaff(DutyStaffEntity staff);
......
...@@ -131,6 +131,13 @@ public class UserImpl implements IUser { ...@@ -131,6 +131,13 @@ public class UserImpl implements IUser {
return userMapper.getOndutyById(uid); return userMapper.getOndutyById(uid);
} }
@Override
public List<UserEntity> getDutyUserByCity(String cityCode) {
Map<String,Object> param = new HashMap<>();
param.put("cityCode",cityCode);
return userMapper.getDutyUserByCity(param);
}
@Override @Override
public List<LabelEntity> getCustomerLabelById(LabelEntity labelentity) { public List<LabelEntity> getCustomerLabelById(LabelEntity labelentity) {
return labelmapper.getCustomerLabelById(labelentity); return labelmapper.getCustomerLabelById(labelentity);
......
...@@ -191,6 +191,11 @@ ...@@ -191,6 +191,11 @@
select id,name,userId,onduty from duty_staff select id,name,userId,onduty from duty_staff
</select> </select>
<select id="getDutyUserByCity" resultMap="infoMap">
select a.id,a.name,a.`realName`,a.`position`,b.`onduty` as enabled,b.order as status from user a join `duty_staff` b on a.id = b.userId
where a.`deptUrlPath` REGEXP CONCAT('^', (select urlPath from `department` where `descripition` = #{cityCode})) order by 'b.order'
</select>
<select id="getDutyByCondition" resultMap="infoMap3" parameterType="map"> <select id="getDutyByCondition" resultMap="infoMap3" parameterType="map">
select id,name,userId,onduty select id,name,userId,onduty
FROM duty_staff FROM duty_staff
......
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