liuliang
parent
0401d6c890
commit
8251489d62
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,15 @@
|
|||||||
|
package com.api.attendance.component.calendarscheduling;
|
||||||
|
|
||||||
|
import com.engine.attendance.component.calendarscheduling.web.WorkRulesController;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2023/12/26 6:52 PM
|
||||||
|
* @Description: 班次列表
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Path("/attendance/component/calendarscheduling")
|
||||||
|
public class WorkRulesControllerApi extends WorkRulesController {
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.api.attendance.persongroup;
|
package com.api.attendance.component.persongroup;
|
||||||
|
|
||||||
import com.engine.attendance.component.persongroup.web.PersonGroupAction;
|
import com.engine.attendance.component.persongroup.web.PersonGroupAction;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
@ -1,4 +1,4 @@
|
|||||||
package com.api.attendance.persongroup;
|
package com.api.attendance.component.persongroup;
|
||||||
|
|
||||||
import com.engine.attendance.component.persongroup.web.SchedulingResultsAction;
|
import com.engine.attendance.component.persongroup.web.SchedulingResultsAction;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
@ -0,0 +1,54 @@
|
|||||||
|
package com.engine.attendance.attendanceanalysis.cmd.item;
|
||||||
|
|
||||||
|
import com.engine.attendance.enums.AttendanceItemTypeEnum;
|
||||||
|
import com.engine.attendance.enums.WorkForTimeEnum;
|
||||||
|
import com.engine.common.biz.AbstractCommonCommand;
|
||||||
|
import com.engine.common.entity.BizLogContext;
|
||||||
|
import com.engine.core.interceptor.CommandContext;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import weaver.general.Util;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class ForGetClockItemCmd extends AbstractCommonCommand<Map<String,Object>> {
|
||||||
|
@Override
|
||||||
|
public BizLogContext getLogContext() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public ForGetClockItemCmd(Map<String,Object> params){
|
||||||
|
this.params=params;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> execute(CommandContext commandContext) {
|
||||||
|
//作用时段
|
||||||
|
String workfor = Util.null2String(params.get("workfor"));
|
||||||
|
//项目id
|
||||||
|
String key = Util.null2String(params.get("key"));
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
||||||
|
List<Map<String,Object>> attendanceItems = (List<Map<String,Object>>)params.get("attendanceItems");
|
||||||
|
attendanceItems = attendanceItems.stream().filter(e -> {
|
||||||
|
//项目类型
|
||||||
|
String xmlx = Util.null2String(e.get("xmlx"));
|
||||||
|
//作用时段
|
||||||
|
String zysd = Util.null2String(e.get("zysd"));
|
||||||
|
//项目id
|
||||||
|
String id = Util.null2String(e.get("key"));
|
||||||
|
|
||||||
|
if(AttendanceItemTypeEnum.OTHER.getKey().equals(xmlx) && (zysd.contains(workfor) || zysd.contains(WorkForTimeEnum.ALL_TIME.getKey())) && key.equals(id)) {
|
||||||
|
return true;
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
log.info("ForGetClockItemCmd attendanceItems : [{}]",attendanceItems);
|
||||||
|
resultMap.put("attendanceItems",attendanceItems);
|
||||||
|
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
# attendance.attendanceAnalysis
|
# attendance.attendanceAnalysis
|
||||||
## 考勤组件模块
|
## 考勤组件模块
|
||||||
## person_group 人员分组功能组件
|
## person_group 人员分组功能组件
|
||||||
|
## calendar_scheduling 日历排班
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.engine.attendance.component.calendarscheduling.service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2023/12/26 6:53 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface WorkRulesService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 班次列表
|
||||||
|
* @Author: liang.cheng
|
||||||
|
* @Date: 2023/12/26 7:18 PM
|
||||||
|
* @param: [resourceIds]
|
||||||
|
* @return: java.lang.String
|
||||||
|
*/
|
||||||
|
Map<String, Object> getWorkRulesList(String resourceIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得部门人员排班情况
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getDepartSchedule(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日历排班修改班次保存
|
||||||
|
*/
|
||||||
|
Map<String, Object> saveCalendarWork(Map<String, Object> params);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.engine.attendance.component.calendarscheduling.web;
|
||||||
|
|
||||||
|
import com.engine.attendance.component.calendarscheduling.service.WorkRulesService;
|
||||||
|
import com.engine.attendance.component.calendarscheduling.service.impl.WorkRulesServiceImpl;
|
||||||
|
import com.engine.common.util.ParamUtil;
|
||||||
|
import com.engine.common.util.ResponseResult;
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import oracle.jdbc.proxy.annotation.Post;
|
||||||
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.QueryParam;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2023/12/26 6:52 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class WorkRulesController {
|
||||||
|
|
||||||
|
private WorkRulesService getReportCollectService(User user) {
|
||||||
|
return ServiceUtil.getService(WorkRulesServiceImpl.class,user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/list")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String getWorkRulesList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
|
@QueryParam("resourceIds") String resourceIds) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<String, Map<String, Object>>(user).run(getReportCollectService(user) :: getWorkRulesList,resourceIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/queryDepartSchedule")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String getDepartSchedule(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
Map<String,Object> paramMap = ParamUtil.request2Map(request);
|
||||||
|
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getReportCollectService(user) :: getDepartSchedule,paramMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post
|
||||||
|
@Path("/saveCalendarWork")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String saveCalendarWork(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
Map<String,Object> paramMap = ParamUtil.request2Map(request);
|
||||||
|
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getReportCollectService(user) :: saveCalendarWork,paramMap);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
# vacation
|
||||||
|
## 假期模块
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.engine.common.exception;
|
||||||
|
|
||||||
|
public class AttendanceRunTimeException extends RuntimeException {
|
||||||
|
public AttendanceRunTimeException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AttendanceRunTimeException(Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AttendanceRunTimeException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
}
|
@ -1,15 +0,0 @@
|
|||||||
package com.engine.common.exception;
|
|
||||||
|
|
||||||
public class SalaryRunTimeException extends RuntimeException {
|
|
||||||
public SalaryRunTimeException(String message) {
|
|
||||||
super(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SalaryRunTimeException(Throwable cause) {
|
|
||||||
super(cause);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SalaryRunTimeException(String message, Throwable cause) {
|
|
||||||
super(message, cause);
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.engine.common.util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2023/11/16 2:37 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ExceptionUtil {
|
||||||
|
public static String getRealMessage(Throwable e) {
|
||||||
|
while (e != null) {
|
||||||
|
Throwable cause = e.getCause();
|
||||||
|
if (cause == null) {
|
||||||
|
return e.getMessage();
|
||||||
|
}
|
||||||
|
e = cause;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue