From e706540fe3a7d4c6cde6b007bff42bfa74f50122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=88=90?= <2847920761@qq.com> Date: Thu, 14 Aug 2025 22:51:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/common/sse/dto/SseMessageDto.java | 11 + .../BusPhysicalsupplyController.java | 105 +++++++++ .../BusPhysicalsupplySonController.java | 105 +++++++++ .../domain/BusPhysicalsupply.java | 98 +++++++++ .../domain/BusPhysicalsupplySon.java | 168 +++++++++++++++ .../domain/BusTotalsupplyplan.java | 4 +- .../domain/bo/BusPhysicalsupplyBo.java | 103 +++++++++ .../domain/bo/BusPhysicalsupplySonBo.java | 167 +++++++++++++++ .../domain/bo/BusTotalsupplyplanBo.java | 4 +- .../domain/vo/BusPhysicalsupplySonVo.java | 202 ++++++++++++++++++ .../domain/vo/BusPhysicalsupplyVo.java | 118 ++++++++++ .../mapper/BusPhysicalsupplyMapper.java | 15 ++ .../mapper/BusPhysicalsupplySonMapper.java | 15 ++ .../service/IBusPhysicalsupplyService.java | 70 ++++++ .../service/IBusPhysicalsupplySonService.java | 70 ++++++ .../impl/BusPhysicalsupplyServiceImpl.java | 152 +++++++++++++ .../impl/BusPhysicalsupplySonServiceImpl.java | 158 ++++++++++++++ ...usBillofquantitiesVersionsServiceImpl.java | 2 +- .../controller/MsgConfigController.java | 12 +- .../message/domain/bo/MsgConfigAddReq.java | 5 + .../service/impl/MsgNoticeServiceImpl.java | 2 + .../dromara/system/mapper/SysDeptMapper.java | 8 + .../system/service/ISysDeptService.java | 12 +- .../service/impl/SysDeptServiceImpl.java | 10 + .../cailiaoshebei/BusPhysicalsupplyMapper.xml | 7 + .../BusPhysicalsupplySonMapper.xml | 7 + .../resources/mapper/system/SysDeptMapper.xml | 39 ++++ 27 files changed, 1654 insertions(+), 15 deletions(-) create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/controller/BusPhysicalsupplyController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/controller/BusPhysicalsupplySonController.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusPhysicalsupply.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusPhysicalsupplySon.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusPhysicalsupplyBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusPhysicalsupplySonBo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/vo/BusPhysicalsupplySonVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/vo/BusPhysicalsupplyVo.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/mapper/BusPhysicalsupplyMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/mapper/BusPhysicalsupplySonMapper.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/IBusPhysicalsupplyService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/IBusPhysicalsupplySonService.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusPhysicalsupplyServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusPhysicalsupplySonServiceImpl.java create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/cailiaoshebei/BusPhysicalsupplyMapper.xml create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/cailiaoshebei/BusPhysicalsupplySonMapper.xml diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-sse/src/main/java/org/dromara/common/sse/dto/SseMessageDto.java b/xinnengyuan/ruoyi-common/ruoyi-common-sse/src/main/java/org/dromara/common/sse/dto/SseMessageDto.java index a2e1210c..e5406d13 100644 --- a/xinnengyuan/ruoyi-common/ruoyi-common-sse/src/main/java/org/dromara/common/sse/dto/SseMessageDto.java +++ b/xinnengyuan/ruoyi-common/ruoyi-common-sse/src/main/java/org/dromara/common/sse/dto/SseMessageDto.java @@ -26,4 +26,15 @@ public class SseMessageDto implements Serializable { * 需要发送的消息 */ private String message; + + /** + * 路由 + */ + private String route; + + /** + * 详情 + */ + private String detailId; + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/controller/BusPhysicalsupplyController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/controller/BusPhysicalsupplyController.java new file mode 100644 index 00000000..68a4d1d8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/controller/BusPhysicalsupplyController.java @@ -0,0 +1,105 @@ +package org.dromara.cailiaoshebei.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.cailiaoshebei.domain.vo.BusPhysicalsupplyVo; +import org.dromara.cailiaoshebei.domain.bo.BusPhysicalsupplyBo; +import org.dromara.cailiaoshebei.service.IBusPhysicalsupplyService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 物资-使用情况 + * + * @author Lion Li + * @date 2025-08-14 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/cailiaoshebei/physicalsupply") +public class BusPhysicalsupplyController extends BaseController { + + private final IBusPhysicalsupplyService busPhysicalsupplyService; + + /** + * 查询物资-使用情况列表 + */ + @SaCheckPermission("cailiaoshebei:physicalsupply:list") + @GetMapping("/list") + public TableDataInfo list(BusPhysicalsupplyBo bo, PageQuery pageQuery) { + return busPhysicalsupplyService.queryPageList(bo, pageQuery); + } + + /** + * 导出物资-使用情况列表 + */ + @SaCheckPermission("cailiaoshebei:physicalsupply:export") + @Log(title = "物资-使用情况", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(BusPhysicalsupplyBo bo, HttpServletResponse response) { + List list = busPhysicalsupplyService.queryList(bo); + ExcelUtil.exportExcel(list, "物资-使用情况", BusPhysicalsupplyVo.class, response); + } + + /** + * 获取物资-使用情况详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("cailiaoshebei:physicalsupply:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(busPhysicalsupplyService.queryById(id)); + } + + /** + * 新增物资-使用情况 + */ + @SaCheckPermission("cailiaoshebei:physicalsupply:add") + @Log(title = "物资-使用情况", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody BusPhysicalsupplyBo bo) { + return toAjax(busPhysicalsupplyService.insertByBo(bo)); + } + + /** + * 修改物资-使用情况 + */ + @SaCheckPermission("cailiaoshebei:physicalsupply:edit") + @Log(title = "物资-使用情况", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BusPhysicalsupplyBo bo) { + return toAjax(busPhysicalsupplyService.updateByBo(bo)); + } + + /** + * 删除物资-使用情况 + * + * @param ids 主键串 + */ + @SaCheckPermission("cailiaoshebei:physicalsupply:remove") + @Log(title = "物资-使用情况", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(busPhysicalsupplyService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/controller/BusPhysicalsupplySonController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/controller/BusPhysicalsupplySonController.java new file mode 100644 index 00000000..21a7b5ac --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/controller/BusPhysicalsupplySonController.java @@ -0,0 +1,105 @@ +package org.dromara.cailiaoshebei.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.cailiaoshebei.domain.vo.BusPhysicalsupplySonVo; +import org.dromara.cailiaoshebei.domain.bo.BusPhysicalsupplySonBo; +import org.dromara.cailiaoshebei.service.IBusPhysicalsupplySonService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 物资-使用情况子数据 + * + * @author Lion Li + * @date 2025-08-14 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/cailiaoshebei/physicalsupplySon") +public class BusPhysicalsupplySonController extends BaseController { + + private final IBusPhysicalsupplySonService busPhysicalsupplySonService; + + /** + * 查询物资-使用情况子数据列表 + */ + @SaCheckPermission("cailiaoshebei:physicalsupplySon:list") + @GetMapping("/list") + public TableDataInfo list(BusPhysicalsupplySonBo bo, PageQuery pageQuery) { + return busPhysicalsupplySonService.queryPageList(bo, pageQuery); + } + + /** + * 导出物资-使用情况子数据列表 + */ + @SaCheckPermission("cailiaoshebei:physicalsupplySon:export") + @Log(title = "物资-使用情况子数据", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(BusPhysicalsupplySonBo bo, HttpServletResponse response) { + List list = busPhysicalsupplySonService.queryList(bo); + ExcelUtil.exportExcel(list, "物资-使用情况子数据", BusPhysicalsupplySonVo.class, response); + } + + /** + * 获取物资-使用情况子数据详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("cailiaoshebei:physicalsupplySon:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(busPhysicalsupplySonService.queryById(id)); + } + + /** + * 新增物资-使用情况子数据 + */ + @SaCheckPermission("cailiaoshebei:physicalsupplySon:add") + @Log(title = "物资-使用情况子数据", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody BusPhysicalsupplySonBo bo) { + return toAjax(busPhysicalsupplySonService.insertByBo(bo)); + } + + /** + * 修改物资-使用情况子数据 + */ + @SaCheckPermission("cailiaoshebei:physicalsupplySon:edit") + @Log(title = "物资-使用情况子数据", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BusPhysicalsupplySonBo bo) { + return toAjax(busPhysicalsupplySonService.updateByBo(bo)); + } + + /** + * 删除物资-使用情况子数据 + * + * @param ids 主键串 + */ + @SaCheckPermission("cailiaoshebei:physicalsupplySon:remove") + @Log(title = "物资-使用情况子数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(busPhysicalsupplySonService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusPhysicalsupply.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusPhysicalsupply.java new file mode 100644 index 00000000..2afb27d3 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusPhysicalsupply.java @@ -0,0 +1,98 @@ +package org.dromara.cailiaoshebei.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 物资-使用情况对象 bus_physicalsupply + * + * @author Lion Li + * @date 2025-08-14 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bus_physicalsupply") +public class BusPhysicalsupply extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 材料名称 + */ + private String name; + + /** + * 规格 + */ + private String specification; + + /** + * 供应商 + */ + private String supplier; + + /** + * 合同签订时间 + */ + private Date contractSigning; + + /** + * 供货要求 + */ + private String supplyRequirements; + + /** + * 生产周期 + */ + private Long productionPhase; + + /** + * 运算周期 + */ + private Long executionCycle; + + /** + * 安装量 + */ + private String installationQuantity; + + /** + * 安装比列 + */ + private String installationRatio; + + /** + * 备注 + */ + private String remark; + + /** + * 采购提交 + */ + private String purchaseSubmission; + + /** + * 材料提交 + */ + private String submissionMaterials; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusPhysicalsupplySon.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusPhysicalsupplySon.java new file mode 100644 index 00000000..f9375884 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusPhysicalsupplySon.java @@ -0,0 +1,168 @@ +package org.dromara.cailiaoshebei.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 物资-使用情况子数据对象 bus_physicalsupply_son + * + * @author Lion Li + * @date 2025-08-14 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bus_physicalsupply_son") +public class BusPhysicalsupplySon extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 使用情况ID + */ + private Long physicalsupplyId; + + /** + * 到货要求 + */ + private String deliveryRequirements; + + /** + * 转换为合同 + */ + private String transition; + + /** + * 批次 + */ + private String batch; + + /** + * 联系单下达时间 + */ + private Date issuanceTime; + + /** + * 要求到货时间 + */ + private Date requireDelivery; + + /** + * 要求到货数量 + */ + private String requiredQuantity; + + /** + * 采购备注 + */ + private String cgRemark; + + /** + * 计划到货时间 + */ + private Date scheduledDelivery; + + /** + * 计划到货数量 + */ + private String plannedQuantity; + + /** + * 差异量 + */ + private String differenceQuantity; + + /** + * 供应商备注 + */ + private String gysRemark; + + /** + * 实际到货时间 + */ + private Date actualDelivery; + + /** + * 验收移交时间 + */ + private Date acceptanceCheck; + + /** + * 交接方式 + */ + private String associate; + + /** + * 实际到货验收数量 + */ + private String actualAcceptance; + + /** + * 到货差异量 + */ + private String dhDifferenceQuantity; + + /** + * 逾期状态 + */ + private String expectedState; + + /** + * 到货备注 + */ + private String dhRemark; + + /** + * 货物金额 + */ + private String cargoAmount; + + /** + * 结算金额 + */ + private String settlementAmount; + + /** + * 预付款 + */ + private String advance; + + /** + * 投料款 + */ + private String feed; + + /** + * 到货验收款 + */ + private String acceptancePayment; + + /** + * 质保金 + */ + private String qualityGuarantee; + + /** + * 调试款 + */ + private String debugging; + + /** + * 结算备注 + */ + private String jsRemark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusTotalsupplyplan.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusTotalsupplyplan.java index 9abae07c..daba0156 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusTotalsupplyplan.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/BusTotalsupplyplan.java @@ -4,6 +4,8 @@ import org.dromara.common.mybatis.core.domain.BaseEntity; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import lombok.EqualsAndHashCode; + +import java.time.LocalDate; import java.util.Date; import java.io.Serial; @@ -41,7 +43,7 @@ public class BusTotalsupplyplan extends BaseEntity { /** * 编制日期 */ - private Date compileDate; + private LocalDate compileDate; /** * 计划编号 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusPhysicalsupplyBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusPhysicalsupplyBo.java new file mode 100644 index 00000000..d79a6066 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusPhysicalsupplyBo.java @@ -0,0 +1,103 @@ +package org.dromara.cailiaoshebei.domain.bo; + +import org.dromara.cailiaoshebei.domain.BusPhysicalsupply; +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.*; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 物资-使用情况业务对象 bus_physicalsupply + * + * @author Lion Li + * @date 2025-08-14 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BusPhysicalsupply.class, reverseConvertGenerate = false) +public class BusPhysicalsupplyBo extends BaseEntity { + + /** + * 主键ID + */ + + private Long id; + + /** + * 采购1 或 材料2 或 查询所有3 + */ + @NotNull(message = "采购或材料填写不能为空", groups = { EditGroup.class }) + private String findType; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 材料名称 + */ + private String name; + + /** + * 规格 + */ + private String specification; + + /** + * 供应商 + */ + private String supplier; + + /** + * 合同签订时间 + */ + private Date contractSigning; + + /** + * 供货要求 + */ + private String supplyRequirements; + + /** + * 生产周期 + */ + private Long productionPhase; + + /** + * 运算周期 + */ + private Long executionCycle; + + /** + * 安装量 + */ + private String installationQuantity; + + /** + * 安装比列 + */ + private String installationRatio; + + /** + * 备注 + */ + private String remark; + + /** + * 采购提交 + */ + private String purchaseSubmission; + + /** + * 材料提交 + */ + private String submissionMaterials; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusPhysicalsupplySonBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusPhysicalsupplySonBo.java new file mode 100644 index 00000000..a524b1c0 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusPhysicalsupplySonBo.java @@ -0,0 +1,167 @@ +package org.dromara.cailiaoshebei.domain.bo; + +import org.dromara.cailiaoshebei.domain.BusPhysicalsupplySon; +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.*; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 物资-使用情况子数据业务对象 bus_physicalsupply_son + * + * @author Lion Li + * @date 2025-08-14 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BusPhysicalsupplySon.class, reverseConvertGenerate = false) +public class BusPhysicalsupplySonBo extends BaseEntity { + + /** + * 主键ID + */ + @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 使用情况ID + */ + private Long physicalsupplyId; + + /** + * 到货要求 + */ + private String deliveryRequirements; + + /** + * 转换为合同 + */ + private String transition; + + /** + * 批次 + */ + private String batch; + + /** + * 联系单下达时间 + */ + private Date issuanceTime; + + /** + * 要求到货时间 + */ + private Date requireDelivery; + + /** + * 要求到货数量 + */ + private String requiredQuantity; + + /** + * 采购备注 + */ + private String cgRemark; + + /** + * 计划到货时间 + */ + private Date scheduledDelivery; + + /** + * 计划到货数量 + */ + private String plannedQuantity; + + /** + * 差异量 + */ + private String differenceQuantity; + + /** + * 供应商备注 + */ + private String gysRemark; + + /** + * 实际到货时间 + */ + private Date actualDelivery; + + /** + * 验收移交时间 + */ + private Date acceptanceCheck; + + /** + * 交接方式 + */ + private String associate; + + /** + * 实际到货验收数量 + */ + private String actualAcceptance; + + /** + * 到货差异量 + */ + private String dhDifferenceQuantity; + + /** + * 逾期状态 + */ + private String expectedState; + + /** + * 到货备注 + */ + private String dhRemark; + + /** + * 货物金额 + */ + private String cargoAmount; + + /** + * 结算金额 + */ + private String settlementAmount; + + /** + * 预付款 + */ + private String advance; + + /** + * 投料款 + */ + private String feed; + + /** + * 到货验收款 + */ + private String acceptancePayment; + + /** + * 质保金 + */ + private String qualityGuarantee; + + /** + * 调试款 + */ + private String debugging; + + /** + * 结算备注 + */ + private String jsRemark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusTotalsupplyplanBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusTotalsupplyplanBo.java index 2d9e103e..65437ec1 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusTotalsupplyplanBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/bo/BusTotalsupplyplanBo.java @@ -7,6 +7,8 @@ import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; import lombok.EqualsAndHashCode; import jakarta.validation.constraints.*; + +import java.time.LocalDate; import java.util.Date; /** @@ -34,7 +36,7 @@ public class BusTotalsupplyplanBo extends BaseEntity { /** * 预计使用日期 */ - private Date dateService; + private LocalDate dateService; /** * 交货地点 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/vo/BusPhysicalsupplySonVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/vo/BusPhysicalsupplySonVo.java new file mode 100644 index 00000000..8d85ee82 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/vo/BusPhysicalsupplySonVo.java @@ -0,0 +1,202 @@ +package org.dromara.cailiaoshebei.domain.vo; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.cailiaoshebei.domain.BusPhysicalsupplySon; +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; + + + +/** + * 物资-使用情况子数据视图对象 bus_physicalsupply_son + * + * @author Lion Li + * @date 2025-08-14 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BusPhysicalsupplySon.class) +public class BusPhysicalsupplySonVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 使用情况ID + */ + @ExcelProperty(value = "使用情况ID") + private Long physicalsupplyId; + + /** + * 到货要求 + */ + @ExcelProperty(value = "到货要求") + private String deliveryRequirements; + + /** + * 转换为合同 + */ + @ExcelProperty(value = "转换为合同") + private String transition; + + /** + * 批次 + */ + @ExcelProperty(value = "批次") + private String batch; + + /** + * 联系单下达时间 + */ + @ExcelProperty(value = "联系单下达时间") + private Date issuanceTime; + + /** + * 要求到货时间 + */ + @ExcelProperty(value = "要求到货时间") + private Date requireDelivery; + + /** + * 要求到货数量 + */ + @ExcelProperty(value = "要求到货数量") + private String requiredQuantity; + + /** + * 采购备注 + */ + @ExcelProperty(value = "采购备注") + private String cgRemark; + + /** + * 计划到货时间 + */ + @ExcelProperty(value = "计划到货时间") + private Date scheduledDelivery; + + /** + * 计划到货数量 + */ + @ExcelProperty(value = "计划到货数量") + private String plannedQuantity; + + /** + * 差异量 + */ + @ExcelProperty(value = "差异量") + private String differenceQuantity; + + /** + * 供应商备注 + */ + @ExcelProperty(value = "供应商备注") + private String gysRemark; + + /** + * 实际到货时间 + */ + @ExcelProperty(value = "实际到货时间") + private Date actualDelivery; + + /** + * 验收移交时间 + */ + @ExcelProperty(value = "验收移交时间") + private Date acceptanceCheck; + + /** + * 交接方式 + */ + @ExcelProperty(value = "交接方式") + private String associate; + + /** + * 实际到货验收数量 + */ + @ExcelProperty(value = "实际到货验收数量") + private String actualAcceptance; + + /** + * 到货差异量 + */ + @ExcelProperty(value = "到货差异量") + private String dhDifferenceQuantity; + + /** + * 逾期状态 + */ + @ExcelProperty(value = "逾期状态") + private String expectedState; + + /** + * 到货备注 + */ + @ExcelProperty(value = "到货备注") + private String dhRemark; + + /** + * 货物金额 + */ + @ExcelProperty(value = "货物金额") + private String cargoAmount; + + /** + * 结算金额 + */ + @ExcelProperty(value = "结算金额") + private String settlementAmount; + + /** + * 预付款 + */ + @ExcelProperty(value = "预付款") + private String advance; + + /** + * 投料款 + */ + @ExcelProperty(value = "投料款") + private String feed; + + /** + * 到货验收款 + */ + @ExcelProperty(value = "到货验收款") + private String acceptancePayment; + + /** + * 质保金 + */ + @ExcelProperty(value = "质保金") + private String qualityGuarantee; + + /** + * 调试款 + */ + @ExcelProperty(value = "调试款") + private String debugging; + + /** + * 结算备注 + */ + @ExcelProperty(value = "结算备注") + private String jsRemark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/vo/BusPhysicalsupplyVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/vo/BusPhysicalsupplyVo.java new file mode 100644 index 00000000..1440f7ce --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/domain/vo/BusPhysicalsupplyVo.java @@ -0,0 +1,118 @@ +package org.dromara.cailiaoshebei.domain.vo; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.cailiaoshebei.domain.BusPhysicalsupply; +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; + + + +/** + * 物资-使用情况视图对象 bus_physicalsupply + * + * @author Lion Li + * @date 2025-08-14 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BusPhysicalsupply.class) +public class BusPhysicalsupplyVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 项目ID + */ + @ExcelProperty(value = "项目ID") + private Long projectId; + + /** + * 材料名称 + */ + @ExcelProperty(value = "材料名称") + private String name; + + /** + * 规格 + */ + @ExcelProperty(value = "规格") + private String specification; + + /** + * 供应商 + */ + @ExcelProperty(value = "供应商") + private String supplier; + + /** + * 合同签订时间 + */ + @ExcelProperty(value = "合同签订时间") + private Date contractSigning; + + /** + * 供货要求 + */ + @ExcelProperty(value = "供货要求") + private String supplyRequirements; + + /** + * 生产周期 + */ + @ExcelProperty(value = "生产周期") + private Long productionPhase; + + /** + * 运算周期 + */ + @ExcelProperty(value = "运算周期") + private Long executionCycle; + + /** + * 安装量 + */ + @ExcelProperty(value = "安装量") + private String installationQuantity; + + /** + * 安装比列 + */ + @ExcelProperty(value = "安装比列") + private String installationRatio; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + /** + * 采购提交 + */ + @ExcelProperty(value = "采购提交") + private String purchaseSubmission; + + /** + * 材料提交 + */ + @ExcelProperty(value = "材料提交") + private String submissionMaterials; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/mapper/BusPhysicalsupplyMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/mapper/BusPhysicalsupplyMapper.java new file mode 100644 index 00000000..2f3c2471 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/mapper/BusPhysicalsupplyMapper.java @@ -0,0 +1,15 @@ +package org.dromara.cailiaoshebei.mapper; + +import org.dromara.cailiaoshebei.domain.BusPhysicalsupply; +import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplyVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 物资-使用情况Mapper接口 + * + * @author Lion Li + * @date 2025-08-14 + */ +public interface BusPhysicalsupplyMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/mapper/BusPhysicalsupplySonMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/mapper/BusPhysicalsupplySonMapper.java new file mode 100644 index 00000000..01dddcd6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/mapper/BusPhysicalsupplySonMapper.java @@ -0,0 +1,15 @@ +package org.dromara.cailiaoshebei.mapper; + +import org.dromara.cailiaoshebei.domain.BusPhysicalsupplySon; +import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplySonVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 物资-使用情况子数据Mapper接口 + * + * @author Lion Li + * @date 2025-08-14 + */ +public interface BusPhysicalsupplySonMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/IBusPhysicalsupplyService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/IBusPhysicalsupplyService.java new file mode 100644 index 00000000..9672fc83 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/IBusPhysicalsupplyService.java @@ -0,0 +1,70 @@ +package org.dromara.cailiaoshebei.service; + +import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplyVo; +import org.dromara.cailiaoshebei.domain.bo.BusPhysicalsupplyBo; +import org.dromara.cailiaoshebei.domain.BusPhysicalsupply; +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; + +/** + * 物资-使用情况Service接口 + * + * @author Lion Li + * @date 2025-08-14 + */ +public interface IBusPhysicalsupplyService extends IService{ + + /** + * 查询物资-使用情况 + * + * @param id 主键 + * @return 物资-使用情况 + */ + BusPhysicalsupplyVo queryById(Long id); + + /** + * 分页查询物资-使用情况列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 物资-使用情况分页列表 + */ + TableDataInfo queryPageList(BusPhysicalsupplyBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的物资-使用情况列表 + * + * @param bo 查询条件 + * @return 物资-使用情况列表 + */ + List queryList(BusPhysicalsupplyBo bo); + + /** + * 新增物资-使用情况 + * + * @param bo 物资-使用情况 + * @return 是否新增成功 + */ + Boolean insertByBo(BusPhysicalsupplyBo bo); + + /** + * 修改物资-使用情况 + * + * @param bo 物资-使用情况 + * @return 是否修改成功 + */ + Boolean updateByBo(BusPhysicalsupplyBo bo); + + /** + * 校验并批量删除物资-使用情况信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/IBusPhysicalsupplySonService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/IBusPhysicalsupplySonService.java new file mode 100644 index 00000000..9dfaa528 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/IBusPhysicalsupplySonService.java @@ -0,0 +1,70 @@ +package org.dromara.cailiaoshebei.service; + +import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplySonVo; +import org.dromara.cailiaoshebei.domain.bo.BusPhysicalsupplySonBo; +import org.dromara.cailiaoshebei.domain.BusPhysicalsupplySon; +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; + +/** + * 物资-使用情况子数据Service接口 + * + * @author Lion Li + * @date 2025-08-14 + */ +public interface IBusPhysicalsupplySonService extends IService{ + + /** + * 查询物资-使用情况子数据 + * + * @param id 主键 + * @return 物资-使用情况子数据 + */ + BusPhysicalsupplySonVo queryById(Long id); + + /** + * 分页查询物资-使用情况子数据列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 物资-使用情况子数据分页列表 + */ + TableDataInfo queryPageList(BusPhysicalsupplySonBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的物资-使用情况子数据列表 + * + * @param bo 查询条件 + * @return 物资-使用情况子数据列表 + */ + List queryList(BusPhysicalsupplySonBo bo); + + /** + * 新增物资-使用情况子数据 + * + * @param bo 物资-使用情况子数据 + * @return 是否新增成功 + */ + Boolean insertByBo(BusPhysicalsupplySonBo bo); + + /** + * 修改物资-使用情况子数据 + * + * @param bo 物资-使用情况子数据 + * @return 是否修改成功 + */ + Boolean updateByBo(BusPhysicalsupplySonBo bo); + + /** + * 校验并批量删除物资-使用情况子数据信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusPhysicalsupplyServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusPhysicalsupplyServiceImpl.java new file mode 100644 index 00000000..dac80294 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusPhysicalsupplyServiceImpl.java @@ -0,0 +1,152 @@ +package org.dromara.cailiaoshebei.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.cailiaoshebei.domain.bo.BusPhysicalsupplyBo; +import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplyVo; +import org.dromara.cailiaoshebei.domain.BusPhysicalsupply; +import org.dromara.cailiaoshebei.mapper.BusPhysicalsupplyMapper; +import org.dromara.cailiaoshebei.service.IBusPhysicalsupplyService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; +import java.util.Objects; + +/** + * 物资-使用情况Service业务层处理 + * + * @author Lion Li + * @date 2025-08-14 + */ +@RequiredArgsConstructor +@Service +public class BusPhysicalsupplyServiceImpl extends ServiceImpl implements IBusPhysicalsupplyService { + + private final BusPhysicalsupplyMapper baseMapper; + + /** + * 查询物资-使用情况 + * + * @param id 主键 + * @return 物资-使用情况 + */ + @Override + public BusPhysicalsupplyVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询物资-使用情况列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 物资-使用情况分页列表 + */ + @Override + public TableDataInfo queryPageList(BusPhysicalsupplyBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的物资-使用情况列表 + * + * @param bo 查询条件 + * @return 物资-使用情况列表 + */ + @Override + public List queryList(BusPhysicalsupplyBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(BusPhysicalsupplyBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BusPhysicalsupply::getId); + lqw.eq(bo.getProjectId() != null, BusPhysicalsupply::getProjectId, bo.getProjectId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), BusPhysicalsupply::getName, bo.getName()); + lqw.eq(StringUtils.isNotBlank(bo.getSpecification()), BusPhysicalsupply::getSpecification, bo.getSpecification()); + lqw.eq(StringUtils.isNotBlank(bo.getSupplier()), BusPhysicalsupply::getSupplier, bo.getSupplier()); + lqw.eq(bo.getContractSigning() != null, BusPhysicalsupply::getContractSigning, bo.getContractSigning()); + lqw.eq(StringUtils.isNotBlank(bo.getSupplyRequirements()), BusPhysicalsupply::getSupplyRequirements, bo.getSupplyRequirements()); + lqw.eq(bo.getProductionPhase() != null, BusPhysicalsupply::getProductionPhase, bo.getProductionPhase()); + lqw.eq(bo.getExecutionCycle() != null, BusPhysicalsupply::getExecutionCycle, bo.getExecutionCycle()); + lqw.eq(StringUtils.isNotBlank(bo.getInstallationQuantity()), BusPhysicalsupply::getInstallationQuantity, bo.getInstallationQuantity()); + lqw.eq(StringUtils.isNotBlank(bo.getInstallationRatio()), BusPhysicalsupply::getInstallationRatio, bo.getInstallationRatio()); + lqw.eq(StringUtils.isNotBlank(bo.getPurchaseSubmission()), BusPhysicalsupply::getPurchaseSubmission, bo.getPurchaseSubmission()); + lqw.eq(StringUtils.isNotBlank(bo.getSubmissionMaterials()), BusPhysicalsupply::getSubmissionMaterials, bo.getSubmissionMaterials()); + + //查询采购 + if (Objects.equals(bo.getFindType(), "1")){ + lqw.eq(BusPhysicalsupply::getPurchaseSubmission, "0"); + } + //查询材料 + else if (Objects.equals(bo.getFindType(), "2")){ + lqw.eq(BusPhysicalsupply::getPurchaseSubmission, "1"); + } + return lqw; + } + + /** + * 新增物资-使用情况 + * + * @param bo 物资-使用情况 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BusPhysicalsupplyBo bo) { + BusPhysicalsupply add = MapstructUtils.convert(bo, BusPhysicalsupply.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改物资-使用情况 + * + * @param bo 物资-使用情况 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BusPhysicalsupplyBo bo) { + BusPhysicalsupply update = MapstructUtils.convert(bo, BusPhysicalsupply.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BusPhysicalsupply entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除物资-使用情况信息 + * + * @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/cailiaoshebei/service/impl/BusPhysicalsupplySonServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusPhysicalsupplySonServiceImpl.java new file mode 100644 index 00000000..5b96ce2d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusPhysicalsupplySonServiceImpl.java @@ -0,0 +1,158 @@ +package org.dromara.cailiaoshebei.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.cailiaoshebei.domain.bo.BusPhysicalsupplySonBo; +import org.dromara.cailiaoshebei.domain.vo.BusPhysicalsupplySonVo; +import org.dromara.cailiaoshebei.domain.BusPhysicalsupplySon; +import org.dromara.cailiaoshebei.mapper.BusPhysicalsupplySonMapper; +import org.dromara.cailiaoshebei.service.IBusPhysicalsupplySonService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 物资-使用情况子数据Service业务层处理 + * + * @author Lion Li + * @date 2025-08-14 + */ +@RequiredArgsConstructor +@Service +public class BusPhysicalsupplySonServiceImpl extends ServiceImpl implements IBusPhysicalsupplySonService { + + private final BusPhysicalsupplySonMapper baseMapper; + + /** + * 查询物资-使用情况子数据 + * + * @param id 主键 + * @return 物资-使用情况子数据 + */ + @Override + public BusPhysicalsupplySonVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询物资-使用情况子数据列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 物资-使用情况子数据分页列表 + */ + @Override + public TableDataInfo queryPageList(BusPhysicalsupplySonBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的物资-使用情况子数据列表 + * + * @param bo 查询条件 + * @return 物资-使用情况子数据列表 + */ + @Override + public List queryList(BusPhysicalsupplySonBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(BusPhysicalsupplySonBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BusPhysicalsupplySon::getId); + lqw.eq(bo.getPhysicalsupplyId() != null, BusPhysicalsupplySon::getPhysicalsupplyId, bo.getPhysicalsupplyId()); + lqw.eq(StringUtils.isNotBlank(bo.getDeliveryRequirements()), BusPhysicalsupplySon::getDeliveryRequirements, bo.getDeliveryRequirements()); + lqw.eq(StringUtils.isNotBlank(bo.getTransition()), BusPhysicalsupplySon::getTransition, bo.getTransition()); + lqw.eq(StringUtils.isNotBlank(bo.getBatch()), BusPhysicalsupplySon::getBatch, bo.getBatch()); + lqw.eq(bo.getIssuanceTime() != null, BusPhysicalsupplySon::getIssuanceTime, bo.getIssuanceTime()); + lqw.eq(bo.getRequireDelivery() != null, BusPhysicalsupplySon::getRequireDelivery, bo.getRequireDelivery()); + lqw.eq(StringUtils.isNotBlank(bo.getRequiredQuantity()), BusPhysicalsupplySon::getRequiredQuantity, bo.getRequiredQuantity()); + lqw.eq(StringUtils.isNotBlank(bo.getCgRemark()), BusPhysicalsupplySon::getCgRemark, bo.getCgRemark()); + lqw.eq(bo.getScheduledDelivery() != null, BusPhysicalsupplySon::getScheduledDelivery, bo.getScheduledDelivery()); + lqw.eq(StringUtils.isNotBlank(bo.getPlannedQuantity()), BusPhysicalsupplySon::getPlannedQuantity, bo.getPlannedQuantity()); + lqw.eq(StringUtils.isNotBlank(bo.getDifferenceQuantity()), BusPhysicalsupplySon::getDifferenceQuantity, bo.getDifferenceQuantity()); + lqw.eq(StringUtils.isNotBlank(bo.getGysRemark()), BusPhysicalsupplySon::getGysRemark, bo.getGysRemark()); + lqw.eq(bo.getActualDelivery() != null, BusPhysicalsupplySon::getActualDelivery, bo.getActualDelivery()); + lqw.eq(bo.getAcceptanceCheck() != null, BusPhysicalsupplySon::getAcceptanceCheck, bo.getAcceptanceCheck()); + lqw.eq(StringUtils.isNotBlank(bo.getAssociate()), BusPhysicalsupplySon::getAssociate, bo.getAssociate()); + lqw.eq(StringUtils.isNotBlank(bo.getActualAcceptance()), BusPhysicalsupplySon::getActualAcceptance, bo.getActualAcceptance()); + lqw.eq(StringUtils.isNotBlank(bo.getDhDifferenceQuantity()), BusPhysicalsupplySon::getDhDifferenceQuantity, bo.getDhDifferenceQuantity()); + lqw.eq(StringUtils.isNotBlank(bo.getExpectedState()), BusPhysicalsupplySon::getExpectedState, bo.getExpectedState()); + lqw.eq(StringUtils.isNotBlank(bo.getDhRemark()), BusPhysicalsupplySon::getDhRemark, bo.getDhRemark()); + lqw.eq(StringUtils.isNotBlank(bo.getCargoAmount()), BusPhysicalsupplySon::getCargoAmount, bo.getCargoAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getSettlementAmount()), BusPhysicalsupplySon::getSettlementAmount, bo.getSettlementAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getAdvance()), BusPhysicalsupplySon::getAdvance, bo.getAdvance()); + lqw.eq(StringUtils.isNotBlank(bo.getFeed()), BusPhysicalsupplySon::getFeed, bo.getFeed()); + lqw.eq(StringUtils.isNotBlank(bo.getAcceptancePayment()), BusPhysicalsupplySon::getAcceptancePayment, bo.getAcceptancePayment()); + lqw.eq(StringUtils.isNotBlank(bo.getQualityGuarantee()), BusPhysicalsupplySon::getQualityGuarantee, bo.getQualityGuarantee()); + lqw.eq(StringUtils.isNotBlank(bo.getDebugging()), BusPhysicalsupplySon::getDebugging, bo.getDebugging()); + lqw.eq(StringUtils.isNotBlank(bo.getJsRemark()), BusPhysicalsupplySon::getJsRemark, bo.getJsRemark()); + + return lqw; + } + + /** + * 新增物资-使用情况子数据 + * + * @param bo 物资-使用情况子数据 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BusPhysicalsupplySonBo bo) { + BusPhysicalsupplySon add = MapstructUtils.convert(bo, BusPhysicalsupplySon.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改物资-使用情况子数据 + * + * @param bo 物资-使用情况子数据 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BusPhysicalsupplySonBo bo) { + BusPhysicalsupplySon update = MapstructUtils.convert(bo, BusPhysicalsupplySon.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BusPhysicalsupplySon entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除物资-使用情况子数据信息 + * + * @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/design/service/impl/BusBillofquantitiesVersionsServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/BusBillofquantitiesVersionsServiceImpl.java index 27380a19..0fd64a29 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/BusBillofquantitiesVersionsServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/BusBillofquantitiesVersionsServiceImpl.java @@ -463,12 +463,12 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl lqw = new LambdaQueryWrapper<>(); lqw.eq(BusBillofquantities::getVersions, id); - lqw.last("limit 1"); List list = busBillofquantitiesService.list(lqw); List busTotalsupplyplans = BeanUtil.copyToList(list, BusTotalsupplyplan.class); for (BusTotalsupplyplan busTotalsupplyplan : busTotalsupplyplans) { busTotalsupplyplan.setBatchNumber(num); busTotalsupplyplan.setProjectId(versions.getProjectId()); + busTotalsupplyplan.setId(null); } boolean b = busTotalsupplyplanService.saveBatch(busTotalsupplyplans); if (!b){ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/controller/MsgConfigController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/controller/MsgConfigController.java index 63c499af..373d5204 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/controller/MsgConfigController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/controller/MsgConfigController.java @@ -11,6 +11,7 @@ import cn.dev33.satoken.annotation.SaCheckPermission; import org.dromara.common.satoken.utils.LoginHelper; import org.dromara.message.domain.bo.MsgConfigAddReq; import org.dromara.message.domain.bo.MsgConfigEditReq; +import org.dromara.system.domain.bo.SysDeptBo; import org.dromara.system.domain.vo.SysDeptVo; import org.dromara.system.domain.vo.SysUserVo; import org.dromara.system.service.ISysDeptService; @@ -53,13 +54,12 @@ public class MsgConfigController extends BaseController { */ @SaCheckPermission("message:config:allUsersOfTheDepartment") @GetMapping("/allUsersOfTheDepartment") - public R allUsersOfTheDepartment() { - Long deptId = Objects.requireNonNull(LoginHelper.getLoginUser()).getDeptId(); - System.out.println("1!!!! "+deptId); + public R allUsersOfTheDepartment() { //获取当前用户的上级部门 - SysDeptVo sysDeptVo = deptService.selectDeptById(deptId); - System.out.println("2!!!! "+sysDeptVo.toString()); - return R.ok(sysDeptVo); + Long deptId = Objects.requireNonNull(LoginHelper.getLoginUser()).getDeptId(); + SysDeptBo bm = deptService.selectDeptByIdBo(deptId); + //从顶级往下推两个部门 + return R.ok(bm); } /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/bo/MsgConfigAddReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/bo/MsgConfigAddReq.java index 711f8f0f..6453adf8 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/bo/MsgConfigAddReq.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/domain/bo/MsgConfigAddReq.java @@ -47,4 +47,9 @@ public class MsgConfigAddReq implements Serializable { */ @NotBlank(message = "跳转路由不能为空") private String route; + + /** + * 通知人 + */ + private String userId; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/service/impl/MsgNoticeServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/service/impl/MsgNoticeServiceImpl.java index e390ab35..cf1917f0 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/service/impl/MsgNoticeServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/message/service/impl/MsgNoticeServiceImpl.java @@ -186,6 +186,8 @@ public class MsgNoticeServiceImpl extends ServiceImpl { """) List getProjectIdsByDept(@Param("deptId") Long deptId); + /** + * 根据部门ID获取到顶级部门 + * + * @return 部门信息 + */ + SysDeptBo selectDeptByIdBo(@Param("deptId") Long deptId); + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysDeptService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysDeptService.java index ab62e8a0..0d64c1d4 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysDeptService.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysDeptService.java @@ -60,12 +60,12 @@ public interface ISysDeptService { */ SysDeptVo selectDeptById(Long deptId); -// /** -// * 根据部门ID查询信息 -// * -// * @return 部门信息 -// */ -// SysDeptBo selectDeptByIdBo(SysDeptBo dept); + /** + * 根据部门ID获取到顶级部门 + * + * @return 部门信息 + */ + SysDeptBo selectDeptByIdBo(Long deptId); /** * 根据部门ID查询所属项目ID列表 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java index 0063cece..029141ad 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java @@ -247,6 +247,16 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService { return dept; } + /** + * 根据部门ID获取到顶级部门 + * + * @return 部门信息 + */ + @Override + public SysDeptBo selectDeptByIdBo(Long deptId) { + return null; + } + /** * 根据部门ID查询所属项目ID列表 * diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/cailiaoshebei/BusPhysicalsupplyMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/cailiaoshebei/BusPhysicalsupplyMapper.xml new file mode 100644 index 00000000..808d3bef --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/cailiaoshebei/BusPhysicalsupplyMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/cailiaoshebei/BusPhysicalsupplySonMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/cailiaoshebei/BusPhysicalsupplySonMapper.xml new file mode 100644 index 00000000..eab8879f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/cailiaoshebei/BusPhysicalsupplySonMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 9057a0e2..fdd72e43 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -44,4 +44,43 @@ order by d.parent_id, d.order_num + +