Commit 2b5256cb authored by 徐州's avatar 徐州

1,新增查詢城市的員工

2,權限選擇改爲單選
parent a94ec1e6
...@@ -87,21 +87,27 @@ ...@@ -87,21 +87,27 @@
//单选 //单选
function checkMember(btn) { function checkMember(btn) {
if (btn.checked) { if(btn.checked) {
var checkAll = true;
for (i = 0; i < document.all("memberCheck").length; i++) { for (i = 0; i < document.all("memberCheck").length; i++) {
if (document.all("memberCheck")[i].checked == false) { document.all("memberCheck")[i].checked = false;
checkAll = false; }
} btn.checked = true;
} }
// if (btn.checked) {
if (checkAll) { // var checkAll = true;
document.getElementById("memberCheckAll").checked = true; // for (i = 0; i < document.all("memberCheck").length; i++) {
} // if (document.all("memberCheck")[i].checked == false) {
} // checkAll = false;
else { // }
document.getElementById("memberCheckAll").checked = false; // }
} //
// if (checkAll) {
// document.getElementById("memberCheckAll").checked = true;
// }
// }
// else {
// document.getElementById("memberCheckAll").checked = false;
// }
} }
var authorizeById = function (selectedId) { var authorizeById = function (selectedId) {
......
...@@ -134,8 +134,6 @@ public interface IUser extends IService { ...@@ -134,8 +134,6 @@ 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);
...@@ -189,4 +187,17 @@ public interface IUser extends IService { ...@@ -189,4 +187,17 @@ public interface IUser extends IService {
String getCityById(String userId); String getCityById(String userId);
/**
* 查询城市值班人员
* @param cityCode nj
* @return
*/
List<UserEntity> getDutyUserByCity(String cityCode);
/**
* 查询城市全部可用员工
* @param cityCode nj
* @return
*/
List<UserEntity> getUserByCity(String cityCode);
} }
...@@ -25,8 +25,6 @@ public interface UserMapper { ...@@ -25,8 +25,6 @@ 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);
...@@ -55,4 +53,8 @@ public interface UserMapper { ...@@ -55,4 +53,8 @@ public interface UserMapper {
String getCityById(String userId); String getCityById(String userId);
List<UserEntity> getDutyUserByCity(Map<String, Object> map);
List<UserEntity> getUserByCity(Map<String, Object> map);
} }
...@@ -131,12 +131,7 @@ public class UserImpl implements IUser { ...@@ -131,12 +131,7 @@ 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) {
...@@ -1147,4 +1142,18 @@ public class UserImpl implements IUser { ...@@ -1147,4 +1142,18 @@ public class UserImpl implements IUser {
@Override @Override
public void commit() { public void commit() {
} }
@Override
public List<UserEntity> getDutyUserByCity(String cityCode) {
Map<String,Object> param = new HashMap<>();
param.put("cityCode",cityCode);
return userMapper.getDutyUserByCity(param);
}
@Override
public List<UserEntity> getUserByCity(String cityCode) {
Map<String,Object> param = new HashMap<>();
param.put("cityCode",cityCode);
return userMapper.getUserByCity(param);
}
} }
...@@ -196,6 +196,11 @@ ...@@ -196,6 +196,11 @@
where a.`deptUrlPath` REGEXP CONCAT('^', (select urlPath from `department` where `descripition` = #{cityCode})) order by 'b.order' where a.`deptUrlPath` REGEXP CONCAT('^', (select urlPath from `department` where `descripition` = #{cityCode})) order by 'b.order'
</select> </select>
<select id="getUserByCity" resultMap="infoMap">
select a.id,a.realName from user a where a.enabled=1 and
a.`deptUrlPath` REGEXP CONCAT('^', (select urlPath from `department` where `descripition` = #{cityCode}))
</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