Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
package org.dromara.bigscreen.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
@ -28,8 +30,10 @@ import org.dromara.gps.domain.vo.GpsEquipmentSonVo;
|
||||
import org.dromara.gps.service.IGpsEquipmentService;
|
||||
import org.dromara.land.domain.BusLandBlock;
|
||||
import org.dromara.land.domain.BusLandTransferLedger;
|
||||
import org.dromara.land.domain.BusLandTransferLedgerSon;
|
||||
import org.dromara.land.service.IBusLandBlockService;
|
||||
import org.dromara.land.service.IBusLandTransferLedgerService;
|
||||
import org.dromara.land.service.impl.BusLandTransferLedgerSonServiceImpl;
|
||||
import org.dromara.manager.weathermanager.vo.WeatherVo;
|
||||
import org.dromara.manager.ys7manager.Ys7Manager;
|
||||
import org.dromara.other.domain.OthYs7Device;
|
||||
@ -88,6 +92,8 @@ public class ProjectBigScreenController extends BaseController {
|
||||
|
||||
private final Ys7Manager ys7Manager;
|
||||
|
||||
private final BusLandTransferLedgerSonServiceImpl busLandTransferLedgerSonService;
|
||||
|
||||
/**
|
||||
* 查询项目土地统计
|
||||
*/
|
||||
@ -97,6 +103,21 @@ public class ProjectBigScreenController extends BaseController {
|
||||
List<BusLandTransferLedger> levelList = busLandTransferLedgerService.list(Wrappers.lambdaQuery(BusLandTransferLedger.class)
|
||||
.eq(BusLandTransferLedger::getProjectId, projectId));
|
||||
|
||||
if(CollectionUtil.isNotEmpty(levelList)){
|
||||
List<Long> list1 = levelList.stream().map(BusLandTransferLedger::getId).toList();
|
||||
LambdaQueryWrapper<BusLandTransferLedgerSon> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(BusLandTransferLedgerSon::getParentId,list1);
|
||||
List<BusLandTransferLedgerSon> sonList = busLandTransferLedgerSonService.list(lambdaQueryWrapper);
|
||||
Map<Long, BigDecimal> collect = sonList.stream().filter(vo -> "1".equals(vo.getTransferStatus()))
|
||||
.collect(Collectors.toMap(BusLandTransferLedgerSon::getParentId, BusLandTransferLedgerSon::getAreaValue));
|
||||
|
||||
for (BusLandTransferLedger busLandTransferLedger : levelList) {
|
||||
BigDecimal areaValue = collect.get(busLandTransferLedger.getId());
|
||||
if (areaValue != null) {
|
||||
busLandTransferLedger.setTransferAea(areaValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 根据 landBlockId 分组,并对 designArea 和 transferAea 进行求和
|
||||
Map<Long, Map<String, BigDecimal>> groupedResult = levelList.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
|
||||
@ -236,4 +236,12 @@ public interface ISubConstructionUserService extends IService<SubConstructionUse
|
||||
TableDataInfo<SubConstructionUserAppVo> queryUndistributedList(SubConstructionUserQueryReq req, PageQuery pageQuery);
|
||||
|
||||
void deleteeBySysUserIds( List<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据系统用户id查询施工人员
|
||||
*
|
||||
* @param sysUserId 系统用户id
|
||||
* @return 施工人员
|
||||
*/
|
||||
SubConstructionUser getByUserId(Long sysUserId);
|
||||
}
|
||||
|
||||
@ -1548,4 +1548,12 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
||||
this.remove(Wrappers.<SubConstructionUser>lambdaUpdate()
|
||||
.in(SubConstructionUser::getSysUserId, ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubConstructionUser getByUserId(Long sysUserId) {
|
||||
return this.lambdaQuery()
|
||||
.eq(SubConstructionUser::getSysUserId, sysUserId)
|
||||
.last("limit 1")
|
||||
.one();
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,8 +14,10 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.design.domain.bo.DesUserBo;
|
||||
import org.dromara.design.domain.bo.DesVolumeFileBo;
|
||||
import org.dromara.design.domain.dto.volumefile.AuditFileDto;
|
||||
import org.dromara.design.domain.dto.volumefile.DesVolumeFileCreateReq;
|
||||
import org.dromara.design.domain.vo.DesUserVo;
|
||||
import org.dromara.design.domain.vo.volumefile.AuditFileVo;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileCodeVo;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileJoinVo;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo;
|
||||
@ -101,6 +103,14 @@ public class DesVolumeFileController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取待审核图纸
|
||||
*/
|
||||
@GetMapping("/auditFile")
|
||||
public R<AuditFileVo> auditFile(AuditFileDto dto) {
|
||||
return R.ok(desVolumeFileService.auditFile(dto));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
package org.dromara.design.domain.dto.volumefile;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AuditFileDto {
|
||||
|
||||
private List<Long> volumeCatalogIds;
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package org.dromara.design.domain.vo.volumefile;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AuditFileVo {
|
||||
|
||||
private List<DesVolumeFileVo> ltList;
|
||||
private List<DesVolumeFileVo> gcList;
|
||||
}
|
||||
@ -6,12 +6,10 @@ import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.design.domain.DesVolumeFile;
|
||||
import org.dromara.design.domain.bo.DesVolumeFileBo;
|
||||
import org.dromara.design.domain.dto.volumefile.AuditFileDto;
|
||||
import org.dromara.design.domain.dto.volumefile.DesVolumeFileAppPageDto;
|
||||
import org.dromara.design.domain.dto.volumefile.DesVolumeFileCreateReq;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileAppVo;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileCodeVo;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileJoinVo;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo;
|
||||
import org.dromara.design.domain.vo.volumefile.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@ -100,4 +98,6 @@ public interface IDesVolumeFileService extends IService<DesVolumeFile> {
|
||||
* app分页查询
|
||||
*/
|
||||
TableDataInfo<DesVolumeFileAppVo> queryAppPageList(DesVolumeFileAppPageDto dto, PageQuery pageQuery);
|
||||
|
||||
AuditFileVo auditFile(AuditFileDto dto);
|
||||
}
|
||||
|
||||
@ -27,13 +27,11 @@ import org.dromara.common.sse.utils.SseMessageUtils;
|
||||
import org.dromara.design.domain.DesVolumeCatalog;
|
||||
import org.dromara.design.domain.DesVolumeFile;
|
||||
import org.dromara.design.domain.bo.DesVolumeFileBo;
|
||||
import org.dromara.design.domain.dto.volumefile.AuditFileDto;
|
||||
import org.dromara.design.domain.dto.volumefile.DesVolumeFileAppPageDto;
|
||||
import org.dromara.design.domain.dto.volumefile.DesVolumeFileCreateReq;
|
||||
import org.dromara.design.domain.vo.BusDrawingreviewReceiptsVo;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileAppVo;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileCodeVo;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileJoinVo;
|
||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo;
|
||||
import org.dromara.design.domain.vo.volumefile.*;
|
||||
import org.dromara.design.mapper.DesVolumeFileMapper;
|
||||
import org.dromara.design.service.IBusDrawingreviewReceiptsService;
|
||||
import org.dromara.design.service.IDesDrawingService;
|
||||
@ -563,6 +561,21 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuditFileVo auditFile(AuditFileDto dto) {
|
||||
List<Long> volumeCatalogIds = dto.getVolumeCatalogIds();
|
||||
List<DesVolumeFileVo> desVolumeFileVos = baseMapper.selectVoList(Wrappers.lambdaQuery(DesVolumeFile.class)
|
||||
.in(CollectionUtil.isNotEmpty(volumeCatalogIds),DesVolumeFile::getVolumeCatalogId, volumeCatalogIds)
|
||||
.eq(DesVolumeFile::getAuditStatus, "draft")
|
||||
);
|
||||
List<DesVolumeFileVo> list1 = desVolumeFileVos.stream().filter(vo -> "1".equals(vo.getType())).toList();
|
||||
List<DesVolumeFileVo> list2 = desVolumeFileVos.stream().filter(vo -> "3".equals(vo.getType())).toList();
|
||||
AuditFileVo auditFileVo = new AuditFileVo();
|
||||
auditFileVo.setGcList(list1);
|
||||
auditFileVo.setLtList(list2);
|
||||
return auditFileVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,8 +111,8 @@ public class BusAttendanceAppController extends BaseController {
|
||||
* 获取用户当天打卡记录
|
||||
*/
|
||||
@GetMapping("/getTodayAttendance/{projectId}")
|
||||
public R<List<BusAttendanceVo>> getTodayAttendance(@NotNull @PathVariable("projectId") Long projectId){
|
||||
return R.ok(attendanceService.getTodayAttendance(projectId));
|
||||
public R<List<BusAttendanceVo>> getTodayAttendance(@NotNull @PathVariable("projectId") Long projectId,Long userId){
|
||||
return R.ok(attendanceService.getTodayAttendance(projectId,userId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 提交请假
|
||||
*/
|
||||
|
||||
@ -8,6 +8,7 @@ import org.dromara.project.domain.dto.projectteam.BusProjectTeamQueryReq;
|
||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamAppVo;
|
||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
|
||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamVo;
|
||||
import org.dromara.project.domain.vo.projectteam.TeamManageVo;
|
||||
import org.dromara.project.service.IBusProjectTeamService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -59,4 +60,20 @@ public class BusProjectTeamAppController extends BaseController {
|
||||
return R.ok(projectTeamService.getByUserId(userId,projectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分包单位的班组
|
||||
*/
|
||||
@GetMapping("/getByContractor/{contractorId}")
|
||||
public R<List<BusProjectTeamAppVo>> getByContractorId(@PathVariable("contractorId") Long contractorId){
|
||||
return R.ok(projectTeamService.getByContractorId(contractorId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班组管理员信息
|
||||
*/
|
||||
@GetMapping("/getManager/{teamId}")
|
||||
public R<List<TeamManageVo>> getManager(@PathVariable("teamId") Long teamId){
|
||||
return R.ok(projectTeamService.getManager(teamId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -46,4 +46,12 @@ public class BusProjectTeamMemberAppController extends BaseController {
|
||||
public R<Void> remove(@RequestBody BusProjectTeamMemberExitReq req) {
|
||||
return toAjax(projectTeamMemberService.deleteById(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位
|
||||
*/
|
||||
@GetMapping("/getPost/{userId}/{projectId}")
|
||||
public R<String> getPost(@PathVariable("userId") Long userId, @PathVariable("projectId")Long projectId) {
|
||||
return R.ok(projectTeamMemberService.getPost(userId,projectId));
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -77,6 +78,4 @@ public class BusReissueCardQueryReq implements Serializable {
|
||||
* 日期
|
||||
*/
|
||||
private LocalDate date;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
package org.dromara.project.domain.vo.projectteam;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TeamManageVo {
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -6,6 +6,8 @@ import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.project.domain.BusProjectTeamMember;
|
||||
|
||||
import java.io.Serial;
|
||||
@ -81,4 +83,15 @@ public class BusProjectTeamMemberVo implements Serializable {
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 工种id
|
||||
*/
|
||||
private String typeOfWork;
|
||||
|
||||
/**
|
||||
* 工种名称
|
||||
*/
|
||||
@Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "typeOfWork",other = "type_of_work")
|
||||
private String typeOfWorkName;
|
||||
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ public interface IBusAttendanceService extends IService<BusAttendance>{
|
||||
/**
|
||||
* 获取用户当天打卡记录
|
||||
*/
|
||||
List<BusAttendanceVo> getTodayAttendance(Long projectId);
|
||||
List<BusAttendanceVo> getTodayAttendance(Long projectId,Long userId);
|
||||
|
||||
/**
|
||||
* 获取用户指定月份的打卡记录
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import org.dromara.project.domain.dto.projectteammember.BusProjectTeamMemberExit
|
||||
import org.dromara.project.domain.dto.projectteammember.BusProjectTeamMemberQueryReq;
|
||||
import org.dromara.project.domain.dto.projectteammember.BusProjectTeamMemberUpdateReq;
|
||||
import org.dromara.project.domain.vo.projectteammember.BusProjectTeamMemberVo;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -94,4 +95,10 @@ public interface IBusProjectTeamMemberService extends IService<BusProjectTeamMem
|
||||
* @return 项目班组成员分页对象视图
|
||||
*/
|
||||
Page<BusProjectTeamMemberVo> getVoPage(Page<BusProjectTeamMember> projectTeamMemberPage);
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户岗位
|
||||
*/
|
||||
String getPost(Long userId,Long projectId);
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import org.dromara.project.domain.dto.projectteam.BusProjectTeamUpdateReq;
|
||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamAppVo;
|
||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
|
||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamVo;
|
||||
import org.dromara.project.domain.vo.projectteam.TeamManageVo;
|
||||
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
@ -120,6 +121,9 @@ public interface IBusProjectTeamService extends IService<BusProjectTeam> {
|
||||
|
||||
List<BusProjectTeamAppVo> getByUserId(Long userId,Long projectId);
|
||||
|
||||
List<BusProjectTeamAppVo> getByContractorId( Long contractorId);
|
||||
|
||||
Boolean deleteUserId(Long id,Long userId);
|
||||
|
||||
List<TeamManageVo> getManager(Long teamId);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
@ -685,9 +685,11 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
|
||||
|
||||
@Override
|
||||
public List<BusAttendanceVo> getTodayAttendance(Long projectId) {
|
||||
public List<BusAttendanceVo> getTodayAttendance(Long projectId,Long userId) {
|
||||
|
||||
Long userId = LoginHelper.getUserId();
|
||||
if (userId == null) {
|
||||
userId = LoginHelper.getUserId();
|
||||
}
|
||||
BusAttendanceRuleVo busAttendanceRuleVo = attendanceRuleService.queryByProjectId(projectId);
|
||||
|
||||
if (busAttendanceRuleVo == null) {
|
||||
@ -1207,15 +1209,14 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
|
||||
|
||||
// 往前14天,包含今天
|
||||
LocalDate startDate = now.minusDays(14);
|
||||
LocalDate endDate = now.minusDays(1);
|
||||
LocalDate startDate = now.minusDays(13);
|
||||
List<BusAttendance> list;
|
||||
if(CollectionUtil.isEmpty(allUserIds)){
|
||||
list = new ArrayList<>();
|
||||
}else {
|
||||
list = list(Wrappers.<BusAttendance>lambdaQuery()
|
||||
.in(BusAttendance::getUserId, allUserIds)
|
||||
.between(BusAttendance::getClockDate, startDate, endDate)
|
||||
.between(BusAttendance::getClockDate, startDate, now)
|
||||
.orderByAsc(BusAttendance::getClockDate)
|
||||
);
|
||||
}
|
||||
@ -1237,7 +1238,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
List<BusAttendanceClockDateForTwoWeekVo> result = new ArrayList<>();
|
||||
|
||||
LocalDate currentDate = startDate;
|
||||
while (!currentDate.isAfter(endDate)) {
|
||||
while (!currentDate.isAfter(now)) {
|
||||
Map<Long, List<BusAttendance>> userAttendanceMap = dateUserMap.getOrDefault(currentDate, new HashMap<>());
|
||||
|
||||
int full = 0, half = 0, absent = 0;
|
||||
|
||||
@ -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,12 +31,15 @@ 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.system.service.ISysRoleService;
|
||||
import org.dromara.workflow.domain.TestLeave;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
@ -75,10 +79,11 @@ public class BusLeaveServiceImpl extends ServiceImpl<BusLeaveMapper, BusLeave>
|
||||
private ISubConstructionUserService constructionUserService;
|
||||
|
||||
@Resource
|
||||
private ISubContractorService contractorService;
|
||||
|
||||
private IBusUserProjectRelevancyService userProjectRelevancyService;
|
||||
|
||||
@Resource
|
||||
private ISysRoleService roleService;
|
||||
|
||||
/**
|
||||
* 查询施工人员请假申请
|
||||
*
|
||||
@ -441,6 +446,55 @@ 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
|
||||
Long userId = LoginHelper.getUserId();
|
||||
List<Long> roleIds = roleService.selectRoleIdsByUserIdAndProjectId(userId, req.getProjectId());
|
||||
|
||||
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'
|
||||
|
||||
@ -378,9 +378,10 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
|
||||
projectTeamMemberVo.setAvatar(byId.getUrl());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
SubConstructionUser user = constructionUserService.getBySysUserId(memberId);
|
||||
projectTeamMemberVo.setMemberName(user.getUserName());
|
||||
}
|
||||
SubConstructionUser byUserId = constructionUserService.getByUserId(memberId);
|
||||
if (byUserId != null) {
|
||||
projectTeamMemberVo.setTypeOfWork(byUserId.getTypeOfWork());
|
||||
}
|
||||
return projectTeamMemberVo;
|
||||
}
|
||||
@ -464,4 +465,17 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
|
||||
projectTeamMemberVoPage.setRecords(projectTeamMemberVoList);
|
||||
return projectTeamMemberVoPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPost(Long userId,Long projectId) {
|
||||
BusProjectTeamMember busProjectTeamMember = baseMapper.selectOne(Wrappers.<BusProjectTeamMember>lambdaQuery()
|
||||
.eq(BusProjectTeamMember::getMemberId, userId)
|
||||
.eq(BusProjectTeamMember::getProjectId, projectId)
|
||||
.last("limit 1")
|
||||
);
|
||||
if(busProjectTeamMember == null){
|
||||
return null;
|
||||
}
|
||||
return busProjectTeamMember.getPostId();
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,10 +27,7 @@ import org.dromara.project.domain.dto.projectteam.BusProjectTeamCreateReq;
|
||||
import org.dromara.project.domain.dto.projectteam.BusProjectTeamQueryReq;
|
||||
import org.dromara.project.domain.dto.projectteam.BusProjectTeamUpdateReq;
|
||||
import org.dromara.project.domain.enums.BusProjectTeamMemberPostEnum;
|
||||
import org.dromara.project.domain.vo.projectteam.BusForemanVo;
|
||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamAppVo;
|
||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
|
||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamVo;
|
||||
import org.dromara.project.domain.vo.projectteam.*;
|
||||
import org.dromara.project.mapper.BusProjectTeamMapper;
|
||||
import org.dromara.project.service.IBusProjectPunchrangeService;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
@ -490,6 +487,23 @@ public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper,
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusProjectTeamAppVo> getByContractorId(Long contractorId) {
|
||||
LambdaQueryWrapper<BusProjectTeam> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.select(BusProjectTeam::getId, BusProjectTeam::getTeamName);
|
||||
lqw.eq(BusProjectTeam::getContractorId, contractorId);
|
||||
List<BusProjectTeam> projectTeamList = list(lqw);
|
||||
if (CollUtil.isNotEmpty(projectTeamList)) {
|
||||
return projectTeamList.stream().map(projectTeam -> {
|
||||
BusProjectTeamAppVo projectTeamAppVo = new BusProjectTeamAppVo();
|
||||
BeanUtils.copyProperties(projectTeam, projectTeamAppVo);
|
||||
return projectTeamAppVo;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteUserId(Long id,Long userId) {
|
||||
BusProjectTeam projectTeam = baseMapper.selectById(id);
|
||||
@ -505,4 +519,24 @@ public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper,
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TeamManageVo> getManager(Long teamId) {
|
||||
BusProjectTeam projectTeam = baseMapper.selectById(teamId);
|
||||
|
||||
String userId = projectTeam.getUserId();
|
||||
if (StringUtils.isNotBlank(userId)) {
|
||||
String[] split = userId.split(",");
|
||||
List<Long> list1 = Arrays.stream(split).map(s -> Long.valueOf(s.trim())).toList();
|
||||
List<SysUserVo> sysUserVos = userService.selectUserByIds(list1, null);
|
||||
|
||||
return sysUserVos.stream().map(s -> {
|
||||
TeamManageVo teamManageVo = new TeamManageVo();
|
||||
teamManageVo.setUserId(s.getUserId());
|
||||
teamManageVo.setName(s.getNickName());
|
||||
return teamManageVo;
|
||||
}).toList();
|
||||
}
|
||||
return List.of();
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.contractor.domain.SubConstructionUser;
|
||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||
import org.dromara.contractor.service.ISubUserSalaryDetailService;
|
||||
@ -39,6 +40,7 @@ import org.dromara.project.service.*;
|
||||
import org.dromara.system.domain.vo.SysOssVo;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.dromara.system.service.ISysRoleService;
|
||||
import org.dromara.system.service.ISysUserService;
|
||||
import org.dromara.websocket.ChatServerHandler;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@ -89,6 +91,9 @@ public class BusReissueCardServiceImpl extends ServiceImpl<BusReissueCardMapper,
|
||||
|
||||
@Resource
|
||||
private ISubConstructionUserService constructionUserService;
|
||||
|
||||
@Resource
|
||||
private ISysRoleService roleService;
|
||||
/**
|
||||
* 查询施工人员补卡申请
|
||||
*
|
||||
@ -363,6 +368,32 @@ public class BusReissueCardServiceImpl extends ServiceImpl<BusReissueCardMapper,
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<BusReissueCardVo> listByAuditRole(BusReissueCardQueryReq req, PageQuery pageQuery) {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
List<Long> roleIds = roleService.selectRoleIdsByUserIdAndProjectId(userId, req.getProjectId());
|
||||
|
||||
|
||||
//两个角色 一个审核分包的=6,一个审核管理的=7
|
||||
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));
|
||||
}
|
||||
|
||||
@ -215,4 +215,7 @@ public interface ISysRoleService {
|
||||
* 批量删除审核审定校审
|
||||
*/
|
||||
void deleteDesignUser(Long projectId);
|
||||
|
||||
|
||||
List<Long> selectRoleIdsByUserIdAndProjectId(Long userId,Long projectId);
|
||||
}
|
||||
|
||||
@ -640,4 +640,17 @@ public class SysRoleServiceImpl implements ISysRoleService, RoleService {
|
||||
.in(SysUserRole::getRoleId, list1)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> selectRoleIdsByUserIdAndProjectId(Long userId, Long projectId) {
|
||||
|
||||
List<SysUserRole> sysUserRoles = userRoleMapper.selectList(Wrappers.lambdaQuery(SysUserRole.class)
|
||||
.eq(SysUserRole::getUserId, userId)
|
||||
.eq(SysUserRole::getProjectId, projectId)
|
||||
);
|
||||
if (CollUtil.isNotEmpty(sysUserRoles)) {
|
||||
return sysUserRoles.stream().map(SysUserRole::getRoleId).toList();
|
||||
}
|
||||
return List.of();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user