diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/contractor/service/impl/SubConstructionUserServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/contractor/service/impl/SubConstructionUserServiceImpl.java index 991ba6c2..001f6a82 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/contractor/service/impl/SubConstructionUserServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/contractor/service/impl/SubConstructionUserServiceImpl.java @@ -63,8 +63,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import java.io.IOException; -import java.io.InputStream; +import java.io.*; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.time.LocalDate; @@ -1164,7 +1163,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl list = List.of(request, faceReq); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/controller/MsgAppNoticeController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/controller/MsgAppNoticeController.java new file mode 100644 index 00000000..f4f55862 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/controller/MsgAppNoticeController.java @@ -0,0 +1,105 @@ +package org.dromara.message.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.message.domain.vo.MsgAppNoticeVo; +import org.dromara.message.domain.bo.MsgAppNoticeBo; +import org.dromara.message.service.IMsgAppNoticeService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * app消息 + * + * @author Lion Li + * @date 2025-09-03 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/message/appNotice") +public class MsgAppNoticeController extends BaseController { + + private final IMsgAppNoticeService msgAppNoticeService; + + /** + * 查询app消息列表 + */ + @SaCheckPermission("message:appNotice:list") + @GetMapping("/list") + public TableDataInfo list(MsgAppNoticeBo bo, PageQuery pageQuery) { + return msgAppNoticeService.queryPageList(bo, pageQuery); + } + + /** + * 导出app消息列表 + */ + @SaCheckPermission("message:appNotice:export") + @Log(title = "app消息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(MsgAppNoticeBo bo, HttpServletResponse response) { + List list = msgAppNoticeService.queryList(bo); + ExcelUtil.exportExcel(list, "app消息", MsgAppNoticeVo.class, response); + } + + /** + * 获取app消息详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("message:appNotice:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(msgAppNoticeService.queryById(id)); + } + + /** + * 新增app消息 + */ + @SaCheckPermission("message:appNotice:add") + @Log(title = "app消息", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody MsgAppNoticeBo bo) { + return toAjax(msgAppNoticeService.insertByBo(bo)); + } + + /** + * 修改app消息 + */ + @SaCheckPermission("message:appNotice:edit") + @Log(title = "app消息", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody MsgAppNoticeBo bo) { + return toAjax(msgAppNoticeService.updateByBo(bo)); + } + + /** + * 删除app消息 + * + * @param ids 主键串 + */ + @SaCheckPermission("message:appNotice:remove") + @Log(title = "app消息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(msgAppNoticeService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/MsgAppNotice.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/MsgAppNotice.java new file mode 100644 index 00000000..da660c6d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/MsgAppNotice.java @@ -0,0 +1,76 @@ +package org.dromara.message.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; + +/** + * app消息对象 msg_app_notice + * + * @author Lion Li + * @date 2025-09-03 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("msg_app_notice") +public class MsgAppNotice extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 接收通知的用户ID + */ + private Long recipientId; + + /** + * 发送通知的用户ID(系统通知 0) + */ + private Long senderId; + + /** + * 通知内容 + */ + private String content; + + /** + * 查看状态(0未读 1已读) + */ + private String viewStatus; + + /** + * 消息类型 + */ + private String msgType; + + /** + * 聊天类型 + */ + private String talkType; + + /** + * 所属模块 + */ + private String msgSource; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/bo/MsgAppNoticeBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/bo/MsgAppNoticeBo.java new file mode 100644 index 00000000..ae6ae7ab --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/bo/MsgAppNoticeBo.java @@ -0,0 +1,79 @@ +package org.dromara.message.domain.bo; + +import org.dromara.message.domain.MsgAppNotice; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; + +/** + * app消息业务对象 msg_app_notice + * + * @author Lion Li + * @date 2025-09-03 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = MsgAppNotice.class, reverseConvertGenerate = false) +public class MsgAppNoticeBo extends BaseEntity { + + /** + * 主键ID + */ + @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 接收通知的用户ID + */ + @NotNull(message = "接收通知的用户ID不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long recipientId; + + /** + * 发送通知的用户ID(系统通知 0) + */ + @NotNull(message = "发送通知的用户ID(系统通知 0)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long senderId; + + /** + * 通知内容 + */ + @NotBlank(message = "通知内容不能为空", groups = { AddGroup.class, EditGroup.class }) + private String content; + + /** + * 查看状态(0未读 1已读) + */ + @NotBlank(message = "查看状态(0未读 1已读)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String viewStatus; + + /** + * 消息类型 + */ + private String msgType; + + /** + * 聊天类型 + */ + private String talkType; + + /** + * 所属模块 + */ + private String msgSource; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/vo/MsgAppNoticeVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/vo/MsgAppNoticeVo.java new file mode 100644 index 00000000..b9736329 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/vo/MsgAppNoticeVo.java @@ -0,0 +1,93 @@ +package org.dromara.message.domain.vo; + +import org.dromara.message.domain.MsgAppNotice; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * app消息视图对象 msg_app_notice + * + * @author Lion Li + * @date 2025-09-03 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = MsgAppNotice.class) +public class MsgAppNoticeVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 项目ID + */ + @ExcelProperty(value = "项目ID") + private Long projectId; + + /** + * 接收通知的用户ID + */ + @ExcelProperty(value = "接收通知的用户ID") + private Long recipientId; + + /** + * 发送通知的用户ID(系统通知 0) + */ + @ExcelProperty(value = "发送通知的用户ID", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "系=统通知,0=") + private Long senderId; + + /** + * 通知内容 + */ + @ExcelProperty(value = "通知内容") + private String content; + + /** + * 查看状态(0未读 1已读) + */ + @ExcelProperty(value = "查看状态(0未读 1已读)") + private String viewStatus; + + /** + * 消息类型 + */ + @ExcelProperty(value = "消息类型") + private String msgType; + + /** + * 聊天类型 + */ + @ExcelProperty(value = "聊天类型") + private String talkType; + + /** + * 所属模块 + */ + @ExcelProperty(value = "所属模块") + private String msgSource; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/mapper/MsgAppNoticeMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/mapper/MsgAppNoticeMapper.java new file mode 100644 index 00000000..a9bad089 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/mapper/MsgAppNoticeMapper.java @@ -0,0 +1,15 @@ +package org.dromara.message.mapper; + +import org.dromara.message.domain.MsgAppNotice; +import org.dromara.message.domain.vo.MsgAppNoticeVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * app消息Mapper接口 + * + * @author Lion Li + * @date 2025-09-03 + */ +public interface MsgAppNoticeMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/service/IMsgAppNoticeService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/service/IMsgAppNoticeService.java new file mode 100644 index 00000000..819e30ca --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/service/IMsgAppNoticeService.java @@ -0,0 +1,70 @@ +package org.dromara.message.service; + +import org.dromara.message.domain.vo.MsgAppNoticeVo; +import org.dromara.message.domain.bo.MsgAppNoticeBo; +import org.dromara.message.domain.MsgAppNotice; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * app消息Service接口 + * + * @author Lion Li + * @date 2025-09-03 + */ +public interface IMsgAppNoticeService extends IService{ + + /** + * 查询app消息 + * + * @param id 主键 + * @return app消息 + */ + MsgAppNoticeVo queryById(Long id); + + /** + * 分页查询app消息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return app消息分页列表 + */ + TableDataInfo queryPageList(MsgAppNoticeBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的app消息列表 + * + * @param bo 查询条件 + * @return app消息列表 + */ + List queryList(MsgAppNoticeBo bo); + + /** + * 新增app消息 + * + * @param bo app消息 + * @return 是否新增成功 + */ + Boolean insertByBo(MsgAppNoticeBo bo); + + /** + * 修改app消息 + * + * @param bo app消息 + * @return 是否修改成功 + */ + Boolean updateByBo(MsgAppNoticeBo bo); + + /** + * 校验并批量删除app消息信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/service/impl/MsgAppNoticeServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/service/impl/MsgAppNoticeServiceImpl.java new file mode 100644 index 00000000..57e51b13 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/service/impl/MsgAppNoticeServiceImpl.java @@ -0,0 +1,138 @@ +package org.dromara.message.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.dromara.message.domain.bo.MsgAppNoticeBo; +import org.dromara.message.domain.vo.MsgAppNoticeVo; +import org.dromara.message.domain.MsgAppNotice; +import org.dromara.message.mapper.MsgAppNoticeMapper; +import org.dromara.message.service.IMsgAppNoticeService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * app消息Service业务层处理 + * + * @author Lion Li + * @date 2025-09-03 + */ +@RequiredArgsConstructor +@Service +public class MsgAppNoticeServiceImpl extends ServiceImpl implements IMsgAppNoticeService { + + private final MsgAppNoticeMapper baseMapper; + + /** + * 查询app消息 + * + * @param id 主键 + * @return app消息 + */ + @Override + public MsgAppNoticeVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询app消息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return app消息分页列表 + */ + @Override + public TableDataInfo queryPageList(MsgAppNoticeBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的app消息列表 + * + * @param bo 查询条件 + * @return app消息列表 + */ + @Override + public List queryList(MsgAppNoticeBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(MsgAppNoticeBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(MsgAppNotice::getId); + lqw.eq(bo.getProjectId() != null, MsgAppNotice::getProjectId, bo.getProjectId()); + lqw.eq(bo.getRecipientId() != null, MsgAppNotice::getRecipientId, bo.getRecipientId()); + lqw.eq(bo.getSenderId() != null, MsgAppNotice::getSenderId, bo.getSenderId()); + lqw.eq(StringUtils.isNotBlank(bo.getContent()), MsgAppNotice::getContent, bo.getContent()); + lqw.eq(StringUtils.isNotBlank(bo.getViewStatus()), MsgAppNotice::getViewStatus, bo.getViewStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getMsgType()), MsgAppNotice::getMsgType, bo.getMsgType()); + lqw.eq(StringUtils.isNotBlank(bo.getTalkType()), MsgAppNotice::getTalkType, bo.getTalkType()); + lqw.eq(StringUtils.isNotBlank(bo.getMsgSource()), MsgAppNotice::getMsgSource, bo.getMsgSource()); + return lqw; + } + + /** + * 新增app消息 + * + * @param bo app消息 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(MsgAppNoticeBo bo) { + MsgAppNotice add = MapstructUtils.convert(bo, MsgAppNotice.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改app消息 + * + * @param bo app消息 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(MsgAppNoticeBo bo) { + MsgAppNotice update = MapstructUtils.convert(bo, MsgAppNotice.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(MsgAppNotice entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除app消息信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/controller/app/BusReissueCardAppController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/controller/app/BusReissueCardAppController.java index c23521a3..aaaae79e 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/controller/app/BusReissueCardAppController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/controller/app/BusReissueCardAppController.java @@ -1,7 +1,12 @@ package org.dromara.project.controller.app; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import jakarta.annotation.Resource; import org.dromara.common.core.domain.R; +import org.dromara.common.core.exception.ServiceException; import org.dromara.common.idempotent.annotation.RepeatSubmit; import org.dromara.common.log.annotation.Log; import org.dromara.common.log.enums.BusinessType; @@ -9,14 +14,27 @@ 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.common.web.core.BaseController; +import org.dromara.contractor.domain.SubConstructionUser; import org.dromara.contractor.service.ISubConstructionUserService; +import org.dromara.project.domain.BusProjectTeamMember; import org.dromara.project.domain.dto.reissuecard.BusReissueCardAddReq; +import org.dromara.project.domain.dto.reissuecard.BusReissueCardManagerReviewReq; import org.dromara.project.domain.dto.reissuecard.BusReissueCardQueryReq; +import org.dromara.project.domain.enums.BusProjectTeamMemberPostEnum; +import org.dromara.project.domain.vo.projectteam.BusForemanVo; +import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo; +import org.dromara.project.domain.vo.projectteam.BusProjectTeamVo; import org.dromara.project.domain.vo.reissuecard.BusReissueCardVo; +import org.dromara.project.service.IBusProjectTeamMemberService; +import org.dromara.project.service.IBusProjectTeamService; import org.dromara.project.service.IBusReissueCardService; +import org.dromara.system.domain.vo.SysUserVo; +import org.dromara.system.service.ISysUserService; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * app补卡 * @author lilemy @@ -33,6 +51,12 @@ public class BusReissueCardAppController extends BaseController { @Resource private ISubConstructionUserService constructionUserService; + @Resource + private ISysUserService userService; + + @Resource + private IBusProjectTeamMemberService busProjectTeamMemberService; + /** * 查询当前登录用户补卡申请列表 */ @@ -53,4 +77,39 @@ public class BusReissueCardAppController extends BaseController { return R.ok(reissueCardService.add(req)); } + + /** + * 获取审批人列表 + */ + @GetMapping("/auditList") + public R> auditList() { + Long userId = LoginHelper.getUserId(); + SubConstructionUser bySysUserId = constructionUserService.getBySysUserId(userId); + if(bySysUserId == null){ + throw new ServiceException("当前用户并不是施工人员"); + } + if (bySysUserId.getTeamId()== null) { + throw new ServiceException("当前用户未加入班组"); + } + List list = busProjectTeamMemberService.list(Wrappers.lambdaQuery(BusProjectTeamMember.class) + .eq(BusProjectTeamMember::getTeamId, bySysUserId.getTeamId()) + .eq(BusProjectTeamMember::getPostId, "1") + ); + if(CollectionUtil.isEmpty(list)){ + throw new ServiceException("当前班组尚未设置班组长"); + } + List list1 = list.stream().map(BusProjectTeamMember::getMemberId).toList(); + + List foremanList = constructionUserService.list(Wrappers.lambdaQuery(SubConstructionUser.class) + .in(SubConstructionUser::getSysUserId, list1) + ); + + List foremanVoList = foremanList.stream().map(constructionUser -> { + BusForemanVo foremanVo = new BusForemanVo(); + foremanVo.setForemanId(constructionUser.getSysUserId()); + foremanVo.setForemanName(constructionUser.getUserName()); + return foremanVo; + }).toList(); + return R.ok(foremanVoList); + } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/dto/reissuecard/BusReissueCardAddReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/dto/reissuecard/BusReissueCardAddReq.java index 9c50dca0..2437c3bd 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/dto/reissuecard/BusReissueCardAddReq.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/dto/reissuecard/BusReissueCardAddReq.java @@ -33,6 +33,15 @@ public class BusReissueCardAddReq implements Serializable { */ private String userExplain; + /** + * 班组长 + */ + private Long gangerId; + + /** + * 班组长名字 + */ + private String gangerName; /** * 项目id diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/BusAttendanceVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/BusAttendanceVo.java index 3d0f228e..bbd15c8a 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/BusAttendanceVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/BusAttendanceVo.java @@ -111,4 +111,6 @@ public class BusAttendanceVo implements Serializable { private String lat; + @ExcelProperty(value = "纬度") + private Integer week; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java index cee99543..ae90ae4e 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java @@ -452,12 +452,16 @@ public class BusAttendanceServiceImpl extends ServiceImpl "1".equals(relevancy.getUserType())); - - return baseMapper.selectVoList(Wrappers.lambdaQuery(BusAttendance.class) + List busAttendanceVos = baseMapper.selectVoList(Wrappers.lambdaQuery(BusAttendance.class) .eq(BusAttendance::getUserId, userId) .eq(b, BusAttendance::getProjectId, projectId) .in(BusAttendance::getClockStatus, abnormalList) ); + //转换星期几 + for (BusAttendanceVo busAttendanceVo : busAttendanceVos) { + busAttendanceVo.setWeek(busAttendanceVo.getClockDate().getDayOfWeek().getValue()); + } + return busAttendanceVos; } /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusProjectTeamServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusProjectTeamServiceImpl.java index d313f5ca..97c59b71 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusProjectTeamServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusProjectTeamServiceImpl.java @@ -271,7 +271,9 @@ public class BusProjectTeamServiceImpl extends ServiceImpl foremanList = constructionUserService.listByIds(foremanIdList); + List foremanList = constructionUserService.list(Wrappers.lambdaQuery(SubConstructionUser.class) + .in(SubConstructionUser::getSysUserId, foremanIdList) + ); Map> foremanMap = foremanList.stream() .collect(Collectors.groupingBy(SubConstructionUser::getTeamId)); // 封装数据 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusReissueCardServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusReissueCardServiceImpl.java index 64f6e0df..92e9921f 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusReissueCardServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusReissueCardServiceImpl.java @@ -324,7 +324,6 @@ public class BusReissueCardServiceImpl extends ServiceImpl list(QltQualityConstructionLogQueryReq req, PageQuery pageQuery) { return qualityConstructionLogService.queryPageList(req, pageQuery); @@ -51,7 +50,6 @@ public class QltQualityConstructionLogAppController extends BaseController { /** * 导出质量-施工日志列表 */ - @SaCheckPermission("quality:qualityConstructionLog:export") @Log(title = "质量-施工日志", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(QltQualityConstructionLogQueryReq req, HttpServletResponse response) { @@ -62,7 +60,6 @@ public class QltQualityConstructionLogAppController extends BaseController { /** * 根据主键导出质量-施工日志 */ - @SaCheckPermission("quality:qualityConstructionLog:exportWord") @Log(title = "质量-施工日志", businessType = BusinessType.EXPORT) @PostMapping("/export/word") public void exportWordById(@NotNull(message = "主键不能为空") Long id, @@ -75,7 +72,6 @@ public class QltQualityConstructionLogAppController extends BaseController { * * @param id 主键 */ - @SaCheckPermission("quality:qualityConstructionLog:query") @GetMapping("/{id}") public R getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) { @@ -85,7 +81,6 @@ public class QltQualityConstructionLogAppController extends BaseController { /** * 新增质量-施工日志 */ - @SaCheckPermission("quality:qualityConstructionLog:add") @Log(title = "质量-施工日志", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping() @@ -96,7 +91,6 @@ public class QltQualityConstructionLogAppController extends BaseController { /** * 修改质量-施工日志 */ - @SaCheckPermission("quality:qualityConstructionLog:edit") @Log(title = "质量-施工日志", businessType = BusinessType.UPDATE) @RepeatSubmit() @PutMapping() @@ -109,7 +103,6 @@ public class QltQualityConstructionLogAppController extends BaseController { * * @param ids 主键串 */ - @SaCheckPermission("quality:qualityConstructionLog:remove") @Log(title = "质量-施工日志", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public R remove(@NotEmpty(message = "主键不能为空") diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/quality/controller/app/QltQualityInspectionAppController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/quality/controller/app/QltQualityInspectionAppController.java index 6924e38a..1ba70a32 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/quality/controller/app/QltQualityInspectionAppController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/quality/controller/app/QltQualityInspectionAppController.java @@ -57,7 +57,6 @@ public class QltQualityInspectionAppController extends BaseController { * * @param id 主键 */ - @SaCheckPermission("quality:qualityInspection:query") @GetMapping("/{id}") public R getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) { diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/quality/domain/dto/qualityinspection/QltQualityInspectionCreateReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/quality/domain/dto/qualityinspection/QltQualityInspectionCreateReq.java index c893536d..50f49498 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/quality/domain/dto/qualityinspection/QltQualityInspectionCreateReq.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/quality/domain/dto/qualityinspection/QltQualityInspectionCreateReq.java @@ -1,5 +1,6 @@ package org.dromara.quality.domain.dto.qualityinspection; +import com.fasterxml.jackson.annotation.JsonFormat; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import lombok.Data; @@ -75,6 +76,7 @@ public class QltQualityInspectionCreateReq implements Serializable { /** * 回复期限日期 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date replyPeriodDate; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/message/MsgAppNoticeMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/message/MsgAppNoticeMapper.xml new file mode 100644 index 00000000..68e2383e --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/message/MsgAppNoticeMapper.xml @@ -0,0 +1,7 @@ + + + + +