打卡范围
This commit is contained in:
@ -13,6 +13,12 @@ import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class Punchrange implements Serializable {
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@NotNull(message = "项目ID不能为空")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 范围名称
|
||||
*/
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user