You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.7 KiB
Java
74 lines
2.7 KiB
Java
package TestAttendanceAllowance;
|
|
|
|
import com.engine.attendance.attendanceanalysis.job.AttendanceAnalysisJob;
|
|
import com.engine.attendance.attendanceanalysis.web.AttendanceanalysisAction;
|
|
import com.engine.attendance.component.calendarscheduling.service.WorkRulesService;
|
|
import com.engine.attendance.component.calendarscheduling.service.impl.WorkRulesServiceImpl;
|
|
import com.engine.attendance.component.calendarscheduling.web.WorkRulesController;
|
|
import com.engine.common.util.DateUtil;
|
|
import com.engine.common.util.ServiceUtil;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import weaver.hrm.User;
|
|
import weaver.hrm.company.SubCompanyComInfo;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
public class
|
|
|
|
Test extends beforlog{
|
|
private WorkRulesService getWorkRulesService(User user) {
|
|
return ServiceUtil.getService(WorkRulesServiceImpl.class,user);
|
|
}
|
|
|
|
@org.junit.Test
|
|
public void testAnalysis() throws Exception{
|
|
Map<String,Object> paramMap = Maps.newHashMap();
|
|
paramMap.put("startDate","2024-04-15");
|
|
paramMap.put("endDate","2024-04-15");
|
|
paramMap.put("userIds","31");
|
|
|
|
beforlog be = new beforlog();
|
|
AttendanceanalysisAction action = new AttendanceanalysisAction();
|
|
action.getSchedulingData(null,null);
|
|
|
|
}
|
|
|
|
@org.junit.Test
|
|
public void testjob() throws Exception{
|
|
AttendanceAnalysisJob attendanceAnalysisJob = new AttendanceAnalysisJob();
|
|
attendanceAnalysisJob.execute();
|
|
}
|
|
@org.junit.Test
|
|
public void testRealse() throws Exception{
|
|
Map<String, Object> params = Maps.newHashMap();
|
|
params.put("resourceIds","22");
|
|
params.put("bcxx","11");
|
|
params.put("date","2024-06-01,2024-06-02,2024-06-09,2024-06-16,2024-06-23,2024-06-30,2024-06-03,2024-06-10,2024-06-17,2024-06-24,2024-07-01,2024-06-04,2024-06-11,2024-06-18,2024-06-25,2024-07-02,2024-06-05,2024-06-12,2024-06-19,2024-06-26,2024-06-06,2024-06-13,2024-06-20,2024-06-27,2024-07-03,2024-07-04,2024-06-07,2024-06-14,2024-06-21,2024-06-28,2024-07-05,2024-06-08,2024-06-15,2024-06-22,2024-06-29,2024-07-06");
|
|
User user = new User(1);
|
|
getWorkRulesService(user).saveCalendarWork(params);
|
|
|
|
}
|
|
|
|
@org.junit.Test
|
|
public void testRealse2() throws Exception{
|
|
Map<String, Object> params = Maps.newHashMap();
|
|
params.put("resourceIds","101");
|
|
params.put("bcxx","101");
|
|
params.put("date","2024-06-17");
|
|
User user = new User(1);
|
|
getWorkRulesService(user).saveCalendarWork(params);
|
|
|
|
}
|
|
@org.junit.Test
|
|
public void testRealse3() throws Exception{
|
|
for (int i=0;i<3;i++){
|
|
System.out.println(i);
|
|
|
|
i=i+1;
|
|
}
|
|
}
|
|
|
|
}
|