浏览代码

新增购置管理模块

lingpeng.li 3 月之前
父节点
当前提交
51062c2943
共有 100 个文件被更改,包括 6867 次插入0 次删除
  1. 30 0
      zgzt-sbsmzq/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/TokenUtils.java
  2. 5 0
      zgzt-sbsmzq/jeecg-module-lifecycle/pom.xml
  3. 163 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/controller/EquipAwaitAcceptController.java
  4. 162 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/entity/EquipAwaitAccept.java
  5. 14 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/mapper/EquipAwaitAcceptMapper.java
  6. 5 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/mapper/xml/EquipAwaitAcceptMapper.xml
  7. 14 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/service/IEquipAwaitAcceptService.java
  8. 19 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/service/impl/EquipAwaitAcceptServiceImpl.java
  9. 334 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/controller/EquipmentAcceptController.java
  10. 142 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/entity/EquipmentAccept.java
  11. 263 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/entity/EquipmentInfo.java
  12. 116 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/entity/EquipmentRelatedFile.java
  13. 24 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/EquipmentAcceptMapper.java
  14. 31 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/EquipmentInfoMapper.java
  15. 31 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/EquipmentRelatedFileMapper.java
  16. 10 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/xml/EquipmentAcceptMapper.xml
  17. 16 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/xml/EquipmentInfoMapper.xml
  18. 16 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/xml/EquipmentRelatedFileMapper.xml
  19. 63 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/IEquipmentAcceptService.java
  20. 22 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/IEquipmentInfoService.java
  21. 22 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/IEquipmentRelatedFileService.java
  22. 105 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/impl/EquipmentAcceptServiceImpl.java
  23. 27 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/impl/EquipmentInfoServiceImpl.java
  24. 27 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/impl/EquipmentRelatedFileServiceImpl.java
  25. 138 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/vo/EquipmentAcceptPage.java
  26. 177 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/controller/FileApplyCategoryController.java
  27. 79 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/entity/FileApplyCategory.java
  28. 25 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/mapper/FileApplyCategoryMapper.java
  29. 11 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/mapper/xml/FileApplyCategoryMapper.xml
  30. 26 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/service/IFileApplyCategoryService.java
  31. 32 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/service/impl/FileApplyCategoryServiceImpl.java
  32. 177 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/controller/FileApplyDeviceController.java
  33. 103 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/entity/FileApplyDevice.java
  34. 26 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/mapper/FileApplyDeviceMapper.java
  35. 11 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/mapper/xml/FileApplyDeviceMapper.xml
  36. 25 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/service/IFileApplyDeviceService.java
  37. 30 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/service/impl/FileApplyDeviceServiceImpl.java
  38. 176 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/controller/FileAttachmentsController.java
  39. 85 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/entity/FileAttachments.java
  40. 26 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/mapper/FileAttachmentsMapper.java
  41. 11 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/mapper/xml/FileAttachmentsMapper.xml
  42. 24 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/service/IFileAttachmentsService.java
  43. 29 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/service/impl/FileAttachmentsServiceImpl.java
  44. 176 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/controller/FileVisibilityController.java
  45. 91 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/entity/FileVisibility.java
  46. 25 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/mapper/FileVisibilityMapper.java
  47. 11 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/mapper/xml/FileVisibilityMapper.xml
  48. 25 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/service/IFileVisibilityService.java
  49. 29 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/service/impl/FileVisibilityServiceImpl.java
  50. 36 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/controller/FileController.java
  51. 15 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/dto/ImgUploadDTO.java
  52. 21 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/exception/FileNameLengthLimitExceededException.java
  53. 19 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/exception/FileSizeLimitExceededException.java
  54. 20 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/exception/FileUploadTypeException.java
  55. 36 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/service/FileService.java
  56. 98 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/service/impl/LocalFileService.java
  57. 191 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/utils/DateUtils.java
  58. 209 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/utils/FileUploadUtils.java
  59. 56 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/utils/MimeTypeUtils.java
  60. 174 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/controller/HistoryPurchaseRecordsController.java
  61. 29 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/dto/MaterialQueryDTO.java
  62. 117 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/entity/HistoryPurchaseRecords.java
  63. 14 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/mapper/HistoryPurchaseRecordsMapper.java
  64. 5 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/mapper/xml/HistoryPurchaseRecordsMapper.xml
  65. 19 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/service/IHistoryPurchaseRecordsService.java
  66. 38 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/service/impl/HistoryPurchaseRecordsServiceImpl.java
  67. 334 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/controller/PurchaseApplicationController.java
  68. 173 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/entity/MaterialList.java
  69. 146 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/entity/PurchaseApplication.java
  70. 80 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/entity/PurchaseApplicationAttachment.java
  71. 33 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/MaterialListMapper.java
  72. 31 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/PurchaseApplicationAttachmentMapper.java
  73. 32 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/PurchaseApplicationMapper.java
  74. 16 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/xml/MaterialListMapper.xml
  75. 16 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/xml/PurchaseApplicationAttachmentMapper.xml
  76. 17 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/xml/PurchaseApplicationMapper.xml
  77. 22 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/IMaterialListService.java
  78. 22 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/IPurchaseApplicationAttachmentService.java
  79. 68 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/IPurchaseApplicationService.java
  80. 27 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/impl/MaterialListServiceImpl.java
  81. 27 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/impl/PurchaseApplicationAttachmentServiceImpl.java
  82. 109 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/impl/PurchaseApplicationServiceImpl.java
  83. 144 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/vo/PurchaseApplicationPage.java
  84. 232 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/controller/PurchaseDetailsController.java
  85. 162 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/entity/PurchaseDetails.java
  86. 14 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/mapper/PurchaseDetailsMapper.java
  87. 5 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/mapper/xml/PurchaseDetailsMapper.xml
  88. 14 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/service/IPurchaseDetailsService.java
  89. 19 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/service/impl/PurchaseDetailsServiceImpl.java
  90. 320 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/controller/PurchasePlanController.java
  91. 80 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/entity/PurchaseAttachments.java
  92. 140 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/entity/PurchasePlan.java
  93. 123 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/entity/PurchasePlanInfo.java
  94. 31 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/PurchaseAttachmentsMapper.java
  95. 31 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/PurchasePlanInfoMapper.java
  96. 14 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/PurchasePlanMapper.java
  97. 16 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/xml/PurchaseAttachmentsMapper.xml
  98. 16 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/xml/PurchasePlanInfoMapper.xml
  99. 5 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/xml/PurchasePlanMapper.xml
  100. 22 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/service/IPurchaseAttachmentsService.java

+ 30 - 0
zgzt-sbsmzq/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/TokenUtils.java

@@ -170,4 +170,34 @@ public class TokenUtils {
         }
         return loginUser;
     }
+
+    /**
+     * 根据请求获取用户 Token
+     * @param request HttpServletRequest
+     * @return Token 字符串
+     */
+    public static String getTokenFromRequest(HttpServletRequest request) {
+        String token = request.getHeader("X-Access-Token"); // JeecgBoot 默认 Token 头
+        if (!org.springframework.util.StringUtils.hasText(token)) {
+            token = request.getParameter("token"); // 兼容 URL 传参的 Token
+        }
+        return token;
+    }
+
+    /**
+     * 根据 Token 获取登录用户信息
+     * @param request HttpServletRequest
+     * @return LoginUser (如果 Token 无效,则返回 null)
+     */
+    public static LoginUser getLoginUser(HttpServletRequest request,CommonAPI commonApi, RedisUtil redisUtil) {
+        String token = getTokenFromRequest(request);
+        if (!org.springframework.util.StringUtils.hasText(token)) {
+            return null;
+        }
+        String username = JwtUtil.getUsername(token);
+        if (username == null) {
+            throw new JeecgBoot401Exception("token非法无效!");
+        }
+        return TokenUtils.getLoginUser(username,commonApi, redisUtil);
+    }
 }

+ 5 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/pom.xml

@@ -18,5 +18,10 @@
             <groupId>org.jeecgframework.boot</groupId>
             <artifactId>jeecg-boot-base-core</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.jeecgframework.boot</groupId>
+            <artifactId>jeecg-system-biz</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 163 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/controller/EquipAwaitAcceptController.java

@@ -0,0 +1,163 @@
+package org.jeecg.modules.purchaseManage.equipAwaitAccept.controller;
+
+import java.util.Arrays;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.purchaseManage.equipAwaitAccept.entity.EquipAwaitAccept;
+import org.jeecg.modules.purchaseManage.equipAwaitAccept.service.IEquipAwaitAcceptService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+
+ /**
+ * @Description: 待验收设备
+ * @Author: jeecg-boot
+ * @Date:   2025-04-01
+ * @Version: V1.0
+ */
+@Api(tags="待验收设备")
+@RestController
+@RequestMapping("/purchaseManage/equipAwaitAccept")
+@Slf4j
+public class EquipAwaitAcceptController extends JeecgController<EquipAwaitAccept, IEquipAwaitAcceptService> {
+	@Autowired
+	private IEquipAwaitAcceptService equipAwaitAcceptService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param equipAwaitAccept
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "待验收设备-分页列表查询")
+	@ApiOperation(value="待验收设备-分页列表查询", notes="待验收设备-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<EquipAwaitAccept>> queryPageList(EquipAwaitAccept equipAwaitAccept,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+        QueryWrapper<EquipAwaitAccept> queryWrapper = QueryGenerator.initQueryWrapper(equipAwaitAccept, req.getParameterMap());
+		Page<EquipAwaitAccept> page = new Page<EquipAwaitAccept>(pageNo, pageSize);
+		IPage<EquipAwaitAccept> pageList = equipAwaitAcceptService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param equipAwaitAccept
+	 * @return
+	 */
+	@AutoLog(value = "待验收设备-添加")
+	@ApiOperation(value="待验收设备-添加", notes="待验收设备-添加")
+	@RequiresPermissions("purchaseManage:sbsmzq_equip_await_accept:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody EquipAwaitAccept equipAwaitAccept) {
+		equipAwaitAcceptService.save(equipAwaitAccept);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param equipAwaitAccept
+	 * @return
+	 */
+	@AutoLog(value = "待验收设备-编辑")
+	@ApiOperation(value="待验收设备-编辑", notes="待验收设备-编辑")
+	@RequiresPermissions("purchaseManage:sbsmzq_equip_await_accept:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody EquipAwaitAccept equipAwaitAccept) {
+		equipAwaitAcceptService.updateById(equipAwaitAccept);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "待验收设备-通过id删除")
+	@ApiOperation(value="待验收设备-通过id删除", notes="待验收设备-通过id删除")
+	@RequiresPermissions("purchaseManage:sbsmzq_equip_await_accept:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		equipAwaitAcceptService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "待验收设备-批量删除")
+	@ApiOperation(value="待验收设备-批量删除", notes="待验收设备-批量删除")
+	@RequiresPermissions("purchaseManage:sbsmzq_equip_await_accept:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.equipAwaitAcceptService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "待验收设备-通过id查询")
+	@ApiOperation(value="待验收设备-通过id查询", notes="待验收设备-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<EquipAwaitAccept> queryById(@RequestParam(name="id",required=true) String id) {
+		EquipAwaitAccept equipAwaitAccept = equipAwaitAcceptService.getById(id);
+		if(equipAwaitAccept==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(equipAwaitAccept);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param equipAwaitAccept
+    */
+    @RequiresPermissions("purchaseManage:sbsmzq_equip_await_accept:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, EquipAwaitAccept equipAwaitAccept) {
+        return super.exportXls(request, equipAwaitAccept, EquipAwaitAccept.class, "待验收设备");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("purchaseManage:sbsmzq_equip_await_accept:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, EquipAwaitAccept.class);
+    }
+
+}

+ 162 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/entity/EquipAwaitAccept.java

@@ -0,0 +1,162 @@
+package org.jeecg.modules.purchaseManage.equipAwaitAccept.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 待验收设备
+ * @Author: jeecg-boot
+ * @Date: 2025-04-01
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_equip_await_accept")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_equip_await_accept对象", description = "待验收设备")
+public class EquipAwaitAccept implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 编号
+     */
+    @Excel(name = "编号", width = 15)
+    @ApiModelProperty(value = "编号")
+    private String number;
+    /**
+     * 设备名称
+     */
+    @Excel(name = "设备名称", width = 15)
+    @ApiModelProperty(value = "设备名称")
+    private String equipmentName;
+    /**
+     * 序列号
+     */
+    @Excel(name = "序列号", width = 15)
+    @ApiModelProperty(value = "序列号")
+    private String serialNumber;
+    /**
+     * 类别(1 设备 2 子设备 3 电脑 4 鼠标  5 电脑外设 6 计量器具 7 特种设备)
+     */
+    @Excel(name = "类别(1 设备 2 子设备 3 电脑 4 鼠标  5 电脑外设 6 计量器具 7 特种设备)", width = 15)
+    @ApiModelProperty(value = "类别(1 设备 2 子设备 3 电脑 4 鼠标  5 电脑外设 6 计量器具 7 特种设备)")
+    private Integer category;
+    /**
+     * 品牌
+     */
+    @Excel(name = "品牌", width = 15)
+    @ApiModelProperty(value = "品牌")
+    private String brand;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+    /**
+     * 供应商
+     */
+    @Excel(name = "供应商", width = 15)
+    @ApiModelProperty(value = "供应商")
+    private String supplier;
+    /**
+     * 购置日期
+     */
+    @Excel(name = "购置日期", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "购置日期")
+    private Date acquiredDate;
+    /**
+     * 采购金额
+     */
+    @Excel(name = "采购金额", width = 15)
+    @ApiModelProperty(value = "采购金额")
+    private BigDecimal purchaseAmount;
+    /**
+     * 负责人
+     */
+    @Excel(name = "负责人", width = 15)
+    @ApiModelProperty(value = "负责人")
+    private String director;
+    /**
+     * 功能位置
+     */
+    @Excel(name = "功能位置", width = 15)
+    @ApiModelProperty(value = "功能位置")
+    private String functionLocation;
+    /**
+     * 部门
+     */
+    @Excel(name = "部门", width = 15)
+    @ApiModelProperty(value = "部门")
+    private String department;
+    /**
+     * 最新验收(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)
+     */
+    @Excel(name = "最新验收(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)", width = 15)
+    @ApiModelProperty(value = "最新验收(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)")
+    private Integer latestAccept;
+    /**
+     * 验收时间
+     */
+    @Excel(name = "验收时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "验收时间")
+    private Date acceptTime;
+    /**
+     * 下步验收(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)
+     */
+    @Excel(name = "下步验收(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)", width = 15)
+    @ApiModelProperty(value = "下步验收(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)")
+    private Integer nextStepAccept;
+}

+ 14 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/mapper/EquipAwaitAcceptMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.purchaseManage.equipAwaitAccept.mapper;
+
+import org.jeecg.modules.purchaseManage.equipAwaitAccept.entity.EquipAwaitAccept;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 待验收设备
+ * @Author: jeecg-boot
+ * @Date:   2025-04-01
+ * @Version: V1.0
+ */
+public interface EquipAwaitAcceptMapper extends BaseMapper<EquipAwaitAccept> {
+
+}

+ 5 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/mapper/xml/EquipAwaitAcceptMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.equipAwaitAccept.mapper.EquipAwaitAcceptMapper">
+
+</mapper>

+ 14 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/service/IEquipAwaitAcceptService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.purchaseManage.equipAwaitAccept.service;
+
+import org.jeecg.modules.purchaseManage.equipAwaitAccept.entity.EquipAwaitAccept;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 待验收设备
+ * @Author: jeecg-boot
+ * @Date:   2025-04-01
+ * @Version: V1.0
+ */
+public interface IEquipAwaitAcceptService extends IService<EquipAwaitAccept> {
+
+}

+ 19 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipAwaitAccept/service/impl/EquipAwaitAcceptServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.purchaseManage.equipAwaitAccept.service.impl;
+
+import org.jeecg.modules.purchaseManage.equipAwaitAccept.entity.EquipAwaitAccept;
+import org.jeecg.modules.purchaseManage.equipAwaitAccept.mapper.EquipAwaitAcceptMapper;
+import org.jeecg.modules.purchaseManage.equipAwaitAccept.service.IEquipAwaitAcceptService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 待验收设备
+ * @Author: jeecg-boot
+ * @Date:   2025-04-01
+ * @Version: V1.0
+ */
+@Service
+public class EquipAwaitAcceptServiceImpl extends ServiceImpl<EquipAwaitAcceptMapper, EquipAwaitAccept> implements IEquipAwaitAcceptService {
+
+}

+ 334 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/controller/EquipmentAcceptController.java

@@ -0,0 +1,334 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.CommonAPI;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.RedisUtil;
+import org.jeecg.common.util.TokenUtils;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentAccept;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentInfo;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentRelatedFile;
+import org.jeecg.modules.purchaseManage.equipmentAccept.service.IEquipmentAcceptService;
+import org.jeecg.modules.purchaseManage.equipmentAccept.service.IEquipmentInfoService;
+import org.jeecg.modules.purchaseManage.equipmentAccept.service.IEquipmentRelatedFileService;
+import org.jeecg.modules.purchaseManage.equipmentAccept.vo.EquipmentAcceptPage;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @Description: 设备验收
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Api(tags = "设备验收")
+@RestController
+@RequestMapping("/purchaseManage/equipmentAccept")
+@Slf4j
+public class EquipmentAcceptController {
+
+    @Lazy
+    @Resource
+    private CommonAPI commonApi;
+
+    @Lazy
+    @Resource
+    private RedisUtil redisUtil;
+
+    @Autowired
+    private IEquipmentAcceptService equipmentAcceptService;
+    @Autowired
+    private IEquipmentRelatedFileService equipmentRelatedFileService;
+    @Autowired
+    private IEquipmentInfoService equipmentInfoService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param equipmentAccept
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "设备验收-分页列表查询")
+    @ApiOperation(value = "设备验收-分页列表查询", notes = "设备验收-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<EquipmentAccept>> queryPageList(EquipmentAccept equipmentAccept,
+                                                        @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                        @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                        HttpServletRequest req) {
+        QueryWrapper<EquipmentAccept> queryWrapper = QueryGenerator.initQueryWrapper(equipmentAccept, req.getParameterMap());
+        Page<EquipmentAccept> page = new Page<EquipmentAccept>(pageNo, pageSize);
+        IPage<EquipmentAccept> pageList = equipmentAcceptService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param equipmentAcceptPage
+     * @return
+     */
+    @AutoLog(value = "设备验收-添加")
+    @ApiOperation(value = "设备验收-添加", notes = "设备验收-添加")
+    @RequiresPermissions("purchaseManage:sbsmzq_equipment_accept:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody EquipmentAcceptPage equipmentAcceptPage) {
+        EquipmentAccept equipmentAccept = new EquipmentAccept();
+        BeanUtils.copyProperties(equipmentAcceptPage, equipmentAccept);
+        equipmentAcceptService.saveMain(equipmentAccept, equipmentAcceptPage.getEquipmentRelatedFileList(), equipmentAcceptPage.getEquipmentInfoList());
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param equipmentAcceptPage
+     * @return
+     */
+    @AutoLog(value = "设备验收-编辑")
+    @ApiOperation(value = "设备验收-编辑", notes = "设备验收-编辑")
+    @RequiresPermissions("purchaseManage:sbsmzq_equipment_accept:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody EquipmentAcceptPage equipmentAcceptPage) {
+        EquipmentAccept equipmentAccept = new EquipmentAccept();
+        BeanUtils.copyProperties(equipmentAcceptPage, equipmentAccept);
+        EquipmentAccept equipmentAcceptEntity = equipmentAcceptService.getById(equipmentAccept.getId());
+        if (equipmentAcceptEntity == null) {
+            return Result.error("未找到对应数据");
+        }
+        equipmentAcceptService.updateMain(equipmentAccept, equipmentAcceptPage.getEquipmentRelatedFileList(), equipmentAcceptPage.getEquipmentInfoList());
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "设备验收-通过id删除")
+    @ApiOperation(value = "设备验收-通过id删除", notes = "设备验收-通过id删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_equipment_accept:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        equipmentAcceptService.delMain(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "设备验收-批量删除")
+    @ApiOperation(value = "设备验收-批量删除", notes = "设备验收-批量删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_equipment_accept:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.equipmentAcceptService.delBatchMain(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "设备验收-通过id查询")
+    @ApiOperation(value = "设备验收-通过id查询", notes = "设备验收-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<EquipmentAccept> queryById(@RequestParam(name = "id", required = true) String id) {
+        EquipmentAccept equipmentAccept = equipmentAcceptService.getById(id);
+        if (equipmentAccept == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(equipmentAccept);
+
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "设备相关文件通过主表ID查询")
+    @ApiOperation(value = "设备相关文件主表ID查询", notes = "设备相关文件-通主表ID查询")
+    @GetMapping(value = "/queryEquipmentRelatedFileByMainId")
+    public Result<List<EquipmentRelatedFile>> queryEquipmentRelatedFileListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<EquipmentRelatedFile> equipmentRelatedFileList = equipmentRelatedFileService.selectByMainId(id);
+        return Result.OK(equipmentRelatedFileList);
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "设备信息通过主表ID查询")
+    @ApiOperation(value = "设备信息主表ID查询", notes = "设备信息-通主表ID查询")
+    @GetMapping(value = "/queryEquipmentInfoByMainId")
+    public Result<List<EquipmentInfo>> queryEquipmentInfoListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<EquipmentInfo> equipmentInfoList = equipmentInfoService.selectByMainId(id);
+        return Result.OK(equipmentInfoList);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param equipmentAccept
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_equipment_accept:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, EquipmentAccept equipmentAccept) {
+        // Step.1 组装查询条件查询数据
+        QueryWrapper<EquipmentAccept> queryWrapper = QueryGenerator.initQueryWrapper(equipmentAccept, request.getParameterMap());
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+        //配置选中数据查询条件
+        String selections = request.getParameter("selections");
+        if (oConvertUtils.isNotEmpty(selections)) {
+            List<String> selectionList = Arrays.asList(selections.split(","));
+            queryWrapper.in("id", selectionList);
+        }
+        //Step.2 获取导出数据
+        List<EquipmentAccept> equipmentAcceptList = equipmentAcceptService.list(queryWrapper);
+
+        // Step.3 组装pageList
+        List<EquipmentAcceptPage> pageList = new ArrayList<EquipmentAcceptPage>();
+        for (EquipmentAccept main : equipmentAcceptList) {
+            EquipmentAcceptPage vo = new EquipmentAcceptPage();
+            BeanUtils.copyProperties(main, vo);
+            List<EquipmentRelatedFile> equipmentRelatedFileList = equipmentRelatedFileService.selectByMainId(main.getId());
+            vo.setEquipmentRelatedFileList(equipmentRelatedFileList);
+            List<EquipmentInfo> equipmentInfoList = equipmentInfoService.selectByMainId(main.getId());
+            vo.setEquipmentInfoList(equipmentInfoList);
+            pageList.add(vo);
+        }
+
+        // Step.4 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        mv.addObject(NormalExcelConstants.FILE_NAME, "设备验收列表");
+        mv.addObject(NormalExcelConstants.CLASS, EquipmentAcceptPage.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("设备验收数据", "导出人:" + sysUser.getRealname(), "设备验收"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_equipment_accept:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            // 获取上传文件对象
+            MultipartFile file = entity.getValue();
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<EquipmentAcceptPage> list = ExcelImportUtil.importExcel(file.getInputStream(), EquipmentAcceptPage.class, params);
+                for (EquipmentAcceptPage page : list) {
+                    EquipmentAccept po = new EquipmentAccept();
+                    BeanUtils.copyProperties(page, po);
+                    equipmentAcceptService.saveMain(po, page.getEquipmentRelatedFileList(), page.getEquipmentInfoList());
+                }
+                return Result.OK("文件导入成功!数据行数:" + list.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.OK("文件导入失败!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "验收单根据采购申请ID查询", notes = "验收单根据采购申请ID查询")
+    @GetMapping(value = "/queryEquipmentAcceptByMainId")
+    public Result<List<EquipmentAccept>> queryEquipmentAcceptByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<EquipmentAccept> equipmentAccepts = equipmentAcceptService.selectByMainId(id);
+        return Result.OK(equipmentAccepts);
+    }
+
+    /**
+     * 分页列表查询(与我相关)
+     *
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "设备验收-分页列表查询(与我相关)", notes = "设备验收-分页列表查询(与我相关)")
+    @GetMapping(value = "/listByUser")
+    public Result<IPage<EquipmentAccept>> queryPageListByUser(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                              HttpServletRequest req) {
+
+        LoginUser loginUser = TokenUtils.getLoginUser(req, commonApi, redisUtil);
+        // 构建查询条件
+        LambdaQueryWrapper<EquipmentAccept> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(EquipmentAccept::getAccepter, loginUser.getId());
+        QueryGenerator.initQueryWrapper(queryWrapper, req.getParameterMap());
+        Page<EquipmentAccept> page = new Page<EquipmentAccept>(pageNo, pageSize);
+        IPage<EquipmentAccept> pageList = equipmentAcceptService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+}

+ 142 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/entity/EquipmentAccept.java

@@ -0,0 +1,142 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 设备验收
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_equipment_accept对象", description = "设备验收")
+@Data
+@TableName("sbsmzq_equipment_accept")
+public class EquipmentAccept implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 编号
+     */
+    @Excel(name = "编号", width = 15)
+    @ApiModelProperty(value = "编号")
+    private String number;
+    /**
+     * 标题
+     */
+    @Excel(name = "标题", width = 15)
+    @ApiModelProperty(value = "标题")
+    private String title;
+    /**
+     * 验收类型(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)
+     */
+    @Excel(name = "验收类型(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)", width = 15)
+    @ApiModelProperty(value = "验收类型(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)")
+    private Integer acceptType;
+    /**
+     * 验收人
+     */
+    @Excel(name = "验收人", width = 15)
+    @ApiModelProperty(value = "验收人")
+    private String accepter;
+    /**
+     * 验收时间
+     */
+    @Excel(name = "验收时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "验收时间")
+    private Date acceptTime;
+    /**
+     * 验收设备
+     */
+    @Excel(name = "验收设备", width = 15)
+    @ApiModelProperty(value = "验收设备")
+    private String acceptEquipment;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    /**
+     * 前置验收单
+     */
+    @Excel(name = "前置验收单", width = 15)
+    @ApiModelProperty(value = "前置验收单")
+    private String preAcceptForm;
+    /**
+     * 随机附件是否完备(0 是 1否)
+     */
+    @Excel(name = "随机附件是否完备(0 是 1否)", width = 15)
+    @ApiModelProperty(value = "随机附件是否完备(0 是 1否)")
+    private Integer completeOrNot;
+    /**
+     * 到货时间
+     */
+    @Excel(name = "到货时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "到货时间")
+    private Date arrivalTime;
+    /**
+     * 到货验收单
+     */
+    @Excel(name = "到货验收单", width = 15)
+    @ApiModelProperty(value = "到货验收单")
+    private String arrivalAcceptForm;
+
+    /**
+     * 采购申请id
+     */
+    @Excel(name = "采购申请id", width = 15)
+    @ApiModelProperty(value = "采购申请id")
+    private String purchaseApplicationId;
+
+
+}

+ 263 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/entity/EquipmentInfo.java

@@ -0,0 +1,263 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 设备信息
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_equipment_info对象", description = "设备信息")
+@Data
+@TableName("sbsmzq_equipment_info")
+public class EquipmentInfo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 设备编号
+     */
+    @Excel(name = "设备编号", width = 15)
+    @ApiModelProperty(value = "设备编号")
+    private String equipmentNum;
+    /**
+     * 资产编号
+     */
+    @Excel(name = "资产编号", width = 15)
+    @ApiModelProperty(value = "资产编号")
+    private String assetNum;
+    /**
+     * 设备名称
+     */
+    @Excel(name = "设备名称", width = 15)
+    @ApiModelProperty(value = "设备名称")
+    private String equipmentName;
+    /**
+     * 单位
+     */
+    @Excel(name = "单位", width = 15)
+    @ApiModelProperty(value = "单位")
+    private String unit;
+    /**
+     * 序列号
+     */
+    @Excel(name = "序列号", width = 15)
+    @ApiModelProperty(value = "序列号")
+    private String serialNum;
+    /**
+     * 类别(1 设备 2 子设备 3 电脑 4 鼠标  5 电脑外设 6 计量器具 7 特种设备)
+     */
+    @Excel(name = "类别(1 设备 2 子设备 3 电脑 4 鼠标  5 电脑外设 6 计量器具 7 特种设备)", width = 15)
+    @ApiModelProperty(value = "类别(1 设备 2 子设备 3 电脑 4 鼠标  5 电脑外设 6 计量器具 7 特种设备)")
+    private Integer category;
+    /**
+     * 品牌
+     */
+    @Excel(name = "品牌", width = 15)
+    @ApiModelProperty(value = "品牌")
+    private String brand;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+    /**
+     * 功能位置
+     */
+    @Excel(name = "功能位置", width = 15)
+    @ApiModelProperty(value = "功能位置")
+    private String functionLocation;
+    /**
+     * 供应商
+     */
+    @Excel(name = "供应商", width = 15)
+    @ApiModelProperty(value = "供应商")
+    private String supplier;
+    /**
+     * 设备来源
+     */
+    @Excel(name = "设备来源", width = 15)
+    @ApiModelProperty(value = "设备来源")
+    private String equipmentSource;
+    /**
+     * 使用状态(0 在用 1 停用)
+     */
+    @Excel(name = "使用状态(0 在用 1 停用)", width = 15)
+    @ApiModelProperty(value = "使用状态(0 在用 1 停用)")
+    private Integer activeState;
+    /**
+     * 设备状态(0 正常  1 停用)
+     */
+    @Excel(name = "设备状态(0 正常  1 停用)", width = 15)
+    @ApiModelProperty(value = "设备状态(0 正常  1 停用)")
+    private Integer equipmentStatus;
+    /**
+     * 设备等级
+     */
+    @Excel(name = "设备等级", width = 15)
+    @ApiModelProperty(value = "设备等级")
+    private Integer equipmentLevel;
+    /**
+     * 负责人
+     */
+    @Excel(name = "负责人", width = 15)
+    @ApiModelProperty(value = "负责人")
+    private String director;
+    /**
+     * 所属部门
+     */
+    @Excel(name = "所属部门", width = 15)
+    @ApiModelProperty(value = "所属部门")
+    private String department;
+    /**
+     * 购置日期
+     */
+    @Excel(name = "购置日期", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "购置日期")
+    private Date acquiredDate;
+    /**
+     * 采购金额
+     */
+    @Excel(name = "采购金额", width = 15)
+    @ApiModelProperty(value = "采购金额")
+    private BigDecimal purchaseAmount;
+    /**
+     * 保修期至
+     */
+    @Excel(name = "保修期至", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "保修期至")
+    private Date warrantyPeriod;
+    /**
+     * 启用日期
+     */
+    @Excel(name = "启用日期", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "启用日期")
+    private Date activationDate;
+    /**
+     * 预计报废日期
+     */
+    @Excel(name = "预计报废日期", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "预计报废日期")
+    private Date expectedScrapDate;
+    /**
+     * 技术参数
+     */
+    @Excel(name = "技术参数", width = 15)
+    @ApiModelProperty(value = "技术参数")
+    private String technicalParameter;
+    /**
+     * 电子标签码
+     */
+    @Excel(name = "电子标签码", width = 15)
+    @ApiModelProperty(value = "电子标签码")
+    private String electronicTagCode;
+    /**
+     * 验收结果(0 合格  1 不合格)
+     */
+    @Excel(name = "验收结果(0 合格  1 不合格)", width = 15)
+    @ApiModelProperty(value = "验收结果(0 合格  1 不合格)")
+    private Integer acceptResults;
+    /**
+     * 下步验收(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)
+     */
+    @Excel(name = "下步验收(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)", width = 15)
+    @ApiModelProperty(value = "下步验收(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)")
+    private Integer nextStepAccept;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    /**
+     * 设备图片
+     */
+    @Excel(name = "设备图片", width = 15)
+    @ApiModelProperty(value = "设备图片")
+    private String equipmentPictures;
+    /**
+     * 功率
+     */
+    @Excel(name = "功率", width = 15)
+    @ApiModelProperty(value = "功率")
+    private BigDecimal power;
+    /**
+     * 重量
+     */
+    @Excel(name = "重量", width = 15)
+    @ApiModelProperty(value = "重量")
+    private BigDecimal weight;
+    /**
+     * 介质
+     */
+    @Excel(name = "介质", width = 15)
+    @ApiModelProperty(value = "介质")
+    private String medium;
+    /**
+     * 是否与生产工艺关联 (0 是 1 否)
+     */
+    @Excel(name = "是否与生产工艺关联 (0 是 1 否)", width = 15)
+    @ApiModelProperty(value = "是否与生产工艺关联 (0 是 1 否)")
+    private Integer productionProcessOrNot;
+    /**
+     * 设备验收id(外键)
+     */
+    @ApiModelProperty(value = "设备验收id(外键)")
+    private String equipmentAcceptId;
+}

+ 116 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/entity/EquipmentRelatedFile.java

@@ -0,0 +1,116 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 设备相关文件
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_equipment_related_file对象", description = "设备相关文件")
+@Data
+@TableName("sbsmzq_equipment_related_file")
+public class EquipmentRelatedFile implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 资料编号
+     */
+    @Excel(name = "资料编号", width = 15)
+    @ApiModelProperty(value = "资料编号")
+    private String dataNum;
+    /**
+     * 资料名称
+     */
+    @Excel(name = "资料名称", width = 15)
+    @ApiModelProperty(value = "资料名称")
+    private String dataName;
+    /**
+     * 资料类型
+     */
+    @Excel(name = "资料类型", width = 15)
+    @ApiModelProperty(value = "资料类型")
+    private String dataType;
+    /**
+     * 文档密级
+     */
+    @Excel(name = "文档密级", width = 15)
+    @ApiModelProperty(value = "文档密级")
+    private String fileClassification;
+    /**
+     * 数量
+     */
+    @Excel(name = "数量", width = 15)
+    @ApiModelProperty(value = "数量")
+    private Integer amount;
+    /**
+     * 说明
+     */
+    @Excel(name = "说明", width = 15)
+    @ApiModelProperty(value = "说明")
+    private String description;
+    /**
+     * 上传人
+     */
+    @Excel(name = "上传人", width = 15)
+    @ApiModelProperty(value = "上传人")
+    private String uploader;
+    /**
+     * 上传时间
+     */
+    @Excel(name = "上传时间", width = 15)
+    @ApiModelProperty(value = "上传时间")
+    private String uploadTime;
+    /**
+     * 设备验收id(外键)
+     */
+    @ApiModelProperty(value = "设备验收id(外键)")
+    private String equipmentAcceptId;
+}

+ 24 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/EquipmentAcceptMapper.java

@@ -0,0 +1,24 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentAccept;
+
+import java.util.List;
+
+/**
+ * @Description: 设备验收
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+public interface EquipmentAcceptMapper extends BaseMapper<EquipmentAccept> {
+
+    /**
+     * 通过采购申请id查询子表数据
+     *
+     * @param mainId 采购申请id
+     * @return List<EquipmentAccept>
+     */
+    public List<EquipmentAccept> selectByMainId(@Param("mainId") String mainId);
+}

+ 31 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/EquipmentInfoMapper.java

@@ -0,0 +1,31 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.mapper;
+
+import java.util.List;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 设备信息
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface EquipmentInfoMapper extends BaseMapper<EquipmentInfo> {
+
+	/**
+	 * 通过主表id删除子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return boolean
+	 */
+	public boolean deleteByMainId(@Param("mainId") String mainId);
+
+  /**
+   * 通过主表id查询子表数据
+   *
+   * @param mainId 主表id
+   * @return List<EquipmentInfo>
+   */
+	public List<EquipmentInfo> selectByMainId(@Param("mainId") String mainId);
+}

+ 31 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/EquipmentRelatedFileMapper.java

@@ -0,0 +1,31 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.mapper;
+
+import java.util.List;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentRelatedFile;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 设备相关文件
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface EquipmentRelatedFileMapper extends BaseMapper<EquipmentRelatedFile> {
+
+	/**
+	 * 通过主表id删除子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return boolean
+	 */
+	public boolean deleteByMainId(@Param("mainId") String mainId);
+
+  /**
+   * 通过主表id查询子表数据
+   *
+   * @param mainId 主表id
+   * @return List<EquipmentRelatedFile>
+   */
+	public List<EquipmentRelatedFile> selectByMainId(@Param("mainId") String mainId);
+}

+ 10 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/xml/EquipmentAcceptMapper.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.equipmentAccept.mapper.EquipmentAcceptMapper">
+
+    <select id="selectByMainId" parameterType="java.lang.String"
+            resultType="org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentAccept">
+        SELECT *
+        FROM sbsmzq_equipment_accept
+        WHERE purchase_application_id = #{mainId}    </select>
+</mapper>

+ 16 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/xml/EquipmentInfoMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.equipmentAccept.mapper.EquipmentInfoMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sbsmzq_equipment_info 
+		WHERE
+			 equipment_accept_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentInfo">
+		SELECT * 
+		FROM  sbsmzq_equipment_info
+		WHERE
+			 equipment_accept_id = #{mainId} 	</select>
+</mapper>

+ 16 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/mapper/xml/EquipmentRelatedFileMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.equipmentAccept.mapper.EquipmentRelatedFileMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sbsmzq_equipment_related_file 
+		WHERE
+			 equipment_accept_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentRelatedFile">
+		SELECT * 
+		FROM  sbsmzq_equipment_related_file
+		WHERE
+			 equipment_accept_id = #{mainId} 	</select>
+</mapper>

+ 63 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/IEquipmentAcceptService.java

@@ -0,0 +1,63 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentAccept;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentInfo;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentRelatedFile;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 设备验收
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+public interface IEquipmentAcceptService extends IService<EquipmentAccept> {
+
+    /**
+     * 添加一对多
+     *
+     * @param equipmentAccept
+     * @param equipmentRelatedFileList
+     * @param equipmentInfoList
+     */
+    public void saveMain(EquipmentAccept equipmentAccept, List<EquipmentRelatedFile> equipmentRelatedFileList, List<EquipmentInfo> equipmentInfoList);
+
+    /**
+     * 修改一对多
+     *
+     * @param equipmentAccept
+     * @param equipmentRelatedFileList
+     * @param equipmentInfoList
+     */
+    public void updateMain(EquipmentAccept equipmentAccept, List<EquipmentRelatedFile> equipmentRelatedFileList, List<EquipmentInfo> equipmentInfoList);
+
+    /**
+     * 删除一对多
+     *
+     * @param id
+     */
+    public void delMain(String id);
+
+    /**
+     * 批量删除一对多
+     *
+     * @param idList
+     */
+    public void delBatchMain(Collection<? extends Serializable> idList);
+
+
+    /**
+     * 通过采购申请id查询数据
+     *
+     * @param mainId 采购申请id
+     * @return List<EquipmentAccept>
+     */
+    public List<EquipmentAccept> selectByMainId(@Param("mainId") String mainId);
+
+
+}

+ 22 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/IEquipmentInfoService.java

@@ -0,0 +1,22 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.service;
+
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 设备信息
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface IEquipmentInfoService extends IService<EquipmentInfo> {
+
+	/**
+	 * 通过主表id查询子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return List<EquipmentInfo>
+	 */
+	public List<EquipmentInfo> selectByMainId(String mainId);
+}

+ 22 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/IEquipmentRelatedFileService.java

@@ -0,0 +1,22 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.service;
+
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentRelatedFile;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface IEquipmentRelatedFileService extends IService<EquipmentRelatedFile> {
+
+	/**
+	 * 通过主表id查询子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return List<EquipmentRelatedFile>
+	 */
+	public List<EquipmentRelatedFile> selectByMainId(String mainId);
+}

+ 105 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/impl/EquipmentAcceptServiceImpl.java

@@ -0,0 +1,105 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentAccept;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentInfo;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentRelatedFile;
+import org.jeecg.modules.purchaseManage.equipmentAccept.mapper.EquipmentAcceptMapper;
+import org.jeecg.modules.purchaseManage.equipmentAccept.mapper.EquipmentInfoMapper;
+import org.jeecg.modules.purchaseManage.equipmentAccept.mapper.EquipmentRelatedFileMapper;
+import org.jeecg.modules.purchaseManage.equipmentAccept.service.IEquipmentAcceptService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 设备验收
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Service
+public class EquipmentAcceptServiceImpl extends ServiceImpl<EquipmentAcceptMapper, EquipmentAccept> implements IEquipmentAcceptService {
+
+    @Autowired
+    private EquipmentAcceptMapper equipmentAcceptMapper;
+    @Autowired
+    private EquipmentRelatedFileMapper equipmentRelatedFileMapper;
+    @Autowired
+    private EquipmentInfoMapper equipmentInfoMapper;
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void saveMain(EquipmentAccept equipmentAccept, List<EquipmentRelatedFile> equipmentRelatedFileList, List<EquipmentInfo> equipmentInfoList) {
+        equipmentAcceptMapper.insert(equipmentAccept);
+        if (equipmentRelatedFileList != null && equipmentRelatedFileList.size() > 0) {
+            for (EquipmentRelatedFile entity : equipmentRelatedFileList) {
+                //外键设置
+                entity.setEquipmentAcceptId(equipmentAccept.getId());
+                equipmentRelatedFileMapper.insert(entity);
+            }
+        }
+        if (equipmentInfoList != null && equipmentInfoList.size() > 0) {
+            for (EquipmentInfo entity : equipmentInfoList) {
+                //外键设置
+                entity.setEquipmentAcceptId(equipmentAccept.getId());
+                equipmentInfoMapper.insert(entity);
+            }
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void updateMain(EquipmentAccept equipmentAccept, List<EquipmentRelatedFile> equipmentRelatedFileList, List<EquipmentInfo> equipmentInfoList) {
+        equipmentAcceptMapper.updateById(equipmentAccept);
+
+        //1.先删除子表数据
+        equipmentRelatedFileMapper.deleteByMainId(equipmentAccept.getId());
+        equipmentInfoMapper.deleteByMainId(equipmentAccept.getId());
+
+        //2.子表数据重新插入
+        if (equipmentRelatedFileList != null && equipmentRelatedFileList.size() > 0) {
+            for (EquipmentRelatedFile entity : equipmentRelatedFileList) {
+                //外键设置
+                entity.setEquipmentAcceptId(equipmentAccept.getId());
+                equipmentRelatedFileMapper.insert(entity);
+            }
+        }
+        if (equipmentInfoList != null && equipmentInfoList.size() > 0) {
+            for (EquipmentInfo entity : equipmentInfoList) {
+                //外键设置
+                entity.setEquipmentAcceptId(equipmentAccept.getId());
+                equipmentInfoMapper.insert(entity);
+            }
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delMain(String id) {
+        equipmentRelatedFileMapper.deleteByMainId(id);
+        equipmentInfoMapper.deleteByMainId(id);
+        equipmentAcceptMapper.deleteById(id);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delBatchMain(Collection<? extends Serializable> idList) {
+        for (Serializable id : idList) {
+            equipmentRelatedFileMapper.deleteByMainId(id.toString());
+            equipmentInfoMapper.deleteByMainId(id.toString());
+            equipmentAcceptMapper.deleteById(id);
+        }
+    }
+
+
+    @Override
+    public List<EquipmentAccept> selectByMainId(String mainId) {
+        return equipmentAcceptMapper.selectByMainId(mainId);
+    }
+
+}

+ 27 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/impl/EquipmentInfoServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.service.impl;
+
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentInfo;
+import org.jeecg.modules.purchaseManage.equipmentAccept.mapper.EquipmentInfoMapper;
+import org.jeecg.modules.purchaseManage.equipmentAccept.service.IEquipmentInfoService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 设备信息
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+@Service
+public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, EquipmentInfo> implements IEquipmentInfoService {
+	
+	@Autowired
+	private EquipmentInfoMapper equipmentInfoMapper;
+	
+	@Override
+	public List<EquipmentInfo> selectByMainId(String mainId) {
+		return equipmentInfoMapper.selectByMainId(mainId);
+	}
+}

+ 27 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/service/impl/EquipmentRelatedFileServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.service.impl;
+
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentRelatedFile;
+import org.jeecg.modules.purchaseManage.equipmentAccept.mapper.EquipmentRelatedFileMapper;
+import org.jeecg.modules.purchaseManage.equipmentAccept.service.IEquipmentRelatedFileService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 设备相关文件
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+@Service
+public class EquipmentRelatedFileServiceImpl extends ServiceImpl<EquipmentRelatedFileMapper, EquipmentRelatedFile> implements IEquipmentRelatedFileService {
+	
+	@Autowired
+	private EquipmentRelatedFileMapper equipmentRelatedFileMapper;
+	
+	@Override
+	public List<EquipmentRelatedFile> selectByMainId(String mainId) {
+		return equipmentRelatedFileMapper.selectByMainId(mainId);
+	}
+}

+ 138 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentAccept/vo/EquipmentAcceptPage.java

@@ -0,0 +1,138 @@
+package org.jeecg.modules.purchaseManage.equipmentAccept.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentInfo;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentRelatedFile;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 设备验收
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Data
+@ApiModel(value = "sbsmzq_equipment_acceptPage对象", description = "设备验收")
+public class EquipmentAcceptPage {
+
+    /**
+     * 主键
+     */
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 编号
+     */
+    @Excel(name = "编号", width = 15)
+    @ApiModelProperty(value = "编号")
+    private String number;
+    /**
+     * 标题
+     */
+    @Excel(name = "标题", width = 15)
+    @ApiModelProperty(value = "标题")
+    private String title;
+    /**
+     * 验收类型(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)
+     */
+    @Excel(name = "验收类型(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)", width = 15)
+    @ApiModelProperty(value = "验收类型(1 到货验收 2 开箱验收  3 安装验收 4 质保验收 5 试运行验收)")
+    private Integer acceptType;
+    /**
+     * 验收人
+     */
+    @Excel(name = "验收人", width = 15)
+    @ApiModelProperty(value = "验收人")
+    private String accepter;
+    /**
+     * 验收时间
+     */
+    @Excel(name = "验收时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "验收时间")
+    private Date acceptTime;
+    /**
+     * 验收设备
+     */
+    @Excel(name = "验收设备", width = 15)
+    @ApiModelProperty(value = "验收设备")
+    private String acceptEquipment;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    /**
+     * 前置验收单
+     */
+    @Excel(name = "前置验收单", width = 15)
+    @ApiModelProperty(value = "前置验收单")
+    private String preAcceptForm;
+    /**
+     * 随机附件是否完备(0 是 1否)
+     */
+    @Excel(name = "随机附件是否完备(0 是 1否)", width = 15)
+    @ApiModelProperty(value = "随机附件是否完备(0 是 1否)")
+    private Integer completeOrNot;
+    /**
+     * 到货时间
+     */
+    @Excel(name = "到货时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "到货时间")
+    private Date arrivalTime;
+    /**
+     * 到货验收单
+     */
+    @Excel(name = "到货验收单", width = 15)
+    @ApiModelProperty(value = "到货验收单")
+    private String arrivalAcceptForm;
+
+    @ExcelCollection(name = "设备相关文件")
+    @ApiModelProperty(value = "设备相关文件")
+    private List<EquipmentRelatedFile> equipmentRelatedFileList;
+    @ExcelCollection(name = "设备信息")
+    @ApiModelProperty(value = "设备信息")
+    private List<EquipmentInfo> equipmentInfoList;
+
+}

+ 177 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/controller/FileApplyCategoryController.java

@@ -0,0 +1,177 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.entity.FileApplyCategory;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.service.IFileApplyCategoryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--适用类别
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Api(tags = "设备相关文件--适用类别")
+@RestController
+@RequestMapping("/purchaseManage/fileApplyCategory")
+@Slf4j
+public class FileApplyCategoryController extends JeecgController<FileApplyCategory, IFileApplyCategoryService> {
+    @Autowired
+    private IFileApplyCategoryService fileApplyCategoryService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param fileApplyCategory
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "设备相关文件--适用类别-分页列表查询")
+    @ApiOperation(value = "设备相关文件--适用类别-分页列表查询", notes = "设备相关文件--适用类别-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<FileApplyCategory>> queryPageList(FileApplyCategory fileApplyCategory,
+                                                          @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                          @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                          HttpServletRequest req) {
+        QueryWrapper<FileApplyCategory> queryWrapper = QueryGenerator.initQueryWrapper(fileApplyCategory, req.getParameterMap());
+        Page<FileApplyCategory> page = new Page<FileApplyCategory>(pageNo, pageSize);
+        IPage<FileApplyCategory> pageList = fileApplyCategoryService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param fileApplyCategory
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--适用类别-添加")
+    @ApiOperation(value = "设备相关文件--适用类别-添加", notes = "设备相关文件--适用类别-添加")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_category:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody FileApplyCategory fileApplyCategory) {
+        fileApplyCategoryService.save(fileApplyCategory);
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param fileApplyCategory
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--适用类别-编辑")
+    @ApiOperation(value = "设备相关文件--适用类别-编辑", notes = "设备相关文件--适用类别-编辑")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_category:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody FileApplyCategory fileApplyCategory) {
+        fileApplyCategoryService.updateById(fileApplyCategory);
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--适用类别-通过id删除")
+    @ApiOperation(value = "设备相关文件--适用类别-通过id删除", notes = "设备相关文件--适用类别-通过id删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_category:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        fileApplyCategoryService.removeById(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--适用类别-批量删除")
+    @ApiOperation(value = "设备相关文件--适用类别-批量删除", notes = "设备相关文件--适用类别-批量删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_category:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.fileApplyCategoryService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "设备相关文件--适用类别-通过id查询")
+    @ApiOperation(value = "设备相关文件--适用类别-通过id查询", notes = "设备相关文件--适用类别-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<FileApplyCategory> queryById(@RequestParam(name = "id", required = true) String id) {
+        FileApplyCategory fileApplyCategory = fileApplyCategoryService.getById(id);
+        if (fileApplyCategory == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(fileApplyCategory);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param fileApplyCategory
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_category:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, FileApplyCategory fileApplyCategory) {
+        return super.exportXls(request, fileApplyCategory, FileApplyCategory.class, "设备相关文件--适用类别");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_category:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, FileApplyCategory.class);
+    }
+
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "适用类别通过文件ID查询", notes = "适用类别通过文件ID查询")
+    @GetMapping(value = "/queryFileApplyCategoryByFileId")
+    public Result<List<FileApplyCategory>> queryFileApplyCategoryByFileId(@RequestParam(name = "id", required = true) String id) {
+        List<FileApplyCategory> fileApplyCategories = fileApplyCategoryService.selectByFileId(id);
+        return Result.OK(fileApplyCategories);
+    }
+
+}

+ 79 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/entity/FileApplyCategory.java

@@ -0,0 +1,79 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 设备相关文件--适用类别
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_file_apply_category")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_file_apply_category对象", description = "设备相关文件--适用类别")
+public class FileApplyCategory implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 类别名称
+     */
+    @Excel(name = "类别名称", width = 15)
+    @ApiModelProperty(value = "类别名称")
+    private String categoryName;
+    /**
+     * 文件id
+     */
+    @Excel(name = "文件id", width = 15)
+    @ApiModelProperty(value = "文件id")
+    private String fileId;
+}

+ 25 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/mapper/FileApplyCategoryMapper.java

@@ -0,0 +1,25 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.entity.FileApplyCategory;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--适用类别
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+public interface FileApplyCategoryMapper extends BaseMapper<FileApplyCategory> {
+
+    /**
+     * 通过文件id查询数据
+     *
+     * @param fileId 文件id
+     * @return List<FileApplyCategory>
+     */
+    public List<FileApplyCategory> selectByFileId(@Param("fileId") String fileId);
+
+}

+ 11 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/mapper/xml/FileApplyCategoryMapper.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.mapper.FileApplyCategoryMapper">
+
+    <select id="selectByFileId" parameterType="java.lang.String"
+            resultType="org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.entity.FileApplyCategory">
+        SELECT *
+        FROM sbsmzq_file_apply_category
+        WHERE file_id = #{fileId}    </select>
+
+</mapper>

+ 26 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/service/IFileApplyCategoryService.java

@@ -0,0 +1,26 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.service;
+
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.entity.FileApplyCategory;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--适用类别
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface IFileApplyCategoryService extends IService<FileApplyCategory> {
+
+    /**
+     * 通过文件id查询数据
+     *
+     * @param fileId 文件id
+     * @return List<FileApplyCategory>
+     */
+    public List<FileApplyCategory> selectByFileId(String fileId);
+
+
+}

+ 32 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyCategory/service/impl/FileApplyCategoryServiceImpl.java

@@ -0,0 +1,32 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.service.impl;
+
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.entity.FileApplyCategory;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.mapper.FileApplyCategoryMapper;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.service.IFileApplyCategoryService;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment;
+import org.jeecg.modules.purchaseManage.purchaseApplication.mapper.PurchaseApplicationAttachmentMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--适用类别
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+@Service
+public class FileApplyCategoryServiceImpl extends ServiceImpl<FileApplyCategoryMapper, FileApplyCategory> implements IFileApplyCategoryService {
+
+    @Autowired
+    private FileApplyCategoryMapper fileApplyCategoryMapper;
+
+    @Override
+    public List<FileApplyCategory> selectByFileId(String fileId) {
+        return fileApplyCategoryMapper.selectByFileId(fileId);
+    }
+
+}

+ 177 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/controller/FileApplyDeviceController.java

@@ -0,0 +1,177 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.entity.FileApplyDevice;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.service.IFileApplyDeviceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--适用设备
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Api(tags = "设备相关文件--适用设备")
+@RestController
+@RequestMapping("/purchaseManage/fileApplyDevice")
+@Slf4j
+public class FileApplyDeviceController extends JeecgController<FileApplyDevice, IFileApplyDeviceService> {
+    @Autowired
+    private IFileApplyDeviceService fileApplyDeviceService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param fileApplyDevice
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "设备相关文件--适用设备-分页列表查询")
+    @ApiOperation(value = "设备相关文件--适用设备-分页列表查询", notes = "设备相关文件--适用设备-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<FileApplyDevice>> queryPageList(FileApplyDevice fileApplyDevice,
+                                                        @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                        @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                        HttpServletRequest req) {
+        QueryWrapper<FileApplyDevice> queryWrapper = QueryGenerator.initQueryWrapper(fileApplyDevice, req.getParameterMap());
+        Page<FileApplyDevice> page = new Page<FileApplyDevice>(pageNo, pageSize);
+        IPage<FileApplyDevice> pageList = fileApplyDeviceService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param fileApplyDevice
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--适用设备-添加")
+    @ApiOperation(value = "设备相关文件--适用设备-添加", notes = "设备相关文件--适用设备-添加")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_device:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody FileApplyDevice fileApplyDevice) {
+        fileApplyDeviceService.save(fileApplyDevice);
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param fileApplyDevice
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--适用设备-编辑")
+    @ApiOperation(value = "设备相关文件--适用设备-编辑", notes = "设备相关文件--适用设备-编辑")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_device:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody FileApplyDevice fileApplyDevice) {
+        fileApplyDeviceService.updateById(fileApplyDevice);
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--适用设备-通过id删除")
+    @ApiOperation(value = "设备相关文件--适用设备-通过id删除", notes = "设备相关文件--适用设备-通过id删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_device:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        fileApplyDeviceService.removeById(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--适用设备-批量删除")
+    @ApiOperation(value = "设备相关文件--适用设备-批量删除", notes = "设备相关文件--适用设备-批量删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_device:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.fileApplyDeviceService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "设备相关文件--适用设备-通过id查询")
+    @ApiOperation(value = "设备相关文件--适用设备-通过id查询", notes = "设备相关文件--适用设备-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<FileApplyDevice> queryById(@RequestParam(name = "id", required = true) String id) {
+        FileApplyDevice fileApplyDevice = fileApplyDeviceService.getById(id);
+        if (fileApplyDevice == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(fileApplyDevice);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param fileApplyDevice
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_device:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, FileApplyDevice fileApplyDevice) {
+        return super.exportXls(request, fileApplyDevice, FileApplyDevice.class, "设备相关文件--适用设备");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_file_apply_device:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, FileApplyDevice.class);
+    }
+
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "适用设备通过文件ID查询", notes = "适用设备通过文件ID查询")
+    @GetMapping(value = "/queryFileApplyDeviceByFileId")
+    public Result<List<FileApplyDevice>> queryFileApplyDeviceByFileId(@RequestParam(name = "id", required = true) String id) {
+        List<FileApplyDevice> fileApplyDevices = fileApplyDeviceService.selectByFileId(id);
+        return Result.OK(fileApplyDevices);
+    }
+
+}

+ 103 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/entity/FileApplyDevice.java

@@ -0,0 +1,103 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 设备相关文件--适用设备
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_file_apply_device")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_file_apply_device对象", description = "设备相关文件--适用设备")
+public class FileApplyDevice implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 设备编号
+     */
+    @Excel(name = "设备编号", width = 15)
+    @ApiModelProperty(value = "设备编号")
+    private String equipmentNum;
+    /**
+     * 设备名称
+     */
+    @Excel(name = "设备名称", width = 15)
+    @ApiModelProperty(value = "设备名称")
+    private String equipmentName;
+    /**
+     * 品牌
+     */
+    @Excel(name = "品牌", width = 15)
+    @ApiModelProperty(value = "品牌")
+    private String brand;
+    /**
+     * 类别
+     */
+    @Excel(name = "类别", width = 15)
+    @ApiModelProperty(value = "类别")
+    private String category;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+    /**
+     * 文件id
+     */
+    @Excel(name = "文件id", width = 15)
+    @ApiModelProperty(value = "文件id")
+    private String fileId;
+}

+ 26 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/mapper/FileApplyDeviceMapper.java

@@ -0,0 +1,26 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.entity.FileApplyCategory;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.entity.FileApplyDevice;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--适用设备
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+public interface FileApplyDeviceMapper extends BaseMapper<FileApplyDevice> {
+
+    /**
+     * 通过文件id查询数据
+     *
+     * @param fileId 文件id
+     * @return List<FileApplyDevice>
+     */
+    public List<FileApplyDevice> selectByFileId(@Param("fileId") String fileId);
+
+}

+ 11 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/mapper/xml/FileApplyDeviceMapper.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.mapper.FileApplyDeviceMapper">
+
+    <select id="selectByFileId" parameterType="java.lang.String"
+            resultType="org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.entity.FileApplyDevice">
+        SELECT *
+        FROM sbsmzq_file_apply_device
+        WHERE file_id = #{fileId}    </select>
+
+</mapper>

+ 25 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/service/IFileApplyDeviceService.java

@@ -0,0 +1,25 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.service;
+
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyCategory.entity.FileApplyCategory;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.entity.FileApplyDevice;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--适用设备
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface IFileApplyDeviceService extends IService<FileApplyDevice> {
+
+    /**
+     * 通过文件id查询数据
+     *
+     * @param fileId 文件id
+     * @return List<FileApplyDevice>
+     */
+    public List<FileApplyDevice> selectByFileId(String fileId);
+
+}

+ 30 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileApplyDevice/service/impl/FileApplyDeviceServiceImpl.java

@@ -0,0 +1,30 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.entity.FileApplyDevice;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.mapper.FileApplyDeviceMapper;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.service.IFileApplyDeviceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--适用设备
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Service
+public class FileApplyDeviceServiceImpl extends ServiceImpl<FileApplyDeviceMapper, FileApplyDevice> implements IFileApplyDeviceService {
+
+
+    @Autowired
+    private FileApplyDeviceMapper fileApplyDeviceMapper;
+
+    @Override
+    public List<FileApplyDevice> selectByFileId(String fileId) {
+        return fileApplyDeviceMapper.selectByFileId(fileId);
+    }
+
+}

+ 176 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/controller/FileAttachmentsController.java

@@ -0,0 +1,176 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.entity.FileAttachments;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.service.IFileAttachmentsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--相关附件
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Api(tags = "设备相关文件--相关附件")
+@RestController
+@RequestMapping("/purchaseManage/fileAttachments")
+@Slf4j
+public class FileAttachmentsController extends JeecgController<FileAttachments, IFileAttachmentsService> {
+    @Autowired
+    private IFileAttachmentsService fileAttachmentsService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param fileAttachments
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "设备相关文件--相关附件-分页列表查询")
+    @ApiOperation(value = "设备相关文件--相关附件-分页列表查询", notes = "设备相关文件--相关附件-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<FileAttachments>> queryPageList(FileAttachments fileAttachments,
+                                                        @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                        @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                        HttpServletRequest req) {
+        QueryWrapper<FileAttachments> queryWrapper = QueryGenerator.initQueryWrapper(fileAttachments, req.getParameterMap());
+        Page<FileAttachments> page = new Page<FileAttachments>(pageNo, pageSize);
+        IPage<FileAttachments> pageList = fileAttachmentsService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param fileAttachments
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--相关附件-添加")
+    @ApiOperation(value = "设备相关文件--相关附件-添加", notes = "设备相关文件--相关附件-添加")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_attachments:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody FileAttachments fileAttachments) {
+        fileAttachmentsService.save(fileAttachments);
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param fileAttachments
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--相关附件-编辑")
+    @ApiOperation(value = "设备相关文件--相关附件-编辑", notes = "设备相关文件--相关附件-编辑")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_attachments:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody FileAttachments fileAttachments) {
+        fileAttachmentsService.updateById(fileAttachments);
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--相关附件-通过id删除")
+    @ApiOperation(value = "设备相关文件--相关附件-通过id删除", notes = "设备相关文件--相关附件-通过id删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_attachments:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        fileAttachmentsService.removeById(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--相关附件-批量删除")
+    @ApiOperation(value = "设备相关文件--相关附件-批量删除", notes = "设备相关文件--相关附件-批量删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_attachments:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.fileAttachmentsService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "设备相关文件--相关附件-通过id查询")
+    @ApiOperation(value = "设备相关文件--相关附件-通过id查询", notes = "设备相关文件--相关附件-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<FileAttachments> queryById(@RequestParam(name = "id", required = true) String id) {
+        FileAttachments fileAttachments = fileAttachmentsService.getById(id);
+        if (fileAttachments == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(fileAttachments);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param fileAttachments
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_file_attachments:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, FileAttachments fileAttachments) {
+        return super.exportXls(request, fileAttachments, FileAttachments.class, "设备相关文件--相关附件");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_file_attachments:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, FileAttachments.class);
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "相关附件通过文件ID查询", notes = "相关附件通过文件ID查询")
+    @GetMapping(value = "/queryFileAttachmentsByFileId")
+    public Result<List<FileAttachments>> queryFileAttachmentsByFileId(@RequestParam(name = "id", required = true) String id) {
+        List<FileAttachments> fileAttachments = fileAttachmentsService.selectByFileId(id);
+        return Result.OK(fileAttachments);
+    }
+
+}

+ 85 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/entity/FileAttachments.java

@@ -0,0 +1,85 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 设备相关文件--相关附件
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_file_attachments")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_file_attachments对象", description = "设备相关文件--相关附件")
+public class FileAttachments implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 文件名称
+     */
+    @Excel(name = "文件名称", width = 15)
+    @ApiModelProperty(value = "文件名称")
+    private String fileName;
+    /**
+     * 文件地址
+     */
+    @Excel(name = "文件地址", width = 15)
+    @ApiModelProperty(value = "文件地址")
+    private String fileAddress;
+    /**
+     * 文件id
+     */
+    @Excel(name = "文件id", width = 15)
+    @ApiModelProperty(value = "文件id")
+    private String fileId;
+}

+ 26 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/mapper/FileAttachmentsMapper.java

@@ -0,0 +1,26 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.mapper;
+
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileApplyDevice.entity.FileApplyDevice;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.entity.FileAttachments;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--相关附件
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface FileAttachmentsMapper extends BaseMapper<FileAttachments> {
+
+
+    /**
+     * 通过文件id查询数据
+     *
+     * @param fileId 文件id
+     * @return List<FileAttachments>
+     */
+    public List<FileAttachments> selectByFileId(String fileId);
+
+}

+ 11 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/mapper/xml/FileAttachmentsMapper.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.mapper.FileAttachmentsMapper">
+
+    <select id="selectByFileId" parameterType="java.lang.String"
+            resultType="org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.entity.FileAttachments">
+        SELECT *
+        FROM sbsmzq_file_attachments
+        WHERE file_id = #{fileId}    </select>
+
+</mapper>

+ 24 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/service/IFileAttachmentsService.java

@@ -0,0 +1,24 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.entity.FileAttachments;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--相关附件
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+public interface IFileAttachmentsService extends IService<FileAttachments> {
+
+    /**
+     * 通过文件id查询数据
+     *
+     * @param fileId 文件id
+     * @return List<FileAttachments>
+     */
+    public List<FileAttachments> selectByFileId(String fileId);
+
+}

+ 29 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileAttachments/service/impl/FileAttachmentsServiceImpl.java

@@ -0,0 +1,29 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.entity.FileAttachments;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.mapper.FileAttachmentsMapper;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.service.IFileAttachmentsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--相关附件
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Service
+public class FileAttachmentsServiceImpl extends ServiceImpl<FileAttachmentsMapper, FileAttachments> implements IFileAttachmentsService {
+
+
+    @Autowired
+    private FileAttachmentsMapper fileAttachmentsMapper;
+
+    @Override
+    public List<FileAttachments> selectByFileId(String fileId) {
+        return fileAttachmentsMapper.selectByFileId(fileId);
+    }
+}

+ 176 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/controller/FileVisibilityController.java

@@ -0,0 +1,176 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.entity.FileVisibility;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.service.IFileVisibilityService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--可见范围
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Api(tags = "设备相关文件--可见范围")
+@RestController
+@RequestMapping("/purchaseManage/fileVisibility")
+@Slf4j
+public class FileVisibilityController extends JeecgController<FileVisibility, IFileVisibilityService> {
+    @Autowired
+    private IFileVisibilityService fileVisibilityService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param fileVisibility
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "设备相关文件--可见范围-分页列表查询")
+    @ApiOperation(value = "设备相关文件--可见范围-分页列表查询", notes = "设备相关文件--可见范围-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<FileVisibility>> queryPageList(FileVisibility fileVisibility,
+                                                       @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                       @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                       HttpServletRequest req) {
+        QueryWrapper<FileVisibility> queryWrapper = QueryGenerator.initQueryWrapper(fileVisibility, req.getParameterMap());
+        Page<FileVisibility> page = new Page<FileVisibility>(pageNo, pageSize);
+        IPage<FileVisibility> pageList = fileVisibilityService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param fileVisibility
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--可见范围-添加")
+    @ApiOperation(value = "设备相关文件--可见范围-添加", notes = "设备相关文件--可见范围-添加")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_visibility:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody FileVisibility fileVisibility) {
+        fileVisibilityService.save(fileVisibility);
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param fileVisibility
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--可见范围-编辑")
+    @ApiOperation(value = "设备相关文件--可见范围-编辑", notes = "设备相关文件--可见范围-编辑")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_visibility:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody FileVisibility fileVisibility) {
+        fileVisibilityService.updateById(fileVisibility);
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--可见范围-通过id删除")
+    @ApiOperation(value = "设备相关文件--可见范围-通过id删除", notes = "设备相关文件--可见范围-通过id删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_visibility:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        fileVisibilityService.removeById(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "设备相关文件--可见范围-批量删除")
+    @ApiOperation(value = "设备相关文件--可见范围-批量删除", notes = "设备相关文件--可见范围-批量删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_file_visibility:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.fileVisibilityService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "设备相关文件--可见范围-通过id查询")
+    @ApiOperation(value = "设备相关文件--可见范围-通过id查询", notes = "设备相关文件--可见范围-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<FileVisibility> queryById(@RequestParam(name = "id", required = true) String id) {
+        FileVisibility fileVisibility = fileVisibilityService.getById(id);
+        if (fileVisibility == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(fileVisibility);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param fileVisibility
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_file_visibility:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, FileVisibility fileVisibility) {
+        return super.exportXls(request, fileVisibility, FileVisibility.class, "设备相关文件--可见范围");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_file_visibility:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, FileVisibility.class);
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "可见范围通过文件ID查询", notes = "可见范围通过文件ID查询")
+    @GetMapping(value = "/queryFileVisibilityByFileId")
+    public Result<List<FileVisibility>> queryFileVisibilityByFileId(@RequestParam(name = "id", required = true) String id) {
+        List<FileVisibility> fileVisibilities = fileVisibilityService.selectByFileId(id);
+        return Result.OK(fileVisibilities);
+    }
+
+}

+ 91 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/entity/FileVisibility.java

@@ -0,0 +1,91 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 设备相关文件--可见范围
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_file_visibility")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_file_visibility对象", description = "设备相关文件--可见范围")
+public class FileVisibility implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 类型
+     */
+    @Excel(name = "类型", width = 15)
+    @ApiModelProperty(value = "类型")
+    private Integer type;
+    /**
+     * 编号
+     */
+    @Excel(name = "编号", width = 15)
+    @ApiModelProperty(value = "编号")
+    private String number;
+    /**
+     * 部门/人员
+     */
+    @Excel(name = "部门/人员", width = 15)
+    @ApiModelProperty(value = "部门/人员")
+    private String departmentOrStaff;
+    /**
+     * 文件id
+     */
+    @Excel(name = "文件id", width = 15)
+    @ApiModelProperty(value = "文件id")
+    private String fileId;
+}

+ 25 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/mapper/FileVisibilityMapper.java

@@ -0,0 +1,25 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.entity.FileVisibility;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--可见范围
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+public interface FileVisibilityMapper extends BaseMapper<FileVisibility> {
+
+
+    /**
+     * 通过文件id查询数据
+     *
+     * @param fileId 文件id
+     * @return List<FileVisibility>
+     */
+    public List<FileVisibility> selectByFileId(String fileId);
+
+}

+ 11 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/mapper/xml/FileVisibilityMapper.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.mapper.FileVisibilityMapper">
+
+    <select id="selectByFileId" parameterType="java.lang.String"
+            resultType="org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.entity.FileVisibility">
+        SELECT *
+        FROM sbsmzq_file_visibility
+        WHERE file_id = #{fileId}    </select>
+
+</mapper>

+ 25 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/service/IFileVisibilityService.java

@@ -0,0 +1,25 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.service;
+
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileAttachments.entity.FileAttachments;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.entity.FileVisibility;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--可见范围
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface IFileVisibilityService extends IService<FileVisibility> {
+
+    /**
+     * 通过文件id查询数据
+     *
+     * @param fileId 文件id
+     * @return List<FileVisibility>
+     */
+    public List<FileVisibility> selectByFileId(String fileId);
+
+}

+ 29 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/equipmentRelatedFile/fileVisibility/service/impl/FileVisibilityServiceImpl.java

@@ -0,0 +1,29 @@
+package org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.entity.FileVisibility;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.mapper.FileVisibilityMapper;
+import org.jeecg.modules.purchaseManage.equipmentRelatedFile.fileVisibility.service.IFileVisibilityService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Description: 设备相关文件--可见范围
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Service
+public class FileVisibilityServiceImpl extends ServiceImpl<FileVisibilityMapper, FileVisibility> implements IFileVisibilityService {
+
+    @Autowired
+    private FileVisibilityMapper fileVisibilityMapper;
+
+    @Override
+    public List<FileVisibility> selectByFileId(String fileId) {
+        return fileVisibilityMapper.selectByFileId(fileId);
+    }
+
+}

+ 36 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/controller/FileController.java

@@ -0,0 +1,36 @@
+package org.jeecg.modules.purchaseManage.fileUpload.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.purchaseManage.fileUpload.service.FileService;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * @Author: llp
+ * Date: 2025-04-09 16:20
+ * @Description:
+ */
+@Api(tags = "上传文件")
+@RestController
+@RequestMapping("/purchaseManage/fileUpload")
+@Slf4j
+public class FileController {
+
+    private final FileService fileService;
+
+    public FileController(FileService fileService) {
+        this.fileService = fileService;
+    }
+
+    @ApiOperation(value="图片上传", notes="图片上传")
+    @PostMapping("uploadImage")
+    public Result<String> upload(MultipartFile file) throws Exception {
+        String s = fileService.uploadFile(file);
+        return Result.OK("上传成功", s);
+    }
+}

+ 15 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/dto/ImgUploadDTO.java

@@ -0,0 +1,15 @@
+package org.jeecg.modules.purchaseManage.fileUpload.dto;
+
+import lombok.Data;
+
+/**
+ * @Author: llp
+ * Date: 2025-04-09 15:21
+ * @Description:
+ */
+@Data
+public class ImgUploadDTO {
+
+    private String img;
+    private String type;
+}

+ 21 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/exception/FileNameLengthLimitExceededException.java

@@ -0,0 +1,21 @@
+package org.jeecg.modules.purchaseManage.fileUpload.exception;
+
+/**
+ * @Author: llp
+ * Date: 2025-04-09 15:28
+ * @Description: 文件超出限制异常类
+ */
+public class FileNameLengthLimitExceededException extends RuntimeException {
+
+    public FileNameLengthLimitExceededException() {
+        super();
+    }
+
+    /**
+     * 定义有参构造方法
+     */
+    public FileNameLengthLimitExceededException(String message) {
+        super(message);
+    }
+
+}

+ 19 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/exception/FileSizeLimitExceededException.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.purchaseManage.fileUpload.exception;
+
+/**
+ * @Author: llp
+ * Date: 2025-04-09 15:38
+ * @Description:
+ */
+public class FileSizeLimitExceededException extends RuntimeException {
+    public FileSizeLimitExceededException() {
+        super();
+    }
+
+    /**
+     * 定义有参构造方法
+     */
+    public FileSizeLimitExceededException(String message) {
+        super(message);
+    }
+}

+ 20 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/exception/FileUploadTypeException.java

@@ -0,0 +1,20 @@
+package org.jeecg.modules.purchaseManage.fileUpload.exception;
+
+/**
+ * @Author: llp
+ * Date: 2025-04-09 15:47
+ * @Description:
+ */
+public class FileUploadTypeException extends RuntimeException {
+
+    public FileUploadTypeException() {
+        super();
+    }
+
+    /**
+     * 定义有参构造方法
+     */
+    public FileUploadTypeException(String message) {
+        super(message);
+    }
+}

+ 36 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/service/FileService.java

@@ -0,0 +1,36 @@
+package org.jeecg.modules.purchaseManage.fileUpload.service;
+
+
+import org.jeecg.modules.purchaseManage.fileUpload.dto.ImgUploadDTO;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.ByteArrayOutputStream;
+
+/**
+ * @Author: llp
+ * Date: 2025-04-09 15:46
+ * @Description:
+ */
+public interface FileService {
+    /**
+     * 文件上传接口
+     *
+     * @param file 上传的文件
+     * @return 访问地址
+     * @throws Exception
+     */
+    String uploadFile(MultipartFile file) throws Exception;
+
+    String uploadFile(ByteArrayOutputStream file, String name) throws Exception;
+
+    String uploadVideo(MultipartFile file) throws Exception;
+
+    /**
+     * base64 文件上传接口
+     *
+     * @param img 上传的文件
+     * @return 访问地址
+     * @throws Exception
+     */
+    String uploadFileBase64(ImgUploadDTO img);
+}

+ 98 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/service/impl/LocalFileService.java

@@ -0,0 +1,98 @@
+package org.jeecg.modules.purchaseManage.fileUpload.service.impl;
+
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.jeecg.modules.purchaseManage.fileUpload.dto.ImgUploadDTO;
+import org.jeecg.modules.purchaseManage.fileUpload.exception.FileUploadTypeException;
+import org.jeecg.modules.purchaseManage.fileUpload.service.FileService;
+import org.jeecg.modules.purchaseManage.fileUpload.utils.FileUploadUtils;
+import org.jeecg.modules.purchaseManage.fileUpload.utils.MimeTypeUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.ByteArrayOutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.stream.Collectors;
+
+/**
+ * @Author: llp
+ * Date: 2025-04-09 16:18
+ * @Description:
+ */
+@Service
+@Slf4j
+public class LocalFileService implements FileService {
+
+
+    public static final String LOCAL_FILE_PREFIX = "zgzt";
+    public static final String DOMAIN = "http://192.168.1.6/";
+    public static final String LOCAL_FILE_PATH = "E:\\files\\image";
+
+
+    @Override
+    public String uploadFile(MultipartFile file) throws Exception {
+        String name = FileUploadUtils.upload(LOCAL_FILE_PATH, file);
+        String url = DOMAIN + LOCAL_FILE_PREFIX + name;
+        return url;
+    }
+
+    @Override
+    public String uploadFile(ByteArrayOutputStream file, String name) throws Exception {
+
+        String upload = FileUploadUtils.upload(LOCAL_FILE_PATH, name, file);
+        String url = DOMAIN + LOCAL_FILE_PREFIX + upload;
+        return url;
+    }
+
+    @Override
+    public String uploadVideo(MultipartFile file) throws Exception {
+        String name = FileUploadUtils.upload(LOCAL_FILE_PATH, file, MimeTypeUtils.VIDEO_EXTENSION);
+        String url = DOMAIN + LOCAL_FILE_PREFIX + name;
+        return url;
+    }
+
+    @Override
+    public String uploadFileBase64(ImgUploadDTO imgStr) {
+
+        String img = imgStr.getImg();
+        img = img.replaceAll(" ", "+");
+        OutputStream out;
+        byte[] b;
+        try {
+            String[] split = imgStr.getType().split("/");
+            boolean allowedExtension = FileUploadUtils.isAllowedExtension(split[1], MimeTypeUtils.IMAGE_EXTENSION);
+            if (!allowedExtension) {
+                String collect = Arrays.stream(MimeTypeUtils.IMAGE_EXTENSION).collect(Collectors.joining(","));
+                log.error("格式不支持", split[1]);
+                throw new FileUploadTypeException("只支持" + collect + "的图片格式");
+            }
+
+            //去除base64 prefix
+            b = Base64.decodeBase64(new String(img).getBytes());
+            for (int i = 0; i < b.length; ++i) {
+                // 调整异常数据
+                if (b[i] < 0) {
+                    b[i] += 256;
+                }
+            }
+
+            //生成文件名
+            String imgName = FileUploadUtils.getRandomFileName() + "." + split[1];
+
+            String path = LOCAL_FILE_PATH + imgName;
+            out = new FileOutputStream(path);
+            out.write(b);
+            out.flush();
+            out.close();
+            String url = DOMAIN + LOCAL_FILE_PREFIX + "/" + imgName;
+            return url;
+        } catch (IOException e) {
+            throw new FileUploadTypeException("文件上传失败");
+        }
+
+    }
+}

+ 191 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/utils/DateUtils.java

@@ -0,0 +1,191 @@
+package org.jeecg.modules.purchaseManage.fileUpload.utils;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import java.lang.management.ManagementFactory;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * 时间工具类
+ *
+ * @author llp
+ */
+public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
+    public static String YYYY = "yyyy";
+
+    public static String YYYY_MM = "yyyy-MM";
+
+    public static String YYYY_MM_DD = "yyyy-MM-dd";
+
+    public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
+
+    public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
+
+    private static String[] parsePatterns = {
+            "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
+            "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
+            "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
+
+    /**
+     * 获取当前Date型日期
+     *
+     * @return Date() 当前日期
+     */
+    public static Date getNowDate() {
+        return new Date();
+    }
+
+    /**
+     * 获取当前日期, 默认格式为yyyy-MM-dd
+     *
+     * @return String
+     */
+    public static String getDate() {
+        return dateTimeNow(YYYY_MM_DD);
+    }
+
+    public static final String getTime() {
+        return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
+    }
+
+    public static final String dateTimeNow() {
+        return dateTimeNow(YYYYMMDDHHMMSS);
+    }
+
+    public static final String dateTimeNow(final String format) {
+        return parseDateToStr(format, new Date());
+    }
+
+    public static final String dateTime(final Date date) {
+        return parseDateToStr(YYYY_MM_DD, date);
+    }
+
+    public static final String parseDateToStr(final String format, final Date date) {
+        if (null == date) {
+            return null;
+        }
+        return new SimpleDateFormat(format).format(date);
+    }
+
+    public static final Date dateTime(final String format, final String ts) {
+        try {
+            return new SimpleDateFormat(format).parse(ts);
+        } catch (ParseException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * 日期路径 即年/月/日 如2018/08/08
+     */
+    public static final String datePath() {
+        Date now = new Date();
+        return DateFormatUtils.format(now, "yyyy/MM/dd");
+    }
+
+    /**
+     * 日期路径 即年/月/日 如20180808
+     */
+    public static final String dateTime() {
+        Date now = new Date();
+        return DateFormatUtils.format(now, "yyyyMMdd");
+    }
+
+    public static final String dateYYYYMMDDHHMMSS() {
+        Date now = new Date();
+        return DateFormatUtils.format(now, DateUtils.YYYYMMDDHHMMSS);
+    }
+
+    /**
+     * 日期型字符串转化为日期 格式
+     */
+    public static Date parseDate(Object str) {
+        if (str == null) {
+            return null;
+        }
+        try {
+            return parseDate(str.toString(), parsePatterns);
+        } catch (ParseException e) {
+            return null;
+        }
+    }
+
+    /**
+     * 获取服务器启动时间
+     */
+    public static Date getServerStartDate() {
+        long time = ManagementFactory.getRuntimeMXBean().getStartTime();
+        return new Date(time);
+    }
+
+    /**
+     * 计算两个时间差
+     */
+    public static String getDatePoor(Date endDate, Date nowDate) {
+        long nd = 1000 * 24 * 60 * 60;
+        long nh = 1000 * 60 * 60;
+        long nm = 1000 * 60;
+        // long ns = 1000;
+        // 获得两个时间的毫秒时间差异
+        long diff = endDate.getTime() - nowDate.getTime();
+        // 计算差多少天
+        long day = diff / nd;
+        // 计算差多少小时
+        long hour = diff % nd / nh;
+        // 计算差多少分钟
+        long min = diff % nd % nh / nm;
+        // 计算差多少秒//输出结果
+        // long sec = diff % nd % nh % nm / ns;
+        return day + "天" + hour + "小时" + min + "分钟";
+    }
+
+    public static long getDateHour(Date endDate, Date nowDate) {
+        long nd = 1000 * 24 * 60 * 60;
+        long nh = 1000 * 60 * 60;
+        long nm = 1000 * 60;
+        // long ns = 1000;
+        // 获得两个时间的毫秒时间差异
+        long diff = endDate.getTime() - nowDate.getTime();
+        // 计算差多少天
+
+        // 计算差多少小时
+        long hour = diff % nd / nh;
+        // 计算差多少分钟
+
+        return hour;
+    }
+
+    /***
+     * 根据出生日期计算年龄
+     */
+
+    public static int getAgeByBirth(Date birthday) {
+        //Calendar:日历
+        /*从Calendar对象中或得一个Date对象*/
+        Calendar cal = Calendar.getInstance();
+        /*把出生日期放入Calendar类型的bir对象中,进行Calendar和Date类型进行转换*/
+        Calendar bir = Calendar.getInstance();
+        bir.setTime(birthday);/*如果生日大于当前日期,则抛出异常:出生日期不能大于当前日期*/
+        if (cal.before(birthday)) {
+            return 0;
+        }
+        /*取出当前年月日*/
+        int yearNow = cal.get(Calendar.YEAR);
+        int monthNow = cal.get(Calendar.MONTH);
+        int dayNow = cal.get(Calendar.DAY_OF_MONTH);
+        /*取出出生年月日*/
+        int yearBirth = bir.get(Calendar.YEAR);
+        int monthBirth = bir.get(Calendar.MONTH);
+        int dayBirth = bir.get(Calendar.DAY_OF_MONTH);
+        /*大概年龄是当前年减去出生年*/
+        int age = yearNow - yearBirth;
+        /*如果出当前月小与出生月,或者当前月等于出生月但是当前日小于出生日,那么年龄age就减一岁*/
+        if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) {
+            age--;
+        }
+        return age;
+    }
+}

+ 209 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/utils/FileUploadUtils.java

@@ -0,0 +1,209 @@
+package org.jeecg.modules.purchaseManage.fileUpload.utils;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.io.FilenameUtils;
+import org.jeecg.modules.purchaseManage.fileUpload.exception.FileNameLengthLimitExceededException;
+import org.jeecg.modules.purchaseManage.fileUpload.exception.FileSizeLimitExceededException;
+import org.jeecg.modules.purchaseManage.fileUpload.exception.FileUploadTypeException;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.util.StringUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Random;
+import java.util.UUID;
+
+/**
+ * @Author: llp
+ * Date: 2025-04-09 15:32
+ * @Description:文件上传工具类
+ */
+@Slf4j
+public class FileUploadUtils {
+    /**
+     * 默认最大 大小 50M
+     */
+    public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024;
+
+    /**
+     * 默认的文件名最大长度 200
+     */
+    public static final int DEFAULT_FILE_NAME_LENGTH = 200;
+
+    /**
+     * 资源映射路径 前缀
+     */
+    @Value("${file.prefix}")
+    public String localFilePrefix;
+
+
+    /**
+     * 根据文件路径上传
+     *
+     * @param baseDir 相对应用的基目录
+     * @param file    上传的文件
+     * @return 文件名称
+     * @throws IOException
+     */
+    public static String upload(String baseDir, MultipartFile file) throws IOException {
+
+        try {
+            return upload(baseDir, file, MimeTypeUtils.IMAGE_EXTENSION);
+        } catch (Exception e) {
+            throw new IOException(e.getMessage(), e);
+        }
+
+    }
+
+    public static String upload(String baseDir, MultipartFile file, String[] allowedExtension) throws IOException {
+
+
+        int fileNameLength = file.getOriginalFilename().length();
+        if (fileNameLength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) {
+            throw new FileNameLengthLimitExceededException("文件名字超出长度,最大长度为" + FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
+        }
+
+        assertAllowed(file, allowedExtension);
+        String fileName = extractFilename(file);
+        File desc = getAbsoluteFile(baseDir, fileName);
+        file.transferTo(desc);
+        String pathFileName = getPathFileName(fileName);
+        return pathFileName;
+    }
+
+
+    public static String upload(String baseDir, String name, ByteArrayOutputStream byteArrayOutputStream) throws IOException {
+
+        FileOutputStream outputStream = null;
+        try {
+            name = DateUtils.datePath() + "/" + name;
+            File desc = getAbsoluteFile(baseDir, name);
+            outputStream = new FileOutputStream(desc);
+            outputStream.write(byteArrayOutputStream.toByteArray());
+            return getPathFileName(name);
+        } finally {
+            if (outputStream != null) {
+                outputStream.close();
+            }
+
+        }
+
+
+    }
+
+
+    private static String getPathFileName(String fileName) throws IOException {
+        String pathFileName = "/" + fileName;
+        return pathFileName;
+    }
+
+    private static File getAbsoluteFile(String uploadDir, String fileName) throws IOException {
+        File desc = new File(uploadDir + File.separator + fileName);
+
+        if (!desc.exists()) {
+            if (!desc.getParentFile().exists()) {
+                boolean mkdirs = desc.getParentFile().mkdirs();
+                log.info("文件是否创建" + mkdirs);
+            }
+        }
+        return desc;
+    }
+
+    /**
+     * 编码文件名
+     */
+    public static final String extractFilename(MultipartFile file) {
+        String originalFilename = file.getOriginalFilename();
+        String extension = getExtension(file);
+
+        // 去掉扩展名部分(避免重复 .jpg.jpg)
+        String baseName = originalFilename != null && originalFilename.contains(".")
+                ? originalFilename.substring(0, originalFilename.lastIndexOf("."))
+                : originalFilename;
+
+        String randomPart = UUID.randomUUID().toString().substring(0, 8); // 更整齐一点
+        String fileName = DateUtils.datePath() + "/" + baseName + "_" + randomPart + "." + extension;
+
+        return fileName;
+    }
+
+
+    /**
+     * 文件大小校验
+     *
+     * @param file 上传的文件
+     * @return
+     */
+
+    public static final void assertAllowed(MultipartFile file, String[] allowedExtension) {
+        long size = file.getSize();
+        if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE) {
+            throw new FileSizeLimitExceededException("文件超出最大长度" + DEFAULT_MAX_SIZE / 1024 / 1024 + "M");
+        }
+        String fileName = file.getOriginalFilename();
+        //后缀名
+        String extension = getExtension(file);
+
+        //判断上传的附件是否符合文件类型
+        if (!isAllowedExtension(extension, allowedExtension)) {
+            String join = String.join(",", allowedExtension);
+            throw new FileUploadTypeException("文件名字为:" + fileName + ",上传的文件格式不正确,正确格式包含" + join);
+
+        }
+    }
+
+    public static String getRandomFileName() {
+
+        SimpleDateFormat simpleDateFormat;
+
+        simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+
+        Date date = new Date();
+
+        String str = simpleDateFormat.format(date);
+
+        Random random = new Random();
+
+        // 获取5位随机数
+        int ranNum = (int) (random.nextDouble() * (99999 - 10000 + 1)) + 10000;
+        // 当前时间
+        return ranNum + str;
+    }
+
+
+    /**
+     * 获取文件名的后缀
+     *
+     * @param file 表单文件
+     * @return 后缀名
+     */
+    public static final String getExtension(MultipartFile file) {
+        String extension = FilenameUtils.getExtension(file.getOriginalFilename());
+        if (StringUtils.isEmpty(extension)) {
+            extension = MimeTypeUtils.getExtension(file.getContentType());
+        }
+        return extension;
+    }
+
+    /**
+     * 判断MIME类型是否是允许的MIME类型
+     *
+     * @param extension
+     * @param allowedExtension
+     * @return
+     */
+    public static final boolean isAllowedExtension(String extension, String[] allowedExtension) {
+        for (String str : allowedExtension) {
+            if (str.equalsIgnoreCase(extension)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+}

+ 56 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/fileUpload/utils/MimeTypeUtils.java

@@ -0,0 +1,56 @@
+package org.jeecg.modules.purchaseManage.fileUpload.utils;
+
+/**
+ * 媒体类型工具类
+ *
+ * @author llp
+ */
+public class MimeTypeUtils {
+    public static final String IMAGE_PNG = "image/png";
+
+    public static final String IMAGE_JPG = "image/jpg";
+
+    public static final String IMAGE_JPEG = "image/jpeg";
+
+    public static final String IMAGE_BMP = "image/bmp";
+
+    public static final String IMAGE_GIF = "image/gif";
+
+    public static final String[] IMAGE_EXTENSION = {"bmp", "gif", "jpg", "jpeg", "png"};
+
+    public static final String[] FLASH_EXTENSION = {"swf", "flv"};
+
+    public static final String[] MEDIA_EXTENSION = {"swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg",
+            "asf", "rm", "rmvb"};
+
+    public static final String[] VIDEO_EXTENSION = {"mp4", "avi", "rmvb"};
+
+    public static final String[] DEFAULT_ALLOWED_EXTENSION = {
+            // 图片
+            "bmp", "gif", "jpg", "jpeg", "png",
+            // word excel powerpoint
+            "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
+            // 压缩文件
+            "rar", "zip", "gz", "bz2",
+            // 视频格式
+            "mp4", "avi", "rmvb",
+            // pdf
+            "pdf"};
+
+    public static String getExtension(String prefix) {
+        switch (prefix) {
+            case IMAGE_PNG:
+                return "png";
+            case IMAGE_JPG:
+                return "jpg";
+            case IMAGE_JPEG:
+                return "jpeg";
+            case IMAGE_BMP:
+                return "bmp";
+            case IMAGE_GIF:
+                return "gif";
+            default:
+                return "";
+        }
+    }
+}

+ 174 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/controller/HistoryPurchaseRecordsController.java

@@ -0,0 +1,174 @@
+package org.jeecg.modules.purchaseManage.historyPurchaseRecords.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.purchaseManage.historyPurchaseRecords.dto.MaterialQueryDTO;
+import org.jeecg.modules.purchaseManage.historyPurchaseRecords.entity.HistoryPurchaseRecords;
+import org.jeecg.modules.purchaseManage.historyPurchaseRecords.service.IHistoryPurchaseRecordsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @Description: 历史采购记录
+ * @Author: jeecg-boot
+ * @Date: 2025-04-03
+ * @Version: V1.0
+ */
+@Api(tags = "历史采购记录")
+@RestController
+@RequestMapping("/purchaseManage/historyPurchaseRecords")
+@Slf4j
+public class HistoryPurchaseRecordsController extends JeecgController<HistoryPurchaseRecords, IHistoryPurchaseRecordsService> {
+    @Autowired
+    private IHistoryPurchaseRecordsService historyPurchaseRecordsService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param historyPurchaseRecords
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "历史采购记录-分页列表查询")
+    @ApiOperation(value = "历史采购记录-分页列表查询", notes = "历史采购记录-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<HistoryPurchaseRecords>> queryPageList(HistoryPurchaseRecords historyPurchaseRecords,
+                                                               @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                               HttpServletRequest req) {
+        QueryWrapper<HistoryPurchaseRecords> queryWrapper = QueryGenerator.initQueryWrapper(historyPurchaseRecords, req.getParameterMap());
+        Page<HistoryPurchaseRecords> page = new Page<HistoryPurchaseRecords>(pageNo, pageSize);
+        IPage<HistoryPurchaseRecords> pageList = historyPurchaseRecordsService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param historyPurchaseRecords
+     * @return
+     */
+    @AutoLog(value = "历史采购记录-添加")
+    @ApiOperation(value = "历史采购记录-添加", notes = "历史采购记录-添加")
+    @RequiresPermissions("purchaseManage:sbsmzq_history_purchase_records:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody HistoryPurchaseRecords historyPurchaseRecords) {
+        historyPurchaseRecordsService.save(historyPurchaseRecords);
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param historyPurchaseRecords
+     * @return
+     */
+    @AutoLog(value = "历史采购记录-编辑")
+    @ApiOperation(value = "历史采购记录-编辑", notes = "历史采购记录-编辑")
+    @RequiresPermissions("purchaseManage:sbsmzq_history_purchase_records:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody HistoryPurchaseRecords historyPurchaseRecords) {
+        historyPurchaseRecordsService.updateById(historyPurchaseRecords);
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "历史采购记录-通过id删除")
+    @ApiOperation(value = "历史采购记录-通过id删除", notes = "历史采购记录-通过id删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_history_purchase_records:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        historyPurchaseRecordsService.removeById(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "历史采购记录-批量删除")
+    @ApiOperation(value = "历史采购记录-批量删除", notes = "历史采购记录-批量删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_history_purchase_records:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.historyPurchaseRecordsService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "历史采购记录-通过id查询")
+    @ApiOperation(value = "历史采购记录-通过id查询", notes = "历史采购记录-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<HistoryPurchaseRecords> queryById(@RequestParam(name = "id", required = true) String id) {
+        HistoryPurchaseRecords historyPurchaseRecords = historyPurchaseRecordsService.getById(id);
+        if (historyPurchaseRecords == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(historyPurchaseRecords);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param historyPurchaseRecords
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_history_purchase_records:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HistoryPurchaseRecords historyPurchaseRecords) {
+        return super.exportXls(request, historyPurchaseRecords, HistoryPurchaseRecords.class, "历史采购记录");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_history_purchase_records:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, HistoryPurchaseRecords.class);
+    }
+
+
+    @ApiOperation(value = "根据物料清单查询历史采购信息", notes = "根据物料清单查询历史采购信息")
+    @GetMapping(value = "/queryRecordsByMaterial")
+    public Result<List<HistoryPurchaseRecords>> queryRecordsByMaterial(MaterialQueryDTO queryDTO) {
+
+        List<HistoryPurchaseRecords> historyPurchaseRecords = historyPurchaseRecordsService.queryRecordsByMaterial(queryDTO);
+        return Result.OK(historyPurchaseRecords);
+    }
+
+
+}

+ 29 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/dto/MaterialQueryDTO.java

@@ -0,0 +1,29 @@
+package org.jeecg.modules.purchaseManage.historyPurchaseRecords.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+@Data
+public class MaterialQueryDTO {
+
+    /**
+     * 料号
+     */
+    @Excel(name = "料号", width = 15)
+    @ApiModelProperty(value = "料号")
+    private String materialNum;
+    /**
+     * 名称
+     */
+    @Excel(name = "名称", width = 15)
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+}

+ 117 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/entity/HistoryPurchaseRecords.java

@@ -0,0 +1,117 @@
+package org.jeecg.modules.purchaseManage.historyPurchaseRecords.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 历史采购记录
+ * @Author: jeecg-boot
+ * @Date: 2025-04-03
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_history_purchase_records")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_history_purchase_records对象", description = "历史采购记录")
+public class HistoryPurchaseRecords implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+
+    /**
+     * 物料编号
+     */
+    @Excel(name = "物料编号", width = 15)
+    @ApiModelProperty(value = "物料编号")
+    private String materialNum;
+
+    /**
+     * 物料名称
+     */
+    @Excel(name = "物料名称", width = 15)
+    @ApiModelProperty(value = "物料名称")
+    private String name;
+
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+
+    /**
+     * 采购时间
+     */
+    @Excel(name = "采购时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "采购时间")
+    private Date purchaseTime;
+    /**
+     * 供应商
+     */
+    @Excel(name = "供应商", width = 15)
+    @ApiModelProperty(value = "供应商")
+    private String supplier;
+    /**
+     * 采购价格
+     */
+    @Excel(name = "采购价格", width = 15)
+    @ApiModelProperty(value = "采购价格")
+    private BigDecimal purchasePrice;
+    /**
+     * 采购数量
+     */
+    @Excel(name = "采购数量", width = 15)
+    @ApiModelProperty(value = "采购数量")
+    private BigDecimal purchaseQuantity;
+}

+ 14 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/mapper/HistoryPurchaseRecordsMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.purchaseManage.historyPurchaseRecords.mapper;
+
+import org.jeecg.modules.purchaseManage.historyPurchaseRecords.entity.HistoryPurchaseRecords;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 历史采购记录
+ * @Author: jeecg-boot
+ * @Date:   2025-04-03
+ * @Version: V1.0
+ */
+public interface HistoryPurchaseRecordsMapper extends BaseMapper<HistoryPurchaseRecords> {
+
+}

+ 5 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/mapper/xml/HistoryPurchaseRecordsMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.historyPurchaseRecords.mapper.HistoryPurchaseRecordsMapper">
+
+</mapper>

+ 19 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/service/IHistoryPurchaseRecordsService.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.purchaseManage.historyPurchaseRecords.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.purchaseManage.historyPurchaseRecords.dto.MaterialQueryDTO;
+import org.jeecg.modules.purchaseManage.historyPurchaseRecords.entity.HistoryPurchaseRecords;
+
+import java.util.List;
+
+/**
+ * @Description: 历史采购记录
+ * @Author: jeecg-boot
+ * @Date: 2025-04-03
+ * @Version: V1.0
+ */
+public interface IHistoryPurchaseRecordsService extends IService<HistoryPurchaseRecords> {
+
+    List<HistoryPurchaseRecords> queryRecordsByMaterial(MaterialQueryDTO queryDTO);
+
+}

+ 38 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/historyPurchaseRecords/service/impl/HistoryPurchaseRecordsServiceImpl.java

@@ -0,0 +1,38 @@
+package org.jeecg.modules.purchaseManage.historyPurchaseRecords.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.apache.commons.lang.StringUtils;
+import org.jeecg.modules.purchaseManage.historyPurchaseRecords.dto.MaterialQueryDTO;
+import org.jeecg.modules.purchaseManage.historyPurchaseRecords.entity.HistoryPurchaseRecords;
+import org.jeecg.modules.purchaseManage.historyPurchaseRecords.mapper.HistoryPurchaseRecordsMapper;
+import org.jeecg.modules.purchaseManage.historyPurchaseRecords.service.IHistoryPurchaseRecordsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Description: 历史采购记录
+ * @Author: jeecg-boot
+ * @Date: 2025-04-03
+ * @Version: V1.0
+ */
+@Service
+public class HistoryPurchaseRecordsServiceImpl extends ServiceImpl<HistoryPurchaseRecordsMapper, HistoryPurchaseRecords> implements IHistoryPurchaseRecordsService {
+
+    @Autowired
+    private HistoryPurchaseRecordsMapper historyPurchaseRecordsMapper;
+
+    @Override
+    public List<HistoryPurchaseRecords> queryRecordsByMaterial(MaterialQueryDTO queryDTO) {
+
+        LambdaQueryWrapper<HistoryPurchaseRecords> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(StringUtils.isNotBlank(queryDTO.getMaterialNum()), HistoryPurchaseRecords::getMaterialNum, queryDTO.getMaterialNum())
+                .eq(StringUtils.isNotBlank(queryDTO.getName()), HistoryPurchaseRecords::getName, queryDTO.getName())
+                .eq(StringUtils.isNotBlank(queryDTO.getSpecification()), HistoryPurchaseRecords::getSpecification, queryDTO.getSpecification());
+
+        return historyPurchaseRecordsMapper.selectList(queryWrapper);
+    }
+
+}

+ 334 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/controller/PurchaseApplicationController.java

@@ -0,0 +1,334 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.CommonAPI;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.RedisUtil;
+import org.jeecg.common.util.TokenUtils;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.MaterialList;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplication;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment;
+import org.jeecg.modules.purchaseManage.purchaseApplication.service.IMaterialListService;
+import org.jeecg.modules.purchaseManage.purchaseApplication.service.IPurchaseApplicationAttachmentService;
+import org.jeecg.modules.purchaseManage.purchaseApplication.service.IPurchaseApplicationService;
+import org.jeecg.modules.purchaseManage.purchaseApplication.vo.PurchaseApplicationPage;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @Description: 采购申请
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Api(tags = "采购申请")
+@RestController
+@RequestMapping("/purchaseManage/purchaseApplication")
+@Slf4j
+public class PurchaseApplicationController {
+
+    @Lazy
+    @Resource
+    private CommonAPI commonApi;
+
+    @Lazy
+    @Resource
+    private RedisUtil redisUtil;
+
+    @Autowired
+    private IPurchaseApplicationService purchaseApplicationService;
+    @Autowired
+    private IPurchaseApplicationAttachmentService purchaseApplicationAttachmentService;
+    @Autowired
+    private IMaterialListService materialListService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param purchaseApplication
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "采购申请-分页列表查询")
+    @ApiOperation(value = "采购申请-分页列表查询", notes = "采购申请-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<PurchaseApplication>> queryPageList(PurchaseApplication purchaseApplication,
+                                                            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                            HttpServletRequest req) {
+        QueryWrapper<PurchaseApplication> queryWrapper = QueryGenerator.initQueryWrapper(purchaseApplication, req.getParameterMap());
+        Page<PurchaseApplication> page = new Page<PurchaseApplication>(pageNo, pageSize);
+        IPage<PurchaseApplication> pageList = purchaseApplicationService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param purchaseApplicationPage
+     * @return
+     */
+    @AutoLog(value = "采购申请-添加")
+    @ApiOperation(value = "采购申请-添加", notes = "采购申请-添加")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_application:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody PurchaseApplicationPage purchaseApplicationPage) {
+        PurchaseApplication purchaseApplication = new PurchaseApplication();
+        BeanUtils.copyProperties(purchaseApplicationPage, purchaseApplication);
+        purchaseApplicationService.saveMain(purchaseApplication, purchaseApplicationPage.getPurchaseApplicationAttachmentList(), purchaseApplicationPage.getMaterialListList());
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param purchaseApplicationPage
+     * @return
+     */
+    @AutoLog(value = "采购申请-编辑")
+    @ApiOperation(value = "采购申请-编辑", notes = "采购申请-编辑")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_application:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody PurchaseApplicationPage purchaseApplicationPage) {
+        PurchaseApplication purchaseApplication = new PurchaseApplication();
+        BeanUtils.copyProperties(purchaseApplicationPage, purchaseApplication);
+        PurchaseApplication purchaseApplicationEntity = purchaseApplicationService.getById(purchaseApplication.getId());
+        if (purchaseApplicationEntity == null) {
+            return Result.error("未找到对应数据");
+        }
+        purchaseApplicationService.updateMain(purchaseApplication, purchaseApplicationPage.getPurchaseApplicationAttachmentList(), purchaseApplicationPage.getMaterialListList());
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "采购申请-通过id删除")
+    @ApiOperation(value = "采购申请-通过id删除", notes = "采购申请-通过id删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_application:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        purchaseApplicationService.delMain(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "采购申请-批量删除")
+    @ApiOperation(value = "采购申请-批量删除", notes = "采购申请-批量删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_application:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.purchaseApplicationService.delBatchMain(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "采购申请-通过id查询")
+    @ApiOperation(value = "采购申请-通过id查询", notes = "采购申请-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<PurchaseApplication> queryById(@RequestParam(name = "id", required = true) String id) {
+        PurchaseApplication purchaseApplication = purchaseApplicationService.getById(id);
+        if (purchaseApplication == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(purchaseApplication);
+
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "采购申请相关附件通过主表ID查询")
+    @ApiOperation(value = "采购申请相关附件主表ID查询", notes = "采购申请相关附件-通主表ID查询")
+    @GetMapping(value = "/queryPurchaseApplicationAttachmentByMainId")
+    public Result<List<PurchaseApplicationAttachment>> queryPurchaseApplicationAttachmentListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<PurchaseApplicationAttachment> purchaseApplicationAttachmentList = purchaseApplicationAttachmentService.selectByMainId(id);
+        return Result.OK(purchaseApplicationAttachmentList);
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "采购物料清单通过主表ID查询")
+    @ApiOperation(value = "采购物料清单主表ID查询", notes = "采购物料清单-通主表ID查询")
+    @GetMapping(value = "/queryMaterialListByMainId")
+    public Result<List<MaterialList>> queryMaterialListListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<MaterialList> materialListList = materialListService.selectByMainId(id);
+        return Result.OK(materialListList);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param purchaseApplication
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_application:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, PurchaseApplication purchaseApplication) {
+        // Step.1 组装查询条件查询数据
+        QueryWrapper<PurchaseApplication> queryWrapper = QueryGenerator.initQueryWrapper(purchaseApplication, request.getParameterMap());
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+        //配置选中数据查询条件
+        String selections = request.getParameter("selections");
+        if (oConvertUtils.isNotEmpty(selections)) {
+            List<String> selectionList = Arrays.asList(selections.split(","));
+            queryWrapper.in("id", selectionList);
+        }
+        //Step.2 获取导出数据
+        List<PurchaseApplication> purchaseApplicationList = purchaseApplicationService.list(queryWrapper);
+
+        // Step.3 组装pageList
+        List<PurchaseApplicationPage> pageList = new ArrayList<PurchaseApplicationPage>();
+        for (PurchaseApplication main : purchaseApplicationList) {
+            PurchaseApplicationPage vo = new PurchaseApplicationPage();
+            BeanUtils.copyProperties(main, vo);
+            List<PurchaseApplicationAttachment> purchaseApplicationAttachmentList = purchaseApplicationAttachmentService.selectByMainId(main.getId());
+            vo.setPurchaseApplicationAttachmentList(purchaseApplicationAttachmentList);
+            List<MaterialList> materialListList = materialListService.selectByMainId(main.getId());
+            vo.setMaterialListList(materialListList);
+            pageList.add(vo);
+        }
+
+        // Step.4 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        mv.addObject(NormalExcelConstants.FILE_NAME, "采购申请列表");
+        mv.addObject(NormalExcelConstants.CLASS, PurchaseApplicationPage.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("采购申请数据", "导出人:" + sysUser.getRealname(), "采购申请"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_application:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            // 获取上传文件对象
+            MultipartFile file = entity.getValue();
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<PurchaseApplicationPage> list = ExcelImportUtil.importExcel(file.getInputStream(), PurchaseApplicationPage.class, params);
+                for (PurchaseApplicationPage page : list) {
+                    PurchaseApplication po = new PurchaseApplication();
+                    BeanUtils.copyProperties(page, po);
+                    purchaseApplicationService.saveMain(po, page.getPurchaseApplicationAttachmentList(), page.getMaterialListList());
+                }
+                return Result.OK("文件导入成功!数据行数:" + list.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.OK("文件导入失败!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "采购申请通过采购计划ID查询", notes = "采购申请通过采购计划ID查询")
+    @GetMapping(value = "/queryPurchaseApplicationByMainId")
+    public Result<List<PurchaseApplication>> queryPurchaseAttachmentsListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<PurchaseApplication> purchaseApplications = purchaseApplicationService.selectByMainId(id);
+        return Result.OK(purchaseApplications);
+    }
+
+    /**
+     * 分页列表查询(与我相关)
+     *
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "采购申请-分页列表查询(与我相关)", notes = "采购申请-分页列表查询(与我相关)")
+    @GetMapping(value = "/listByUser")
+    public Result<IPage<PurchaseApplication>> queryPageListByUser(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                  @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                  HttpServletRequest req) {
+
+        LoginUser loginUser = TokenUtils.getLoginUser(req, commonApi, redisUtil);
+        // 构建查询条件
+        LambdaQueryWrapper<PurchaseApplication> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(PurchaseApplication::getApplicant, loginUser.getId());
+        QueryGenerator.initQueryWrapper(queryWrapper, req.getParameterMap());
+        Page<PurchaseApplication> page = new Page<PurchaseApplication>(pageNo, pageSize);
+        IPage<PurchaseApplication> pageList = purchaseApplicationService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+}

+ 173 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/entity/MaterialList.java

@@ -0,0 +1,173 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 采购物料清单
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_material_list对象", description = "采购物料清单")
+@Data
+@TableName("sbsmzq_material_list")
+public class MaterialList implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 料号
+     */
+    @Excel(name = "料号", width = 15)
+    @ApiModelProperty(value = "料号")
+    private String materialNum;
+    /**
+     * 名称
+     */
+    @Excel(name = "名称", width = 15)
+    @ApiModelProperty(value = "名称")
+    private String name;
+    /**
+     * 单位
+     */
+    @Excel(name = "单位", width = 15)
+    @ApiModelProperty(value = "单位")
+    private String unit;
+    /**
+     * 品牌
+     */
+    @Excel(name = "品牌", width = 15)
+    @ApiModelProperty(value = "品牌")
+    private String brand;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+    /**
+     * 申请数量
+     */
+    @Excel(name = "申请数量", width = 15)
+    @ApiModelProperty(value = "申请数量")
+    private Integer quantity;
+    /**
+     * 推荐供应商1
+     */
+    @Excel(name = "推荐供应商1", width = 15)
+    @ApiModelProperty(value = "推荐供应商1")
+    private String recommendSupplierOne;
+    /**
+     * 价格1
+     */
+    @Excel(name = "价格1", width = 15)
+    @ApiModelProperty(value = "价格1")
+    private BigDecimal priceOne;
+    /**
+     * 推荐供应商2
+     */
+    @Excel(name = "推荐供应商2", width = 15)
+    @ApiModelProperty(value = "推荐供应商2")
+    private String recommendSupplierTwo;
+    /**
+     * 价格2
+     */
+    @Excel(name = "价格2", width = 15)
+    @ApiModelProperty(value = "价格2")
+    private BigDecimal priceTwo;
+    /**
+     * 预计单价
+     */
+    @Excel(name = "预计单价", width = 15)
+    @ApiModelProperty(value = "预计单价")
+    private BigDecimal expectedPrice;
+    /**
+     * 实际单价
+     */
+    @Excel(name = "实际单价", width = 15)
+    @ApiModelProperty(value = "实际单价")
+    private BigDecimal actualPrice;
+    /**
+     * 期望供货时间
+     */
+    @Excel(name = "期望供货时间", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "期望供货时间")
+    private Date expectedDeliveryTime;
+    /**
+     * 供应商
+     */
+    @Excel(name = "供应商", width = 15)
+    @ApiModelProperty(value = "供应商")
+    private String supplier;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    /**
+     * 预计总价
+     */
+    @Excel(name = "预计总价", width = 15)
+    @ApiModelProperty(value = "预计总价")
+    private BigDecimal expectedTotalPrice;
+    /**
+     * 实际总价
+     */
+    @Excel(name = "实际总价", width = 15)
+    @ApiModelProperty(value = "实际总价")
+    private BigDecimal actualTotalPrice;
+    /**
+     * 采购申请id(外键)
+     */
+    @ApiModelProperty(value = "采购申请id(外键)")
+    private String purchaseApplicationId;
+}

+ 146 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/entity/PurchaseApplication.java

@@ -0,0 +1,146 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 采购申请
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_purchase_application对象", description = "采购申请")
+@Data
+@TableName("sbsmzq_purchase_application")
+public class PurchaseApplication implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 申请单号
+     */
+    @Excel(name = "申请单号", width = 15)
+    @ApiModelProperty(value = "申请单号")
+    private String requestNo;
+    /**
+     * 申请时间
+     */
+    @Excel(name = "申请时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "申请时间")
+    private Date applicationTime;
+    /**
+     * 采购标题
+     */
+    @Excel(name = "采购标题", width = 15)
+    @ApiModelProperty(value = "采购标题")
+    private String purchaseTitle;
+    /**
+     * 申请人
+     */
+    @Excel(name = "申请人", width = 15)
+    @ApiModelProperty(value = "申请人")
+    private String applicant;
+    /**
+     * 采购类型(1 设备采购  2 备件物料采购)
+     */
+    @Excel(name = "采购类型(1 设备采购  2 备件物料采购)", width = 15)
+    @ApiModelProperty(value = "采购类型(1 设备采购  2 备件物料采购)")
+    private String purchaseType;
+    /**
+     * 项目
+     */
+    @Excel(name = "项目", width = 15)
+    @ApiModelProperty(value = "项目")
+    private String project;
+    /**
+     * 当前节点
+     */
+    @Excel(name = "当前节点", width = 15)
+    @ApiModelProperty(value = "当前节点")
+    private String currentNode;
+    /**
+     * 审批状态
+     */
+    @Excel(name = "审批状态", width = 15)
+    @ApiModelProperty(value = "审批状态")
+    private Integer approvalStatus;
+    /**
+     * 审批结束时间
+     */
+    @Excel(name = "审批结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "审批结束时间")
+    private Date approvalEndTime;
+    /**
+     * 采购计划
+     */
+    @Excel(name = "采购计划", width = 15)
+    @ApiModelProperty(value = "采购计划")
+    private String purchasePlan;
+    /**
+     * 购置理由
+     */
+    @Excel(name = "购置理由", width = 15)
+    @ApiModelProperty(value = "购置理由")
+    private String purchaseReason;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    /**
+     * 采购计划id
+     */
+    @ApiModelProperty(value = "采购计划id")
+    private String purchasePlanId;
+
+}

+ 80 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/entity/PurchaseApplicationAttachment.java

@@ -0,0 +1,80 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 采购申请相关附件
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_purchase_application_attachment对象", description = "采购申请相关附件")
+@Data
+@TableName("sbsmzq_purchase_application_attachment")
+public class PurchaseApplicationAttachment implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 文件名称
+     */
+    @Excel(name = "文件名称", width = 15)
+    @ApiModelProperty(value = "文件名称")
+    private String fileName;
+    /**
+     * 文件地址
+     */
+    @Excel(name = "文件地址", width = 15)
+    @ApiModelProperty(value = "文件地址")
+    private String fileAddress;
+    /**
+     * 采购申请id
+     */
+    @ApiModelProperty(value = "采购申请id")
+    private String purchaseApplicationId;
+}

+ 33 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/MaterialListMapper.java

@@ -0,0 +1,33 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.mapper;
+
+import java.util.List;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.MaterialList;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 采购物料清单
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface MaterialListMapper extends BaseMapper<MaterialList> {
+
+	/**
+	 * 通过主表id删除子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return boolean
+	 */
+	public boolean deleteByMainId(@Param("mainId") String mainId);
+
+  /**
+   * 通过主表id查询子表数据
+   *
+   * @param mainId 主表id
+   * @return List<MaterialList>
+   */
+	public List<MaterialList> selectByMainId(@Param("mainId") String mainId);
+
+
+}

+ 31 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/PurchaseApplicationAttachmentMapper.java

@@ -0,0 +1,31 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.mapper;
+
+import java.util.List;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 采购申请相关附件
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface PurchaseApplicationAttachmentMapper extends BaseMapper<PurchaseApplicationAttachment> {
+
+	/**
+	 * 通过主表id删除子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return boolean
+	 */
+	public boolean deleteByMainId(@Param("mainId") String mainId);
+
+  /**
+   * 通过主表id查询子表数据
+   *
+   * @param mainId 主表id
+   * @return List<PurchaseApplicationAttachment>
+   */
+	public List<PurchaseApplicationAttachment> selectByMainId(@Param("mainId") String mainId);
+}

+ 32 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/PurchaseApplicationMapper.java

@@ -0,0 +1,32 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplication;
+
+import java.util.List;
+
+/**
+ * @Description: 采购申请
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+public interface PurchaseApplicationMapper extends BaseMapper<PurchaseApplication> {
+
+    /**
+     * 通过采购计划id查询采购申请数据
+     *
+     * @param mainId 采购计划id
+     * @return List<PurchaseApplication>
+     */
+    public List<PurchaseApplication> selectByMainId(@Param("mainId") String mainId);
+
+    /**
+     * 通过申请单号查询采购申请数据
+     *
+     * @param requestNo 申请单号
+     * @return List<PurchaseApplication>
+     */
+    public PurchaseApplication selectByRequestNo(@Param("requestNo") String requestNo);
+}

+ 16 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/xml/MaterialListMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.purchaseApplication.mapper.MaterialListMapper">
+
+	<delete id="deleteByMainId" parameterType="String">
+		DELETE 
+		FROM  sbsmzq_material_list 
+		WHERE
+			 purchase_application_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.purchaseManage.purchaseApplication.entity.MaterialList">
+		SELECT * 
+		FROM  sbsmzq_material_list
+		WHERE
+			 purchase_application_id = #{mainId} 	</select>
+</mapper>

+ 16 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/xml/PurchaseApplicationAttachmentMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.purchaseApplication.mapper.PurchaseApplicationAttachmentMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sbsmzq_purchase_application_attachment 
+		WHERE
+			 purchase_application_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment">
+		SELECT * 
+		FROM  sbsmzq_purchase_application_attachment
+		WHERE
+			 purchase_application_id = #{mainId} 	</select>
+</mapper>

+ 17 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/mapper/xml/PurchaseApplicationMapper.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.purchaseApplication.mapper.PurchaseApplicationMapper">
+
+    <select id="selectByMainId" parameterType="java.lang.String"
+            resultType="org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplication">
+        SELECT *
+        FROM sbsmzq_purchase_application
+        WHERE purchase_plan_id = #{mainId}    </select>
+
+    <select id="selectByRequestNo" parameterType="java.lang.String"
+            resultType="org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplication">
+        SELECT *
+        FROM sbsmzq_purchase_application
+        WHERE request_no = #{requestNo} LIMIT 1 </select>
+
+</mapper>

+ 22 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/IMaterialListService.java

@@ -0,0 +1,22 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.service;
+
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.MaterialList;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 采购物料清单
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface IMaterialListService extends IService<MaterialList> {
+
+	/**
+	 * 通过主表id查询子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return List<MaterialList>
+	 */
+	public List<MaterialList> selectByMainId(String mainId);
+}

+ 22 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/IPurchaseApplicationAttachmentService.java

@@ -0,0 +1,22 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.service;
+
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 采购申请相关附件
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface IPurchaseApplicationAttachmentService extends IService<PurchaseApplicationAttachment> {
+
+	/**
+	 * 通过主表id查询子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return List<PurchaseApplicationAttachment>
+	 */
+	public List<PurchaseApplicationAttachment> selectByMainId(String mainId);
+}

+ 68 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/IPurchaseApplicationService.java

@@ -0,0 +1,68 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.MaterialList;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplication;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 采购申请
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+public interface IPurchaseApplicationService extends IService<PurchaseApplication> {
+
+    /**
+     * 添加一对多
+     *
+     * @param purchaseApplication
+     * @param purchaseApplicationAttachmentList
+     * @param materialListList
+     */
+    public void saveMain(PurchaseApplication purchaseApplication, List<PurchaseApplicationAttachment> purchaseApplicationAttachmentList, List<MaterialList> materialListList);
+
+    /**
+     * 修改一对多
+     *
+     * @param purchaseApplication
+     * @param purchaseApplicationAttachmentList
+     * @param materialListList
+     */
+    public void updateMain(PurchaseApplication purchaseApplication, List<PurchaseApplicationAttachment> purchaseApplicationAttachmentList, List<MaterialList> materialListList);
+
+    /**
+     * 删除一对多
+     *
+     * @param id
+     */
+    public void delMain(String id);
+
+    /**
+     * 批量删除一对多
+     *
+     * @param idList
+     */
+    public void delBatchMain(Collection<? extends Serializable> idList);
+
+
+    /**
+     * 通过采购计划id查询采购申请数据
+     *
+     * @param mainId 采购计划id
+     * @return List<PurchaseApplication>
+     */
+    public List<PurchaseApplication> selectByMainId(String mainId);
+
+    /**
+     * 通过申请单号查询采购申请数据
+     *
+     * @param requestNo 申请单号
+     * @return PurchaseApplication
+     */
+    public PurchaseApplication selectByRequestNo(String requestNo);
+}

+ 27 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/impl/MaterialListServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.service.impl;
+
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.MaterialList;
+import org.jeecg.modules.purchaseManage.purchaseApplication.mapper.MaterialListMapper;
+import org.jeecg.modules.purchaseManage.purchaseApplication.service.IMaterialListService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 采购物料清单
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+@Service
+public class MaterialListServiceImpl extends ServiceImpl<MaterialListMapper, MaterialList> implements IMaterialListService {
+	
+	@Autowired
+	private MaterialListMapper materialListMapper;
+	
+	@Override
+	public List<MaterialList> selectByMainId(String mainId) {
+		return materialListMapper.selectByMainId(mainId);
+	}
+}

+ 27 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/impl/PurchaseApplicationAttachmentServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.service.impl;
+
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment;
+import org.jeecg.modules.purchaseManage.purchaseApplication.mapper.PurchaseApplicationAttachmentMapper;
+import org.jeecg.modules.purchaseManage.purchaseApplication.service.IPurchaseApplicationAttachmentService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 采购申请相关附件
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+@Service
+public class PurchaseApplicationAttachmentServiceImpl extends ServiceImpl<PurchaseApplicationAttachmentMapper, PurchaseApplicationAttachment> implements IPurchaseApplicationAttachmentService {
+	
+	@Autowired
+	private PurchaseApplicationAttachmentMapper purchaseApplicationAttachmentMapper;
+	
+	@Override
+	public List<PurchaseApplicationAttachment> selectByMainId(String mainId) {
+		return purchaseApplicationAttachmentMapper.selectByMainId(mainId);
+	}
+}

+ 109 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/service/impl/PurchaseApplicationServiceImpl.java

@@ -0,0 +1,109 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.MaterialList;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplication;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment;
+import org.jeecg.modules.purchaseManage.purchaseApplication.mapper.MaterialListMapper;
+import org.jeecg.modules.purchaseManage.purchaseApplication.mapper.PurchaseApplicationAttachmentMapper;
+import org.jeecg.modules.purchaseManage.purchaseApplication.mapper.PurchaseApplicationMapper;
+import org.jeecg.modules.purchaseManage.purchaseApplication.service.IPurchaseApplicationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 采购申请
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Service
+public class PurchaseApplicationServiceImpl extends ServiceImpl<PurchaseApplicationMapper, PurchaseApplication> implements IPurchaseApplicationService {
+
+    @Autowired
+    private PurchaseApplicationMapper purchaseApplicationMapper;
+    @Autowired
+    private PurchaseApplicationAttachmentMapper purchaseApplicationAttachmentMapper;
+    @Autowired
+    private MaterialListMapper materialListMapper;
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void saveMain(PurchaseApplication purchaseApplication, List<PurchaseApplicationAttachment> purchaseApplicationAttachmentList, List<MaterialList> materialListList) {
+        purchaseApplicationMapper.insert(purchaseApplication);
+        if (purchaseApplicationAttachmentList != null && purchaseApplicationAttachmentList.size() > 0) {
+            for (PurchaseApplicationAttachment entity : purchaseApplicationAttachmentList) {
+                //外键设置
+                entity.setPurchaseApplicationId(purchaseApplication.getId());
+                purchaseApplicationAttachmentMapper.insert(entity);
+            }
+        }
+        if (materialListList != null && materialListList.size() > 0) {
+            for (MaterialList entity : materialListList) {
+                //外键设置
+                entity.setPurchaseApplicationId(purchaseApplication.getId());
+                materialListMapper.insert(entity);
+            }
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void updateMain(PurchaseApplication purchaseApplication, List<PurchaseApplicationAttachment> purchaseApplicationAttachmentList, List<MaterialList> materialListList) {
+        purchaseApplicationMapper.updateById(purchaseApplication);
+
+        //1.先删除子表数据
+        purchaseApplicationAttachmentMapper.deleteByMainId(purchaseApplication.getId());
+        materialListMapper.deleteByMainId(purchaseApplication.getId());
+
+        //2.子表数据重新插入
+        if (purchaseApplicationAttachmentList != null && purchaseApplicationAttachmentList.size() > 0) {
+            for (PurchaseApplicationAttachment entity : purchaseApplicationAttachmentList) {
+                //外键设置
+                entity.setPurchaseApplicationId(purchaseApplication.getId());
+                purchaseApplicationAttachmentMapper.insert(entity);
+            }
+        }
+        if (materialListList != null && materialListList.size() > 0) {
+            for (MaterialList entity : materialListList) {
+                //外键设置
+                entity.setPurchaseApplicationId(purchaseApplication.getId());
+                materialListMapper.insert(entity);
+            }
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delMain(String id) {
+        purchaseApplicationAttachmentMapper.deleteByMainId(id);
+        materialListMapper.deleteByMainId(id);
+        purchaseApplicationMapper.deleteById(id);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delBatchMain(Collection<? extends Serializable> idList) {
+        for (Serializable id : idList) {
+            purchaseApplicationAttachmentMapper.deleteByMainId(id.toString());
+            materialListMapper.deleteByMainId(id.toString());
+            purchaseApplicationMapper.deleteById(id);
+        }
+    }
+
+
+    @Override
+    public List<PurchaseApplication> selectByMainId(String mainId) {
+        return purchaseApplicationMapper.selectByMainId(mainId);
+    }
+
+    @Override
+    public PurchaseApplication selectByRequestNo(String requestNo) {
+        return purchaseApplicationMapper.selectByRequestNo(requestNo);
+    }
+}

+ 144 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseApplication/vo/PurchaseApplicationPage.java

@@ -0,0 +1,144 @@
+package org.jeecg.modules.purchaseManage.purchaseApplication.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.MaterialList;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 采购申请
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Data
+@ApiModel(value = "sbsmzq_purchase_applicationPage对象", description = "采购申请")
+public class PurchaseApplicationPage {
+
+    /**
+     * 主键
+     */
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 申请单号
+     */
+    @Excel(name = "申请单号", width = 15)
+    @ApiModelProperty(value = "申请单号")
+    private String requestNo;
+    /**
+     * 申请时间
+     */
+    @Excel(name = "申请时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "申请时间")
+    private Date applicationTime;
+    /**
+     * 采购标题
+     */
+    @Excel(name = "采购标题", width = 15)
+    @ApiModelProperty(value = "采购标题")
+    private String purchaseTitle;
+    /**
+     * 申请人
+     */
+    @Excel(name = "申请人", width = 15)
+    @ApiModelProperty(value = "申请人")
+    private String applicant;
+    /**
+     * 采购类型(1 设备采购  2 备件物料采购)
+     */
+    @Excel(name = "采购类型(1 设备采购  2 备件物料采购)", width = 15)
+    @ApiModelProperty(value = "采购类型(1 设备采购  2 备件物料采购)")
+    private String purchaseType;
+    /**
+     * 项目
+     */
+    @Excel(name = "项目", width = 15)
+    @ApiModelProperty(value = "项目")
+    private String project;
+    /**
+     * 当前节点
+     */
+    @Excel(name = "当前节点", width = 15)
+    @ApiModelProperty(value = "当前节点")
+    private String currentNode;
+    /**
+     * 审批状态
+     */
+    @Excel(name = "审批状态", width = 15)
+    @ApiModelProperty(value = "审批状态")
+    private Integer approvalStatus;
+    /**
+     * 审批结束时间
+     */
+    @Excel(name = "审批结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "审批结束时间")
+    private Date approvalEndTime;
+    /**
+     * 采购计划
+     */
+    @Excel(name = "采购计划", width = 15)
+    @ApiModelProperty(value = "采购计划")
+    private String purchasePlan;
+    /**
+     * 购置理由
+     */
+    @Excel(name = "购置理由", width = 15)
+    @ApiModelProperty(value = "购置理由")
+    private String purchaseReason;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ExcelCollection(name = "采购申请相关附件")
+    @ApiModelProperty(value = "采购申请相关附件")
+    private List<PurchaseApplicationAttachment> purchaseApplicationAttachmentList;
+    @ExcelCollection(name = "采购物料清单")
+    @ApiModelProperty(value = "采购物料清单")
+    private List<MaterialList> materialListList;
+
+}

+ 232 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/controller/PurchaseDetailsController.java

@@ -0,0 +1,232 @@
+package org.jeecg.modules.purchaseManage.purchaseDetails.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.MaterialList;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplication;
+import org.jeecg.modules.purchaseManage.purchaseApplication.entity.PurchaseApplicationAttachment;
+import org.jeecg.modules.purchaseManage.purchaseApplication.service.IMaterialListService;
+import org.jeecg.modules.purchaseManage.purchaseApplication.service.IPurchaseApplicationAttachmentService;
+import org.jeecg.modules.purchaseManage.purchaseApplication.service.IPurchaseApplicationService;
+import org.jeecg.modules.purchaseManage.purchaseDetails.entity.PurchaseDetails;
+import org.jeecg.modules.purchaseManage.purchaseDetails.service.IPurchaseDetailsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @Description: 采购明细
+ * @Author: jeecg-boot
+ * @Date: 2025-04-01
+ * @Version: V1.0
+ */
+@Api(tags = "采购明细")
+@RestController
+@RequestMapping("/purchaseManage/purchaseDetails")
+@Slf4j
+public class PurchaseDetailsController extends JeecgController<PurchaseDetails, IPurchaseDetailsService> {
+    @Autowired
+    private IPurchaseDetailsService purchaseDetailsService;
+    @Autowired
+    private IPurchaseApplicationService purchaseApplicationService;
+    @Autowired
+    private IPurchaseApplicationAttachmentService purchaseApplicationAttachmentService;
+    @Autowired
+    private IMaterialListService materialListService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param purchaseDetails
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "采购明细-分页列表查询")
+    @ApiOperation(value = "采购明细-分页列表查询", notes = "采购明细-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<PurchaseDetails>> queryPageList(PurchaseDetails purchaseDetails,
+                                                        @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                        @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                        HttpServletRequest req) {
+        QueryWrapper<PurchaseDetails> queryWrapper = QueryGenerator.initQueryWrapper(purchaseDetails, req.getParameterMap());
+        Page<PurchaseDetails> page = new Page<PurchaseDetails>(pageNo, pageSize);
+        IPage<PurchaseDetails> pageList = purchaseDetailsService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param purchaseDetails
+     * @return
+     */
+    @AutoLog(value = "采购明细-添加")
+    @ApiOperation(value = "采购明细-添加", notes = "采购明细-添加")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_details:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody PurchaseDetails purchaseDetails) {
+        purchaseDetailsService.save(purchaseDetails);
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param purchaseDetails
+     * @return
+     */
+    @AutoLog(value = "采购明细-编辑")
+    @ApiOperation(value = "采购明细-编辑", notes = "采购明细-编辑")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_details:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody PurchaseDetails purchaseDetails) {
+        purchaseDetailsService.updateById(purchaseDetails);
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "采购明细-通过id删除")
+    @ApiOperation(value = "采购明细-通过id删除", notes = "采购明细-通过id删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_details:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        purchaseDetailsService.removeById(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "采购明细-批量删除")
+    @ApiOperation(value = "采购明细-批量删除", notes = "采购明细-批量删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_details:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.purchaseDetailsService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "采购明细-通过id查询")
+    @ApiOperation(value = "采购明细-通过id查询", notes = "采购明细-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<PurchaseDetails> queryById(@RequestParam(name = "id", required = true) String id) {
+        PurchaseDetails purchaseDetails = purchaseDetailsService.getById(id);
+        if (purchaseDetails == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(purchaseDetails);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param purchaseDetails
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_details:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, PurchaseDetails purchaseDetails) {
+        return super.exportXls(request, purchaseDetails, PurchaseDetails.class, "采购明细");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_details:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, PurchaseDetails.class);
+    }
+
+
+    /**
+     * 通过requestNo查询
+     *
+     * @param requestNo
+     * @return
+     */
+    @ApiOperation(value = "采购申请-通过requestNo查询", notes = "采购申请-通过requestNo查询")
+    @GetMapping(value = "/queryByRequestNo")
+    public Result<PurchaseApplication> queryByRequestNo(@RequestParam(name = "requestNo", required = true) String requestNo) {
+        PurchaseApplication selectByRequestNo = purchaseApplicationService.selectByRequestNo(requestNo);
+        if (selectByRequestNo == null) {
+            return Result.error("未根据申请单号找到对应采购申请数据");
+        }
+        PurchaseApplication purchaseApplication = purchaseApplicationService.getById(selectByRequestNo.getId());
+        if (purchaseApplication == null) {
+            return Result.error("未根据id找到对应采购申请数据");
+        }
+        return Result.OK(purchaseApplication);
+
+    }
+
+    /**
+     * 通过requestNo查询
+     *
+     * @param requestNo
+     * @return
+     */
+    @ApiOperation(value = "采购申请相关附件主表requestNo查询", notes = "采购申请相关附件-通主表requestNo查询")
+    @GetMapping(value = "/queryPurchaseApplicationAttachmentByRequestNo")
+    public Result<List<PurchaseApplicationAttachment>> queryPurchaseApplicationAttachmentByRequestNo(@RequestParam(name = "requestNo", required = true) String requestNo) {
+
+        PurchaseApplication selectByRequestNo = purchaseApplicationService.selectByRequestNo(requestNo);
+        if (selectByRequestNo == null) {
+            return Result.error("未根据申请单号找到对应采购申请数据");
+        }
+        List<PurchaseApplicationAttachment> purchaseApplicationAttachmentList = purchaseApplicationAttachmentService.selectByMainId(selectByRequestNo.getId());
+        return Result.OK(purchaseApplicationAttachmentList);
+    }
+
+    /**
+     * 通过requestNo查询
+     *
+     * @param requestNo
+     * @return
+     */
+    @ApiOperation(value = "采购物料清单主表RequestNo查询", notes = "采购物料清单-通主表RequestNo查询")
+    @GetMapping(value = "/queryMaterialListByRequestNo")
+    public Result<List<MaterialList>> queryMaterialListListByRequestNo(@RequestParam(name = "requestNo", required = true) String requestNo) {
+
+        PurchaseApplication selectByRequestNo = purchaseApplicationService.selectByRequestNo(requestNo);
+        if (selectByRequestNo == null) {
+            return Result.error("未根据申请单号找到对应采购申请数据");
+        }
+        List<MaterialList> materialListList = materialListService.selectByMainId(selectByRequestNo.getId());
+        return Result.OK(materialListList);
+    }
+}

+ 162 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/entity/PurchaseDetails.java

@@ -0,0 +1,162 @@
+package org.jeecg.modules.purchaseManage.purchaseDetails.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 采购明细
+ * @Author: jeecg-boot
+ * @Date: 2025-04-01
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_purchase_details")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_purchase_details对象", description = "采购明细")
+public class PurchaseDetails implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 物料编号
+     */
+    @Excel(name = "物料编号", width = 15)
+    @ApiModelProperty(value = "物料编号")
+    private String materialNo;
+    /**
+     * 物料名称
+     */
+    @Excel(name = "物料名称", width = 15)
+    @ApiModelProperty(value = "物料名称")
+    private String materialName;
+    /**
+     * 单位
+     */
+    @Excel(name = "单位", width = 15)
+    @ApiModelProperty(value = "单位")
+    private String unit;
+    /**
+     * 品牌
+     */
+    @Excel(name = "品牌", width = 15)
+    @ApiModelProperty(value = "品牌")
+    private String brand;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+    /**
+     * 供应商
+     */
+    @Excel(name = "供应商", width = 15)
+    @ApiModelProperty(value = "供应商")
+    private String supplier;
+    /**
+     * 申请时间
+     */
+    @Excel(name = "申请时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "申请时间")
+    private Date applicationTime;
+    /**
+     * 期望供货时间
+     */
+    @Excel(name = "期望供货时间", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "期望供货时间")
+    private Date expectedDeliveryTime;
+    /**
+     * 申请人
+     */
+    @Excel(name = "申请人", width = 15)
+    @ApiModelProperty(value = "申请人")
+    private String applicant;
+    /**
+     * 申请数量
+     */
+    @Excel(name = "申请数量", width = 15)
+    @ApiModelProperty(value = "申请数量")
+    private Integer quantity;
+    /**
+     * 预计单价
+     */
+    @Excel(name = "预计单价", width = 15)
+    @ApiModelProperty(value = "预计单价")
+    private BigDecimal expectedPrice;
+    /**
+     * 实际单价
+     */
+    @Excel(name = "实际单价", width = 15)
+    @ApiModelProperty(value = "实际单价")
+    private BigDecimal actualPrice;
+    /**
+     * 到货量
+     */
+    @Excel(name = "到货量", width = 15)
+    @ApiModelProperty(value = "到货量")
+    private Integer arrivalQuantity;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    /**
+     * 申请单号
+     */
+    @Excel(name = "申请单号", width = 15)
+    @ApiModelProperty(value = "申请单号")
+    private String requestNo;
+}

+ 14 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/mapper/PurchaseDetailsMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.purchaseManage.purchaseDetails.mapper;
+
+import org.jeecg.modules.purchaseManage.purchaseDetails.entity.PurchaseDetails;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 采购明细
+ * @Author: jeecg-boot
+ * @Date:   2025-04-01
+ * @Version: V1.0
+ */
+public interface PurchaseDetailsMapper extends BaseMapper<PurchaseDetails> {
+
+}

+ 5 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/mapper/xml/PurchaseDetailsMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.purchaseDetails.mapper.PurchaseDetailsMapper">
+
+</mapper>

+ 14 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/service/IPurchaseDetailsService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.purchaseManage.purchaseDetails.service;
+
+import org.jeecg.modules.purchaseManage.purchaseDetails.entity.PurchaseDetails;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 采购明细
+ * @Author: jeecg-boot
+ * @Date:   2025-04-01
+ * @Version: V1.0
+ */
+public interface IPurchaseDetailsService extends IService<PurchaseDetails> {
+
+}

+ 19 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchaseDetails/service/impl/PurchaseDetailsServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.purchaseManage.purchaseDetails.service.impl;
+
+import org.jeecg.modules.purchaseManage.purchaseDetails.entity.PurchaseDetails;
+import org.jeecg.modules.purchaseManage.purchaseDetails.mapper.PurchaseDetailsMapper;
+import org.jeecg.modules.purchaseManage.purchaseDetails.service.IPurchaseDetailsService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 采购明细
+ * @Author: jeecg-boot
+ * @Date:   2025-04-01
+ * @Version: V1.0
+ */
+@Service
+public class PurchaseDetailsServiceImpl extends ServiceImpl<PurchaseDetailsMapper, PurchaseDetails> implements IPurchaseDetailsService {
+
+}

+ 320 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/controller/PurchasePlanController.java

@@ -0,0 +1,320 @@
+package org.jeecg.modules.purchaseManage.purchasePlan.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.CommonAPI;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.RedisUtil;
+import org.jeecg.common.util.TokenUtils;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.purchaseManage.purchasePlan.entity.PurchaseAttachments;
+import org.jeecg.modules.purchaseManage.purchasePlan.entity.PurchasePlan;
+import org.jeecg.modules.purchaseManage.purchasePlan.entity.PurchasePlanInfo;
+import org.jeecg.modules.purchaseManage.purchasePlan.service.IPurchaseAttachmentsService;
+import org.jeecg.modules.purchaseManage.purchasePlan.service.IPurchasePlanInfoService;
+import org.jeecg.modules.purchaseManage.purchasePlan.service.IPurchasePlanService;
+import org.jeecg.modules.purchaseManage.purchasePlan.vo.PurchasePlanPage;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @Description: 采购计划
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@Api(tags = "采购计划")
+@RestController
+@RequestMapping("/purchaseManage/purchasePlan")
+@Slf4j
+public class PurchasePlanController {
+
+    @Lazy
+    @Resource
+    private CommonAPI commonApi;
+
+    @Lazy
+    @Resource
+    private RedisUtil redisUtil;
+
+    @Autowired
+    private IPurchasePlanService purchasePlanService;
+    @Autowired
+    private IPurchaseAttachmentsService purchaseAttachmentsService;
+    @Autowired
+    private IPurchasePlanInfoService purchasePlanInfoService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param purchasePlan
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "采购计划-分页列表查询")
+    @ApiOperation(value = "采购计划-分页列表查询", notes = "采购计划-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<PurchasePlan>> queryPageList(PurchasePlan purchasePlan,
+                                                     @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                     @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                     HttpServletRequest req) {
+        QueryWrapper<PurchasePlan> queryWrapper = QueryGenerator.initQueryWrapper(purchasePlan, req.getParameterMap());
+        Page<PurchasePlan> page = new Page<PurchasePlan>(pageNo, pageSize);
+        IPage<PurchasePlan> pageList = purchasePlanService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param purchasePlanPage
+     * @return
+     */
+    @AutoLog(value = "采购计划-添加")
+    @ApiOperation(value = "采购计划-添加", notes = "采购计划-添加")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_plan:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody PurchasePlanPage purchasePlanPage) {
+        PurchasePlan purchasePlan = new PurchasePlan();
+        BeanUtils.copyProperties(purchasePlanPage, purchasePlan);
+        purchasePlanService.saveMain(purchasePlan, purchasePlanPage.getPurchaseAttachmentsList(), purchasePlanPage.getPurchasePlanInfoList());
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param purchasePlanPage
+     * @return
+     */
+    @AutoLog(value = "采购计划-编辑")
+    @ApiOperation(value = "采购计划-编辑", notes = "采购计划-编辑")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_plan:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody PurchasePlanPage purchasePlanPage) {
+        PurchasePlan purchasePlan = new PurchasePlan();
+        BeanUtils.copyProperties(purchasePlanPage, purchasePlan);
+        PurchasePlan purchasePlanEntity = purchasePlanService.getById(purchasePlan.getId());
+        if (purchasePlanEntity == null) {
+            return Result.error("未找到对应数据");
+        }
+        purchasePlanService.updateMain(purchasePlan, purchasePlanPage.getPurchaseAttachmentsList(), purchasePlanPage.getPurchasePlanInfoList());
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "采购计划-通过id删除")
+    @ApiOperation(value = "采购计划-通过id删除", notes = "采购计划-通过id删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_plan:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        purchasePlanService.delMain(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "采购计划-批量删除")
+    @ApiOperation(value = "采购计划-批量删除", notes = "采购计划-批量删除")
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_plan:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.purchasePlanService.delBatchMain(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "采购计划-通过id查询")
+    @ApiOperation(value = "采购计划-通过id查询", notes = "采购计划-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<PurchasePlan> queryById(@RequestParam(name = "id", required = true) String id) {
+        PurchasePlan purchasePlan = purchasePlanService.getById(id);
+        if (purchasePlan == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(purchasePlan);
+
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "采购计划相关附件通过主表ID查询")
+    @ApiOperation(value = "采购计划相关附件主表ID查询", notes = "采购计划相关附件-通主表ID查询")
+    @GetMapping(value = "/queryPurchaseAttachmentsByMainId")
+    public Result<List<PurchaseAttachments>> queryPurchaseAttachmentsListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<PurchaseAttachments> purchaseAttachmentsList = purchaseAttachmentsService.selectByMainId(id);
+        return Result.OK(purchaseAttachmentsList);
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "采购计划信息通过主表ID查询")
+    @ApiOperation(value = "采购计划信息主表ID查询", notes = "采购计划信息-通主表ID查询")
+    @GetMapping(value = "/queryPurchasePlanInfoByMainId")
+    public Result<List<PurchasePlanInfo>> queryPurchasePlanInfoListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<PurchasePlanInfo> purchasePlanInfoList = purchasePlanInfoService.selectByMainId(id);
+        return Result.OK(purchasePlanInfoList);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param purchasePlan
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_plan:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, PurchasePlan purchasePlan) {
+        // Step.1 组装查询条件查询数据
+        QueryWrapper<PurchasePlan> queryWrapper = QueryGenerator.initQueryWrapper(purchasePlan, request.getParameterMap());
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+        //配置选中数据查询条件
+        String selections = request.getParameter("selections");
+        if (oConvertUtils.isNotEmpty(selections)) {
+            List<String> selectionList = Arrays.asList(selections.split(","));
+            queryWrapper.in("id", selectionList);
+        }
+        //Step.2 获取导出数据
+        List<PurchasePlan> purchasePlanList = purchasePlanService.list(queryWrapper);
+
+        // Step.3 组装pageList
+        List<PurchasePlanPage> pageList = new ArrayList<PurchasePlanPage>();
+        for (PurchasePlan main : purchasePlanList) {
+            PurchasePlanPage vo = new PurchasePlanPage();
+            BeanUtils.copyProperties(main, vo);
+            List<PurchaseAttachments> purchaseAttachmentsList = purchaseAttachmentsService.selectByMainId(main.getId());
+            vo.setPurchaseAttachmentsList(purchaseAttachmentsList);
+            List<PurchasePlanInfo> purchasePlanInfoList = purchasePlanInfoService.selectByMainId(main.getId());
+            vo.setPurchasePlanInfoList(purchasePlanInfoList);
+            pageList.add(vo);
+        }
+
+        // Step.4 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        mv.addObject(NormalExcelConstants.FILE_NAME, "采购计划列表");
+        mv.addObject(NormalExcelConstants.CLASS, PurchasePlanPage.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("采购计划数据", "导出人:" + sysUser.getRealname(), "采购计划"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("purchaseManage:sbsmzq_purchase_plan:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            // 获取上传文件对象
+            MultipartFile file = entity.getValue();
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<PurchasePlanPage> list = ExcelImportUtil.importExcel(file.getInputStream(), PurchasePlanPage.class, params);
+                for (PurchasePlanPage page : list) {
+                    PurchasePlan po = new PurchasePlan();
+                    BeanUtils.copyProperties(page, po);
+                    purchasePlanService.saveMain(po, page.getPurchaseAttachmentsList(), page.getPurchasePlanInfoList());
+                }
+                return Result.OK("文件导入成功!数据行数:" + list.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.OK("文件导入失败!");
+    }
+
+    /**
+     * 分页列表查询(与我相关)
+     *
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "采购计划-分页列表查询(与我相关)", notes = "采购计划-分页列表查询(与我相关)")
+    @GetMapping(value = "/listByUser")
+    public Result<IPage<PurchasePlan>> queryPageListByUser(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                           HttpServletRequest req) {
+        LoginUser loginUser = TokenUtils.getLoginUser(req, commonApi, redisUtil);
+        // 构建查询条件
+        LambdaQueryWrapper<PurchasePlan> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(PurchasePlan::getApplicant, loginUser.getId());
+        QueryGenerator.initQueryWrapper(queryWrapper, req.getParameterMap());
+        Page<PurchasePlan> page = new Page<PurchasePlan>(pageNo, pageSize);
+        IPage<PurchasePlan> pageList = purchasePlanService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+}

+ 80 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/entity/PurchaseAttachments.java

@@ -0,0 +1,80 @@
+package org.jeecg.modules.purchaseManage.purchasePlan.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 采购计划相关附件
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_purchase_attachments对象", description = "采购计划相关附件")
+@Data
+@TableName("sbsmzq_purchase_attachments")
+public class PurchaseAttachments implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 文件地址
+     */
+    @Excel(name = "文件地址", width = 15)
+    @ApiModelProperty(value = "文件地址")
+    private String fileAddress;
+    /**
+     * 采购计划id(外键)
+     */
+    @ApiModelProperty(value = "采购计划id(外键)")
+    private String purchasePlanId;
+    /**
+     * 文件名称
+     */
+    @Excel(name = "文件名称", width = 15)
+    @ApiModelProperty(value = "文件名称")
+    private String fileName;
+}

+ 140 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/entity/PurchasePlan.java

@@ -0,0 +1,140 @@
+package org.jeecg.modules.purchaseManage.purchasePlan.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 采购计划
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_purchase_plan对象", description = "采购计划")
+@Data
+@TableName("sbsmzq_purchase_plan")
+public class PurchasePlan implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 计划编号
+     */
+    @Excel(name = "计划编号", width = 15)
+    @ApiModelProperty(value = "计划编号")
+    private String planNumber;
+    /**
+     * 标题
+     */
+    @Excel(name = "标题", width = 15)
+    @ApiModelProperty(value = "标题")
+    private String title;
+    /**
+     * 采购类型(1 设备采购  2 备件物料采购)
+     */
+    @Excel(name = "采购类型(1 设备采购  2 备件物料采购)", width = 15)
+    @ApiModelProperty(value = "采购类型(1 设备采购  2 备件物料采购)")
+    private Integer purchaseType;
+    /**
+     * 计划采购数量
+     */
+    @Excel(name = "计划采购数量", width = 15)
+    @ApiModelProperty(value = "计划采购数量")
+    private Integer planPurchaseNum;
+    /**
+     * 计划金额
+     */
+    @Excel(name = "计划金额", width = 15)
+    @ApiModelProperty(value = "计划金额")
+    private BigDecimal planAmount;
+    /**
+     * 申请时间
+     */
+    @Excel(name = "申请时间", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "申请时间")
+    private Date applicationTime;
+    /**
+     * 申请人
+     */
+    @Excel(name = "申请人", width = 15)
+    @ApiModelProperty(value = "申请人")
+    private String applicant;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    /**
+     * 当前节点
+     */
+    @Excel(name = "当前节点", width = 15)
+    @ApiModelProperty(value = "当前节点")
+    private String currentNode;
+    /**
+     * 审批状态
+     */
+    @Excel(name = "审批状态", width = 15)
+    @ApiModelProperty(value = "审批状态")
+    private Integer approvalStatus;
+    /**
+     * 审批结束时间
+     */
+    @Excel(name = "审批结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "审批结束时间")
+    private Date approvalEndTime;
+    /**
+     * 采购周期
+     */
+    @Excel(name = "采购周期", width = 15)
+    @ApiModelProperty(value = "采购周期")
+    private String purchaseCycle;
+}

+ 123 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/entity/PurchasePlanInfo.java

@@ -0,0 +1,123 @@
+package org.jeecg.modules.purchaseManage.purchasePlan.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 采购计划信息
+ * @Author: jeecg-boot
+ * @Date: 2025-04-07
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_purchase_plan_info对象", description = "采购计划信息")
+@Data
+@TableName("sbsmzq_purchase_plan_info")
+public class PurchasePlanInfo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 编号
+     */
+    @Excel(name = "编号", width = 15)
+    @ApiModelProperty(value = "编号")
+    private String number;
+    /**
+     * 名称
+     */
+    @Excel(name = "名称", width = 15)
+    @ApiModelProperty(value = "名称")
+    private String name;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+    /**
+     * 数量
+     */
+    @Excel(name = "数量", width = 15)
+    @ApiModelProperty(value = "数量")
+    private Integer amount;
+    /**
+     * 预计单价
+     */
+    @Excel(name = "预计单价", width = 15)
+    @ApiModelProperty(value = "预计单价")
+    private BigDecimal expectedPrice;
+    /**
+     * 单位
+     */
+    @Excel(name = "单位", width = 15)
+    @ApiModelProperty(value = "单位")
+    private String unit;
+    /**
+     * 供应商
+     */
+    @Excel(name = "供应商", width = 15)
+    @ApiModelProperty(value = "供应商")
+    private String supplier;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    /**
+     * 小计
+     */
+    @Excel(name = "小计", width = 15)
+    @ApiModelProperty(value = "小计")
+    private BigDecimal total;
+    /**
+     * 采购计划id(外键)
+     */
+    @ApiModelProperty(value = "采购计划id(外键)")
+    private String purchasePlanId;
+}

+ 31 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/PurchaseAttachmentsMapper.java

@@ -0,0 +1,31 @@
+package org.jeecg.modules.purchaseManage.purchasePlan.mapper;
+
+import java.util.List;
+import org.jeecg.modules.purchaseManage.purchasePlan.entity.PurchaseAttachments;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 采购计划相关附件
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface PurchaseAttachmentsMapper extends BaseMapper<PurchaseAttachments> {
+
+	/**
+	 * 通过主表id删除子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return boolean
+	 */
+	public boolean deleteByMainId(@Param("mainId") String mainId);
+
+  /**
+   * 通过主表id查询子表数据
+   *
+   * @param mainId 主表id
+   * @return List<PurchaseAttachments>
+   */
+	public List<PurchaseAttachments> selectByMainId(@Param("mainId") String mainId);
+}

+ 31 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/PurchasePlanInfoMapper.java

@@ -0,0 +1,31 @@
+package org.jeecg.modules.purchaseManage.purchasePlan.mapper;
+
+import java.util.List;
+import org.jeecg.modules.purchaseManage.purchasePlan.entity.PurchasePlanInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 采购计划信息
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface PurchasePlanInfoMapper extends BaseMapper<PurchasePlanInfo> {
+
+	/**
+	 * 通过主表id删除子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return boolean
+	 */
+	public boolean deleteByMainId(@Param("mainId") String mainId);
+
+  /**
+   * 通过主表id查询子表数据
+   *
+   * @param mainId 主表id
+   * @return List<PurchasePlanInfo>
+   */
+	public List<PurchasePlanInfo> selectByMainId(@Param("mainId") String mainId);
+}

+ 14 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/PurchasePlanMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.purchaseManage.purchasePlan.mapper;
+
+import org.jeecg.modules.purchaseManage.purchasePlan.entity.PurchasePlan;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 采购计划
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface PurchasePlanMapper extends BaseMapper<PurchasePlan> {
+
+}

+ 16 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/xml/PurchaseAttachmentsMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.purchasePlan.mapper.PurchaseAttachmentsMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sbsmzq_purchase_attachments 
+		WHERE
+			 purchase_plan_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.purchaseManage.purchasePlan.entity.PurchaseAttachments">
+		SELECT * 
+		FROM  sbsmzq_purchase_attachments
+		WHERE
+			 purchase_plan_id = #{mainId} 	</select>
+</mapper>

+ 16 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/xml/PurchasePlanInfoMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.purchasePlan.mapper.PurchasePlanInfoMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sbsmzq_purchase_plan_info 
+		WHERE
+			 purchase_plan_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.purchaseManage.purchasePlan.entity.PurchasePlanInfo">
+		SELECT * 
+		FROM  sbsmzq_purchase_plan_info
+		WHERE
+			 purchase_plan_id = #{mainId} 	</select>
+</mapper>

+ 5 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/mapper/xml/PurchasePlanMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.purchaseManage.purchasePlan.mapper.PurchasePlanMapper">
+
+</mapper>

+ 22 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/purchaseManage/purchasePlan/service/IPurchaseAttachmentsService.java

@@ -0,0 +1,22 @@
+package org.jeecg.modules.purchaseManage.purchasePlan.service;
+
+import org.jeecg.modules.purchaseManage.purchasePlan.entity.PurchaseAttachments;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 采购计划相关附件
+ * @Author: jeecg-boot
+ * @Date:   2025-04-07
+ * @Version: V1.0
+ */
+public interface IPurchaseAttachmentsService extends IService<PurchaseAttachments> {
+
+	/**
+	 * 通过主表id查询子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return List<PurchaseAttachments>
+	 */
+	public List<PurchaseAttachments> selectByMainId(String mainId);
+}

部分文件因为文件数量过多而无法显示