管理员和分包补卡
This commit is contained in:
@ -15,6 +15,9 @@ import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.contractor.domain.dto.contractor.SubContractorQueryReq;
|
||||
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
||||
import org.dromara.contractor.service.ISubContractorService;
|
||||
import org.dromara.materials.domain.dto.materials.MatMaterialsCreateReq;
|
||||
import org.dromara.materials.domain.dto.materials.MatMaterialsGisReq;
|
||||
import org.dromara.materials.domain.dto.materials.MatMaterialsQueryReq;
|
||||
@ -40,6 +43,8 @@ public class MatMaterialsController extends BaseController {
|
||||
|
||||
private final IMatMaterialsService materialsService;
|
||||
|
||||
private final ISubContractorService contractorService;
|
||||
|
||||
/**
|
||||
* 查询材料列表
|
||||
*/
|
||||
@ -155,4 +160,14 @@ public class MatMaterialsController extends BaseController {
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(materialsService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询分包单位列表
|
||||
*/
|
||||
@SaCheckPermission("materials:materials:contractorList")
|
||||
@GetMapping("/contractorList")
|
||||
public R<List<SubContractorVo>> contractorList(SubContractorQueryReq req) {
|
||||
return R.ok(contractorService.queryList(req));
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,9 @@ import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||
import org.dromara.project.domain.dto.leave.BusLeaveAddReq;
|
||||
import org.dromara.project.domain.dto.leave.BusLeaveQueryReq;
|
||||
import org.dromara.project.domain.dto.reissuecard.BusReissueCardQueryReq;
|
||||
import org.dromara.project.domain.vo.leave.BusLeaveVo;
|
||||
import org.dromara.project.domain.vo.reissuecard.BusReissueCardVo;
|
||||
import org.dromara.project.service.IBusLeaveService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -38,12 +40,31 @@ public class BusLeaveAppController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/list/loginUser")
|
||||
public TableDataInfo<BusLeaveVo> listByLoginUser(BusLeaveQueryReq req, PageQuery pageQuery) {
|
||||
// SubConstructionUser constructionUser = constructionUserService.getBySysUserId(LoginHelper.getUserId());
|
||||
req.setUserId(LoginHelper.getUserId());
|
||||
//管理员呢
|
||||
return leaveService.listByLoginUser(req, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前登录用户补卡审批列表
|
||||
*/
|
||||
@GetMapping("/list/auditUser")
|
||||
public TableDataInfo<BusLeaveVo> listByAuditUser(BusLeaveQueryReq req, PageQuery pageQuery) {
|
||||
req.setGangerId(LoginHelper.getUserId());
|
||||
return leaveService.listByAuditUser(req, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询角色补卡审批列表
|
||||
*/
|
||||
@GetMapping("/list/auditRole")
|
||||
public TableDataInfo<BusLeaveVo> listByAuditRole(BusLeaveQueryReq req, PageQuery pageQuery) {
|
||||
return leaveService.listByAuditRole(req, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 提交请假
|
||||
*/
|
||||
|
||||
@ -75,10 +75,19 @@ public class BusReissueCardAppController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/list/auditUser")
|
||||
public TableDataInfo<BusReissueCardVo> listByAuditUser(BusReissueCardQueryReq req, PageQuery pageQuery) {
|
||||
// SubConstructionUser constructionUser = constructionUserService.getBySysUserId(LoginHelper.getUserId());
|
||||
req.setGangerId(LoginHelper.getUserId());
|
||||
return reissueCardService.listByAuditUser(req, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询角色补卡审批列表
|
||||
*/
|
||||
@GetMapping("/list/auditRole")
|
||||
public TableDataInfo<BusReissueCardVo> listByAuditRole(BusReissueCardQueryReq req, PageQuery pageQuery) {
|
||||
return reissueCardService.listByAuditRole(req, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取施工人员补卡申请详细信息
|
||||
*
|
||||
@ -91,9 +100,9 @@ public class BusReissueCardAppController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改补卡申请
|
||||
* 审核
|
||||
*/
|
||||
@Log(title = "修改补卡申请", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "审核补卡申请", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("")
|
||||
public R<Void> managerReview(@RequestBody BusReissueCardUpdateReq req) {
|
||||
|
||||
@ -149,4 +149,10 @@ public class BusLeave extends BaseEntity {
|
||||
* 时间段类型 1-上午 2-下午
|
||||
*/
|
||||
private String periodType;
|
||||
|
||||
|
||||
/**
|
||||
* 申请人类型(0-施工人员 1-管理人员 2-分包人员)
|
||||
*/
|
||||
private String userType;
|
||||
}
|
||||
|
||||
@ -130,4 +130,10 @@ public class BusReissueCard extends BaseEntity {
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
/**
|
||||
* 申请人类型(0-施工人员 1-管理人员 2-分包人员)
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
}
|
||||
|
||||
@ -64,4 +64,9 @@ public class BusLeaveAddReq implements Serializable {
|
||||
* 时间段类型 1-上午 2-下午
|
||||
*/
|
||||
private String periodType;
|
||||
|
||||
/**
|
||||
* 申请人类型(0-施工人员 1-管理人员 2-分包人员)
|
||||
*/
|
||||
private String userType;
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lilemy
|
||||
@ -73,4 +74,7 @@ public class BusLeaveQueryReq implements Serializable {
|
||||
*/
|
||||
private LocalDate date;
|
||||
|
||||
|
||||
private List<Long> roleIds;
|
||||
|
||||
}
|
||||
|
||||
@ -63,4 +63,9 @@ public class BusReissueCardAddReq implements Serializable {
|
||||
* 补卡类型(1上班 2下班)
|
||||
*/
|
||||
private String reissueCardType;
|
||||
|
||||
/**
|
||||
* 申请人类型(0-施工人员 1-管理人员 2-分包人员)
|
||||
*/
|
||||
private String userType;
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lilemy
|
||||
@ -78,5 +79,8 @@ public class BusReissueCardQueryReq implements Serializable {
|
||||
*/
|
||||
private LocalDate date;
|
||||
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private List<Long> roleIds;
|
||||
}
|
||||
|
||||
@ -10,7 +10,9 @@ import org.dromara.project.domain.dto.leave.BusLeaveAddReq;
|
||||
import org.dromara.project.domain.dto.leave.BusLeaveGangerReviewReq;
|
||||
import org.dromara.project.domain.dto.leave.BusLeaveManagerReviewReq;
|
||||
import org.dromara.project.domain.dto.leave.BusLeaveQueryReq;
|
||||
import org.dromara.project.domain.dto.reissuecard.BusReissueCardQueryReq;
|
||||
import org.dromara.project.domain.vo.leave.BusLeaveVo;
|
||||
import org.dromara.project.domain.vo.reissuecard.BusReissueCardVo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
@ -114,4 +116,18 @@ public interface IBusLeaveService extends IService<BusLeave> {
|
||||
* 查询当前登录用户请假申请列表
|
||||
*/
|
||||
TableDataInfo<BusLeaveVo> listByLoginUser(BusLeaveQueryReq req, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 审批列表(班组长和分包管理)
|
||||
*/
|
||||
TableDataInfo<BusLeaveVo> listByAuditUser(BusLeaveQueryReq req, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 审批列表(角色)
|
||||
*/
|
||||
TableDataInfo<BusLeaveVo> listByAuditRole(BusLeaveQueryReq req, PageQuery pageQuery);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -97,10 +97,15 @@ public interface IBusReissueCardService extends IService<BusReissueCard> {
|
||||
TableDataInfo<BusReissueCardVo> listByLoginUser(BusReissueCardQueryReq req, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 审批列表
|
||||
* 审批列表(班组长和分包管理)
|
||||
*/
|
||||
TableDataInfo<BusReissueCardVo> listByAuditUser(BusReissueCardQueryReq req, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 审批列表(角色)
|
||||
*/
|
||||
TableDataInfo<BusReissueCardVo> listByAuditRole(BusReissueCardQueryReq req, PageQuery pageQuery);
|
||||
|
||||
|
||||
/**
|
||||
* 新增施工人员补卡申请
|
||||
|
||||
@ -538,7 +538,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
List<BusAttendance> records = entry.getValue();
|
||||
|
||||
boolean allValid = records.stream()
|
||||
.allMatch(record -> ATTENDANCE_STATUS.contains(record.getClockStatus()));
|
||||
.anyMatch(record -> ATTENDANCE_STATUS.contains(record.getClockStatus()));
|
||||
if (allValid) {
|
||||
attendedUserIds.add(userId);
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -30,10 +31,12 @@ import org.dromara.contractor.service.ISubContractorService;
|
||||
import org.dromara.project.domain.*;
|
||||
import org.dromara.project.domain.dto.leave.BusLeaveAddReq;
|
||||
import org.dromara.project.domain.dto.leave.BusLeaveGangerReviewReq;
|
||||
import org.dromara.project.domain.dto.reissuecard.BusReissueCardQueryReq;
|
||||
import org.dromara.project.domain.enums.*;
|
||||
import org.dromara.project.domain.dto.leave.BusLeaveManagerReviewReq;
|
||||
import org.dromara.project.domain.dto.leave.BusLeaveQueryReq;
|
||||
import org.dromara.project.domain.vo.leave.BusLeaveVo;
|
||||
import org.dromara.project.domain.vo.reissuecard.BusReissueCardVo;
|
||||
import org.dromara.project.mapper.BusLeaveMapper;
|
||||
import org.dromara.project.service.*;
|
||||
import org.dromara.workflow.domain.TestLeave;
|
||||
@ -441,6 +444,53 @@ public class BusLeaveServiceImpl extends ServiceImpl<BusLeaveMapper, BusLeave>
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TableDataInfo<BusLeaveVo> listByAuditUser(BusLeaveQueryReq req, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<BusLeave> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.orderByDesc(BusLeave::getCreateTime);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(req.getGangerId()), BusLeave::getGangerId, req.getGangerId());
|
||||
lqw.like(StrUtil.isNotBlank(req.getUserName()), BusLeave::getUserName, req.getUserName());
|
||||
Page<BusLeave> result = this.page(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<BusLeaveVo> listByAuditRole(BusLeaveQueryReq req, PageQuery pageQuery) {
|
||||
//两个角色 一个审核分包的=6,一个审核管理的=7
|
||||
List<Long> roleIds = req.getRoleIds();
|
||||
List<String> type = new ArrayList<>();
|
||||
if(roleIds.contains(7L)){
|
||||
type.add("7");
|
||||
}
|
||||
if(roleIds.contains(6L)){
|
||||
type.add("6");
|
||||
}
|
||||
if(CollUtil.isEmpty(type)){
|
||||
return TableDataInfo.build();
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<BusLeave> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.orderByDesc(BusLeave::getCreateTime);
|
||||
lqw.like(StrUtil.isNotBlank(req.getUserName()), BusLeave::getUserName, req.getUserName());
|
||||
lqw.in(BusLeave::getUserType, type);
|
||||
Page<BusLeave> result = this.page(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||
|
||||
@ -363,6 +363,29 @@ public class BusReissueCardServiceImpl extends ServiceImpl<BusReissueCardMapper,
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<BusReissueCardVo> listByAuditRole(BusReissueCardQueryReq req, PageQuery pageQuery) {
|
||||
//两个角色 一个审核分包的=6,一个审核管理的=7
|
||||
List<Long> roleIds = req.getRoleIds();
|
||||
List<String> type = new ArrayList<>();
|
||||
if(roleIds.contains(7L)){
|
||||
type.add("7");
|
||||
}
|
||||
if(roleIds.contains(6L)){
|
||||
type.add("6");
|
||||
}
|
||||
if(CollUtil.isEmpty(type)){
|
||||
return TableDataInfo.build();
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<BusReissueCard> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.orderByDesc(BusReissueCard::getCreateTime);
|
||||
lqw.like(StrUtil.isNotBlank(req.getUserName()), BusReissueCard::getUserName, req.getUserName());
|
||||
lqw.in(BusReissueCard::getUserType, type);
|
||||
Page<BusReissueCard> result = this.page(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long add(BusReissueCardAddReq req) {
|
||||
BusReissueCard bean = BeanUtil.toBean(req, BusReissueCard.class);
|
||||
|
||||
@ -366,6 +366,7 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
||||
String rectificationUnit = req.getRectificationUnit();
|
||||
Long rectificationId = req.getRectificationId();
|
||||
// 精确查询
|
||||
lqw.orderByAsc(QltQualityInspection::getInspectionStatus);
|
||||
lqw.orderByDesc(QltQualityInspection::getCreateTime);
|
||||
lqw.orderByDesc(QltQualityInspection::getVersion);
|
||||
lqw.eq(StringUtils.isNotBlank(inspectionType), QltQualityInspection::getInspectionType, inspectionType);
|
||||
|
||||
@ -63,7 +63,7 @@ public class WgzQuestionSavePdfVo implements Serializable {
|
||||
/**
|
||||
* pdf路径
|
||||
*/
|
||||
@Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "pathUrl")
|
||||
@Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "path")
|
||||
@ExcelProperty(value = "pdf路径(URL)")
|
||||
private String pathUrl;
|
||||
|
||||
|
||||
@ -139,6 +139,9 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
||||
// lqw.eq(HseSafetyInspection::getCorrectorId, userId);
|
||||
// }
|
||||
// }
|
||||
lqw.orderByAsc(HseSafetyInspection::getStatus);
|
||||
lqw.orderByDesc(HseSafetyInspection::getCreateTime);
|
||||
lqw.orderByDesc(HseSafetyInspection::getVersion);
|
||||
Page<HseSafetyInspection> result = this.page(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user