# SvaEmployeePostProcessor.java

    package cloud.wconnect.workperformance.businesstask.sva.employee;

    import cloud.wconnect.commonlib.businesstask.postprocessor.IReportMissedPostProcessor;
    import cloud.wconnect.commonlib.cons.BaseConstant;
    import cloud.wconnect.commonlib.cons.ReportImportResultCons;
    import cloud.wconnect.commonlib.pojo.dto.PropertyDTO;
    import cloud.wconnect.commonlib.pojo.dto.ReportMissedDTO;
    import cloud.wconnect.workperformance.cons.BusinessEnum;
    import cloud.wconnect.workperformance.cons.EventSubjectEnum;
    import cloud.wconnect.workperformance.service.sva.employees.IAttendanceEmpImportLogService;
    import org.springframework.stereotype.Component;

    import jakarta.annotation.Resource;

    /**
     * Attendance For Employee 报告缺失后续逻辑处理
     *
     * @author zc
     * @date 2023/09/26
     */
    @Component
    public class SvaEmployeePostProcessor implements IReportMissedPostProcessor {
        @Resource
        private IAttendanceEmpImportLogService attendanceEmpImportLogService;

        /**
         * 校验是否支持
         *
         * @param reportMissedDTO 报告缺失后置处理程序 DTO
         * @return false： 不支持；true：支持
         * @author zc
         * @date 2023/9/26
         */
        @Override
        public boolean supports(ReportMissedDTO reportMissedDTO) {
            return reportMissedDTO.getSubject().equals(EventSubjectEnum.ATTENDANCE_EMPLOYEE.getSubject())
                    && reportMissedDTO.getBusiness().equals(BusinessEnum.SVA_EMPLOYEES.getBusiness());
        }

        /**
         * 后置处理
         *
         * @param reportMissedDTO 报告缺失后置处理程序 DTO
         * @author zc
         * @date 2023/9/26
         */
        @Override
        public void afterPostProcess(ReportMissedDTO reportMissedDTO) {
            PropertyDTO propertyDTO = reportMissedDTO.getPropertyDTO();
            attendanceEmpImportLogService.add(propertyDTO, ReportImportResultCons.IMPORT_RESULT_MISSED,
                    BaseConstant.ZERO, null);
        }

    }