打卡范围

This commit is contained in:
2025-07-28 20:02:03 +08:00
parent 14abcc646b
commit d3bc55ea18
3 changed files with 23 additions and 1 deletions

View File

@ -13,6 +13,12 @@ import java.io.Serializable;
@Data
public class Punchrange implements Serializable {
/**
* 项目ID
*/
@NotNull(message = "项目ID不能为空")
private Long projectId;
/**
* 范围名称
*/

View File

@ -7,6 +7,7 @@ import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.project.domain.BusProject;
import org.dromara.project.domain.bo.Punchrange;
import java.io.Serial;
import java.io.Serializable;
@ -184,4 +185,9 @@ public class BusProjectVo implements Serializable {
*/
private List<BusSubProjectVo> children;
/**
* 打卡范围
*/
private List<Punchrange> punchrangeList;
}

View File

@ -151,7 +151,17 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
if (project == null) {
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
}
return this.getVo(project);
BusProjectVo vo = this.getVo(project);
//成功获取项目信息过后,还需要获取打卡范围
List<BusProjectPunchrange> punchrangeList = busProjectPunchrangeService.lambdaQuery()
.eq(BusProjectPunchrange::getProjectId, id)
.list();
if (!punchrangeList.isEmpty()) {
List<Punchrange> objects = new ArrayList<>();
BeanUtil.copyProperties(punchrangeList, objects);
vo.setPunchrangeList(objects);
}
return vo;
}
/**