调整员工信息维护列表和个人资料校验
This commit is contained in:
@@ -28,6 +28,14 @@ public interface CcdiBaseStaffMapper extends BaseMapper<CcdiBaseStaff> {
|
||||
Page<CcdiBaseStaffVO> selectBaseStaffPageWithDept(@Param("page") Page<CcdiBaseStaffVO> page,
|
||||
@Param("query") CcdiBaseStaffQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 查询员工详情(包含部门名称)
|
||||
*
|
||||
* @param staffId 员工ID
|
||||
* @return 员工详情
|
||||
*/
|
||||
CcdiBaseStaffVO selectBaseStaffByIdWithDept(@Param("staffId") Long staffId);
|
||||
|
||||
int insertOrUpdateBatch(@Param("list") List<CcdiBaseStaff> list);
|
||||
|
||||
/**
|
||||
|
||||
@@ -119,10 +119,10 @@ public class CcdiBaseStaffServiceImpl implements ICcdiBaseStaffService {
|
||||
*/
|
||||
@Override
|
||||
public CcdiBaseStaffVO selectBaseStaffById(Long staffId) {
|
||||
CcdiBaseStaff staff = baseStaffMapper.selectById(staffId);
|
||||
CcdiBaseStaffVO vo = convertToVO(staff);
|
||||
if (staff != null) {
|
||||
vo.setAssetInfoList(assetInfoService.selectByFamilyIdAndPersonId(staff.getIdCard(), staff.getIdCard()).stream().map(asset -> {
|
||||
CcdiBaseStaffVO vo = baseStaffMapper.selectBaseStaffByIdWithDept(staffId);
|
||||
if (vo != null) {
|
||||
vo.setStatusDesc(EmployeeStatus.getDescByCode(vo.getStatus()));
|
||||
vo.setAssetInfoList(assetInfoService.selectByFamilyIdAndPersonId(vo.getIdCard(), vo.getIdCard()).stream().map(asset -> {
|
||||
CcdiAssetInfoVO assetInfoVO = new CcdiAssetInfoVO();
|
||||
BeanUtils.copyProperties(asset, assetInfoVO);
|
||||
return assetInfoVO;
|
||||
|
||||
@@ -42,7 +42,16 @@
|
||||
AND e.status = #{query.status}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY e.create_time DESC, e.staff_id DESC
|
||||
ORDER BY e.hire_date DESC, e.staff_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBaseStaffByIdWithDept" resultMap="CcdiBaseStaffVOResult">
|
||||
SELECT
|
||||
e.staff_id, e.name, e.dept_id, e.id_card, e.phone, e.annual_income, e.hire_date, e.is_party_member, e.status, e.create_time,
|
||||
d.dept_name
|
||||
FROM ccdi_base_staff e
|
||||
LEFT JOIN sys_dept d ON e.dept_id = d.dept_id
|
||||
WHERE e.staff_id = #{staffId}
|
||||
</select>
|
||||
|
||||
<!-- 批量插入或更新员工信息(只更新非null字段) -->
|
||||
|
||||
Reference in New Issue
Block a user