|
|
@ -6,6 +6,7 @@ import com.zc.business.mapper.DcEmployeesMapper; |
|
|
|
import com.zc.business.service.IDcEmployeesService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
@ -19,8 +20,7 @@ import java.util.stream.Collectors; |
|
|
|
* @date 2024-01-04 |
|
|
|
*/ |
|
|
|
@Service |
|
|
|
public class DcEmployeesServiceImpl implements IDcEmployeesService |
|
|
|
{ |
|
|
|
public class DcEmployeesServiceImpl implements IDcEmployeesService { |
|
|
|
@Autowired |
|
|
|
private DcEmployeesMapper dcEmployeesMapper; |
|
|
|
|
|
|
@ -31,8 +31,7 @@ public class DcEmployeesServiceImpl implements IDcEmployeesService |
|
|
|
* @return 值班人员信息 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public DcEmployees selectDcEmployeesById(Long id) |
|
|
|
{ |
|
|
|
public DcEmployees selectDcEmployeesById(Long id) { |
|
|
|
return dcEmployeesMapper.selectDcEmployeesById(id); |
|
|
|
} |
|
|
|
|
|
|
@ -43,8 +42,7 @@ public class DcEmployeesServiceImpl implements IDcEmployeesService |
|
|
|
* @return 值班人员信息 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<DcEmployees> selectDcEmployeesList(DcEmployees dcEmployees) |
|
|
|
{ |
|
|
|
public List<DcEmployees> selectDcEmployeesList(DcEmployees dcEmployees) { |
|
|
|
return dcEmployeesMapper.selectDcEmployeesList(dcEmployees); |
|
|
|
} |
|
|
|
|
|
|
@ -55,8 +53,7 @@ public class DcEmployeesServiceImpl implements IDcEmployeesService |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public int insertDcEmployees(DcEmployees dcEmployees) |
|
|
|
{ |
|
|
|
public int insertDcEmployees(DcEmployees dcEmployees) { |
|
|
|
dcEmployees.setCreateTime(DateUtils.getNowDate()); |
|
|
|
return dcEmployeesMapper.insertDcEmployees(dcEmployees); |
|
|
|
} |
|
|
@ -68,8 +65,7 @@ public class DcEmployeesServiceImpl implements IDcEmployeesService |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public int updateDcEmployees(DcEmployees dcEmployees) |
|
|
|
{ |
|
|
|
public int updateDcEmployees(DcEmployees dcEmployees) { |
|
|
|
dcEmployees.setUpdateTime(DateUtils.getNowDate()); |
|
|
|
return dcEmployeesMapper.updateDcEmployees(dcEmployees); |
|
|
|
} |
|
|
@ -81,8 +77,9 @@ public class DcEmployeesServiceImpl implements IDcEmployeesService |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public int deleteDcEmployeesByIds(Long[] ids) |
|
|
|
{ |
|
|
|
@Transactional |
|
|
|
public int deleteDcEmployeesByIds(Long[] ids) { |
|
|
|
dcEmployeesMapper.deleteShifts(ids); |
|
|
|
return dcEmployeesMapper.deleteDcEmployeesByIds(ids); |
|
|
|
} |
|
|
|
|
|
|
@ -93,20 +90,22 @@ public class DcEmployeesServiceImpl implements IDcEmployeesService |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public int deleteDcEmployeesById(Long id) |
|
|
|
{ |
|
|
|
public int deleteDcEmployeesById(Long id) { |
|
|
|
return dcEmployeesMapper.deleteDcEmployeesById(id); |
|
|
|
} |
|
|
|
|
|
|
|
//获取全部机构id与名称
|
|
|
|
@Override |
|
|
|
public List<HashMap<String,Object>> selectOrganizationAll() { |
|
|
|
public List<HashMap<String, Object>> selectOrganizationAll() { |
|
|
|
return dcEmployeesMapper.selectOrganizationAll(); |
|
|
|
} |
|
|
|
|
|
|
|
//获取全部岗位信息
|
|
|
|
@Override |
|
|
|
public List<HashMap<String,Object>> selectSysPostAll() { |
|
|
|
public List<HashMap<String, Object>> selectSysPostAll() { |
|
|
|
return dcEmployeesMapper.selectSysPostAll(); |
|
|
|
} |
|
|
|
|
|
|
|
//获取用户信息,按照岗位分组
|
|
|
|
@Override |
|
|
|
public Map<Object, List<Map<String, Object>>> selectEmployeesPost() { |
|
|
@ -114,6 +113,7 @@ public class DcEmployeesServiceImpl implements IDcEmployeesService |
|
|
|
Map<Object, List<Map<String, Object>>> group = mapList.stream().collect(Collectors.groupingBy(map -> map.get("postName"))); |
|
|
|
return group; |
|
|
|
} |
|
|
|
|
|
|
|
//获取全部用户信息,以及所在岗位信息
|
|
|
|
@Override |
|
|
|
public List<HashMap<String, Object>> selectEmployeesPostAll() { |
|
|
|