| | |
| | | import com.ruoyi.project.system.mapper.SysUserDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.staff.dto.CalculateSalaryDto; |
| | | import com.ruoyi.staff.mapper.StaffLeaveMapper; |
| | | import com.ruoyi.staff.mapper.StaffOnJobMapper; |
| | | import com.ruoyi.staff.mapper.StaffSalaryDetailMapper; |
| | | import com.ruoyi.staff.pojo.SchemeApplicableStaff; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.staff.pojo.StaffSalaryDetail; |
| | | import com.ruoyi.staff.pojo.StaffSalaryMain; |
| | | import com.ruoyi.staff.pojo.*; |
| | | import com.ruoyi.staff.mapper.StaffSalaryMainMapper; |
| | | import com.ruoyi.staff.service.StaffSalaryDetailService; |
| | | import com.ruoyi.staff.service.StaffSalaryMainService; |
| | |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @Autowired |
| | | private StaffLeaveMapper staffLeaveMapper; |
| | | |
| | | @Autowired |
| | | private AccountExpenseMapper accountExpenseMapper; |
| | |
| | | if(CollectionUtils.isEmpty(longs)){ |
| | | return AjaxResult.error("无员工"); |
| | | } |
| | | List<Map<String, Object>> mapList = new ArrayList<>(); |
| | | for (Map<String, Object> id : longs) { |
| | | // 判断员工是否为当月离职 |
| | | if((Integer) id.get("staffState") == 0){ |
| | | StaffLeave id1 = staffLeaveMapper.selectOne(new LambdaQueryWrapper<StaffLeave>() |
| | | .eq(StaffLeave::getStaffOnJobId, id.get("id")) |
| | | .like(StaffLeave::getLeaveDate, calculateSalaryDto.getDate())); |
| | | if(id1 == null){ |
| | | continue; |
| | | } |
| | | } |
| | | schemeApplicableStaffService.calculateByEmployeeId((Integer) id.get("id"),id,calculateSalaryDto.getDate()); |
| | | mapList.add(id); |
| | | } |
| | | return AjaxResult.success(longs); |
| | | return AjaxResult.success(mapList); |
| | | } |
| | | |
| | | public List<Map<String, Object>> setSchemeApplicableStaffUserInfo(List<Long> ids) { |