Merge branch 'dev' of http://47.97.8.94:19527/yj/zn-cloud
This commit is contained in:
commit
0e47026178
@ -35,6 +35,11 @@ public class CommonResult<T> implements Serializable {
|
||||
*/
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
private long timestamp = System.currentTimeMillis();
|
||||
|
||||
/**
|
||||
* 将传入的 result 对象,转换成另外一个泛型结果的对象
|
||||
*
|
||||
@ -65,6 +70,7 @@ public class CommonResult<T> implements Serializable {
|
||||
result.code = GlobalErrorCodeConstants.SUCCESS.getCode();
|
||||
result.data = data;
|
||||
result.msg = "";
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,17 @@
|
||||
package cn.iocoder.yudao.framework.common.util.date;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 时间工具类
|
||||
*
|
||||
|
||||
*/
|
||||
public class DateUtils {
|
||||
|
||||
@ -34,6 +35,7 @@ public class DateUtils {
|
||||
|
||||
/**
|
||||
* 根据传入的时间格式,将Date对象,转换成对应的时间格式
|
||||
*
|
||||
* @param date
|
||||
* @param format
|
||||
* @return
|
||||
@ -41,7 +43,7 @@ public class DateUtils {
|
||||
public static String dateFormat(Date date, String format) {
|
||||
SimpleDateFormat formatter = new SimpleDateFormat(format);
|
||||
String formattedDate = formatter.format(date);
|
||||
return formattedDate ;
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -131,6 +133,42 @@ public class DateUtils {
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建指定时间
|
||||
*
|
||||
* @param timeStr 时间字符串,格式为 HH:mm
|
||||
* @return 指定时间
|
||||
*/
|
||||
public static Date buildHHmmTime(String timeStr) {
|
||||
String[] time = timeStr.split(":");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.HOUR_OF_DAY, Integer.parseInt(time[0]));
|
||||
calendar.set(Calendar.MINUTE, Integer.parseInt(time[1]));
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
Date endTime = calendar.getTime();
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
public static Date buildWeekHHmmTime(String timeStr) {
|
||||
String[] time = timeStr.split(",");
|
||||
int week = Integer.parseInt(time[0]);
|
||||
boolean isItTheNextDay = false;
|
||||
if (week == 7) {
|
||||
isItTheNextDay = true;
|
||||
}
|
||||
week = (week + 1) == 8 ? 7 : (week + 1);
|
||||
String[] hhmm = time[1].split(":");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.DAY_OF_WEEK, week);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, Integer.parseInt(hhmm[0]));
|
||||
calendar.set(Calendar.MINUTE, Integer.parseInt(hhmm[1]));
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return isItTheNextDay ? DateUtil.offsetDay(calendar.getTime(), 1) : calendar.getTime();
|
||||
}
|
||||
|
||||
|
||||
public static Date max(Date a, Date b) {
|
||||
if (a == null) {
|
||||
return b;
|
||||
@ -192,4 +230,52 @@ public class DateUtils {
|
||||
return LocalDateTimeUtil.isSameDay(date, LocalDateTime.now());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取两个时间区间 - 获取两个时间区间的所有日期
|
||||
*
|
||||
* @param beginTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
public static List<String> betweenDayStrList(String beginTime, String endTime) {
|
||||
List<String> list = new ArrayList<>();
|
||||
Date begin = DateUtil.parse(beginTime, "yyyy-MM-dd").toJdkDate();
|
||||
Date end = DateUtil.parse(endTime, "yyyy-MM-dd").toJdkDate();
|
||||
int num = (int) DateUtil.betweenDay(begin, end, true);
|
||||
for (int i = 0; i <= num; i++) {
|
||||
Date time = DateUtil.offsetDay(begin, i).toJdkDate();
|
||||
list.add(DateUtil.format(time, "yyyy-MM-dd"));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取两个时间区间 - 获取两个时间区间的所有日期
|
||||
*
|
||||
* @param beginTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
public static List<String> betweenDayList(Date beginTime, Date endTime) {
|
||||
List<String> list = new ArrayList<>();
|
||||
int num = (int) DateUtil.betweenDay(beginTime, endTime, true);
|
||||
for (int i = 0; i <= num; i++) {
|
||||
Date time = DateUtil.offsetDay(beginTime, i).toJdkDate();
|
||||
list.add(DateUtil.format(time, "yyyy-MM-dd"));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static Date buildTimeYYYYMMddHHmm(String yyyy_MM_dd, String HH_mm) {
|
||||
String[] yyyy_MM_dds = yyyy_MM_dd.split("-");
|
||||
String[] time = HH_mm.split(":");
|
||||
return buildTime(Integer.parseInt(yyyy_MM_dds[0]), Integer.parseInt(yyyy_MM_dds[1]), Integer.parseInt(yyyy_MM_dds[2]),
|
||||
Integer.parseInt(time[0]), Integer.parseInt(time[1]), 0);
|
||||
}
|
||||
|
||||
public static Date buildTimeYYYYMMdd(String yyyy_MM_dd) {
|
||||
String[] yyyy_MM_dds = yyyy_MM_dd.split("-");
|
||||
return buildTime(Integer.parseInt(yyyy_MM_dds[0]), Integer.parseInt(yyyy_MM_dds[1]), Integer.parseInt(yyyy_MM_dds[2]),
|
||||
0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package cn.iocoder.yudao.framework.datapermission.core.rule.dept;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
|
||||
@ -22,27 +23,22 @@ import net.sf.jsqlparser.expression.operators.relational.EqualsTo;
|
||||
import net.sf.jsqlparser.expression.operators.relational.ExpressionList;
|
||||
import net.sf.jsqlparser.expression.operators.relational.InExpression;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 基于部门的 {@link DataPermissionRule} 数据权限规则实现
|
||||
*
|
||||
* <p>
|
||||
* 注意,使用 DeptDataPermissionRule 时,需要保证表中有 dept_id 部门编号的字段,可自定义。
|
||||
*
|
||||
* <p>
|
||||
* 实际业务场景下,会存在一个经典的问题?当用户修改部门时,冗余的 dept_id 是否需要修改?
|
||||
* 1. 一般情况下,dept_id 不进行修改,则会导致用户看不到之前的数据。【yudao-server 采用该方案】
|
||||
* 2. 部分情况下,希望该用户还是能看到之前的数据,则有两种方式解决:【需要你改造该 DeptDataPermissionRule 的实现代码】
|
||||
* 1)编写洗数据的脚本,将 dept_id 修改成新部门的编号;【建议】
|
||||
* 最终过滤条件是 WHERE dept_id = ?
|
||||
* 2)洗数据的话,可能涉及的数据量较大,也可以采用 user_id 进行过滤的方式,此时需要获取到 dept_id 对应的所有 user_id 用户编号;
|
||||
* 最终过滤条件是 WHERE user_id IN (?, ?, ? ...)
|
||||
* 3)想要保证原 dept_id 和 user_id 都可以看的到,此时使用 dept_id 和 user_id 一起过滤;
|
||||
* 最终过滤条件是 WHERE dept_id = ? OR user_id IN (?, ?, ? ...)
|
||||
*
|
||||
|
||||
* 1)编写洗数据的脚本,将 dept_id 修改成新部门的编号;【建议】
|
||||
* 最终过滤条件是 WHERE dept_id = ?
|
||||
* 2)洗数据的话,可能涉及的数据量较大,也可以采用 user_id 进行过滤的方式,此时需要获取到 dept_id 对应的所有 user_id 用户编号;
|
||||
* 最终过滤条件是 WHERE user_id IN (?, ?, ? ...)
|
||||
* 3)想要保证原 dept_id 和 user_id 都可以看的到,此时使用 dept_id 和 user_id 一起过滤;
|
||||
* 最终过滤条件是 WHERE dept_id = ? OR user_id IN (?, ?, ? ...)
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
@ -60,10 +56,18 @@ public class DeptDataPermissionRule implements DataPermissionRule {
|
||||
|
||||
private final PermissionApi permissionApi;
|
||||
|
||||
// TODO: 2024/4/10 注意 - 如果需要降级低权的话 要把需要的表名称加在这里 并且在方法上开启数据权限 并且添加 DataPermissionConfiguration 对象
|
||||
private static final List<String> LOW_POWER_TABLES = Arrays.asList(
|
||||
"bpm_process_instance_ext",
|
||||
"work_log_use",
|
||||
"work_log_statistics",
|
||||
"work_log_instance_ext"
|
||||
);
|
||||
|
||||
/**
|
||||
* 基于部门的表字段配置
|
||||
* 一般情况下,每个表的部门编号字段是 dept_id,通过该配置自定义。
|
||||
*
|
||||
* <p>
|
||||
* key:表名
|
||||
* value:字段名
|
||||
*/
|
||||
@ -71,7 +75,7 @@ public class DeptDataPermissionRule implements DataPermissionRule {
|
||||
/**
|
||||
* 基于用户的表字段配置
|
||||
* 一般情况下,每个表的部门编号字段是 dept_id,通过该配置自定义。
|
||||
*
|
||||
* <p>
|
||||
* key:表名
|
||||
* value:字段名
|
||||
*/
|
||||
@ -113,18 +117,19 @@ public class DeptDataPermissionRule implements DataPermissionRule {
|
||||
}
|
||||
|
||||
// 情况一,如果是 ALL 可查看全部,则无需拼接条件
|
||||
if (deptDataPermission.getAll()) {
|
||||
// 并且 (低权 和 支持地权) 都不成立
|
||||
if (deptDataPermission.getAll() && !((deptDataPermission.getSelf() || CollectionUtil.isNotEmpty(deptDataPermission.getDeptIds())) && LOW_POWER_TABLES.contains(tableName))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 情况二,即不能查看部门,又不能查看自己,则说明 100% 无权限
|
||||
if (CollUtil.isEmpty(deptDataPermission.getDeptIds())
|
||||
&& Boolean.FALSE.equals(deptDataPermission.getSelf())) {
|
||||
&& Boolean.FALSE.equals(deptDataPermission.getSelf())) {
|
||||
return new EqualsTo(null, null); // WHERE null = null,可以保证返回的数据为空
|
||||
}
|
||||
|
||||
// 情况三,拼接 Dept 和 User 的条件,最后组合
|
||||
Expression deptExpression = buildDeptExpression(tableName,tableAlias, deptDataPermission.getDeptIds());
|
||||
Expression deptExpression = buildDeptExpression(tableName, tableAlias, deptDataPermission.getDeptIds());
|
||||
Expression userExpression = buildUserExpression(tableName, tableAlias, deptDataPermission.getSelf(), loginUser.getId());
|
||||
if (deptExpression == null && userExpression == null) {
|
||||
// TODO 芋艿:获得不到条件的时候,暂时不抛出异常,而是不返回数据
|
||||
@ -180,7 +185,7 @@ public class DeptDataPermissionRule implements DataPermissionRule {
|
||||
|
||||
public void addDeptColumn(Class<? extends BaseDO> entityClass, String columnName) {
|
||||
String tableName = TableInfoHelper.getTableInfo(entityClass).getTableName();
|
||||
addDeptColumn(tableName, columnName);
|
||||
addDeptColumn(tableName, columnName);
|
||||
}
|
||||
|
||||
public void addDeptColumn(String tableName, String columnName) {
|
||||
|
@ -3,7 +3,7 @@ spring:
|
||||
name: gateway-server
|
||||
|
||||
profiles:
|
||||
active: local #local
|
||||
active: dev #local
|
||||
# active: prod
|
||||
server:
|
||||
port: 48080
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.procurepay;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@ -7,6 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
|
||||
|
||||
@Schema(description = "管理后台 - 采购收款明细 Response VO")
|
||||
@Data
|
||||
@ -45,6 +47,7 @@ public class BpmOAProcurePayItemRespVO {
|
||||
|
||||
@Schema(description = "期望交付日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private LocalDateTime expectedDeliveryDate;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ -56,4 +59,6 @@ public class BpmOAProcurePayItemRespVO {
|
||||
@Schema(description = "采购总金额大写")
|
||||
private String totalMoneyChinese;
|
||||
|
||||
@Schema(description = "采购详情json数据")
|
||||
private String procureDetailJson;
|
||||
}
|
@ -1,13 +1,18 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.procurepay;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.upload.UploadUserFile;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
|
||||
|
||||
@Schema(description = "管理后台 - 采购支付 Response VO")
|
||||
@Data
|
||||
public class BpmOAProcurePayRespVO {
|
||||
@ -22,6 +27,8 @@ public class BpmOAProcurePayRespVO {
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "支付日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private LocalDateTime payTime;
|
||||
|
||||
@Schema(description = "采购付款总金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
@ -10,6 +10,8 @@ import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 采购支付新增/修改 Request VO")
|
||||
@Data
|
||||
public class BpmOAProcurePaySaveReqVO {
|
||||
@ -25,6 +27,7 @@ public class BpmOAProcurePaySaveReqVO {
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "支付日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime payTime;
|
||||
|
||||
@Schema(description = "采购付款总金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
@ -25,7 +25,6 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti
|
||||
@RestController
|
||||
@RequestMapping("/bpm/process-instance")
|
||||
@Validated
|
||||
@DataPermission(enable = false)
|
||||
public class BpmProcessInstanceController {
|
||||
|
||||
@Resource
|
||||
@ -34,6 +33,7 @@ public class BpmProcessInstanceController {
|
||||
@GetMapping("/my-page")
|
||||
@Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
|
||||
@DataPermission(enable = false)
|
||||
public CommonResult<PageResult<BpmProcessInstancePageItemRespVO>> getMyProcessInstancePage(
|
||||
@Valid BpmProcessInstanceMyPageReqVO pageReqVO) {
|
||||
return success(processInstanceService.getMyProcessInstancePage(getLoginUserId(), pageReqVO));
|
||||
@ -42,6 +42,7 @@ public class BpmProcessInstanceController {
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "新建流程实例")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
|
||||
@DataPermission(enable = false)
|
||||
public CommonResult<String> createProcessInstance(@Valid @RequestBody BpmProcessInstanceCreateReqVO createReqVO) {
|
||||
return success(processInstanceService.createProcessInstance(getLoginUserId(), createReqVO));
|
||||
}
|
||||
@ -50,6 +51,7 @@ public class BpmProcessInstanceController {
|
||||
@Operation(summary = "获得指定流程实例", description = "在【流程详细】界面中,进行调用")
|
||||
@Parameter(name = "id", description = "流程实例的编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
|
||||
@DataPermission(enable = false)
|
||||
public CommonResult<BpmProcessInstanceRespVO> getProcessInstance(@RequestParam("id") String id) {
|
||||
return success(processInstanceService.getProcessInstanceVO(id));
|
||||
}
|
||||
@ -57,6 +59,7 @@ public class BpmProcessInstanceController {
|
||||
@DeleteMapping("/cancel")
|
||||
@Operation(summary = "取消流程实例", description = "撤回发起的流程")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel')")
|
||||
@DataPermission(enable = false)
|
||||
public CommonResult<Boolean> cancelProcessInstance(@Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) {
|
||||
processInstanceService.cancelProcessInstance(getLoginUserId(), cancelReqVO);
|
||||
return success(true);
|
||||
@ -69,6 +72,7 @@ public class BpmProcessInstanceController {
|
||||
@GetMapping("/process_instance_group_name_statistics")
|
||||
@Operation(summary = "根据流程名称分组,统计各个流程的具体实例数据", description = "根据流程名称分组,统计各个流程的具体实例数据")
|
||||
//@PreAuthorize("@ss.hasPermission('bpm:task:update')")
|
||||
@DataPermission(enable = false)
|
||||
public CommonResult<List<BpmProcessInstanceStatisticsRespVO>> getProcessInstancesGroupByModelName(@Valid BpmProcessInstanceStatisticsReqVO reqVO) {
|
||||
List<BpmProcessInstanceStatisticsRespVO> list = processInstanceService.getProcessInstancesGroupByModelName(reqVO);
|
||||
return success(list);
|
||||
@ -80,6 +84,7 @@ public class BpmProcessInstanceController {
|
||||
*/
|
||||
@GetMapping("/process_instance_result_status_statistics")
|
||||
@Operation(summary = "流程实例的状态统计查询", description = "根据流程状态(处理中,通过,不通过,取消),统计各个状态的数据量")
|
||||
@DataPermission(enable = false)
|
||||
public CommonResult<List<BpmProcessInstanceStatisticsRespVO>> getProcessInstancesGroupByResultStatus(@Valid BpmProcessInstanceStatisticsReqVO reqVO) {
|
||||
List<BpmProcessInstanceStatisticsRespVO> list = processInstanceService.getProcessInstancesGroupByResultStatus(reqVO);
|
||||
return success(list);
|
||||
@ -95,6 +100,7 @@ public class BpmProcessInstanceController {
|
||||
|
||||
@GetMapping("/getUserProcessTpo10")
|
||||
@Operation(summary = "获得用户审批耗时最长Top10", description = "在工作台-给数据权限是可以查看全部数据的用户查询使用")
|
||||
@DataPermission(enable = false)
|
||||
public CommonResult<List<BpmProcessFinishStatisticsRespVO>> getUserProcessTpo10(@Valid BpmProcessInstanceStatisticsReqVO reqVO) {
|
||||
List<BpmProcessFinishStatisticsRespVO> list = processInstanceService.getUserProcessTpo10(reqVO);
|
||||
return success(list);
|
||||
|
@ -8,10 +8,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessI
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceStatisticsReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceStatisticsRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -21,7 +18,7 @@ public interface BpmProcessInstanceExtMapper extends BaseMapperX<BpmProcessInsta
|
||||
default PageResult<BpmProcessInstanceExtDO> selectCCPage(Long userId, BpmProcessInstanceMyPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmProcessInstanceExtDO>()
|
||||
// .eqIfPresent(BpmProcessInstanceExtDO::getStartUserId, userId)
|
||||
.likeIfPresent(BpmProcessInstanceExtDO::getCcids, "["+userId+"]")
|
||||
.likeIfPresent(BpmProcessInstanceExtDO::getCcids, "[" + userId + "]")
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, reqVO.getProcessDefinitionId())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getCategory, reqVO.getCategory())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getStatus, reqVO.getStatus())
|
||||
@ -53,36 +50,25 @@ public interface BpmProcessInstanceExtMapper extends BaseMapperX<BpmProcessInsta
|
||||
}
|
||||
|
||||
|
||||
List<BpmProcessInstanceStatisticsRespVO> getProcessInstancesGroupByModelName(BpmProcessInstanceStatisticsReqVO reqVO) ;
|
||||
List<BpmProcessInstanceStatisticsRespVO> getProcessInstancesGroupByModelName(BpmProcessInstanceStatisticsReqVO reqVO);
|
||||
|
||||
List<BpmProcessInstanceStatisticsRespVO> getProcessInstancesGroupByResultStatus(BpmProcessInstanceStatisticsReqVO reqVO) ;
|
||||
List<BpmProcessInstanceStatisticsRespVO> getProcessInstancesGroupByResultStatus(BpmProcessInstanceStatisticsReqVO reqVO);
|
||||
|
||||
default PageResult<BpmProcessInstanceExtDO> selectStatisticePage(BpmProcessInstanceMyPageReqVO reqVO) {
|
||||
//如果为空,那么查询全部
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmProcessInstanceExtDO>()
|
||||
.likeIfPresent(BpmProcessInstanceExtDO::getName, reqVO.getName())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, reqVO.getProcessDefinitionId())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getCategory, reqVO.getCategory())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getResult, reqVO.getResult())
|
||||
.betweenIfPresent(BpmProcessInstanceExtDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(BpmProcessInstanceExtDO::getId));
|
||||
|
||||
default PageResult<BpmProcessInstanceExtDO> selectStatisticePage(Long[] userIds, BpmProcessInstanceMyPageReqVO reqVO) {
|
||||
if( userIds == null ) {
|
||||
//如果为空,那么查询全部
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmProcessInstanceExtDO>()
|
||||
.likeIfPresent(BpmProcessInstanceExtDO::getName, reqVO.getName())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, reqVO.getProcessDefinitionId())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getCategory, reqVO.getCategory())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getResult, reqVO.getResult())
|
||||
.betweenIfPresent(BpmProcessInstanceExtDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(BpmProcessInstanceExtDO::getId));
|
||||
}else {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmProcessInstanceExtDO>()
|
||||
.likeIfPresent(BpmProcessInstanceExtDO::getName, reqVO.getName())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, reqVO.getProcessDefinitionId())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getCategory, reqVO.getCategory())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getResult, reqVO.getResult())
|
||||
.betweenIfPresent(BpmProcessInstanceExtDO::getCreateTime, reqVO.getCreateTime())
|
||||
.in(BpmProcessInstanceExtDO::getStartUserId,userIds)
|
||||
.orderByDesc(BpmProcessInstanceExtDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
List<BpmProcessFinishStatisticsRespVO> getUserProcessTpo10(BpmProcessInstanceStatisticsReqVO reqVO) ;
|
||||
List<BpmProcessFinishStatisticsRespVO> getUserProcessTpo10(BpmProcessInstanceStatisticsReqVO reqVO);
|
||||
|
||||
List<BpmProcessFinishStatisticsRespVO> selectUnfinishProcessCount(BpmProcessInstanceStatisticsReqVO reqVO) ;
|
||||
List<BpmProcessFinishStatisticsRespVO> selectUnfinishProcessCount(BpmProcessInstanceStatisticsReqVO reqVO);
|
||||
|
||||
}
|
||||
|
@ -8,20 +8,17 @@ import org.springframework.context.annotation.Configuration;
|
||||
/**
|
||||
* 工作流 模块的数据权限 Configuration
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
//@Configuration(proxyBeanMethods = false)
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class DataPermissionConfiguration {
|
||||
|
||||
// @Bean
|
||||
// public DeptDataPermissionRuleCustomizer sysDeptDataPermissionRuleCustomizer() {
|
||||
// return rule -> {
|
||||
// // dept
|
||||
// rule.addDeptColumn(AdminUserDO.class);
|
||||
// rule.addDeptColumn(DeptDO.class, "id");
|
||||
// // user
|
||||
// rule.addUserColumn(BpmProcessInstanceExtDO.class, "start_user_id");
|
||||
// };
|
||||
// }
|
||||
@Bean
|
||||
public DeptDataPermissionRuleCustomizer sysDeptDataPermissionRuleCustomizer() {
|
||||
return rule -> {
|
||||
// user
|
||||
rule.addUserColumn(BpmProcessInstanceExtDO.class, "start_user_id");
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@ spring:
|
||||
name: bpm-server
|
||||
|
||||
profiles:
|
||||
active: local #local
|
||||
active: dev #local
|
||||
# active: prod
|
||||
|
||||
server:
|
||||
|
@ -18,6 +18,7 @@
|
||||
b.reason,
|
||||
b.procure_type,
|
||||
b.expected_delivery_date,
|
||||
b.procure_detail_json as procureDetailJson,
|
||||
b.remarks,
|
||||
b.total_money,
|
||||
b.total_money_chinese
|
||||
|
@ -3,7 +3,7 @@ spring:
|
||||
name: infra-server
|
||||
|
||||
profiles:
|
||||
active: local #local
|
||||
active: dev #local
|
||||
# active: prod
|
||||
|
||||
server:
|
||||
|
@ -26,4 +26,6 @@ public interface DictTypeConstants {
|
||||
String SMS_SEND_STATUS = "system_sms_send_status"; // 短信发送状态
|
||||
String SMS_RECEIVE_STATUS = "system_sms_receive_status"; // 短信接收状态
|
||||
|
||||
|
||||
String WORK_LOG_SUBMIT_STATUS = "work_log_submit_status"; // 日志提交状态
|
||||
}
|
||||
|
@ -176,4 +176,21 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode LOG_INSTANCE_NOT_EXISTS = new ErrorCode(1_009_010_002, "日志实例的拓展不存在");
|
||||
|
||||
ErrorCode LOG_RULE_NOT_EXISTS = new ErrorCode(1_009_010_003, "日志规则不存在");
|
||||
// ========== 站内信发送 1-003-001-000 ==========
|
||||
ErrorCode SCHEDULING_NOT_EXISTS = new ErrorCode(1_003_001_000, "排班制考勤设置不存在");
|
||||
ErrorCode PUNCH_RECORD_NOT_EXISTS = new ErrorCode(1_003_002_000, "用户打卡记录不存在");
|
||||
ErrorCode GROUP_USER_NOT_EXISTS = new ErrorCode(1_003_003_000, "考勤组人员不存在");
|
||||
ErrorCode GROUP_SHIFT_NOT_EXISTS = new ErrorCode(1_003_004_000, "考勤组班次不存在");
|
||||
ErrorCode GROUP_NOT_EXISTS = new ErrorCode(1_003_005_000, "考勤组不存在");
|
||||
ErrorCode FIXED_NOT_EXISTS = new ErrorCode(1_003_006_000, "固定班制考勤设置");
|
||||
|
||||
ErrorCode LOG_FORM_NOT_USE = new ErrorCode(1_009_010_004, "你不用使用该日志模板");
|
||||
|
||||
ErrorCode LOG_USE_NOT_EXISTS = new ErrorCode(1_009_010_005, "模板不存在");
|
||||
|
||||
ErrorCode LOG_TYPE_EXISTS = new ErrorCode(1_009_010_006, "当前日期的日志已提交过,请勿重复提交");
|
||||
|
||||
ErrorCode LOG_NOT_DATE = new ErrorCode(1_009_010_007, "只能修改当天提交的日志");
|
||||
|
||||
ErrorCode LOG_NOT_UPDATE = new ErrorCode(1_009_010_008, "已过了提交时间,不能修改");
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.auth;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
@ -27,7 +26,6 @@ import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.fixed;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.fixed.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.fixed.AttendanceFixedDO;
|
||||
import cn.iocoder.yudao.module.system.service.fixed.AttendanceFixedService;
|
||||
|
||||
@Tag(name = "管理后台 - 固定班制考勤设置")
|
||||
@RestController
|
||||
@RequestMapping("/system/attendance/fixed")
|
||||
@Validated
|
||||
public class AttendanceFixedController {
|
||||
|
||||
@Resource
|
||||
private AttendanceFixedService fixedService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建固定班制考勤设置")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:fixed:create')")
|
||||
public CommonResult<Long> createFixed(@Valid @RequestBody AttendanceFixedSaveReqVO createReqVO) {
|
||||
return success(fixedService.createFixed(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新固定班制考勤设置")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:fixed:update')")
|
||||
public CommonResult<Boolean> updateFixed(@Valid @RequestBody AttendanceFixedSaveReqVO updateReqVO) {
|
||||
fixedService.updateFixed(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除固定班制考勤设置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('attendance:fixed:delete')")
|
||||
public CommonResult<Boolean> deleteFixed(@RequestParam("id") Long id) {
|
||||
fixedService.deleteFixed(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得固定班制考勤设置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:fixed:query')")
|
||||
public CommonResult<AttendanceFixedRespVO> getFixed(@RequestParam("id") Long id) {
|
||||
AttendanceFixedDO fixed = fixedService.getFixed(id);
|
||||
return success(BeanUtils.toBean(fixed, AttendanceFixedRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得固定班制考勤设置分页")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:fixed:query')")
|
||||
public CommonResult<PageResult<AttendanceFixedRespVO>> getFixedPage(@Valid AttendanceFixedPageReqVO pageReqVO) {
|
||||
PageResult<AttendanceFixedDO> pageResult = fixedService.getFixedPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AttendanceFixedRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出固定班制考勤设置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:fixed:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportFixedExcel(@Valid AttendanceFixedPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AttendanceFixedDO> list = fixedService.getFixedPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "固定班制考勤设置.xls", "数据", AttendanceFixedRespVO.class,
|
||||
BeanUtils.toBean(list, AttendanceFixedRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.fixed.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 固定班制考勤设置分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AttendanceFixedPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "考勤组id", example = "19908")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "周时间 1-7")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Integer[] weekTime;
|
||||
|
||||
@Schema(description = "班次id", example = "16385")
|
||||
private Long attendanceGroupShiftId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.fixed.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 固定班制考勤设置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AttendanceFixedRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23824")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "考勤组id", example = "19908")
|
||||
@ExcelProperty("考勤组id")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "周时间 1-7")
|
||||
@ExcelProperty("周时间 1-7")
|
||||
private Integer weekTime;
|
||||
|
||||
@Schema(description = "班次id", example = "16385")
|
||||
@ExcelProperty("班次id")
|
||||
private Long attendanceGroupShiftId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.fixed.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 固定班制考勤设置新增/修改 Request VO")
|
||||
@Data
|
||||
public class AttendanceFixedSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23824")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "考勤组id", example = "19908")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "周时间 1-7")
|
||||
private Integer weekTime;
|
||||
|
||||
@Schema(description = "班次id", example = "16385")
|
||||
private Long attendanceGroupShiftId;
|
||||
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.group;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.group.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.group.AttendanceGroupDO;
|
||||
import cn.iocoder.yudao.module.system.service.group.AttendanceGroupService;
|
||||
|
||||
@Tag(name = "管理后台 - 考勤组")
|
||||
@RestController
|
||||
@RequestMapping("/system/attendance/group")
|
||||
@Validated
|
||||
public class AttendanceGroupController {
|
||||
|
||||
@Resource
|
||||
private AttendanceGroupService groupService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建考勤组")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group:create')")
|
||||
public CommonResult<Long> createGroup(@Valid @RequestBody AttendanceGroupSaveReqVO createReqVO) {
|
||||
return success(groupService.createGroup(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新考勤组")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group:update')")
|
||||
public CommonResult<Boolean> updateGroup(@Valid @RequestBody AttendanceGroupSaveReqVO updateReqVO) {
|
||||
groupService.updateGroup(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除考勤组")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group:delete')")
|
||||
public CommonResult<Boolean> deleteGroup(@RequestParam("id") Long id) {
|
||||
groupService.deleteGroup(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得考勤组")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group:query')")
|
||||
public CommonResult<AttendanceGroupRespVO> getGroup(@RequestParam("id") Long id) {
|
||||
AttendanceGroupDO group = groupService.getGroup(id);
|
||||
return success(BeanUtils.toBean(group, AttendanceGroupRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得考勤组分页")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group:query')")
|
||||
public CommonResult<PageResult<AttendanceGroupRespVO>> getGroupPage(@Valid AttendanceGroupPageReqVO pageReqVO) {
|
||||
PageResult<AttendanceGroupDO> pageResult = groupService.getGroupPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AttendanceGroupRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出考勤组 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportGroupExcel(@Valid AttendanceGroupPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AttendanceGroupDO> list = groupService.getGroupPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "考勤组.xls", "数据", AttendanceGroupRespVO.class,
|
||||
BeanUtils.toBean(list, AttendanceGroupRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.group.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AttendanceGroupPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "考勤组管理员id", example = "15633")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "群组名称", example = "李四")
|
||||
private String groupName;
|
||||
|
||||
@Schema(description = "考勤类型 1固定班制 2排班制", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "打卡类型 1考勤机 2小程序范围打卡", example = "2")
|
||||
private Integer punchType;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "范围(米)")
|
||||
private Integer scope;
|
||||
|
||||
@Schema(description = "是否允许外勤打卡 0否 1是")
|
||||
private Integer fieldworkFlag;
|
||||
|
||||
@Schema(description = "节假日自动排休 0否 1是")
|
||||
private Integer autoHolidaysFlag;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.group.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AttendanceGroupRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22881")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "考勤组管理员id", example = "15633")
|
||||
@ExcelProperty("考勤组管理员id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "群组名称", example = "李四")
|
||||
@ExcelProperty("群组名称")
|
||||
private String groupName;
|
||||
|
||||
@Schema(description = "考勤类型 1固定班制 2排班制", example = "1")
|
||||
@ExcelProperty("考勤类型 1固定班制 2排班制")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "打卡类型 1考勤机 2小程序范围打卡", example = "2")
|
||||
@ExcelProperty("打卡类型 1考勤机 2小程序范围打卡")
|
||||
private Integer punchType;
|
||||
|
||||
@Schema(description = "经度")
|
||||
@ExcelProperty("经度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "纬度")
|
||||
@ExcelProperty("纬度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "范围(米)")
|
||||
@ExcelProperty("范围(米)")
|
||||
private Integer scope;
|
||||
|
||||
@Schema(description = "是否允许外勤打卡 0否 1是")
|
||||
@ExcelProperty("是否允许外勤打卡 0否 1是")
|
||||
private Integer fieldworkFlag;
|
||||
|
||||
@Schema(description = "节假日自动排休 0否 1是")
|
||||
@ExcelProperty("节假日自动排休 0否 1是")
|
||||
private Integer autoHolidaysFlag;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.group.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组新增/修改 Request VO")
|
||||
@Data
|
||||
public class AttendanceGroupSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22881")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "考勤组管理员id", example = "15633")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "群组名称", example = "李四")
|
||||
private String groupName;
|
||||
|
||||
@Schema(description = "考勤类型 1固定班制 2排班制", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "打卡类型 1考勤机 2小程序范围打卡", example = "2")
|
||||
private Integer punchType;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "范围(米)")
|
||||
private Integer scope;
|
||||
|
||||
@Schema(description = "是否允许外勤打卡 0否 1是")
|
||||
private Integer fieldworkFlag;
|
||||
|
||||
@Schema(description = "节假日自动排休 0否 1是")
|
||||
private Integer autoHolidaysFlag;
|
||||
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.groupshift;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.groupshift.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.groupshift.AttendanceGroupShiftDO;
|
||||
import cn.iocoder.yudao.module.system.service.groupshift.AttendanceGroupShiftService;
|
||||
|
||||
@Tag(name = "管理后台 - 考勤组班次")
|
||||
@RestController
|
||||
@RequestMapping("/system/attendance/group-shift")
|
||||
@Validated
|
||||
public class AttendanceGroupShiftController {
|
||||
|
||||
@Resource
|
||||
private AttendanceGroupShiftService groupShiftService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建考勤组班次")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-shift:create')")
|
||||
public CommonResult<Long> createGroupShift(@Valid @RequestBody AttendanceGroupShiftSaveReqVO createReqVO) {
|
||||
return success(groupShiftService.createGroupShift(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新考勤组班次")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-shift:update')")
|
||||
public CommonResult<Boolean> updateGroupShift(@Valid @RequestBody AttendanceGroupShiftSaveReqVO updateReqVO) {
|
||||
groupShiftService.updateGroupShift(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除考勤组班次")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-shift:delete')")
|
||||
public CommonResult<Boolean> deleteGroupShift(@RequestParam("id") Long id) {
|
||||
groupShiftService.deleteGroupShift(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得考勤组班次")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-shift:query')")
|
||||
public CommonResult<AttendanceGroupShiftRespVO> getGroupShift(@RequestParam("id") Long id) {
|
||||
AttendanceGroupShiftDO groupShift = groupShiftService.getGroupShift(id);
|
||||
return success(BeanUtils.toBean(groupShift, AttendanceGroupShiftRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得考勤组班次分页")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-shift:query')")
|
||||
public CommonResult<PageResult<AttendanceGroupShiftRespVO>> getGroupShiftPage(@Valid AttendanceGroupShiftPageReqVO pageReqVO) {
|
||||
PageResult<AttendanceGroupShiftDO> pageResult = groupShiftService.getGroupShiftPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AttendanceGroupShiftRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出考勤组班次 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-shift:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportGroupShiftExcel(@Valid AttendanceGroupShiftPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AttendanceGroupShiftDO> list = groupShiftService.getGroupShiftPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "考勤组班次.xls", "数据", AttendanceGroupShiftRespVO.class,
|
||||
BeanUtils.toBean(list, AttendanceGroupShiftRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.groupshift.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组班次分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AttendanceGroupShiftPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "考勤组id", example = "24585")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "班次名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "班次考勤时间json[{start_tiem:HH:mm,start_check_flag:true,end_time:HH:mm,end_check_flah: true}]")
|
||||
private String attendanceTimeJson;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.groupshift.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组班次 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AttendanceGroupShiftRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "5305")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "考勤组id", example = "24585")
|
||||
@ExcelProperty("考勤组id")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "班次名称", example = "张三")
|
||||
@ExcelProperty("班次名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "班次考勤时间json[{start_tiem:HH:mm,start_check_flag:true,end_time:HH:mm,end_check_flah: true}]")
|
||||
@ExcelProperty("班次考勤时间json[{start_tiem:HH:mm,start_check_flag:true,end_time:HH:mm,end_check_flah: true}]")
|
||||
private String attendanceTimeJson;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.groupshift.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组班次新增/修改 Request VO")
|
||||
@Data
|
||||
public class AttendanceGroupShiftSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "5305")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "考勤组id", example = "24585")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "班次名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "班次考勤时间json[{start_tiem:HH:mm,start_check_flag:true,end_time:HH:mm,end_check_flah: true}]")
|
||||
private String attendanceTimeJson;
|
||||
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.groupuser;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.groupuser.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.groupuser.AttendanceGroupUserDO;
|
||||
import cn.iocoder.yudao.module.system.service.groupuser.AttendanceGroupUserService;
|
||||
|
||||
@Tag(name = "管理后台 - 考勤组人员")
|
||||
@RestController
|
||||
@RequestMapping("/system/attendance/group-user")
|
||||
@Validated
|
||||
public class AttendanceGroupUserController {
|
||||
|
||||
@Resource
|
||||
private AttendanceGroupUserService groupUserService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建考勤组人员")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-user:create')")
|
||||
public CommonResult<Long> createGroupUser(@Valid @RequestBody AttendanceGroupUserSaveReqVO createReqVO) {
|
||||
return success(groupUserService.createGroupUser(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新考勤组人员")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-user:update')")
|
||||
public CommonResult<Boolean> updateGroupUser(@Valid @RequestBody AttendanceGroupUserSaveReqVO updateReqVO) {
|
||||
groupUserService.updateGroupUser(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除考勤组人员")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-user:delete')")
|
||||
public CommonResult<Boolean> deleteGroupUser(@RequestParam("id") Long id) {
|
||||
groupUserService.deleteGroupUser(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得考勤组人员")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-user:query')")
|
||||
public CommonResult<AttendanceGroupUserRespVO> getGroupUser(@RequestParam("id") Long id) {
|
||||
AttendanceGroupUserDO groupUser = groupUserService.getGroupUser(id);
|
||||
return success(BeanUtils.toBean(groupUser, AttendanceGroupUserRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得考勤组人员分页")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-user:query')")
|
||||
public CommonResult<PageResult<AttendanceGroupUserRespVO>> getGroupUserPage(@Valid AttendanceGroupUserPageReqVO pageReqVO) {
|
||||
PageResult<AttendanceGroupUserDO> pageResult = groupUserService.getGroupUserPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AttendanceGroupUserRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出考勤组人员 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:group-user:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportGroupUserExcel(@Valid AttendanceGroupUserPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AttendanceGroupUserDO> list = groupUserService.getGroupUserPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "考勤组人员.xls", "数据", AttendanceGroupUserRespVO.class,
|
||||
BeanUtils.toBean(list, AttendanceGroupUserRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.groupuser.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组人员分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AttendanceGroupUserPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "考勤组id", example = "21406")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "用户id", example = "22547")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.groupuser.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组人员 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AttendanceGroupUserRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "31257")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "考勤组id", example = "21406")
|
||||
@ExcelProperty("考勤组id")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "用户id", example = "22547")
|
||||
@ExcelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.groupuser.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组人员新增/修改 Request VO")
|
||||
@Data
|
||||
public class AttendanceGroupUserSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "31257")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "考勤组id", example = "21406")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "用户id", example = "22547")
|
||||
private Long userId;
|
||||
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.punchrecord;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.punchrecord.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.punchrecord.AttendancePunchRecordDO;
|
||||
import cn.iocoder.yudao.module.system.service.punchrecord.AttendancePunchRecordService;
|
||||
|
||||
@Tag(name = "管理后台 - 用户打卡记录")
|
||||
@RestController
|
||||
@RequestMapping("/system/attendance/punch-record")
|
||||
@Validated
|
||||
public class AttendancePunchRecordController {
|
||||
|
||||
@Resource
|
||||
private AttendancePunchRecordService punchRecordService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建用户打卡记录")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:punch-record:create')")
|
||||
public CommonResult<Long> createPunchRecord(@Valid @RequestBody AttendancePunchRecordSaveReqVO createReqVO) {
|
||||
return success(punchRecordService.createPunchRecord(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新用户打卡记录")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:punch-record:update')")
|
||||
public CommonResult<Boolean> updatePunchRecord(@Valid @RequestBody AttendancePunchRecordSaveReqVO updateReqVO) {
|
||||
punchRecordService.updatePunchRecord(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除用户打卡记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('attendance:punch-record:delete')")
|
||||
public CommonResult<Boolean> deletePunchRecord(@RequestParam("id") Long id) {
|
||||
punchRecordService.deletePunchRecord(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得用户打卡记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:punch-record:query')")
|
||||
public CommonResult<AttendancePunchRecordRespVO> getPunchRecord(@RequestParam("id") Long id) {
|
||||
AttendancePunchRecordDO punchRecord = punchRecordService.getPunchRecord(id);
|
||||
return success(BeanUtils.toBean(punchRecord, AttendancePunchRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户打卡记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:punch-record:query')")
|
||||
public CommonResult<PageResult<AttendancePunchRecordRespVO>> getPunchRecordPage(@Valid AttendancePunchRecordPageReqVO pageReqVO) {
|
||||
PageResult<AttendancePunchRecordDO> pageResult = punchRecordService.getPunchRecordPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AttendancePunchRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出用户打卡记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:punch-record:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportPunchRecordExcel(@Valid AttendancePunchRecordPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AttendancePunchRecordDO> list = punchRecordService.getPunchRecordPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "用户打卡记录.xls", "数据", AttendancePunchRecordRespVO.class,
|
||||
BeanUtils.toBean(list, AttendancePunchRecordRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.punchrecord.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 用户打卡记录分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AttendancePunchRecordPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "考勤组管理员id", example = "11409")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "考勤组id", example = "22293")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "班次id", example = "10780")
|
||||
private Long attendanceGroupShiftId;
|
||||
|
||||
@Schema(description = "考勤类型 1固定班制 2排班制", example = "2")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "打卡类型 1考勤机 2小程序范围打卡", example = "2")
|
||||
private Integer punchType;
|
||||
|
||||
@Schema(description = "班次考勤时间json[{start_tiem:HH:mm,start_check_flag:true,end_time:HH:mm,end_check_flah: true}]")
|
||||
private String attendanceTimeJson;
|
||||
|
||||
@Schema(description = "打卡状态 0正常 1迟到 2缺卡 3外勤 4补卡", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "日期yyyy-MM-dd格式")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] dayTime;
|
||||
|
||||
@Schema(description = "打卡时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] punchTime;
|
||||
|
||||
@Schema(description = "打卡备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "图片")
|
||||
private String image;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.punchrecord.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 用户打卡记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AttendancePunchRecordRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "65")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "考勤组管理员id", example = "11409")
|
||||
@ExcelProperty("考勤组管理员id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "考勤组id", example = "22293")
|
||||
@ExcelProperty("考勤组id")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "班次id", example = "10780")
|
||||
@ExcelProperty("班次id")
|
||||
private Long attendanceGroupShiftId;
|
||||
|
||||
@Schema(description = "考勤类型 1固定班制 2排班制", example = "2")
|
||||
@ExcelProperty("考勤类型 1固定班制 2排班制")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "打卡类型 1考勤机 2小程序范围打卡", example = "2")
|
||||
@ExcelProperty("打卡类型 1考勤机 2小程序范围打卡")
|
||||
private Integer punchType;
|
||||
|
||||
@Schema(description = "班次考勤时间json[{start_tiem:HH:mm,start_check_flag:true,end_time:HH:mm,end_check_flah: true}]")
|
||||
@ExcelProperty("班次考勤时间json[{start_tiem:HH:mm,start_check_flag:true,end_time:HH:mm,end_check_flah: true}]")
|
||||
private String attendanceTimeJson;
|
||||
|
||||
@Schema(description = "打卡状态 0正常 1迟到 2缺卡 3外勤 4补卡", example = "1")
|
||||
@ExcelProperty("打卡状态 0正常 1迟到 2缺卡 3外勤 4补卡")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "日期yyyy-MM-dd格式")
|
||||
@ExcelProperty("日期yyyy-MM-dd格式")
|
||||
private String dayTime;
|
||||
|
||||
@Schema(description = "打卡时间")
|
||||
@ExcelProperty("打卡时间")
|
||||
private LocalDateTime punchTime;
|
||||
|
||||
@Schema(description = "打卡备注", example = "你说的对")
|
||||
@ExcelProperty("打卡备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "图片")
|
||||
@ExcelProperty("图片")
|
||||
private String image;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.punchrecord.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 用户打卡记录新增/修改 Request VO")
|
||||
@Data
|
||||
public class AttendancePunchRecordSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "65")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "考勤组管理员id", example = "11409")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "考勤组id", example = "22293")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "班次id", example = "10780")
|
||||
private Long attendanceGroupShiftId;
|
||||
|
||||
@Schema(description = "考勤类型 1固定班制 2排班制", example = "2")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "打卡类型 1考勤机 2小程序范围打卡", example = "2")
|
||||
private Integer punchType;
|
||||
|
||||
@Schema(description = "班次考勤时间json[{start_tiem:HH:mm,start_check_flag:true,end_time:HH:mm,end_check_flah: true}]")
|
||||
private String attendanceTimeJson;
|
||||
|
||||
@Schema(description = "打卡状态 0正常 1迟到 2缺卡 3外勤 4补卡", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "日期yyyy-MM-dd格式")
|
||||
private String dayTime;
|
||||
|
||||
@Schema(description = "打卡时间")
|
||||
private LocalDateTime punchTime;
|
||||
|
||||
@Schema(description = "打卡备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "图片")
|
||||
private String image;
|
||||
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.scheduling;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.scheduling.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.scheduling.AttendanceSchedulingDO;
|
||||
import cn.iocoder.yudao.module.system.service.scheduling.AttendanceSchedulingService;
|
||||
|
||||
@Tag(name = "管理后台 - 排班制考勤设置")
|
||||
@RestController
|
||||
@RequestMapping("/system/attendance/scheduling")
|
||||
@Validated
|
||||
public class AttendanceSchedulingController {
|
||||
|
||||
@Resource
|
||||
private AttendanceSchedulingService schedulingService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建排班制考勤设置")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:scheduling:create')")
|
||||
public CommonResult<Long> createScheduling(@Valid @RequestBody AttendanceSchedulingSaveReqVO createReqVO) {
|
||||
return success(schedulingService.createScheduling(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新排班制考勤设置")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:scheduling:update')")
|
||||
public CommonResult<Boolean> updateScheduling(@Valid @RequestBody AttendanceSchedulingSaveReqVO updateReqVO) {
|
||||
schedulingService.updateScheduling(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除排班制考勤设置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('attendance:scheduling:delete')")
|
||||
public CommonResult<Boolean> deleteScheduling(@RequestParam("id") Long id) {
|
||||
schedulingService.deleteScheduling(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得排班制考勤设置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:scheduling:query')")
|
||||
public CommonResult<AttendanceSchedulingRespVO> getScheduling(@RequestParam("id") Long id) {
|
||||
AttendanceSchedulingDO scheduling = schedulingService.getScheduling(id);
|
||||
return success(BeanUtils.toBean(scheduling, AttendanceSchedulingRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得排班制考勤设置分页")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:scheduling:query')")
|
||||
public CommonResult<PageResult<AttendanceSchedulingRespVO>> getSchedulingPage(@Valid AttendanceSchedulingPageReqVO pageReqVO) {
|
||||
PageResult<AttendanceSchedulingDO> pageResult = schedulingService.getSchedulingPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AttendanceSchedulingRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出排班制考勤设置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('attendance:scheduling:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportSchedulingExcel(@Valid AttendanceSchedulingPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AttendanceSchedulingDO> list = schedulingService.getSchedulingPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "排班制考勤设置.xls", "数据", AttendanceSchedulingRespVO.class,
|
||||
BeanUtils.toBean(list, AttendanceSchedulingRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.scheduling.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 排班制考勤设置分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AttendanceSchedulingPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "第几天")
|
||||
private Integer indexDay;
|
||||
|
||||
@Schema(description = "考勤组id", example = "5025")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "班次id", example = "9583")
|
||||
private Long attendanceGroupShiftId;
|
||||
|
||||
@Schema(description = "是否休息 0否 1是")
|
||||
private Integer restFlag;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.scheduling.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 排班制考勤设置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AttendanceSchedulingRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23862")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "第几天")
|
||||
@ExcelProperty("第几天")
|
||||
private Integer indexDay;
|
||||
|
||||
@Schema(description = "考勤组id", example = "5025")
|
||||
@ExcelProperty("考勤组id")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "班次id", example = "9583")
|
||||
@ExcelProperty("班次id")
|
||||
private Long attendanceGroupShiftId;
|
||||
|
||||
@Schema(description = "是否休息 0否 1是")
|
||||
@ExcelProperty("是否休息 0否 1是")
|
||||
private Integer restFlag;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.scheduling.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 排班制考勤设置新增/修改 Request VO")
|
||||
@Data
|
||||
public class AttendanceSchedulingSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23862")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "第几天")
|
||||
private Integer indexDay;
|
||||
|
||||
@Schema(description = "考勤组id", example = "5025")
|
||||
private Long attendanceGroupId;
|
||||
|
||||
@Schema(description = "班次id", example = "9583")
|
||||
private Long attendanceGroupShiftId;
|
||||
|
||||
@Schema(description = "是否休息 0否 1是")
|
||||
private Integer restFlag;
|
||||
|
||||
}
|
@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.*;
|
||||
@ -19,6 +20,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -140,6 +142,27 @@ public class UserController {
|
||||
return success(UserConvert.INSTANCE.convert(user, dept, post));
|
||||
}
|
||||
|
||||
@PostMapping("/getByDeptIds")
|
||||
@Operation(summary = "获得用户详情")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:query')")
|
||||
public CommonResult<List<UserRespVO>> getUserByDeptIds(@RequestBody Collection<Long> deptIds) {
|
||||
|
||||
List<UserRespVO> user = userService.getUserByDeptIds(deptIds);
|
||||
|
||||
return success(user);
|
||||
}
|
||||
|
||||
@PostMapping("/getByDeptId")
|
||||
@Operation(summary = "根据部门编号获得用户详情")
|
||||
@Parameter(name = "deptId", description = "部门编号", required = true, example = "117")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:query')")
|
||||
public CommonResult<List<UserRespVO>> getListUserByDeptId(@RequestParam("deptId") Long deptId) {
|
||||
|
||||
List<AdminUserDO> user = userService.getListUserByDeptId(deptId);
|
||||
|
||||
return success(BeanUtils.toBean(user, UserRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export")
|
||||
@Operation(summary = "导出用户")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:export')")
|
||||
|
@ -5,7 +5,9 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.form.*;
|
||||
import cn.iocoder.yudao.module.system.convert.worklog.LogFormConvert;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogFormDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogRuleDO;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.LogFormService;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.LogRuleService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -19,7 +21,7 @@ import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 日志动态表单")
|
||||
@Tag(name = "管理后台 - 日志动态模板")
|
||||
@RestController
|
||||
@RequestMapping("/system/worklog/form")
|
||||
@Validated
|
||||
@ -28,15 +30,18 @@ public class LogFormController {
|
||||
@Resource
|
||||
private LogFormService formService;
|
||||
|
||||
@Resource
|
||||
private LogRuleService logRuleService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建动态表单")
|
||||
@Operation(summary = "创建动态模板")
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:create')")
|
||||
public CommonResult<Long> createForm(@Valid @RequestBody LogFormCreateReqVO createReqVO) {
|
||||
return success(formService.createForm(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新动态表单")
|
||||
@Operation(summary = "更新动态模板")
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:update')")
|
||||
public CommonResult<Boolean> updateForm(@Valid @RequestBody LogFormUpdateReqVO updateReqVO) {
|
||||
formService.updateForm(updateReqVO);
|
||||
@ -44,7 +49,7 @@ public class LogFormController {
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除动态表单")
|
||||
@Operation(summary = "删除动态模板")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:delete')")
|
||||
public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) {
|
||||
@ -53,26 +58,47 @@ public class LogFormController {
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得动态表单")
|
||||
@Operation(summary = "获得动态模板")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:query')")
|
||||
public CommonResult<LogFormRespVO> getForm(@RequestParam("id") Long id) {
|
||||
|
||||
LogFormDO form = formService.getForm(id);
|
||||
return success(LogFormConvert.INSTANCE.convert(form));
|
||||
LogFormRespVO logFormRespVO = LogFormConvert.INSTANCE.convert(form);
|
||||
|
||||
if (form != null) {
|
||||
|
||||
//获取规则信息
|
||||
LogRuleDO logRuleDO = logRuleService.getLogRule(form.getId());
|
||||
|
||||
//设置日志类型
|
||||
logFormRespVO.setType(logRuleDO.getType());
|
||||
}
|
||||
|
||||
return success(logFormRespVO);
|
||||
}
|
||||
|
||||
@GetMapping("/list-all-simple")
|
||||
@Operation(summary = "获得动态表单的精简列表", description = "用于表单下拉框")
|
||||
@Operation(summary = "获得动态模板的精简列表", description = "用于表单下拉框")
|
||||
public CommonResult<List<LogFormSimpleRespVO>> getSimpleForms() {
|
||||
List<LogFormDO> list = formService.getFormList();
|
||||
return success(LogFormConvert.INSTANCE.convertList2(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得动态表单分页")
|
||||
@Operation(summary = "获得动态模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:query')")
|
||||
public CommonResult<PageResult<LogFormRespVO>> getFormPage(@Valid LogFormPageReqVO pageVO) {
|
||||
PageResult<LogFormDO> pageResult = formService.getFormPage(pageVO);
|
||||
return success(LogFormConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/page-by-rule")
|
||||
@Operation(summary = "获得我可以使用的模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:query')")
|
||||
public CommonResult<PageResult<LogFormRespVO>> getFormPageByRule(@Valid LogFormPageReqVO pageVO) {
|
||||
|
||||
PageResult<LogFormDO> pageResult = formService.getFormPageByRule(pageVO);
|
||||
return success(LogFormConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
}
|
||||
|
@ -1,37 +1,41 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptRespVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserRespVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance.LogInstancePageReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance.LogInstanceRespVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance.LogInstanceSaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import cn.iocoder.yudao.module.system.convert.worklog.LogInstanceConvert;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.LogInstanceService;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.LogReadService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogInstanceDO;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.LogInstanceService;
|
||||
|
||||
@Tag(name = "管理后台 - 日志实例的拓展")
|
||||
@Tag(name = "管理后台 - 日志实例")
|
||||
@RestController
|
||||
@RequestMapping("/system/log-instance")
|
||||
@Validated
|
||||
@ -40,15 +44,21 @@ public class LogInstanceController {
|
||||
@Resource
|
||||
private LogInstanceService logInstanceService;
|
||||
|
||||
@Resource
|
||||
private LogReadService logReadService;
|
||||
|
||||
@Resource
|
||||
private AdminUserService adminUserService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建日志实例的拓展")
|
||||
@Operation(summary = "创建日志实例")
|
||||
@PreAuthorize("@ss.hasPermission('system:log-instance:create')")
|
||||
public CommonResult<Long> createLogInstance(@Valid @RequestBody LogInstanceSaveReqVO createReqVO) {
|
||||
return success(logInstanceService.createLogInstance(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新日志实例的拓展")
|
||||
@Operation(summary = "更新日志实例")
|
||||
@PreAuthorize("@ss.hasPermission('system:log-instance:update')")
|
||||
public CommonResult<Boolean> updateLogInstance(@Valid @RequestBody LogInstanceSaveReqVO updateReqVO) {
|
||||
logInstanceService.updateLogInstance(updateReqVO);
|
||||
@ -56,7 +66,7 @@ public class LogInstanceController {
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除日志实例的拓展")
|
||||
@Operation(summary = "删除日志实例")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('system:log-instance:delete')")
|
||||
public CommonResult<Boolean> deleteLogInstance(@RequestParam("id") Long id) {
|
||||
@ -65,38 +75,93 @@ public class LogInstanceController {
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得日志实例的拓展")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:log-instance:query')")
|
||||
@Operation(summary = "获得日志实例")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1")
|
||||
@PreAuthorize("@ss.hasPermission('system:view-log:query')")
|
||||
public CommonResult<LogInstanceRespVO> getLogInstance(@RequestParam("id") Long id) {
|
||||
LogInstanceDO logInstance = logInstanceService.getLogInstance(id);
|
||||
return success(BeanUtils.toBean(logInstance, LogInstanceRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/my-page")
|
||||
@Operation(summary = "获得我的日志分页列表", description = "在【我的日志】菜单中,进行调用")
|
||||
@PreAuthorize("@ss.hasPermission('system:log-instance:query')")
|
||||
public CommonResult<PageResult<LogInstanceRespVO>> getMyLogInstancePage(@Valid LogInstancePageReqVO pageReqVO) {
|
||||
//查看日志详情时,变更当前用户日志的阅读状态
|
||||
logReadService.updateReadStatus(id, getLoginUserId());
|
||||
|
||||
return success(logInstanceService.getMyProcessInstancePage(getLoginUserId(), pageReqVO));
|
||||
LogInstanceRespVO logInstance = logInstanceService.getLogInstance(id);
|
||||
return success(logInstance);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得日志实例的拓展分页")
|
||||
@Operation(summary = "获得日志分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('system:view-log:query')")
|
||||
public CommonResult<PageResult<LogInstanceRespVO>> getLogInstancePage(@Valid LogInstancePageReqVO pageReqVO) {
|
||||
PageResult<LogInstanceDO> pageResult = logInstanceService.getLogInstancePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, LogInstanceRespVO.class));
|
||||
public CommonResult<IPage<LogInstanceRespVO>> getLogInstancePage(@ModelAttribute LogInstancePageReqVO pageReqVO) {
|
||||
|
||||
IPage<LogInstanceRespVO> pageResult = logInstanceService.getLogInstancePage(pageReqVO, 0);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/my-page")
|
||||
@Operation(summary = "获得我的日志分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('system:view-log:query')")
|
||||
public CommonResult<IPage<LogInstanceRespVO>> getMyLogInstancePage(@ModelAttribute LogInstancePageReqVO pageReqVO) {
|
||||
|
||||
IPage<LogInstanceRespVO> pageResult = logInstanceService.getLogInstancePage(pageReqVO, 1);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@PostMapping("/get-dept")
|
||||
@Operation(summary = "获得我收到的日志页面中的部门列表")
|
||||
@PreAuthorize("@ss.hasPermission('system:view-log:query')")
|
||||
public CommonResult<List<DeptRespVO>> getReadDept() {
|
||||
|
||||
List<DeptRespVO> deptInfo = logInstanceService.getDeptInfo();
|
||||
return success(deptInfo);
|
||||
}
|
||||
|
||||
@GetMapping("/get-upLog")
|
||||
@Operation(summary = "获取上一篇日志,用于导入上一篇日志")
|
||||
@Parameter(name = "formId", description = "日志模板编号", required = true, example = "1")
|
||||
@PreAuthorize("@ss.hasPermission('system:view-log:query')")
|
||||
public CommonResult<LogInstanceRespVO> getUpLog(@RequestParam("formId") Long formId) {
|
||||
|
||||
LogInstanceRespVO logInstanceRespVO = LogInstanceConvert.INSTANCE.convert(logInstanceService.getUpLog(formId));
|
||||
logInstanceRespVO = logInstanceService.setContentFun(logInstanceRespVO);
|
||||
|
||||
return success(logInstanceRespVO);
|
||||
}
|
||||
|
||||
@PostMapping("/getByLogId")
|
||||
@Operation(summary = "获得可查看日志的用户详情")
|
||||
@Parameter(name = "logId", description = "日志编号", required = true, example = "10")
|
||||
@PreAuthorize("@ss.hasPermission('system:view-log:query')")
|
||||
public CommonResult<List<Map<String, Object>>> getUserByLogId(@RequestParam("logId") Long logId) {
|
||||
|
||||
List<Map<String, Object>> readUserVO = new ArrayList<>();
|
||||
|
||||
Map<Integer, List<Long>> usrMap = logReadService.getUserId(logId);
|
||||
|
||||
List<UserRespVO> unReadUserInfo = BeanUtils.toBean(adminUserService.getUserList(usrMap.get(0)), UserRespVO.class);
|
||||
List<UserRespVO> readUserInfo = BeanUtils.toBean(adminUserService.getUserList(usrMap.get(1)), UserRespVO.class);
|
||||
|
||||
Map<String, Object> unReadMap = new HashMap<>();
|
||||
Map<String, Object> readMap = new HashMap<>();
|
||||
|
||||
unReadMap.put("readStatus", 0);
|
||||
unReadMap.put("value", unReadUserInfo);
|
||||
|
||||
readMap.put("readStatus", 1);
|
||||
readMap.put("value", readUserInfo);
|
||||
|
||||
readUserVO.add(unReadMap);
|
||||
readUserVO.add(readMap);
|
||||
|
||||
return success(readUserVO);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出日志实例的拓展 Excel")
|
||||
@Operation(summary = "导出日志实例 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('system:log-instance:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportLogInstanceExcel(@Valid LogInstancePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<LogInstanceDO> list = logInstanceService.getLogInstancePage(pageReqVO).getList();
|
||||
List<LogInstanceRespVO> list = logInstanceService.getLogInstancePage(pageReqVO,null).getRecords();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "日志实例的拓展.xls", "数据", LogInstanceRespVO.class,
|
||||
BeanUtils.toBean(list, LogInstanceRespVO.class));
|
||||
|
@ -6,11 +6,14 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserRespVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.rule.LogRulePageReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.rule.LogRuleRespVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.rule.LogRuleSaveReqVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogRuleDO;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.LogRuleService;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.LogUseService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -23,6 +26,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
@ -36,6 +40,12 @@ public class LogRuleController {
|
||||
@Resource
|
||||
private LogRuleService logRuleService;
|
||||
|
||||
@Resource
|
||||
private LogUseService logUseService;
|
||||
|
||||
@Resource
|
||||
private AdminUserService userService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建日志规则")
|
||||
@PreAuthorize("@ss.hasPermission('system:log-rule:create')")
|
||||
@ -62,13 +72,31 @@ public class LogRuleController {
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得日志规则")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@Parameter(name = "formId", description = "日志模板编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:log-rule:query')")
|
||||
public CommonResult<LogRuleRespVO> getLogRule(@RequestParam("id") Long id) {
|
||||
LogRuleDO logRule = logRuleService.getLogRule(id);
|
||||
public CommonResult<LogRuleRespVO> getLogRule(@RequestParam("formId") Long formId) {
|
||||
|
||||
LogRuleDO logRule = logRuleService.getLogRule(formId);
|
||||
|
||||
return success(BeanUtils.toBean(logRule, LogRuleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/get-userInfo")
|
||||
@Operation(summary = "获得规则内模板使用者信息")
|
||||
@Parameter(name = "formId", description = "模板编号", required = true, example = "1")
|
||||
public CommonResult<List<UserRespVO>> getLogUseInfo(@RequestParam("formId") Long formId) {
|
||||
|
||||
//获取模板使用者部门编号组
|
||||
List<Long> deptIds = logUseService.getDeptByFormId(formId);
|
||||
//获取模板使用者编号组
|
||||
List<Long> userIds = logUseService.getUserByFormId(formId);
|
||||
|
||||
//根据部门编号组 获取用户信息
|
||||
List<UserRespVO> userInfo = userService.getUserByDeptIds(deptIds);
|
||||
|
||||
return success(userInfo.stream().filter(user -> userIds.contains(user.getId())).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得日志规则分页")
|
||||
@PreAuthorize("@ss.hasPermission('system:log-rule:query')")
|
||||
|
@ -0,0 +1,67 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListDTO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsDetailsListVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsDetailsVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsExcelVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsModelVO;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.LogStatisticsService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
@Tag(name = "管理后台 - 工作日志统计")
|
||||
@RestController
|
||||
@RequestMapping("/system/worklog/statistics")
|
||||
@Validated
|
||||
public class LogStatisticsController {
|
||||
|
||||
@Resource
|
||||
private LogStatisticsService logStatisticsService;
|
||||
|
||||
@GetMapping("/myManageModel")
|
||||
@Operation(summary = "获取我管理的模版")
|
||||
public CommonResult<List<LogStatisticsModelVO>> myManageModel() {
|
||||
return success(logStatisticsService.myManageModel());
|
||||
}
|
||||
|
||||
@GetMapping("/getStatistics")
|
||||
@Operation(summary = "获取日志统计")
|
||||
public CommonResult<LogStatisticsDetailsListVO> getStatistics(@ModelAttribute LogStatisticsDetailsListDTO dto) {
|
||||
return success(logStatisticsService.getStatistics(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/getNeedWrite")
|
||||
@Operation(summary = "获取需要填写的")
|
||||
public CommonResult<List<LogStatisticsModelVO>> getNeedWrite() {
|
||||
List<LogStatisticsModelVO> list = logStatisticsService.getNeedWrite();
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出日志规则 Excel")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportLogRuleExcel(@ModelAttribute LogStatisticsDetailsListDTO dto,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<LogStatisticsDetailsVO> list = logStatisticsService.exportLogRuleExcel(dto);
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "日志规则.xls", "数据", LogStatisticsExcelVO.class,
|
||||
BeanUtils.toBean(list, LogStatisticsExcelVO.class));
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LogStatisticsDetailsListDTO {
|
||||
|
||||
@Schema(description = "模板编号")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "开始时间 格式yyyy-MM-dd 如果是日报的话 开始时间结束时间都传同一天即可")
|
||||
private String beginTime;
|
||||
|
||||
@Schema(description = "结束时间 格式yyyy-MM-dd 如果是日报的话 开始时间结束时间都传同一天即可")
|
||||
private String endTime;
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 动态表单 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class WorkLogStatisticsModelDTO {
|
||||
|
||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@NotNull(message = "表单名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "日志绑定规则编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1")
|
||||
private String ruleId;
|
||||
|
||||
@Schema(description = "表单状态-参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "表单状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "我是备注")
|
||||
private String remark;
|
||||
|
||||
}
|
@ -6,13 +6,16 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 动态表单分页 Request VO")
|
||||
@Schema(description = "管理后台 - 动态模板分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class LogFormPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "表单名称", example = "芋道")
|
||||
@Schema(description = "模板名称", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模板状态", example = "0")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@ -17,6 +17,9 @@ public class LogFormRespVO extends LogFormBaseVO {
|
||||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "日志类型", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "表单的配置不能为空")
|
||||
private String conf;
|
||||
|
@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.form;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogFormDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogRuleDO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LogFormRuleVO {
|
||||
@Schema(description = "模版对象", example = "模版对象")
|
||||
private LogFormDO formDO;
|
||||
@Schema(description = "规则对象", example = "规则对象")
|
||||
private LogRuleDO ruleDO;
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.upload.UploadUserFile;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@ -9,8 +8,6 @@ import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ -26,7 +23,13 @@ public class LogInstancePageReqVO extends PageParam {
|
||||
@Schema(description = "日志发起人的部门编号", example = "24292")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "日志实例的名字", example = "张三")
|
||||
@Schema(description = "日志发起人的用户名称", example = "张三")
|
||||
private String startUserName;
|
||||
|
||||
@Schema(description = "日志发起人的用户头像", example = "https://www.iocoder.cn/xxx.png")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "日志实例的名字", example = "张三的XX日报")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "日志类型 字典值 详情参考work_log_type", example = "2")
|
||||
@ -36,16 +39,12 @@ public class LogInstancePageReqVO extends PageParam {
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "模板值")
|
||||
private Map<String, Object> formVariables;
|
||||
|
||||
@Schema(description = "日志阅读状态", example = "2")
|
||||
private Map<String, Object> readStatus;
|
||||
|
||||
@Schema(description = "附件信息")
|
||||
private List<UploadUserFile> fileItems ;
|
||||
private String formVariables;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "未读", example = "0")
|
||||
private Integer unRead;
|
||||
}
|
@ -1,11 +1,13 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.upload.UploadUserFile;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -15,15 +17,22 @@ import java.util.Map;
|
||||
public class LogInstanceRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20649")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "日志发起人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24292")
|
||||
@Schema(description = "日志发起人的用户编号", example = "146")
|
||||
private Long startUserId;
|
||||
|
||||
@Schema(description = "日志发起人的部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24292")
|
||||
@Schema(description = "日志发起人的部门编号", example = "128")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "日志实例的名字", example = "张三")
|
||||
@Schema(description = "日志发起人的用户名称", example = "张三")
|
||||
private String startUserName;
|
||||
|
||||
@Schema(description = "日志发起人的用户头像", example = "https://www.iocoder.cn/xxx.png")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "日志实例的名字", example = "张三的XX日报")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "日志类型 字典值 详情参考work_log_type", example = "2")
|
||||
@ -33,15 +42,35 @@ public class LogInstanceRespVO {
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "模板值")
|
||||
private Map<String, Object> formVariables;
|
||||
private String formVariables;
|
||||
|
||||
@Schema(description = "日志阅读状态", example = "2")
|
||||
private Map<String, Object> readStatus;
|
||||
@Schema(description = "工作日志内容(部分) | 分页列表使用")
|
||||
private String workLogContent;
|
||||
|
||||
@Schema(description = "工作日志内容详情")
|
||||
private List<Map<String, String>> logDetail;
|
||||
|
||||
@Schema(description = "附件信息")
|
||||
private List<UploadUserFile> fileItems ;
|
||||
private String fileItems ;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
@Schema(description = "日志日期")
|
||||
private String time;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String createTime;
|
||||
|
||||
@Schema(description = "阅读状态, 0:未读、1:已读", example = "0")
|
||||
private String readStatus;
|
||||
|
||||
@Schema(description = "评论数", example = "10")
|
||||
private Integer comment;
|
||||
|
||||
@Schema(description = "已读人数", example = "10")
|
||||
private Integer readCount;
|
||||
|
||||
@Schema(description = "未读人数", example = "10")
|
||||
private Integer unreadCount;
|
||||
|
||||
}
|
@ -2,9 +2,8 @@ package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.upload.UploadUserFile;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -15,15 +14,13 @@ public class LogInstanceSaveReqVO {
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20649")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "日志发起人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24292")
|
||||
@NotNull(message = "发起日志的用户编号不能为空")
|
||||
@Schema(description = "日志发起人的用户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "24292")
|
||||
private Long startUserId;
|
||||
|
||||
@Schema(description = "日志发起人的部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24292")
|
||||
@NotNull(message = "发起日志的用户编号不能为空")
|
||||
@Schema(description = "日志发起人的部门编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "24292")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "日志实例的名字", example = "张三")
|
||||
@Schema(description = "日志实例的名字", example = "张三的XX日报")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "日志类型 字典值 详情参考work_log_type", example = "2")
|
||||
@ -35,10 +32,9 @@ public class LogInstanceSaveReqVO {
|
||||
@Schema(description = "模板值")
|
||||
private Map<String, Object> formVariables;
|
||||
|
||||
@Schema(description = "日志阅读状态", example = "2")
|
||||
private Map<String, Object> readStatus;
|
||||
|
||||
@Schema(description = "附件信息")
|
||||
private List<UploadUserFile> fileItems ;
|
||||
|
||||
@Schema(description = "日志详情,日期的值 | yyyy-MM-dd", example = "2024-04-14")
|
||||
private String time;
|
||||
}
|
@ -17,9 +17,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@ToString(callSuper = true)
|
||||
public class LogRulePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模板使用部门组")
|
||||
private String deptIds;
|
||||
|
||||
@Schema(description = "日志类型 字典值 详情参考work_log_type", example = "2")
|
||||
private Integer type;
|
||||
|
||||
|
@ -16,9 +16,8 @@ public class LogRuleRespVO {
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板使用部门组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("模板使用部门组")
|
||||
private Long deptIds;
|
||||
@Schema(description = "日志模板编号", example = "2")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "日志类型 字典值 详情参考work_log_type", example = "2")
|
||||
@ExcelProperty("日志类型")
|
||||
|
@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.rule;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 日志规则新增/修改 Request VO")
|
||||
@Data
|
||||
@ -12,9 +12,8 @@ public class LogRuleSaveReqVO {
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "21181")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板使用部门组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "模板使用部门组不能为空")
|
||||
private String deptIds;
|
||||
@Schema(description = "日志模板编号", example = "12")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "日志类型", example = "2")
|
||||
private Integer type;
|
||||
@ -34,4 +33,14 @@ public class LogRuleSaveReqVO {
|
||||
@Schema(description = "统计时间段")
|
||||
private String statisticalTime;
|
||||
|
||||
@Schema(description = "使用者用户信息")
|
||||
private List<UserInfo> userInfo;
|
||||
|
||||
@Data
|
||||
public static class UserInfo {
|
||||
|
||||
private Long userId;
|
||||
|
||||
private Long deptId;
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 动态表单 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class LogStatisticsDetailsListVO {
|
||||
@Schema(description = "按时提交")
|
||||
private List<LogStatisticsDetailsVO> onTime;
|
||||
|
||||
@Schema(description = "迟交")
|
||||
private List<LogStatisticsDetailsVO> late;
|
||||
|
||||
@Schema(description = "未提交")
|
||||
private List<LogStatisticsDetailsVO> unSubmitted;
|
||||
}
|
||||
|
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
|
||||
|
||||
@Data
|
||||
public class LogStatisticsDetailsVO {
|
||||
@Schema(description = "用户id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "部门id")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
@Schema(description = "日志id", example = "30875")
|
||||
private Long logInstanceExtId;
|
||||
|
||||
@Schema(description = "提交状态 1按时提交 2迟交 3未提交", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private Date createTime;
|
||||
}
|
||||
|
@ -0,0 +1,58 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
|
||||
|
||||
/**
|
||||
* 动态表单 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@Accessors(chain = false)
|
||||
public class LogStatisticsExcelVO {
|
||||
@Schema(description = "用户id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "名称")
|
||||
@ExcelProperty("名称")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "部门id")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "部门名称")
|
||||
@ExcelProperty("部门名称")
|
||||
private String deptName;
|
||||
|
||||
@Schema(description = "日志id", example = "30875")
|
||||
private Long logInstanceExtId;
|
||||
|
||||
@Schema(description = "提交状态 1按时提交 2迟交 3未提交", example = "2")
|
||||
@ExcelProperty(value = "提交状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.WORK_LOG_SUBMIT_STATUS)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
@ExcelProperty(value = "提交时间")
|
||||
private Date createTime;
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogFormDO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 动态表单 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class LogStatisticsModelVO extends LogFormDO {
|
||||
@Schema(description = "按时提交数量")
|
||||
private Integer onTimeNum = 0;
|
||||
|
||||
@Schema(description = "迟交数量")
|
||||
private Integer lateNum = 0;
|
||||
|
||||
@Schema(description = "未提交数量")
|
||||
private Integer unSubmittedNum = 0;
|
||||
|
||||
@Schema(description = "提交范围")
|
||||
private String commitTimeRange;
|
||||
|
||||
@Schema(description = "模版类型 1日报 2周报 3月报")
|
||||
private Integer type;
|
||||
}
|
||||
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 工作日志统计分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class LogStatisticsPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模板编号", example = "27285")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "模板规则编号", example = "17370")
|
||||
private Long ruleId;
|
||||
|
||||
@Schema(description = "用户id", example = "23689")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "部门编号", example = "21782")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "日志id", example = "30875")
|
||||
private Long logInstanceExtId;
|
||||
|
||||
@Schema(description = "日志类型 1日报 2周报", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "提交状态 1按时提交 2迟交 3未提交", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "提交日期 格式 yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] time;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 工作日志统计 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class LogStatisticsRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29400")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板编号", example = "27285")
|
||||
@ExcelProperty("模板编号")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "模板规则编号", example = "17370")
|
||||
@ExcelProperty("模板规则编号")
|
||||
private Long ruleId;
|
||||
|
||||
@Schema(description = "用户id", example = "23689")
|
||||
@ExcelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "部门编号", example = "21782")
|
||||
@ExcelProperty("部门编号")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "日志id", example = "30875")
|
||||
@ExcelProperty("日志id")
|
||||
private Long logInstanceExtId;
|
||||
|
||||
@Schema(description = "日志类型 1日报 2周报", example = "1")
|
||||
@ExcelProperty("日志类型 1日报 2周报")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "提交状态 1按时提交 2迟交 3未提交", example = "2")
|
||||
@ExcelProperty("提交状态 1按时提交 2迟交 3未提交")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "提交日期 格式 yyyy-MM-dd")
|
||||
@ExcelProperty("提交日期 格式 yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 工作日志统计新增/修改 Request VO")
|
||||
@Data
|
||||
public class LogStatisticsSaveReqVO {
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "21181")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板编号", example = "27285")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "模板规则编号", example = "17370")
|
||||
private Long ruleId;
|
||||
|
||||
@Schema(description = "用户id", example = "23689")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "部门编号", example = "21782")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "日志id", example = "30875")
|
||||
private Long logInstanceExtId;
|
||||
|
||||
@Schema(description = "日志类型 1日报 2周报", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "提交状态 1按时提交 2迟交 3未提交", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "提交日期 格式 yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 工作日志统计记录分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class LogStatisticsRecordPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模板编号", example = "4029")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "模板规则编号", example = "19133")
|
||||
private Long ruleId;
|
||||
|
||||
@Schema(description = "是否统计过 0否 1是")
|
||||
private Integer statisticsFlag;
|
||||
|
||||
@Schema(description = "统计日期 格式 yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private String[] time;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 工作日志统计记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class LogStatisticsRecordRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "18988")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板编号", example = "4029")
|
||||
@ExcelProperty("模板编号")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "模板规则编号", example = "19133")
|
||||
@ExcelProperty("模板规则编号")
|
||||
private Long ruleId;
|
||||
|
||||
@Schema(description = "是否统计过 0否 1是")
|
||||
@ExcelProperty("是否统计过 0否 1是")
|
||||
private Integer statisticsFlag;
|
||||
|
||||
@Schema(description = "统计日期 格式 yyyy-MM-dd")
|
||||
@ExcelProperty("统计日期 格式 yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 工作日志统计记录新增/修改 Request VO")
|
||||
@Data
|
||||
public class LogStatisticsRecordSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "18988")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板编号", example = "4029")
|
||||
private Long formId;
|
||||
|
||||
@Schema(description = "模板规则编号", example = "19133")
|
||||
private Long ruleId;
|
||||
|
||||
@Schema(description = "是否统计过 0否 1是")
|
||||
private Integer statisticsFlag;
|
||||
|
||||
@Schema(description = "统计日期 格式 yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.system.controller.app.attendance;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.system.controller.app.attendance.dto.AttendancePunchPageDTO;
|
||||
import cn.iocoder.yudao.module.system.controller.app.attendance.vo.AttendancePunchPageVO;
|
||||
import cn.iocoder.yudao.module.system.controller.app.dict.vo.AppDictDataRespVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictDataDO;
|
||||
import cn.iocoder.yudao.module.system.handler.PunchHandler;
|
||||
import cn.iocoder.yudao.module.system.service.attendance.AttendanceService;
|
||||
import cn.iocoder.yudao.module.system.service.dict.DictDataService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "考勤 App - 考勤管理")
|
||||
@RestController
|
||||
@RequestMapping("/system/attendance")
|
||||
@Validated
|
||||
public class AttendanceController {
|
||||
|
||||
@Resource
|
||||
private AttendanceService attendanceService;
|
||||
|
||||
@GetMapping("/getPunchPage")
|
||||
@Operation(summary = "获取考勤页面")
|
||||
public CommonResult<AttendancePunchPageVO> getPunchPage(@ModelAttribute AttendancePunchPageDTO dto) {
|
||||
Long userId = WebFrameworkUtils.getLoginUserId();
|
||||
AttendancePunchPageVO vo = attendanceService.getPunchPage(dto.setUserId(userId));
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.system.controller.app.attendance.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AttendancePunchPageDTO {
|
||||
|
||||
@Schema(description = "经度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "当前用户id", hidden = true)
|
||||
private Long userId;
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package cn.iocoder.yudao.module.system.controller.app.attendance.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AttendancePunchPageVO {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package cn.iocoder.yudao.module.system.controller.app.comment;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.system.controller.app.comment.dto.CommentDTO;
|
||||
import cn.iocoder.yudao.module.system.controller.app.comment.vo.CommentPageListVO;
|
||||
import cn.iocoder.yudao.module.system.controller.app.comment.vo.CommentTypeCountVO;
|
||||
import cn.iocoder.yudao.module.system.controller.app.comment.vo.WorkLogCommentSaveReqVO;
|
||||
import cn.iocoder.yudao.module.system.service.comment.WorkLogCommentService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 工作日志评论")
|
||||
@RestController
|
||||
@RequestMapping("/system/work-log-comment")
|
||||
@Validated
|
||||
public class WorkLogCommentController {
|
||||
|
||||
@Autowired
|
||||
private WorkLogCommentService workLogCommentService;
|
||||
|
||||
@Operation(summary = "用户工作日志评论-分页查询评论列表")
|
||||
@GetMapping(value = "/queryCommentPageList")
|
||||
public CommonResult<IPage<CommentPageListVO>> queryCommentPageList(CommentDTO dto,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<CommentPageListVO> page = new Page<>(pageNo, pageSize);
|
||||
IPage<CommentPageListVO> pageList = workLogCommentService.queryCommentPageList(page, dto);
|
||||
return success(pageList);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建工作日志评论")
|
||||
public CommonResult<Long> createWorkLogComment(@RequestBody WorkLogCommentSaveReqVO createReqVO) {
|
||||
return success(workLogCommentService.createWorkLogComment(createReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/queryCommentTypeCount")
|
||||
@Operation(summary = "获取评论类型数量")
|
||||
public CommonResult<CommentTypeCountVO> queryCommentTypeCount() {
|
||||
return success(workLogCommentService.queryCommentTypeCount());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.system.controller.app.comment.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CommentDTO {
|
||||
@Schema(description = "工作日志id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long workLogId;
|
||||
@Schema(description = "评论类型(0|评论;1|回评")
|
||||
private Integer type;
|
||||
@Schema(description = "是否需要显示日志内容 0否 1是 默认否")
|
||||
private Integer isShowWorkLogContent;
|
||||
|
||||
@Schema(description = "是否查看自己的评论记录 0否 1是")
|
||||
private Integer checkMyselfFlag;
|
||||
|
||||
@Schema(description = "用户id")
|
||||
private Long userId;
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package cn.iocoder.yudao.module.system.controller.app.comment.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@Data
|
||||
public class CommentPageListVO {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "id")
|
||||
private Long id;
|
||||
@Schema(description = "工作日志ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long workLogId;
|
||||
@Schema(description = "评论用户ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
@Schema(description = "评论用户头像")
|
||||
private String avatar;
|
||||
@Schema(description = "评论用户名称")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "被评论用户ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long commentUserId;
|
||||
@Schema(description = "被评论用户头像")
|
||||
private String commentAvatar;
|
||||
@Schema(description = "被评论用户名称")
|
||||
private String commentUserName;
|
||||
|
||||
@Schema(description = "评论内容")
|
||||
private String comment;
|
||||
@Schema(description = "评论类型(0|评论;1|回评)")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "被回评内容")
|
||||
private String replyComment;
|
||||
|
||||
@Schema(description = "工作日志内容(部分)")
|
||||
private String workLogContent;
|
||||
@Schema(description = "工作日志名称")
|
||||
private String workLogName;
|
||||
@Schema(description = "工作日志模版id")
|
||||
private Long workFormId;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "创建日期")
|
||||
private String createTime;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "发布日志时间")
|
||||
private String workLogTime;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.system.controller.app.comment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CommentTypeCountVO {
|
||||
|
||||
@Schema(description = "全部数量")
|
||||
private Integer allNum;
|
||||
@Schema(description = "评论数量")
|
||||
private Integer commentNum;
|
||||
@Schema(description = "回复数量")
|
||||
private Integer replyNum;
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.system.controller.app.comment.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 工作日志评论分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class WorkLogCommentPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "动态ID", example = "26393")
|
||||
private Long workLogId;
|
||||
|
||||
@Schema(description = "评论ID(回复评论的ID)", example = "25541")
|
||||
private Long commentId;
|
||||
|
||||
@Schema(description = "评论用户ID", example = "17082")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "被评论用户ID", example = "22388")
|
||||
private Long commentUserId;
|
||||
|
||||
@Schema(description = "评论内容")
|
||||
private String comment;
|
||||
|
||||
@Schema(description = "评论类型(0|评论;1|回评)", example = "1")
|
||||
private Boolean type;
|
||||
|
||||
@Schema(description = "楼栋标识")
|
||||
private String buildingCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package cn.iocoder.yudao.module.system.controller.app.comment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 工作日志评论 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WorkLogCommentRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21304")
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "动态ID", example = "26393")
|
||||
@ExcelProperty("动态ID")
|
||||
private Long workLogId;
|
||||
|
||||
@Schema(description = "评论ID(回复评论的ID)", example = "25541")
|
||||
@ExcelProperty("评论ID(回复评论的ID)")
|
||||
private Long commentId;
|
||||
|
||||
@Schema(description = "评论用户ID", example = "17082")
|
||||
@ExcelProperty("评论用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "被评论用户ID", example = "22388")
|
||||
@ExcelProperty("被评论用户ID")
|
||||
private Long commentUserId;
|
||||
|
||||
@Schema(description = "评论内容")
|
||||
@ExcelProperty("评论内容")
|
||||
private String comment;
|
||||
|
||||
@Schema(description = "评论类型(0|评论;1|回评)", example = "1")
|
||||
@ExcelProperty("评论类型(0|评论;1|回评)")
|
||||
private Boolean type;
|
||||
|
||||
@Schema(description = "楼栋标识")
|
||||
@ExcelProperty("楼栋标识")
|
||||
private String buildingCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.system.controller.app.comment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 工作日志评论新增/修改 Request VO")
|
||||
@Data
|
||||
public class WorkLogCommentSaveReqVO {
|
||||
|
||||
@Schema(description = "工作日志ID", example = "26393")
|
||||
private Long workLogId;
|
||||
|
||||
@Schema(description = "评论ID(回复评论的ID)", example = "25541")
|
||||
private Long commentId;
|
||||
|
||||
@Schema(description = "被评论用户ID", example = "22388")
|
||||
private Long commentUserId;
|
||||
|
||||
@Schema(description = "评论内容")
|
||||
private String comment;
|
||||
|
||||
@Schema(description = "评论类型(0|评论;1|回评)", example = "1")
|
||||
private Boolean type;
|
||||
|
||||
}
|
@ -1,12 +1,15 @@
|
||||
package cn.iocoder.yudao.module.system.convert.worklog;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance.LogInstanceRespVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance.LogInstanceSaveReqVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogInstanceDO;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* 日志详情 Convert
|
||||
*
|
||||
@ -19,8 +22,16 @@ public interface LogInstanceConvert {
|
||||
|
||||
LogInstanceDO convert(LogInstanceSaveReqVO bean);
|
||||
|
||||
default LogInstanceRespVO convert(LogInstanceDO logInstanceDO) {
|
||||
|
||||
LogInstanceRespVO convert(LogInstanceDO bean);
|
||||
LogInstanceRespVO logInstanceRespVO = BeanUtils.toBean(logInstanceDO, LogInstanceRespVO.class);
|
||||
if (logInstanceRespVO != null) {
|
||||
|
||||
PageResult<LogInstanceRespVO> convertPage(PageResult<LogInstanceDO> page);
|
||||
logInstanceRespVO.setFormVariables(JSONObject.toJSONString(logInstanceDO.getFormVariables()));
|
||||
logInstanceRespVO.setFileItems(JSONObject.toJSONString(logInstanceDO.getFileItems()));
|
||||
logInstanceRespVO.setCreateTime(logInstanceDO.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
}
|
||||
|
||||
return logInstanceRespVO;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,59 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.comment;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 工作日志评论 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("work_log_comment")
|
||||
@KeySequence("work_log_comment_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WorkLogCommentDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 工作日志ID
|
||||
*/
|
||||
private Long workLogId;
|
||||
/**
|
||||
* 评论ID(回复评论的ID)
|
||||
*/
|
||||
private Long commentId;
|
||||
/**
|
||||
* 评论用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 被评论用户ID
|
||||
*/
|
||||
private Long commentUserId;
|
||||
/**
|
||||
* 评论内容
|
||||
*/
|
||||
private String comment;
|
||||
/**
|
||||
* 评论类型(0|评论;1|回评)
|
||||
*/
|
||||
private Boolean type;
|
||||
/**
|
||||
* 楼栋标识
|
||||
*/
|
||||
private String buildingCode;
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.fixed;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 固定班制考勤设置 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("kq_attendance_fixed")
|
||||
@KeySequence("kq_attendance_fixed_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AttendanceFixedDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 考勤组id
|
||||
*/
|
||||
private Long attendanceGroupId;
|
||||
/**
|
||||
* 周时间 1-7
|
||||
*/
|
||||
private Integer weekTime;
|
||||
/**
|
||||
* 班次id
|
||||
*/
|
||||
private Long attendanceGroupShiftId;
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.group;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 考勤组 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("kq_attendance_group")
|
||||
@KeySequence("kq_attendance_group_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AttendanceGroupDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 考勤组管理员id
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 群组名称
|
||||
*/
|
||||
private String groupName;
|
||||
/**
|
||||
* 考勤类型 1固定班制 2排班制
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 打卡类型 1考勤机 2小程序范围打卡
|
||||
*/
|
||||
private Integer punchType;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String longitude;
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private String latitude;
|
||||
/**
|
||||
* 范围(米)
|
||||
*/
|
||||
private Integer scope;
|
||||
/**
|
||||
* 是否允许外勤打卡 0否 1是
|
||||
*/
|
||||
private Integer fieldworkFlag;
|
||||
/**
|
||||
* 节假日自动排休 0否 1是
|
||||
*/
|
||||
private Integer autoHolidaysFlag;
|
||||
|
||||
|
||||
public static String getCodeByType(Integer type) {
|
||||
if (type == 1) {
|
||||
return "fixed";
|
||||
} else {
|
||||
return "scheduling";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.groupshift;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 考勤组班次 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("kq_attendance_group_shift")
|
||||
@KeySequence("kq_attendance_group_shift_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AttendanceGroupShiftDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 考勤组id
|
||||
*/
|
||||
private Long attendanceGroupId;
|
||||
/**
|
||||
* 班次名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 班次考勤时间json[{start_tiem:HH:mm,start_check_flag:true,end_time:HH:mm,end_check_flah: true}]
|
||||
*/
|
||||
private String attendanceTimeJson;
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.groupuser;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 考勤组人员 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("kq_attendance_group_user")
|
||||
@KeySequence("kq_attendance_group_user_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AttendanceGroupUserDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 考勤组id
|
||||
*/
|
||||
private Long attendanceGroupId;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.punchrecord;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 用户打卡记录 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("kq_attendance_punch_record")
|
||||
@KeySequence("kq_attendance_punch_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AttendancePunchRecordDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 考勤组管理员id
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 考勤组id
|
||||
*/
|
||||
private Long attendanceGroupId;
|
||||
/**
|
||||
* 班次id
|
||||
*/
|
||||
private Long attendanceGroupShiftId;
|
||||
/**
|
||||
* 考勤类型 1固定班制 2排班制
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 打卡类型 1考勤机 2小程序范围打卡
|
||||
*/
|
||||
private Integer punchType;
|
||||
/**
|
||||
* 班次考勤时间json[{start_tiem:HH:mm,start_check_flag:true,end_time:HH:mm,end_check_flah: true}]
|
||||
*/
|
||||
private String attendanceTimeJson;
|
||||
/**
|
||||
* 打卡状态 0正常 1迟到 2缺卡 3外勤 4补卡
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 日期yyyy-MM-dd格式
|
||||
*/
|
||||
private String dayTime;
|
||||
/**
|
||||
* 打卡时间
|
||||
*/
|
||||
private LocalDateTime punchTime;
|
||||
/**
|
||||
* 打卡备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String image;
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.scheduling;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 排班制考勤设置 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("kq_attendance_scheduling")
|
||||
@KeySequence("kq_attendance_scheduling_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AttendanceSchedulingDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 第几天
|
||||
*/
|
||||
private Integer indexDay;
|
||||
/**
|
||||
* 考勤组id
|
||||
*/
|
||||
private Long attendanceGroupId;
|
||||
/**
|
||||
* 班次id
|
||||
*/
|
||||
private Long attendanceGroupShiftId;
|
||||
/**
|
||||
* 是否休息 0否 1是
|
||||
*/
|
||||
private Integer restFlag;
|
||||
|
||||
}
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.List;
|
||||
@ -40,6 +41,15 @@ public class LogInstanceDO extends BaseDO {
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 日志发起人的用户名称
|
||||
*/
|
||||
private String startUserName;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String avatar;
|
||||
/**
|
||||
* 日志名称
|
||||
*/
|
||||
@ -49,24 +59,27 @@ public class LogInstanceDO extends BaseDO {
|
||||
* 日报类型
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 提交状态 1按时提交 2迟交
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 日志模板编号
|
||||
*/
|
||||
private Long formId;
|
||||
|
||||
/**
|
||||
* 时间格式 yyyy-MM-dd
|
||||
*/
|
||||
private String time;
|
||||
|
||||
/**
|
||||
* 日志模板值
|
||||
*/
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private Map<String, Object> formVariables;
|
||||
|
||||
/**
|
||||
* 日志阅读状态
|
||||
*/
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private Map<String, Object> readStatus;
|
||||
|
||||
/**
|
||||
* 附件基本信息
|
||||
*/
|
||||
|
@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.worklog;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 日志查看状态 DO
|
||||
*
|
||||
* @author 符溶馨
|
||||
*/
|
||||
@TableName("work_log_read")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class LogReadDo extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 日志实例编号
|
||||
*/
|
||||
private Long logInstanceId;
|
||||
|
||||
/**
|
||||
* 日这发起人的用户编号
|
||||
*/
|
||||
private Long startUserId;
|
||||
|
||||
/**
|
||||
* 日志查看人的用户编号
|
||||
*/
|
||||
private Long readUserId;
|
||||
|
||||
/**
|
||||
* 日志查看人的部门编号
|
||||
*/
|
||||
private Long readUserDept;
|
||||
|
||||
/**
|
||||
* 日志查看状态
|
||||
* 0:未读
|
||||
* 1:已读
|
||||
*/
|
||||
private Integer readStatus;
|
||||
}
|
@ -25,23 +25,23 @@ public class LogRuleDO extends BaseDO {
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 模板使用部门组
|
||||
* 模版id
|
||||
*/
|
||||
private String deptIds;
|
||||
private Long formId;
|
||||
/**
|
||||
* 日志类型
|
||||
* 日志类型 1日报 2周报 3月报 4年报
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 日报情况,需提交的日期
|
||||
* 日报情况,需提交的日期 1,2,3,4,5 周一 到 周五
|
||||
*/
|
||||
private String weekDays;
|
||||
/**
|
||||
* 提交开始时间段
|
||||
* 提交开始时间段 如果是日报的话 格式是 HH:mm 如果是周报的话 格式是 1,HH:mm 其中1代表的是周几
|
||||
*/
|
||||
private String startTime;
|
||||
/**
|
||||
* 提交结束时间段
|
||||
* 提交结束时间段 如果是日报的话 格式是 HH:mm 如果是周报的话 格式是 1,HH:mm 其中1代表的是周几
|
||||
*/
|
||||
private String endTime;
|
||||
/**
|
||||
@ -49,7 +49,7 @@ public class LogRuleDO extends BaseDO {
|
||||
*/
|
||||
private Integer remindTime;
|
||||
/**
|
||||
* 统计时间段
|
||||
* 统计时间段 如果是日报的话 格式是 HH:mm 如果是周报的话 格式是 1,HH:mm 其中1代表的是周几
|
||||
*/
|
||||
private String statisticalTime;
|
||||
|
||||
|
@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.worklog;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 工作日志统计 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("work_log_statistics")
|
||||
@KeySequence("work_log_statistics_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class LogStatisticsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 模板编号
|
||||
*/
|
||||
private Long formId;
|
||||
/**
|
||||
* 模板规则编号
|
||||
*/
|
||||
private Long ruleId;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 日志id
|
||||
*/
|
||||
private Long logInstanceExtId;
|
||||
/**
|
||||
* 日志类型 1日报 2周报
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 提交状态 1按时提交 2迟交 3未提交
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 提交日期 格式 yyyy-MM-dd
|
||||
*/
|
||||
private String time;
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.worklog;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 工作日志统计记录 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("work_log_statistics_record")
|
||||
@KeySequence("work_log_statistics_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class LogStatisticsRecordDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 模板编号
|
||||
*/
|
||||
private Long formId;
|
||||
/**
|
||||
* 模板规则编号
|
||||
*/
|
||||
private Long ruleId;
|
||||
/**
|
||||
* 是否统计过 0否 1是
|
||||
*/
|
||||
private Integer statisticsFlag;
|
||||
/**
|
||||
* 统计日期 格式 yyyy-MM-dd
|
||||
*/
|
||||
private String time;
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.worklog;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 日志模板使用者 DO
|
||||
*
|
||||
* @author 符溶馨
|
||||
*/
|
||||
@TableName("work_log_use")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class LogUseDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 模板编号
|
||||
*/
|
||||
private Long formId;
|
||||
|
||||
/**
|
||||
* 规则编号
|
||||
*/
|
||||
private Long ruleId;
|
||||
|
||||
/**
|
||||
* 使用者编号
|
||||
*/
|
||||
private Long useUserId;
|
||||
|
||||
/**
|
||||
* 使用者部门编号
|
||||
*/
|
||||
private Long useUserDept;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.comment;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.controller.app.comment.dto.CommentDTO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.comment.WorkLogCommentDO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.app.comment.vo.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 工作日志评论 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface WorkLogCommentMapper extends BaseMapperX<WorkLogCommentDO> {
|
||||
|
||||
default PageResult<WorkLogCommentDO> selectPage(WorkLogCommentPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<WorkLogCommentDO>()
|
||||
.eqIfPresent(WorkLogCommentDO::getWorkLogId, reqVO.getWorkLogId())
|
||||
.eqIfPresent(WorkLogCommentDO::getCommentId, reqVO.getCommentId())
|
||||
.eqIfPresent(WorkLogCommentDO::getUserId, reqVO.getUserId())
|
||||
.eqIfPresent(WorkLogCommentDO::getCommentUserId, reqVO.getCommentUserId())
|
||||
.eqIfPresent(WorkLogCommentDO::getComment, reqVO.getComment())
|
||||
.eqIfPresent(WorkLogCommentDO::getType, reqVO.getType())
|
||||
.eqIfPresent(WorkLogCommentDO::getBuildingCode, reqVO.getBuildingCode())
|
||||
.betweenIfPresent(WorkLogCommentDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(WorkLogCommentDO::getId));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param page
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
IPage<CommentPageListVO> queryCommentPageList(@Param("page") Page<CommentPageListVO> page, @Param("dto") CommentDTO dto);
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.fixed;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.fixed.AttendanceFixedDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.fixed.vo.*;
|
||||
|
||||
/**
|
||||
* 固定班制考勤设置 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttendanceFixedMapper extends BaseMapperX<AttendanceFixedDO> {
|
||||
|
||||
default PageResult<AttendanceFixedDO> selectPage(AttendanceFixedPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AttendanceFixedDO>()
|
||||
.eqIfPresent(AttendanceFixedDO::getAttendanceGroupId, reqVO.getAttendanceGroupId())
|
||||
.betweenIfPresent(AttendanceFixedDO::getWeekTime, reqVO.getWeekTime())
|
||||
.eqIfPresent(AttendanceFixedDO::getAttendanceGroupShiftId, reqVO.getAttendanceGroupShiftId())
|
||||
.betweenIfPresent(AttendanceFixedDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AttendanceFixedDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.group;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.group.vo.AttendanceGroupPageReqVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.group.AttendanceGroupDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤组 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttendanceGroupMapper extends BaseMapperX<AttendanceGroupDO> {
|
||||
|
||||
default PageResult<AttendanceGroupDO> selectPage(AttendanceGroupPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AttendanceGroupDO>()
|
||||
.eqIfPresent(AttendanceGroupDO::getUserId, reqVO.getUserId())
|
||||
.likeIfPresent(AttendanceGroupDO::getGroupName, reqVO.getGroupName())
|
||||
.eqIfPresent(AttendanceGroupDO::getType, reqVO.getType())
|
||||
.eqIfPresent(AttendanceGroupDO::getPunchType, reqVO.getPunchType())
|
||||
.eqIfPresent(AttendanceGroupDO::getLongitude, reqVO.getLongitude())
|
||||
.eqIfPresent(AttendanceGroupDO::getLatitude, reqVO.getLatitude())
|
||||
.eqIfPresent(AttendanceGroupDO::getScope, reqVO.getScope())
|
||||
.eqIfPresent(AttendanceGroupDO::getAutoHolidaysFlag, reqVO.getAutoHolidaysFlag())
|
||||
.betweenIfPresent(AttendanceGroupDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AttendanceGroupDO::getId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过当前登录用户获取用户所在群组
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<AttendanceGroupDO> getByUserId(@Param("userId") Long userId);
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.groupshift;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.groupshift.AttendanceGroupShiftDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.groupshift.vo.*;
|
||||
|
||||
/**
|
||||
* 考勤组班次 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttendanceGroupShiftMapper extends BaseMapperX<AttendanceGroupShiftDO> {
|
||||
|
||||
default PageResult<AttendanceGroupShiftDO> selectPage(AttendanceGroupShiftPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AttendanceGroupShiftDO>()
|
||||
.eqIfPresent(AttendanceGroupShiftDO::getAttendanceGroupId, reqVO.getAttendanceGroupId())
|
||||
.likeIfPresent(AttendanceGroupShiftDO::getName, reqVO.getName())
|
||||
.eqIfPresent(AttendanceGroupShiftDO::getAttendanceTimeJson, reqVO.getAttendanceTimeJson())
|
||||
.betweenIfPresent(AttendanceGroupShiftDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AttendanceGroupShiftDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.groupuser;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.groupuser.AttendanceGroupUserDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.groupuser.vo.*;
|
||||
|
||||
/**
|
||||
* 考勤组人员 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttendanceGroupUserMapper extends BaseMapperX<AttendanceGroupUserDO> {
|
||||
|
||||
default PageResult<AttendanceGroupUserDO> selectPage(AttendanceGroupUserPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AttendanceGroupUserDO>()
|
||||
.eqIfPresent(AttendanceGroupUserDO::getAttendanceGroupId, reqVO.getAttendanceGroupId())
|
||||
.eqIfPresent(AttendanceGroupUserDO::getUserId, reqVO.getUserId())
|
||||
.betweenIfPresent(AttendanceGroupUserDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AttendanceGroupUserDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.punchrecord;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.punchrecord.AttendancePunchRecordDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.punchrecord.vo.*;
|
||||
|
||||
/**
|
||||
* 用户打卡记录 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttendancePunchRecordMapper extends BaseMapperX<AttendancePunchRecordDO> {
|
||||
|
||||
default PageResult<AttendancePunchRecordDO> selectPage(AttendancePunchRecordPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AttendancePunchRecordDO>()
|
||||
.eqIfPresent(AttendancePunchRecordDO::getUserId, reqVO.getUserId())
|
||||
.eqIfPresent(AttendancePunchRecordDO::getAttendanceGroupId, reqVO.getAttendanceGroupId())
|
||||
.eqIfPresent(AttendancePunchRecordDO::getAttendanceGroupShiftId, reqVO.getAttendanceGroupShiftId())
|
||||
.eqIfPresent(AttendancePunchRecordDO::getType, reqVO.getType())
|
||||
.eqIfPresent(AttendancePunchRecordDO::getPunchType, reqVO.getPunchType())
|
||||
.eqIfPresent(AttendancePunchRecordDO::getAttendanceTimeJson, reqVO.getAttendanceTimeJson())
|
||||
.eqIfPresent(AttendancePunchRecordDO::getStatus, reqVO.getStatus())
|
||||
.betweenIfPresent(AttendancePunchRecordDO::getDayTime, reqVO.getDayTime())
|
||||
.betweenIfPresent(AttendancePunchRecordDO::getPunchTime, reqVO.getPunchTime())
|
||||
.eqIfPresent(AttendancePunchRecordDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(AttendancePunchRecordDO::getImage, reqVO.getImage())
|
||||
.betweenIfPresent(AttendancePunchRecordDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AttendancePunchRecordDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.scheduling;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.scheduling.AttendanceSchedulingDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.scheduling.vo.*;
|
||||
|
||||
/**
|
||||
* 排班制考勤设置 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttendanceSchedulingMapper extends BaseMapperX<AttendanceSchedulingDO> {
|
||||
|
||||
default PageResult<AttendanceSchedulingDO> selectPage(AttendanceSchedulingPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AttendanceSchedulingDO>()
|
||||
.eqIfPresent(AttendanceSchedulingDO::getIndexDay, reqVO.getIndexDay())
|
||||
.eqIfPresent(AttendanceSchedulingDO::getAttendanceGroupId, reqVO.getAttendanceGroupId())
|
||||
.eqIfPresent(AttendanceSchedulingDO::getAttendanceGroupShiftId, reqVO.getAttendanceGroupShiftId())
|
||||
.eqIfPresent(AttendanceSchedulingDO::getRestFlag, reqVO.getRestFlag())
|
||||
.betweenIfPresent(AttendanceSchedulingDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AttendanceSchedulingDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserRespVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -52,5 +53,13 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
|
||||
return selectList(AdminUserDO::getDeptId, deptIds);
|
||||
}
|
||||
|
||||
default List<AdminUserDO> selectListByDeptId(Long deptId, Long userId) {
|
||||
return selectList(new LambdaQueryWrapperX<AdminUserDO>()
|
||||
.eq(AdminUserDO::getDeptId, deptId)
|
||||
.ne(AdminUserDO::getId, userId));
|
||||
}
|
||||
|
||||
void emptyOpenId(@Param("openId") String openId);
|
||||
|
||||
List<UserRespVO> selectByDeptIds(Collection<Long> deptIds);
|
||||
}
|
||||
|
@ -2,17 +2,27 @@ package cn.iocoder.yudao.module.system.dal.mysql.worklog;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.form.LogFormPageReqVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogFormDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface LogFormMapper extends BaseMapperX<LogFormDO> {
|
||||
|
||||
default PageResult<LogFormDO> selectPage(LogFormPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new QueryWrapperX<LogFormDO>()
|
||||
.likeIfPresent("name", reqVO.getName())
|
||||
.orderByDesc("id"));
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<LogFormDO>()
|
||||
.likeIfPresent(LogFormDO::getName, reqVO.getName())
|
||||
.eqIfPresent(LogFormDO::getStatus, reqVO.getStatus())
|
||||
.orderByDesc(LogFormDO::getId));
|
||||
}
|
||||
|
||||
default PageResult<LogFormDO> selectPageByRule(LogFormPageReqVO reqVO, List<Long> formIds) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<LogFormDO>()
|
||||
.eq(LogFormDO::getStatus, 0)
|
||||
.in(LogFormDO::getId, formIds)
|
||||
.orderByDesc(LogFormDO::getId));
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user