Browse Source

设备子系统——保养检修 V1
任务生成
批量新增
年度复制

hyq 1 year ago
parent
commit
2f0aa7093a
37 changed files with 3400 additions and 0 deletions
  1. 31 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenancePartDao.java
  2. 30 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceScheduleDao.java
  3. 13 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceStandardDao.java
  4. 13 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceTaskDao.java
  5. 13 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquPartsSetoutStandardDao.java
  6. 27 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquPartsSetoutTaskDao.java
  7. 41 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenancePartService.java
  8. 24 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceScheduleService.java
  9. 27 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceStandardService.java
  10. 19 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceTaskService.java
  11. 27 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquPartsSetoutStandardService.java
  12. 26 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquPartsSetoutTaskService.java
  13. 49 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/MaintenanceService.java
  14. 59 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenancePartServiceImpl.java
  15. 88 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceScheduleServiceImpl.java
  16. 34 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceStandardServiceImpl.java
  17. 57 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceTaskServiceImpl.java
  18. 44 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquPartsSetoutStandardServiceImpl.java
  19. 28 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquPartsSetoutTaskServiceImpl.java
  20. 386 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/MaintenanceServiceImpl.java
  21. 54 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/utils/CommonUtils.java
  22. 291 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenancePartDo.java
  23. 215 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceScheduleDo.java
  24. 263 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceStandardDo.java
  25. 348 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceTaskDo.java
  26. 341 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquOverhaulPlanningTasksDo.java
  27. 180 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquPartsSetoutPlanningTasksDo.java
  28. 166 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquPartsSetoutStandardDo.java
  29. 180 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquPartsSetoutTaskDo.java
  30. 35 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/BatchCreateDTO.java
  31. 15 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/IdGeneralDTO.java
  32. 31 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/PlanYearCopyDTO.java
  33. 39 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/TaskCreatorDTO.java
  34. 11 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/enums/BoolEnum.java
  35. 67 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/enums/EquipmentTypeEnum.java
  36. 60 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/enums/ErrorCodeEnum.java
  37. 68 0
      cx-equipment/cx-equipment-server/src/main/java/com/rongwei/bsserver/sys/controller/MaintenanceController.java

+ 31 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenancePartDao.java

@@ -0,0 +1,31 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.EquMaintenancePartDo;
+import org.apache.ibatis.annotations.Insert;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquMaintenancePartDao
+ * @date 2023/11/27 14:59
+ * @description 设备维护部位
+ */
+public interface EquMaintenancePartDao extends BaseMapper<EquMaintenancePartDo> {
+    @Insert("<script>" +
+            "insert into equ_maintenance_part (ID,TENANTID,ROPTION,REMARK,CREATEDATE,CREATEUSERID,MODIFYDATE,MODIFYUSERID," +
+            "CREATEUSERNAME,MODIFYUSERNAME,MASTERID,JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DECEMBER,MAINTENANCESITE," +
+            "MAINTENANCECONTENT,STANDARDREQUEST,EQUIPMENTSUPPORT,MEANS,`PERIOD`,MAINTENANCETYPE,ISOUTSOURCE,MAINTENANCESTANDID,MAINTENANCESTAND) VALUES " +
+            "<foreach collection='list' item='info' separator=','>" +
+            "(#{info.id},#{info.tenantid},#{info.roption},#{info.remark},#{info.createdate},#{info.createuserid},#{info.modifydate}," +
+            "#{info.modifyuserid},#{info.createusername},#{info.modifyusername},#{info.masterid},#{info.jan}," +
+            "#{info.feb},#{info.mar},#{info.apr},#{info.may},#{info.jun},#{info.jul},#{info.aug},#{info.sep}," +
+            "#{info.oct},#{info.nov},#{info.december},#{info.maintenancesite},#{info.maintenancecontent}," +
+            "#{info.standardrequest},#{info.equipmentsupport},#{info.means},#{info.period},#{info.maintenancetype}," +
+            "#{info.isoutsource},#{info.maintenancestandid},#{info.maintenancestand})"+
+            "</foreach>" +
+            "</script>")
+    void saveBatchList(@Param("list") List<EquMaintenancePartDo> equMaintenancePartList);
+}

+ 30 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceScheduleDao.java

@@ -0,0 +1,30 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.EquMaintenanceScheduleDo;
+import org.apache.ibatis.annotations.Insert;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquMaintenanceScheduleDao
+ * @date 2023/11/27 14:58
+ * @description 保养/维护计划
+ */
+public interface EquMaintenanceScheduleDao extends BaseMapper<EquMaintenanceScheduleDo> {
+
+    @Insert("<script>" +
+            "insert into equ_maintenance_schedule (ID,TENANTID,ROPTION,REMARK,CREATEDATE,CREATEUSERID,MODIFYDATE,MODIFYUSERID," +
+            "CREATEUSERNAME,MODIFYUSERNAME,PLANYEAR,EQUIPMENTNAME,EQUIPMENTNUMBER,PLANTYPE,EQUIPMENTTYPE,PLANT,SPECIALEQUIPMENT,OBJECTTYPE," +
+            "SPECIFICATION,WORKSHOPID,WORKSHOP,PLANNEDSTATUS,EQUIPMENTID) values " +
+            "<foreach collection='list' item='info' separator=','>" +
+            "(#{info.id},#{info.tenantid},#{info.roption},#{info.remark},#{info.createdate},#{info.createuserid},#{info.modifydate}," +
+            "#{info.modifyuserid},#{info.createusername},#{info.modifyusername},#{info.planyear},#{info.equipmentname}," +
+            "#{info.equipmentnumber},#{info.plantype},#{info.equipmenttype},#{info.plant},#{info.specialequipment}," +
+            "#{info.objecttype},#{info.specification},#{info.workshopid},#{info.workshop},#{info.plannedstatus},#{info.equipmentid})" +
+            "</foreach>" +
+            "</script>")
+    int saveBatchList(@Param("list") List<EquMaintenanceScheduleDo> maintenanceScheduleList);
+}

+ 13 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceStandardDao.java

@@ -0,0 +1,13 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.EquMaintenanceStandardDo;
+
+/**
+ * @author shangmi
+ * @title EquMaintenanceStandardDao
+ * @date 2023/11/28 15:30
+ * @description 保养标准库
+ */
+public interface EquMaintenanceStandardDao extends BaseMapper<EquMaintenanceStandardDo> {
+}

+ 13 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceTaskDao.java

@@ -0,0 +1,13 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.EquMaintenanceTaskDo;
+
+/**
+ * @author shangmi
+ * @title EquMaintenanceTaskDao
+ * @date 2023/11/27 14:55
+ * @description 保养检修任务
+ */
+public interface EquMaintenanceTaskDao extends BaseMapper<EquMaintenanceTaskDo> {
+}

+ 13 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquPartsSetoutStandardDao.java

@@ -0,0 +1,13 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.EquPartsSetoutStandardDo;
+
+/**
+ * @author shangmi
+ * @title EquPartsSetoutStandardDao
+ * @date 2023/11/28 15:17
+ * @description 备品备件标准库
+ */
+public interface EquPartsSetoutStandardDao extends BaseMapper<EquPartsSetoutStandardDo> {
+}

+ 27 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquPartsSetoutTaskDao.java

@@ -0,0 +1,27 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.EquPartsSetoutTaskDo;
+import org.apache.ibatis.annotations.Insert;
+import org.springframework.data.repository.query.Param;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquPartsSetoutTaskDao
+ * @date 2023/11/28 13:17
+ * @description  任务备品备件
+ */
+public interface EquPartsSetoutTaskDao extends BaseMapper<EquPartsSetoutTaskDo> {
+    @Insert("<script>" +
+            "insert into equ_parts_setout_task (ID,TENANTID,ROPTION,REMARK,CREATEDATE,CREATEUSERID,MODIFYDATE,MODIFYUSERID," +
+            "CREATEUSERNAME,MODIFYUSERNAME,MASTERID,PARTSID,PARTSCODE,PARTSNAME,PARTSIMG,SPECIFICATION,MODEL,UNIT,USENUMBER,INVENTORYNUMBER,OCCUPYNUMBER) values" +
+            "<foreach collection='list' item='info' separator=','>" +
+            "(#{info.id},#{info.tenantid},#{info.roption},#{info.remark},#{info.createdate},#{info.createuserid},#{info.modifydate}," +
+            "#{info.modifyuserid},#{info.createusername},#{info.modifyusername},#{info.masterid},#{info.partsid},#{info.partscode}," +
+            "#{info.partsname},#{info.partsimg},#{info.specification},#{info.model},#{info.unit},#{info.usenumber},#{info.inventorynumber},#{info.occupynumber})" +
+            "</foreach>" +
+            "</script>")
+    void batchSave(@Param("list") List<EquPartsSetoutTaskDo> partsSetoutTaskDoList);
+}

+ 41 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenancePartService.java

@@ -0,0 +1,41 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.EquMaintenancePartDo;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquMaintenancePartService
+ * @date 2023/11/27 15:53
+ * @description 设备维护部位业务类
+ */
+public interface EquMaintenancePartService extends IService<EquMaintenancePartDo> {
+    /**
+     * 根据主表ID和月查询计划详细信息信息
+     *
+     * @param id 主表ID
+     * @param month 月份
+     * @return {@link List< EquMaintenancePartDo>}
+     * @date 2023/11/29 17:32
+     * @author shangmi
+     *
+     */
+
+    List<EquMaintenancePartDo> getMasterIdAndMonthByList(String id, Integer month);
+
+    /**
+     * 批量保存计划详细信息
+     *
+     * @param equMaintenancePartList 数组
+     * @return
+     * @date 2023/11/29 17:33
+     * @author shangmi
+     *
+     */
+
+    void saveBatchList(List<EquMaintenancePartDo> equMaintenancePartList);
+
+    List<EquMaintenancePartDo> getMasterIdByList(List<String> collect);
+}

+ 24 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceScheduleService.java

@@ -0,0 +1,24 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.EquMaintenanceScheduleDo;
+import com.rongwei.bsentity.dto.BatchCreateDTO;
+import com.rongwei.bsentity.dto.TaskCreatorDTO;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquMaintenanceScheduleService
+ * @date 2023/11/27 15:53
+ * @description 保养/维护计划业务类
+ */
+public interface EquMaintenanceScheduleService extends IService<EquMaintenanceScheduleDo>{
+    EquMaintenanceScheduleDo getMaintenanceSiteByList(TaskCreatorDTO taskCreator);
+
+    int saveBatchList(List<EquMaintenanceScheduleDo> maintenanceScheduleList);
+
+    List<EquMaintenanceScheduleDo> getYearAndEquipmentByList(List<String> split,BatchCreateDTO batchCreate);
+
+    List<EquMaintenanceScheduleDo> getYearByList(int oldYear, String tenantId);
+}

+ 27 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceStandardService.java

@@ -0,0 +1,27 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.EquMaintenanceScheduleDo;
+import com.rongwei.bsentity.domain.EquMaintenanceStandardDo;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquMaintenanceStandardService
+ * @date 2023/11/28 15:29
+ * @description 保养标准库业务类
+ */
+public interface EquMaintenanceStandardService extends IService<EquMaintenanceStandardDo> {
+    /**
+     * 根据对象分类查询标准库数组
+     *
+     * @param planType
+     * @return {@link List< EquMaintenanceStandardDo>}
+     * @date 2023/11/29 14:30
+     * @author shangmi
+     *
+     */
+
+    List<EquMaintenanceStandardDo> getPlanTypeByList(String planType);
+}

+ 19 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceTaskService.java

@@ -0,0 +1,19 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.EquMaintenanceTaskDo;
+import com.rongwei.bsentity.dto.TaskCreatorDTO;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquMaintenanceTaskService
+ * @date 2023/11/27 15:23
+ * @description 保养检修任务业务类
+ */
+public interface EquMaintenanceTaskService extends IService<EquMaintenanceTaskDo> {
+    List<EquMaintenanceTaskDo> getMaintenanceSite(TaskCreatorDTO taskCreator);
+
+    int insertBatch(List<EquMaintenanceTaskDo> equMaintenanceTaskDos);
+}

+ 27 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquPartsSetoutStandardService.java

@@ -0,0 +1,27 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.EquPartsSetoutStandardDo;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquPartsSetoutStandardService
+ * @date 2023/11/28 15:16
+ * @description 备品备件标准库业务类
+ */
+public interface EquPartsSetoutStandardService extends IService<EquPartsSetoutStandardDo> {
+
+    /**
+     * 通过主表ID查询所有的备品备件信息
+     *
+     * @param collect
+     * @return {@link List<EquPartsSetoutStandardDo>}
+     * @date 2023/11/28 18:06
+     * @author shangmi
+     *
+     */
+    List<EquPartsSetoutStandardDo> getMasterIdByList(List<String> collect);
+
+}

+ 26 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquPartsSetoutTaskService.java

@@ -0,0 +1,26 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.EquPartsSetoutTaskDo;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquPartsSetoutTaskService
+ * @date 2023/11/28 13:30
+ * @description 备品备件任务业务类
+ */
+public interface EquPartsSetoutTaskService extends IService<EquPartsSetoutTaskDo> {
+    /**
+     * 将数据保存 如果存在则更新
+     *
+     * @param partsSetoutTaskDoList
+     * @return
+     * @date 2023/11/28 14:07
+     * @author shangmi
+     *
+     */
+
+    void batchSave(List<EquPartsSetoutTaskDo> partsSetoutTaskDoList);
+}

+ 49 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/MaintenanceService.java

@@ -0,0 +1,49 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.dto.BatchCreateDTO;
+import com.rongwei.bsentity.dto.PlanYearCopyDTO;
+import com.rongwei.bsentity.dto.TaskCreatorDTO;
+import com.rongwei.rwcommon.base.R;
+
+/**
+ * @author shangmi
+ * @title MaintenanceService
+ * @date 2023/11/27 14:41
+ * @description 保养检修Service
+ */
+public interface MaintenanceService  {
+
+    /**
+     * 发布任务
+     *
+     * @param taskCreator 入参
+     * @return {@link R}
+     * @date 2023/11/27 16:25
+     * @author shangmi
+     */
+    R saveTask(TaskCreatorDTO taskCreator);
+
+    /**
+     * 批量生成保养计划
+     *
+     * @param batchCreate 入参
+     * @return {@link R}
+     * @date 2023/11/29 14:01
+     * @author shangmi
+     *
+     */
+    R batchSavePlans(BatchCreateDTO batchCreate);
+
+    /**
+     * 复制年度计划
+     *
+     * @param planYearCopy 入参
+     * @return {@link R}
+     * @date 2023/11/30 17:35
+     * @author shangmi
+     *
+     */
+
+    R saveYearByTask(PlanYearCopyDTO planYearCopy);
+}

+ 59 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenancePartServiceImpl.java

@@ -0,0 +1,59 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.dao.EquMaintenancePartDao;
+import com.rongwei.bscommon.sys.service.EquMaintenancePartService;
+import com.rongwei.bsentity.domain.EquMaintenancePartDo;
+import com.rongwei.bsentity.domain.EquMaintenanceTaskDo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquMaintenancePartServiceImpl
+ * @date 2023/11/27 15:55
+ * @description 设备维护部位业务实现
+ */
+@Service
+public class EquMaintenancePartServiceImpl extends ServiceImpl<EquMaintenancePartDao,EquMaintenancePartDo> implements EquMaintenancePartService {
+
+    @Autowired
+    private EquMaintenancePartDao maintenancePartDao;
+
+
+    @Override
+    public List<EquMaintenancePartDo> getMasterIdAndMonthByList(String id, Integer month) {
+        LambdaQueryWrapper<EquMaintenancePartDo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(EquMaintenancePartDo::getMasterid,id)
+                .eq(EquMaintenancePartDo::getDeleted,0)
+                .eq(month==1,EquMaintenancePartDo::getJan,1)
+                .eq(month==2,EquMaintenancePartDo::getFeb,1)
+                .eq(month==3,EquMaintenancePartDo::getMar,1)
+                .eq(month==4,EquMaintenancePartDo::getApr,1)
+                .eq(month==5,EquMaintenancePartDo::getMay,1)
+                .eq(month==6,EquMaintenancePartDo::getJun,1)
+                .eq(month==7,EquMaintenancePartDo::getJul,1)
+                .eq(month==8,EquMaintenancePartDo::getAug,1)
+                .eq(month==9,EquMaintenancePartDo::getSep,1)
+                .eq(month==10,EquMaintenancePartDo::getOct,1)
+                .eq(month==11,EquMaintenancePartDo::getNov,1)
+                .eq(month==12,EquMaintenancePartDo::getDecember,1);
+        return maintenancePartDao.selectList(queryWrapper);
+    }
+
+    @Override
+    public void saveBatchList(List<EquMaintenancePartDo> equMaintenancePartList) {
+        maintenancePartDao.saveBatchList(equMaintenancePartList);
+    }
+
+    @Override
+    public List<EquMaintenancePartDo> getMasterIdByList(List<String> collect) {
+        LambdaQueryWrapper<EquMaintenancePartDo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(EquMaintenancePartDo::getDeleted,0)
+                .in(EquMaintenancePartDo::getMasterid,collect);
+        return maintenancePartDao.selectList(queryWrapper);
+    }
+}

+ 88 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceScheduleServiceImpl.java

@@ -0,0 +1,88 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.dao.EquMaintenanceScheduleDao;
+import com.rongwei.bscommon.sys.service.EquMaintenanceScheduleService;
+import com.rongwei.bsentity.domain.EquMaintenanceScheduleDo;
+import com.rongwei.bsentity.dto.BatchCreateDTO;
+import com.rongwei.bsentity.dto.TaskCreatorDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquMaintenanceScheduleServiceImpl
+ * @date 2023/11/27 15:56
+ * @description 保养/维护计划业务实现
+ */
+@Service
+public class EquMaintenanceScheduleServiceImpl extends ServiceImpl<EquMaintenanceScheduleDao,EquMaintenanceScheduleDo> implements EquMaintenanceScheduleService {
+
+    @Autowired
+    private EquMaintenanceScheduleDao maintenanceScheduleDao;
+
+    /**
+     * 通过年、设备ID、保养分类获得保养计划
+     *
+     * @param taskCreator
+     * @return {@link List< EquMaintenanceScheduleDo>}
+     * @date 2023/11/27 16:06
+     * @author shangmi
+     */
+
+    @Override
+    public EquMaintenanceScheduleDo getMaintenanceSiteByList(TaskCreatorDTO taskCreator) {
+        LambdaQueryWrapper<EquMaintenanceScheduleDo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(EquMaintenanceScheduleDo::getEquipmentid,taskCreator.getEquipmentId())
+                .eq(EquMaintenanceScheduleDo::getPlanyear,taskCreator.getYear())
+                .eq(EquMaintenanceScheduleDo::getPlantype,taskCreator.getPlanType())
+                .last("limit 1");
+        return maintenanceScheduleDao.selectOne(queryWrapper);
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param maintenanceScheduleList 保存数据
+     * @return {@link int}
+     * @date 2023/11/30 18:24
+     * @author shangmi
+     *
+     */
+
+    @Override
+    public int saveBatchList(List<EquMaintenanceScheduleDo> maintenanceScheduleList) {
+        return maintenanceScheduleDao.saveBatchList(maintenanceScheduleList);
+    }
+
+    /**
+     * 通过年和设备
+     *
+     * @param split
+     * @param batchCreate
+     * @return {@link List< EquMaintenanceScheduleDo>}
+     * @date 2023/11/30 18:25
+     * @author shangmi
+     *
+     */
+
+    @Override
+    public List<EquMaintenanceScheduleDo> getYearAndEquipmentByList(List<String> split, BatchCreateDTO batchCreate) {
+        LambdaQueryWrapper<EquMaintenanceScheduleDo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.in(EquMaintenanceScheduleDo::getEquipmentid,split)
+                .eq(EquMaintenanceScheduleDo::getPlanyear,batchCreate.getYear())
+                .eq(EquMaintenanceScheduleDo::getTenantid,batchCreate.getTenantId());
+        return maintenanceScheduleDao.selectList(queryWrapper);
+    }
+
+    @Override
+    public List<EquMaintenanceScheduleDo> getYearByList(int oldYear, String tenantId) {
+        LambdaQueryWrapper<EquMaintenanceScheduleDo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(EquMaintenanceScheduleDo::getPlanyear,oldYear)
+                .eq(EquMaintenanceScheduleDo::getTenantid,tenantId);
+        return maintenanceScheduleDao.selectList(queryWrapper);
+    }
+}

+ 34 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceStandardServiceImpl.java

@@ -0,0 +1,34 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.dao.EquMaintenanceStandardDao;
+import com.rongwei.bscommon.sys.service.EquMaintenanceStandardService;
+import com.rongwei.bsentity.domain.EquMaintenanceScheduleDo;
+import com.rongwei.bsentity.domain.EquMaintenanceStandardDo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquMaintenanceStandardServiceImpl
+ * @date 2023/11/28 15:29
+ * @description 保养标准库业务实现类
+ */
+@Service
+public class EquMaintenanceStandardServiceImpl extends ServiceImpl<EquMaintenanceStandardDao,EquMaintenanceStandardDo> implements EquMaintenanceStandardService {
+
+    @Autowired
+    private EquMaintenanceStandardDao maintenanceStandardDao;
+
+    @Override
+    public List<EquMaintenanceStandardDo> getPlanTypeByList(String planType) {
+        LambdaQueryWrapper<EquMaintenanceStandardDo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(EquMaintenanceStandardDo::getEquipmenttype,planType)
+                .eq(EquMaintenanceStandardDo::getDeleted,0);
+
+        return maintenanceStandardDao.selectList(queryWrapper);
+    }
+}

+ 57 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceTaskServiceImpl.java

@@ -0,0 +1,57 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.dao.EquMaintenanceTaskDao;
+import com.rongwei.bscommon.sys.service.EquMaintenanceTaskService;
+import com.rongwei.bsentity.domain.EquMaintenanceTaskDo;
+import com.rongwei.bsentity.dto.TaskCreatorDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * @author shangmi
+ * @title EquMaintenanceTaskServiceImpl
+ * @date 2023/11/27 15:24
+ * @description 保养检修任务业务实现
+ */
+@Service
+public class EquMaintenanceTaskServiceImpl extends ServiceImpl<EquMaintenanceTaskDao,EquMaintenanceTaskDo> implements EquMaintenanceTaskService {
+
+    @Autowired
+    private EquMaintenanceTaskDao maintenanceTaskDao;
+
+    /**
+     * 查询任务中是否存在该条记录
+     *
+     * @param taskCreator
+     * @return {@link EquMaintenanceTaskDo}
+     * @date 2023/11/27 15:37
+     * @author shangmi
+     */
+
+    @Override
+    public List<EquMaintenanceTaskDo> getMaintenanceSite(TaskCreatorDTO taskCreator) {
+        LambdaQueryWrapper<EquMaintenanceTaskDo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(EquMaintenanceTaskDo::getEquipmentid, taskCreator.getEquipmentId())
+                .eq(EquMaintenanceTaskDo::getPlanyear, taskCreator.getYear())
+                .eq(EquMaintenanceTaskDo::getMonth, taskCreator.getMonth())
+                .eq(EquMaintenanceTaskDo::getPlantype, taskCreator.getPlanType())
+                .eq(EquMaintenanceTaskDo::getDeleted,0);
+        return maintenanceTaskDao.selectList(queryWrapper);
+    }
+
+
+
+    @Override
+    public int insertBatch(List<EquMaintenanceTaskDo> equMaintenanceTaskDos) {
+        int total = 0;
+        for(EquMaintenanceTaskDo info :equMaintenanceTaskDos){
+            total +=maintenanceTaskDao.insert(info);
+        };
+        return total;
+    }
+}

+ 44 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquPartsSetoutStandardServiceImpl.java

@@ -0,0 +1,44 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.dao.EquPartsSetoutStandardDao;
+import com.rongwei.bscommon.sys.service.EquPartsSetoutStandardService;
+import com.rongwei.bsentity.domain.EquPartsSetoutStandardDo;
+import com.rongwei.bsentity.domain.EquPartsSetoutTaskDo;
+import org.checkerframework.checker.units.qual.A;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquPartsSetoutStandardServiceImpl
+ * @date 2023/11/28 15:16
+ * @description 备品备件标准库业务实现类
+ */
+@Service
+public class EquPartsSetoutStandardServiceImpl extends ServiceImpl<EquPartsSetoutStandardDao,EquPartsSetoutStandardDo> implements EquPartsSetoutStandardService {
+
+    @Autowired
+    private EquPartsSetoutStandardDao partsSetoutStandardDao;
+
+    /**
+     * 通过主表ID查询所有的备品备件信息
+     *
+     * @param collect
+     * @return {@link List< EquPartsSetoutStandardDo>}
+     * @date 2023/11/28 18:06
+     * @author shangmi
+     *
+     */
+    @Override
+    public List<EquPartsSetoutStandardDo> getMasterIdByList(List<String> collect) {
+        LambdaQueryWrapper<EquPartsSetoutStandardDo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(EquPartsSetoutStandardDo::getDeleted,0)
+                .in(EquPartsSetoutStandardDo::getMasterid,collect);
+        return partsSetoutStandardDao.selectList(queryWrapper);
+    }
+
+}

+ 28 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquPartsSetoutTaskServiceImpl.java

@@ -0,0 +1,28 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.dao.EquPartsSetoutTaskDao;
+import com.rongwei.bscommon.sys.service.EquPartsSetoutTaskService;
+import com.rongwei.bsentity.domain.EquPartsSetoutTaskDo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author shangmi
+ * @title EquPartsSetoutTaskServiceImpl
+ * @date 2023/11/28 13:30
+ * @description 备品备件计划业务类实现类
+ */
+@Service
+public class EquPartsSetoutTaskServiceImpl extends ServiceImpl<EquPartsSetoutTaskDao,EquPartsSetoutTaskDo> implements EquPartsSetoutTaskService {
+
+    @Autowired
+    private EquPartsSetoutTaskDao equPartsSetoutTaskDao;
+
+    @Override
+    public void batchSave(List<EquPartsSetoutTaskDo> partsSetoutTaskDoList) {
+        equPartsSetoutTaskDao.batchSave(partsSetoutTaskDoList);
+    }
+}

+ 386 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/MaintenanceServiceImpl.java

@@ -0,0 +1,386 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.rongwei.bscommon.sys.service.*;
+import com.rongwei.bscommon.sys.utils.CommonUtils;
+import com.rongwei.bsentity.domain.*;
+import com.rongwei.bsentity.dto.BatchCreateDTO;
+import com.rongwei.bsentity.dto.PlanYearCopyDTO;
+import com.rongwei.bsentity.dto.TaskCreatorDTO;
+import com.rongwei.bsentity.enums.EquipmentTypeEnum;
+import com.rongwei.rwadmincommon.system.vo.SysUserVo;
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.utils.SecurityUtil;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @author shangmi
+ * @title MaintenanceServiceImpl
+ * @date 2023/11/27 14:41
+ * @description 保养检修ServiceImpl
+ */
+@Service
+public class MaintenanceServiceImpl implements MaintenanceService {
+
+    @Autowired
+    private EquMaintenanceTaskService maintenanceTaskService;
+
+    @Autowired
+    private EquMaintenanceScheduleService maintenanceScheduleService;
+
+    @Autowired
+    private EquMaintenancePartService maintenancePartService;
+
+    @Autowired
+    private EquPartsSetoutStandardService partsSetoutStandardService;
+
+    @Autowired
+    private EquPartsSetoutTaskService partsSetoutTaskService;
+
+    @Autowired
+    private EquMaintenanceStandardService maintenanceStandardService;
+
+    @Autowired
+    private AspCheckItemsService aspCheckItemsService;
+
+    /**
+     * 发布任务
+     *
+     * @param taskCreator 入参
+     * @return {@link R}
+     * @date 2023/11/27 16:25
+     * @author shangmi
+     */
+
+    @Override
+    @Transactional
+    public R saveTask(TaskCreatorDTO taskCreator) {
+        // 查询主表信息
+        EquMaintenanceScheduleDo maintenanceSchedule = maintenanceScheduleService.getMaintenanceSiteByList(taskCreator);
+        // 查询子表信息
+        Integer month = taskCreator.getMonth();
+        List<EquMaintenancePartDo> maintenancePartList = maintenancePartService.getMasterIdAndMonthByList(maintenanceSchedule.getId(), month);
+        // 查询是否有生成过任务
+        List<EquMaintenanceTaskDo> maintenanceSiteList = maintenanceTaskService.getMaintenanceSite(taskCreator);
+        // 判断所有部位是否都有生成过任务
+        if (maintenanceSiteList.size() == maintenancePartList.size()) {
+            return R.error(maintenanceSchedule.getEquipmentname() + "在" + taskCreator.getYear() + "年" + month + "月的所有部位已发布任务!");
+        }
+        // 任务表没有数据则全部添加
+        if (maintenanceSiteList.size() != 0) {
+            // 去重
+            maintenancePartList = removeDuplicates(maintenancePartList, maintenanceSiteList);
+        }
+        // 通过主表ID查询备品备件信息
+        List<EquPartsSetoutStandardDo> partsSetoutStandardList = partsSetoutStandardService.getMasterIdByList(maintenancePartList.stream().map(EquMaintenancePartDo::getMaintenancestandid).collect(Collectors.toList()));
+        // 转移数据
+        List<EquMaintenanceTaskDo> equMaintenanceTaskDos = dataTransfer(maintenancePartList, maintenanceSchedule,month);
+        List<EquPartsSetoutTaskDo> partsSetoutTaskDoList = sparePartsConversion(partsSetoutStandardList, equMaintenanceTaskDos);
+        // 插入
+        int number = maintenanceTaskService.insertBatch(equMaintenanceTaskDos);
+        partsSetoutTaskService.batchSave(partsSetoutTaskDoList);
+        // 判断是否全部插入成功
+        if (number == equMaintenanceTaskDos.size()){
+            return R.ok();
+        }else {
+            return R.ok("数据添加不完整,请核对数据!");
+        }
+    }
+
+    /**
+     * 批量生成保养计划
+     *
+     * @param batchCreate 入参
+     * @return {@link R}
+     * @date 2023/11/29 14:01
+     * @author shangmi
+     *
+     */
+    @Override
+    @Transactional
+    public R batchSavePlans(BatchCreateDTO batchCreate) {
+        //该设备分类下的所以部位保养标准
+        List<EquMaintenanceStandardDo> partsSetoutStandardList = maintenanceStandardService.getPlanTypeByList(batchCreate.getPlanType());
+        //明细表数组
+        List<EquMaintenancePartDo> equMaintenancePartList = new ArrayList<>();
+
+        //获取设备ID并拆分
+        List<String> equipmentId = Arrays.asList(batchCreate.getEquipmentId().split(","));
+        //设备计划数组
+        List<EquMaintenanceScheduleDo> maintenancePartList = maintenanceScheduleService.getYearAndEquipmentByList(equipmentId,batchCreate);
+        if (maintenancePartList.size()==equipmentId.size()){
+            return R.error(batchCreate.getYear()+"年"+ EquipmentTypeEnum.typeOf(Integer.parseInt(batchCreate.getPlanType()))+"以生成所有计划!");
+        }
+        if (maintenancePartList.size()!=0){
+            equipmentId = equipmentId.stream()
+                    .filter(info -> !(maintenancePartList.stream()
+                                    .map(EquMaintenanceScheduleDo::getEquipmentid)
+                                    .collect(Collectors.toList()).contains(info))
+                            ).collect(Collectors.toList());
+        }
+        List<AspCheckItems> aspCheckItems = new ArrayList<>(aspCheckItemsService.listByIds(equipmentId));
+        List<EquMaintenanceScheduleDo> maintenanceScheduleList = aspCheckItems.stream().map(info -> {
+            //数据转换(设备——计划)
+            EquMaintenanceScheduleDo maintenanceScheduleDo = dataShiftFacilityToPlan(info, batchCreate.getYear());
+            equMaintenancePartList.addAll(dataShiftSpareStandToPlan(partsSetoutStandardList,maintenanceScheduleDo.getId()));
+            return maintenanceScheduleDo;
+        }).collect(Collectors.toList());
+        int number = maintenanceScheduleService.saveBatchList(maintenanceScheduleList);
+        maintenancePartService.saveBatchList(equMaintenancePartList);
+        if (number==maintenanceScheduleList.size()){
+            return R.ok();
+        }else {
+            return R.error("数据添加不完整,请核对数据!");
+        }
+    }
+
+    /**
+     * 复制年度计划
+     *
+     * @param planYearCopy 入参
+     * @return {@link R}
+     * @date 2023/11/30 17:36
+     * @author shangmi
+     *
+     */
+
+    @Override
+    @Transactional
+    public R saveYearByTask(PlanYearCopyDTO planYearCopy) {
+
+        Date newDate = new Date();
+        SysUserVo currentUser = CommonUtils.getCurrentUser();
+        //获得指定年——工厂下所以计划及其备件信息
+        List<EquMaintenanceScheduleDo> maintenanceScheduleOldList = maintenanceScheduleService.getYearByList(planYearCopy.getOldYear(),planYearCopy.getTenantId());
+        List<EquMaintenanceScheduleDo> maintenanceScheduleNewList = maintenanceScheduleService.getYearByList(planYearCopy.getNewYear(), planYearCopy.getTenantId());
+        List<EquMaintenanceScheduleDo> maintenanceScheduleList = maintenanceScheduleOldList;
+        if (maintenanceScheduleNewList.size()!=0){
+            //获取不重复数据(去重)
+            maintenanceScheduleList = Stream.concat(maintenanceScheduleOldList.stream(),maintenanceScheduleNewList.stream())
+                    .collect(Collectors.groupingBy(info->info.getEquipmentid()+info.getPlantype(),Collectors.counting()))
+                    .entrySet().stream()
+                    .filter(info -> info.getValue()==1)
+                    .map(Map.Entry::getKey)
+                    .map(info -> Stream.concat(maintenanceScheduleOldList.stream(),maintenanceScheduleNewList.stream())
+                            .filter(item -> (item.getEquipmentid()+item.getPlantype()).equals(info))
+                            .findFirst().orElse(null))
+                    .filter(Objects::nonNull)
+                    .collect(Collectors.toList());
+        }
+        if (maintenanceScheduleList.size()==0){
+            return R.error(planYearCopy.getOldYear()+"年计划已存在与"+ planYearCopy.getNewYear()+"中,请检查后再重新添加!");
+        }
+
+        List<EquMaintenancePartDo> masterIdByList = maintenancePartService.getMasterIdByList(maintenanceScheduleList.stream().map(EquMaintenanceScheduleDo::getId).collect(Collectors.toList()));
+        //计划备件信息
+        List<EquMaintenancePartDo> maintenancePartList = new ArrayList<>();
+        //赋值
+        maintenanceScheduleList.forEach(info ->{
+            List<EquMaintenancePartDo> collect = masterIdByList.stream().filter(item -> item.getMasterid().equals(info.getId())).collect(Collectors.toList());
+
+            info.setId(SecurityUtil.getUUID())
+                    .setPlanyear(planYearCopy.getNewYear())
+                    .setCreateusername(currentUser.getName())
+                    .setCreatedate(newDate)
+                    .setCreateuserid(currentUser.getId())
+                    .setModifyusername(currentUser.getName())
+                    .setModifyuserid(currentUser.getId())
+                    .setModifydate(newDate);
+
+            collect.forEach(item ->{
+                item.setId(SecurityUtil.getUUID())
+                        .setMasterid(info.getId())
+                        .setCreateusername(currentUser.getName())
+                        .setCreatedate(newDate)
+                        .setCreateuserid(currentUser.getId())
+                        .setModifyusername(currentUser.getName())
+                        .setModifyuserid(currentUser.getId())
+                        .setModifydate(newDate);
+            });
+            maintenancePartList.addAll(collect);
+
+        });
+        boolean b = maintenanceScheduleService.saveBatch(maintenanceScheduleList,100);
+        maintenancePartService.saveBatch(maintenancePartList,100);
+        if (b){
+            return R.ok();
+        }else {
+            return R.error("数据添加不完整,请核对数据!");
+        }
+    }
+
+
+    /**
+     * 详细库转移(标准——计划明细)
+     *
+     * @param partsSetoutStandardList 标准库备品备件
+     * @param id    主表ID
+     * @return {@link Collection<? extends  EquMaintenancePartDo>}
+     * @date 2023/11/29 16:21
+     * @author shangmi
+     *
+     */
+
+    private Collection<? extends EquMaintenancePartDo> dataShiftSpareStandToPlan(List<EquMaintenanceStandardDo> partsSetoutStandardList, String id) {
+        Date newDate = new Date();
+        SysUserVo currentUser = CommonUtils.getCurrentUser();
+        return partsSetoutStandardList.stream().map(info ->{
+            EquMaintenancePartDo maintenancePart = new EquMaintenancePartDo();
+            BeanUtils.copyProperties(info,maintenancePart);
+            maintenancePart.setId(SecurityUtil.getUUID())
+                    .setCreatedate(newDate)
+                    .setCreateusername(currentUser.getName())
+                    .setCreateuserid(currentUser.getId())
+                    .setModifyuserid(currentUser.getId())
+                    .setModifydate(newDate)
+                    .setModifyusername(currentUser.getName())
+                    .setStandardrequest(info.getEquipmentsupport())
+                    .setMaintenancestand(info.getStandardid())
+                    .setMaintenancestandid(info.getId())
+                    .setMasterid(id);
+            return maintenancePart;
+        }).collect(Collectors.toList());
+    }
+
+
+    /**
+     * 处理数据转移 (任务——计划)
+     *
+     * @param maintenancePartList 保养部位
+     * @param maintenanceSchedule 设备
+     * @param month               月份
+     * @return {@link List<EquMaintenanceTaskDo>}
+     * @date 2023/11/27 17:55 创建时间
+     * @author shangmi
+     *
+     */
+
+    public List<EquMaintenanceTaskDo> dataTransfer(
+            List<EquMaintenancePartDo> maintenancePartList,
+            EquMaintenanceScheduleDo maintenanceSchedule,
+            Integer month) {
+        Date newDate = new Date();
+        SysUserVo currentUser = CommonUtils.getCurrentUser();
+        List<EquMaintenanceTaskDo> maintenanceTaskList = new ArrayList<>();
+        for (EquMaintenancePartDo maintenancePart : maintenancePartList) {
+            EquMaintenanceTaskDo equMaintenanceTask = new EquMaintenanceTaskDo();
+            BeanUtils.copyProperties( maintenanceSchedule,equMaintenanceTask);
+            BeanUtils.copyProperties( maintenancePart,equMaintenanceTask);
+            equMaintenanceTask.setId(SecurityUtil.getUUID())
+                    .setMonth(month)
+                    .setCreateuserid(currentUser.getId())
+                    .setCreateusername(currentUser.getName())
+                    .setCreatedate(newDate)
+                    .setModifyuserid(currentUser.getId())
+                    .setModifyusername(currentUser.getName())
+                    .setModifydate(newDate)
+                    .setTenantid(currentUser.getTenantid());
+            maintenanceTaskList.add(equMaintenanceTask);
+        }
+
+        return maintenanceTaskList;
+    }
+
+
+    /**
+     *转移子表数据
+     *
+     * @param partsSetoutStandardList 标准库备品备件
+     * @param equMaintenanceTaskDos 任务信息
+     * @return {@link List<EquPartsSetoutTaskDo>}
+     * @date 2023/11/28 19:16
+     * @author shangmi
+     *
+     */
+
+    public List<EquPartsSetoutTaskDo> sparePartsConversion(
+            List<EquPartsSetoutStandardDo> partsSetoutStandardList,
+            List<EquMaintenanceTaskDo> equMaintenanceTaskDos){
+        Date newDate = new Date();
+        SysUserVo currentUser = CommonUtils.getCurrentUser();
+        //遍历赛选出标准库备品备件主表ID和任务表标准库ID对应的字段并塞入任务表备品备件库中
+        return equMaintenanceTaskDos.stream().map(info -> partsSetoutStandardList.stream()
+                .filter(item -> item.getMasterid().equals(info.getMaintenancestandid()))
+                .map(item -> {
+                    EquPartsSetoutTaskDo equPartsSetoutTaskDo = new EquPartsSetoutTaskDo();
+                    BeanUtils.copyProperties(item, equPartsSetoutTaskDo);
+                    //更换主表ID
+                    equPartsSetoutTaskDo.setMasterid(info.getId())
+                            .setId(SecurityUtil.getUUID())
+                            .setCreateuserid(currentUser.getId())
+                            .setCreateusername(currentUser.getName())
+                            .setCreatedate(newDate)
+                            .setModifyuserid(currentUser.getId())
+                            .setModifyusername(currentUser.getName())
+                            .setModifydate(newDate);
+                    // .setTenantid(currentUser.getTenantid());
+                    return equPartsSetoutTaskDo;
+                }).collect(Collectors.toList())).flatMap(Collection::stream).distinct().collect(Collectors.toList());
+    }
+
+    /**
+     *
+     *  去重复
+     * @param maintenancePartList 任务表
+     * @param maintenanceSiteList 计划表
+     * @return {@link List<EquMaintenancePartDo>}
+     * @date 2023/11/27 18:14
+     * @author shangmi
+     *
+     */
+    public List<EquMaintenancePartDo> removeDuplicates(
+            List<EquMaintenancePartDo> maintenancePartList,
+            List<EquMaintenanceTaskDo> maintenanceSiteList){
+        List<String> maintenanceSite = maintenanceSiteList.stream()
+                .map(EquMaintenanceTaskDo::getMaintenancesite)
+                .collect(Collectors.toList());
+        return maintenancePartList.stream().filter(info ->
+                !maintenanceSite.contains(info.getMaintenancesite())
+        ).collect(Collectors.toList());
+    }
+
+    /**
+     * 数据转换(设备——计划)
+     *
+     * @param aspCheckItem 设备信息
+     * @return {@link EquMaintenanceStandardDo}
+     * @date 2023/11/29 15:24
+     * @author shangmi
+     *
+     */
+
+    public EquMaintenanceScheduleDo dataShiftFacilityToPlan(AspCheckItems aspCheckItem,Integer year){
+        EquMaintenanceScheduleDo maintenanceSchedule = new EquMaintenanceScheduleDo();
+        Date newDate = new Date();
+        SysUserVo currentUser = CommonUtils.getCurrentUser();
+        maintenanceSchedule.setEquipmenttype(aspCheckItem.getDevicesort())
+                .setPlanyear(year)
+                .setEquipmentname(aspCheckItem.getCheckitemname())
+                .setEquipmentid(aspCheckItem.getId())
+                .setEquipmentnumber(aspCheckItem.getCheckitemcode())
+                .setPlantype("BY")
+                .setSpecialequipment(aspCheckItem.getSource())
+                .setObjecttype("1")
+                .setSpecification(aspCheckItem.getDeleted())
+                .setWorkshop(aspCheckItem.getUsedeptname())
+                .setWorkshopid(aspCheckItem.getUsedeptid())
+                .setPlannedstatus("unlocked")
+                .setId(SecurityUtil.getUUID())
+                .setCreatedate(newDate)
+                .setCreateuserid(currentUser.getId())
+                .setCreateusername(currentUser.getName())
+                .setModifydate(newDate)
+                .setModifyuserid(currentUser.getId())
+                .setModifyusername(currentUser.getName())
+                .setTenantid(aspCheckItem.getTenantid());
+        return maintenanceSchedule;
+    }
+
+
+}

+ 54 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/utils/CommonUtils.java

@@ -0,0 +1,54 @@
+package com.rongwei.bscommon.sys.utils;
+
+import com.rongwei.commonservice.serial.service.SysSerialNumberService;
+import com.rongwei.commonservice.service.RedisService;
+import com.rongwei.rwadmincommon.system.vo.SysUserVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.annotation.PostConstruct;
+import javax.servlet.http.HttpServletRequest;
+
+
+@Component
+public class CommonUtils {
+
+    @Autowired
+    private RedisService autoRedisService;
+    @Autowired
+    private SysSerialNumberService autoSysSerialNumberService;
+
+    private static RedisService redisService;
+    private static SysSerialNumberService sysSerialNumberService;
+
+    @PostConstruct
+    public void init() {
+        redisService = autoRedisService;
+        sysSerialNumberService = autoSysSerialNumberService;
+    }
+
+
+    /**
+     * 获取当前的登陆人信息
+     *
+     * @return
+     */
+    public static SysUserVo getCurrentUser() {
+        // 获取当前登录人信息
+        SysUserVo currUser = null;
+        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        if (attributes != null) {
+            HttpServletRequest request = attributes.getRequest();
+            if (request != null) {
+                String token = request.getHeader("token");
+                if (com.rongwei.rwcommon.utils.StringUtils.isNotEmpty(token)) {
+                    currUser = redisService.getLoginUser(token);
+                }
+            }
+        }
+        return currUser;
+    }
+
+}

+ 291 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenancePartDo.java

@@ -0,0 +1,291 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.NoArgsConstructor;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author  cyn 
+ * @create 2023-11-24 15:10 
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("equ_maintenance_part")
+public class EquMaintenancePartDo implements Serializable {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * table name:ID
+	 * table type:varchar(36)
+	 * table comment:主键
+	 */
+	private String id;
+
+	/**
+	 * table name:TENANTID
+	 * table type:varchar(36)
+	 * table comment:租户ID
+	 */
+	private String tenantid;
+
+	/**
+	 * table name:ROPTION
+	 * table type:longtext
+	 * table comment:扩展json格式配置
+	 */
+	private String roption;
+
+	/**
+	 * table name:DELETED
+	 * table type:char(1)
+	 * table comment:是否删除
+	 */
+	private String deleted;
+
+	/**
+	 * table name:REMARK
+	 * table type:text
+	 * table comment:备注
+	 */
+	private String remark;
+
+	/**
+	 * table name:CREATEDATE
+	 * table type:datetime
+	 * table comment:创建时间
+	 */
+	private Date createdate;
+
+	/**
+	 * table name:CREATEUSERID
+	 * table type:varchar(36)
+	 * table comment:创建用户ID
+	 */
+	private String createuserid;
+
+	/**
+	 * table name:MODIFYDATE
+	 * table type:datetime
+	 * table comment:修改日期
+	 */
+	private Date modifydate;
+
+	/**
+	 * table name:MODIFYUSERID
+	 * table type:varchar(36)
+	 * table comment:修改用户ID
+	 */
+	private String modifyuserid;
+
+	/**
+	 * table name:CREATEUSERNAME
+	 * table type:varchar(50)
+	 * table comment:创建人名称
+	 */
+	private String createusername;
+
+	/**
+	 * table name:MODIFYUSERNAME
+	 * table type:varchar(50)
+	 * table comment:修改人名称
+	 */
+	private String modifyusername;
+
+	/**
+	 * table name:MASTERID
+	 * table type:varchar(36)
+	 * table comment:主表ID
+	 */
+	private String masterid;
+
+	/**
+	 * table name:JAN
+	 * table type:int
+	 * table comment:1月
+	 */
+	private Integer jan;
+
+	/**
+	 * table name:FEB
+	 * table type:int
+	 * table comment:2月
+	 */
+	private Integer feb;
+
+	/**
+	 * table name:MAR
+	 * table type:int
+	 * table comment:3月
+	 */
+	private Integer mar;
+
+	/**
+	 * table name:APR
+	 * table type:int
+	 * table comment:4月
+	 */
+	private Integer apr;
+
+	/**
+	 * table name:MAY
+	 * table type:int
+	 * table comment:5月
+	 */
+	private Integer may;
+
+	/**
+	 * table name:JUN
+	 * table type:int
+	 * table comment:6月
+	 */
+	private Integer jun;
+
+	/**
+	 * table name:JUL
+	 * table type:int
+	 * table comment:7月
+	 */
+	private Integer jul;
+
+	/**
+	 * table name:AUG
+	 * table type:int
+	 * table comment:8月
+	 */
+	private Integer aug;
+
+	/**
+	 * table name:SEP
+	 * table type:int
+	 * table comment:9月
+	 */
+	private Integer sep;
+
+	/**
+	 * table name:OCT
+	 * table type:int
+	 * table comment:10月
+	 */
+	private Integer oct;
+
+	/**
+	 * table name:NOV
+	 * table type:int
+	 * table comment:11月
+	 */
+	private Integer nov;
+
+	/**
+	 * table name:DECEMBER
+	 * table type:int
+	 * table comment:12月
+	 */
+	private Integer december;
+
+	/**
+	 * table name:MAINTENANCESITE
+	 * table type:varchar(50)
+	 * table comment:保养部位
+	 */
+	private String maintenancesite;
+
+	/**
+	 * table name:MAINTENANCECONTENT
+	 * table type:text
+	 * table comment:问题点/计划保养内容
+	 */
+	private String maintenancecontent;
+
+	/**
+	 * table name:STANDARDREQUEST
+	 * table type:text
+	 * table comment:预控标准要求
+	 */
+	private String standardrequest;
+
+	/**
+	 * table name:EQUIPMENTSUPPORT
+	 * table type:text
+	 * table comment:设备保障域控措施
+	 */
+	private String equipmentsupport;
+
+	/**
+	 * table name:MEANS
+	 * table type:text
+	 * table comment:保养/预防方法
+	 */
+	private String means;
+
+	/**
+	 * table name:PRINCIPALID
+	 * table type:varchar(36)
+	 * table comment:责任人ID
+	 */
+	private String principalid;
+
+	/**
+	 * table name:PRINCIPAL
+	 * table type:varchar(20)
+	 * table comment:责任人
+	 */
+	private String principal;
+
+	/**
+	 * table name:OTHERENGINEERS
+	 * table type:text
+	 * table comment:其他工程师
+	 */
+	private String otherengineers;
+
+	/**
+	 * table name:PERIOD
+	 * table type:varchar(20)
+	 * table comment:保养周期
+	 */
+	private String period;
+
+	/**
+	 * table name:MAINTENANCETYPE
+	 * table type:varchar(20)
+	 * table comment:保养检修分类
+	 */
+	private String maintenancetype;
+
+	/**
+	 * table name:ISOUTSOURCE
+	 * table type:varchar(10)
+	 * table comment:是否委外
+	 */
+	private String isoutsource;
+
+	/**
+	 * table name:OTHERENGINEERSID
+	 * table type:text
+	 * table comment:其他工程师ID
+	 */
+	private String otherengineersid;
+
+	/**
+	 * table name:MAINTENANCESTANDID
+	 * table type:varchar(10)
+	 * table comment:标准库ID
+	 */
+	private String maintenancestandid;
+
+	/**
+	 * table name:MAINTENANCESTAND
+	 * table type:text
+	 * table comment:保养标准
+	 */
+	private String maintenancestand;
+
+}

+ 215 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceScheduleDo.java

@@ -0,0 +1,215 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.NoArgsConstructor;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author  cyn 
+ * @create 2023-11-24 15:10 
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("equ_maintenance_schedule")
+public class EquMaintenanceScheduleDo implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+	/**
+	 * table name:ID
+	 * table type:varchar(36)
+	 * table comment:主键
+	 */
+	private String id;
+
+	/**
+	 * table name:TENANTID
+	 * table type:varchar(36)
+	 * table comment:租户ID
+	 */
+	private String tenantid;
+
+	/**
+	 * table name:ROPTION
+	 * table type:longtext
+	 * table comment:扩展json格式配置
+	 */
+	private String roption;
+
+	/**
+	 * table name:DELETED
+	 * table type:char(1)
+	 * table comment:是否删除
+	 */
+	private String deleted;
+
+	/**
+	 * table name:REMARK
+	 * table type:text
+	 * table comment:备注
+	 */
+	private String remark;
+
+	/**
+	 * table name:CREATEDATE
+	 * table type:datetime
+	 * table comment:创建时间
+	 */
+	private Date createdate;
+
+	/**
+	 * table name:CREATEUSERID
+	 * table type:varchar(36)
+	 * table comment:创建用户ID
+	 */
+	private String createuserid;
+
+	/**
+	 * table name:MODIFYDATE
+	 * table type:datetime
+	 * table comment:修改日期
+	 */
+	private Date modifydate;
+
+	/**
+	 * table name:MODIFYUSERID
+	 * table type:varchar(36)
+	 * table comment:修改用户ID
+	 */
+	private String modifyuserid;
+
+	/**
+	 * table name:CREATEUSERNAME
+	 * table type:varchar(50)
+	 * table comment:创建人名称
+	 */
+	private String createusername;
+
+	/**
+	 * table name:MODIFYUSERNAME
+	 * table type:varchar(50)
+	 * table comment:修改人名称
+	 */
+	private String modifyusername;
+
+	/**
+	 * table name:PLANYEAR
+	 * table type:int
+	 * table comment:计划年份
+	 */
+	private Integer planyear;
+
+	/**
+	 * table name:EQUIPMENTNAME
+	 * table type:varchar(50)
+	 * table comment:设备名称
+	 */
+	private String equipmentname;
+
+	/**
+	 * table name:EQUIPMENTID
+	 * table type:varchar(36)
+	 * table comment:设备ID
+	 */
+	private String equipmentid;
+
+	/**
+	 * table name:EQUIPMENTNUMBER
+	 * table type:varchar(50)
+	 * table comment:设备编号
+	 */
+	private String equipmentnumber;
+
+	/**
+	 * table name:PLANTYPE
+	 * table type:varchar(20)
+	 * table comment:计划分类
+	 */
+	private String plantype;
+
+	/**
+	 * table name:EQUIPMENTTYPE
+	 * table type:varchar(20)
+	 * table comment:设备分类
+	 */
+	private String equipmenttype;
+
+	/**
+	 * table name:PLANT
+	 * table type:varchar(50)
+	 * table comment:所属工厂
+	 */
+	private String plant;
+
+	/**
+	 * table name:SPECIALEQUIPMENT
+	 * table type:varchar(10)
+	 * table comment:特种设备
+	 */
+	private String specialequipment;
+
+	/**
+	 * table name:OBJECTTYPE
+	 * table type:varchar(20)
+	 * table comment:对象分类
+	 */
+	private String objecttype;
+
+	/**
+	 * table name:SPECIFICATION
+	 * table type:varchar(50)
+	 * table comment:规格型号
+	 */
+	private String specification;
+
+	/**
+	 * table name:WORKSHOPID
+	 * table type:varchar(36)
+	 * table comment:使用车间ID
+	 */
+	private String workshopid;
+
+	/**
+	 * table name:WORKSHOP
+	 * table type:varchar(50)
+	 * table comment:使用车间
+	 */
+	private String workshop;
+
+	/**
+	 * table name:USERID
+	 * table type:text
+	 * table comment:使用人ID
+	 */
+	private String userid;
+
+	/**
+	 * table name:USER
+	 * table type:text
+	 * table comment:使用人
+	 */
+	private String user;
+
+	/**
+	 * table name:PLANNEDSTATUS
+	 * table type:varchar(20)
+	 * table comment:计划状态
+	 */
+	private String plannedstatus;
+
+	/**
+	 * table name:SKED
+	 * table type:text
+	 * table comment:计划表
+	 */
+	private String sked;
+
+}

+ 263 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceStandardDo.java

@@ -0,0 +1,263 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.NoArgsConstructor;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author  cyn 
+ * @create 2023-11-24 15:10 
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("equ_maintenance_standard")
+public class EquMaintenanceStandardDo implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+	/**
+	 * table name:ID
+	 * table type:varchar(36)
+	 * table comment:主键
+	 */
+	private String id;
+
+	/**
+	 * table name:TENANTID
+	 * table type:varchar(36)
+	 * table comment:租户ID
+	 */
+	private String tenantid;
+
+	/**
+	 * table name:ROPTION
+	 * table type:longtext
+	 * table comment:扩展json格式配置
+	 */
+	private String roption;
+
+	/**
+	 * table name:DELETED
+	 * table type:char(1)
+	 * table comment:是否删除
+	 */
+	private String deleted;
+
+	/**
+	 * table name:REMARK
+	 * table type:text
+	 * table comment:备注
+	 */
+	private String remark;
+
+	/**
+	 * table name:CREATEDATE
+	 * table type:datetime
+	 * table comment:创建时间
+	 */
+	private Date createdate;
+
+	/**
+	 * table name:CREATEUSERID
+	 * table type:varchar(36)
+	 * table comment:创建用户ID
+	 */
+	private String createuserid;
+
+	/**
+	 * table name:MODIFYDATE
+	 * table type:datetime
+	 * table comment:修改日期
+	 */
+	private Date modifydate;
+
+	/**
+	 * table name:MODIFYUSERID
+	 * table type:varchar(36)
+	 * table comment:修改用户ID
+	 */
+	private String modifyuserid;
+
+	/**
+	 * table name:CREATEUSERNAME
+	 * table type:varchar(50)
+	 * table comment:创建人名称
+	 */
+	private String createusername;
+
+	/**
+	 * table name:MODIFYUSERNAME
+	 * table type:varchar(50)
+	 * table comment:修改人名称
+	 */
+	private String modifyusername;
+
+	/**
+	 * table name:EQUIPMENTTYPE
+	 * table type:varchar(20)
+	 * table comment:设备分类
+	 */
+	private String equipmenttype;
+
+	/**
+	 * table name:MAINTENANCETYPE
+	 * table type:varchar(20)
+	 * table comment:保养分类
+	 */
+	private String maintenancetype;
+
+	/**
+	 * table name:PLANT
+	 * table type:varchar(35)
+	 * table comment:工厂
+	 */
+	private String plant;
+
+	/**
+	 * table name:STANDARDID
+	 * table type:varchar(36)
+	 * table comment:标准编号
+	 */
+	private String standardid;
+
+	/**
+	 * table name:MAINTENANCESITE
+	 * table type:text
+	 * table comment:保养部位
+	 */
+	private String maintenancesite;
+
+	/**
+	 * table name:MAINTENANCECONTEXT
+	 * table type:text
+	 * table comment:保养内容
+	 */
+	private String maintenancecontext;
+
+	/**
+	 * table name:PRECONTROL
+	 * table type:text
+	 * table comment:预控标准要求
+	 */
+	private String precontrol;
+
+	/**
+	 * table name:EQUIPMENTSUPPORT
+	 * table type:text
+	 * table comment:设备保障域控措施
+	 */
+	private String equipmentsupport;
+
+	/**
+	 * table name:MEANS
+	 * table type:text
+	 * table comment:保养/预防方法
+	 */
+	private String means;
+
+	/**
+	 * table name:PERIOD
+	 * table type:varchar(20)
+	 * table comment:保养周期
+	 */
+	private String period;
+
+	/**
+	 * table name:ISOUTSOURCE
+	 * table type:varchar(10)
+	 * table comment:是否委外
+	 */
+	private String isoutsource;
+
+	/**
+	 * table name:JAN
+	 * table type:int
+	 * table comment:1月
+	 */
+	private Integer jan;
+
+	/**
+	 * table name:FEB
+	 * table type:int
+	 * table comment:2月
+	 */
+	private Integer feb;
+
+	/**
+	 * table name:MAR
+	 * table type:int
+	 * table comment:3月
+	 */
+	private Integer mar;
+
+	/**
+	 * table name:APR
+	 * table type:int
+	 * table comment:4月
+	 */
+	private Integer apr;
+
+	/**
+	 * table name:MAY
+	 * table type:int
+	 * table comment:5月
+	 */
+	private Integer may;
+
+	/**
+	 * table name:JUN
+	 * table type:int
+	 * table comment:6月
+	 */
+	private Integer jun;
+
+	/**
+	 * table name:JUL
+	 * table type:int
+	 * table comment:7月
+	 */
+	private Integer jul;
+
+	/**
+	 * table name:AUG
+	 * table type:int
+	 * table comment:8月
+	 */
+	private Integer aug;
+
+	/**
+	 * table name:SEP
+	 * table type:int
+	 * table comment:9月
+	 */
+	private Integer sep;
+
+	/**
+	 * table name:OCT
+	 * table type:int
+	 * table comment:10月
+	 */
+	private Integer oct;
+
+	/**
+	 * table name:NOV
+	 * table type:int
+	 * table comment:11月
+	 */
+	private Integer nov;
+
+	/**
+	 * table name:DECEMBER
+	 * table type:int
+	 * table comment:12月
+	 */
+	private Integer december;
+
+}

+ 348 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceTaskDo.java

@@ -0,0 +1,348 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.NoArgsConstructor;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author  cyn 
+ * @create 2023-11-24 15:08 
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("equ_maintenance_task")
+public class EquMaintenanceTaskDo implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * table name:ID
+	 * table type:varchar(36)
+	 * table comment:主键
+	 */
+	private String id;
+
+	/**
+	 * table name:TENANTID
+	 * table type:varchar(36)
+	 * table comment:租户ID
+	 */
+	private String tenantid;
+
+	/**
+	 * table name:ROPTION
+	 * table type:longtext
+	 * table comment:扩展json格式配置
+	 */
+	private String roption;
+
+	/**
+	 * table name:DELETED
+	 * table type:char(1)
+	 * table comment:是否删除
+	 */
+	private String deleted;
+
+	/**
+	 * table name:REMARK
+	 * table type:text
+	 * table comment:备注
+	 */
+	private String remark;
+
+	/**
+	 * table name:CREATEDATE
+	 * table type:datetime
+	 * table comment:创建时间
+	 */
+	private Date createdate;
+
+	/**
+	 * table name:CREATEUSERID
+	 * table type:varchar(36)
+	 * table comment:创建用户ID
+	 */
+	private String createuserid;
+
+	/**
+	 * table name:MODIFYDATE
+	 * table type:datetime
+	 * table comment:修改日期
+	 */
+	private Date modifydate;
+
+	/**
+	 * table name:MODIFYUSERID
+	 * table type:varchar(36)
+	 * table comment:修改用户ID
+	 */
+	private String modifyuserid;
+
+	/**
+	 * table name:CREATEUSERNAME
+	 * table type:varchar(50)
+	 * table comment:创建人名称
+	 */
+	private String createusername;
+
+	/**
+	 * table name:MODIFYUSERNAME
+	 * table type:varchar(50)
+	 * table comment:修改人名称
+	 */
+	private String modifyusername;
+
+	/**
+	 * table name:TASKID
+	 * table type:varchar(50)
+	 * table comment:任务号
+	 */
+	private String taskid;
+
+	/**
+	 * table name:PLANYEAR
+	 * table type:int
+	 * table comment:计划年份
+	 */
+	private Integer planyear;
+
+	/**
+	 * table name:EQUIPMENTNAME
+	 * table type:varchar(50)
+	 * table comment:设备名称
+	 */
+	private String equipmentname;
+
+	/**
+	 * table name:EQUIPMENTID
+	 * table type:varchar(36)
+	 * table comment:设备ID
+	 */
+	private String equipmentid;
+
+	/**
+	 * table name:EQUIPMENTNUMBER
+	 * table type:varchar(50)
+	 * table comment:设备编号
+	 */
+	private String equipmentnumber;
+
+	/**
+	 * table name:PLANTYPE
+	 * table type:varchar(20)
+	 * table comment:计划分类
+	 */
+	private String plantype;
+
+	/**
+	 * table name:EQUIPMENTTYPE
+	 * table type:varchar(20)
+	 * table comment:设备分类
+	 */
+	private String equipmenttype;
+
+	/**
+	 * table name:PLANT
+	 * table type:varchar(35)
+	 * table comment:所属工厂
+	 */
+	private String plant;
+
+	/**
+	 * table name:SPECIALEQUIPMENT
+	 * table type:varchar(20)
+	 * table comment:特种设备
+	 */
+	private String specialequipment;
+
+	/**
+	 * table name:MAINTENANCESITE
+	 * table type:text
+	 * table comment:保养部位
+	 */
+	private String maintenancesite;
+
+	/**
+	 * table name:MAINTENANCECONTENT
+	 * table type:text
+	 * table comment:问题点/计划保养内容
+	 */
+	private String maintenancecontent;
+
+	/**
+	 * table name:STANDARDREQUEST
+	 * table type:text
+	 * table comment:预控标准要求
+	 */
+	private String standardrequest;
+
+	/**
+	 * table name:EQUIPMENTSUPPORT
+	 * table type:text
+	 * table comment:设备保障域控措施
+	 */
+	private String equipmentsupport;
+
+	/**
+	 * table name:MEANS
+	 * table type:text
+	 * table comment:保养/预防方法
+	 */
+	private String means;
+
+	/**
+	 * table name:PRINCIPALID
+	 * table type:text
+	 * table comment:责任人ID
+	 */
+	private String principalid;
+
+	/**
+	 * table name:PRINCIPAL
+	 * table type:text
+	 * table comment:责任人
+	 */
+	private String principal;
+
+	/**
+	 * table name:OTHERENGINEERS
+	 * table type:text
+	 * table comment:其他工程师
+	 */
+	private String otherengineers;
+
+	/**
+	 * table name:PERIOD
+	 * table type:varchar(20)
+	 * table comment:保养周期
+	 */
+	private String period;
+
+	/**
+	 * table name:MAINTENANCETYPE
+	 * table type:varchar(20)
+	 * table comment:保养检修分类
+	 */
+	private String maintenancetype;
+
+	/**
+	 * table name:ISOUTSOURCE
+	 * table type:varchar(10)
+	 * table comment:是否委外
+	 */
+	private String isoutsource;
+
+	/**
+	 * table name:OBJECTTYPE
+	 * table type:varchar(20)
+	 * table comment:对象分类
+	 */
+	private String objecttype;
+
+	/**
+	 * table name:SPECIFICATION
+	 * table type:varchar(50)
+	 * table comment:规格型号
+	 */
+	private String specification;
+
+	/**
+	 * table name:MAINTENANCESTANDID
+	 * table type:varchar(36)
+	 * table comment:保养标准ID
+	 */
+	private String maintenancestandid;
+
+	/**
+	 * table name:MAINTENANCESTAND
+	 * table type:varchar(50)
+	 * table comment:保养标准
+	 */
+	private String maintenancestand;
+
+	/**
+	 * table name:MONTH
+	 * table type:int
+	 * table comment:计划月份
+	 */
+	private Integer month;
+
+	/**
+	 * table name:WORKSHOPID
+	 * table type:varchar(36)
+	 * table comment:使用车间ID
+	 */
+	private String workshopid;
+
+	/**
+	 * table name:WORKSHOP
+	 * table type:varchar(50)
+	 * table comment:使用车间
+	 */
+	private String workshop;
+
+	/**
+	 * table name:USERID
+	 * table type:text
+	 * table comment:使用人ID
+	 */
+	private String userid;
+
+	/**
+	 * table name:USER
+	 * table type:text
+	 * table comment:使用人
+	 */
+	private String user;
+
+	/**
+	 * table name:TASKSTART
+	 * table type:datetime
+	 * table comment:计划开始时间
+	 */
+	private Date taskstart;
+
+	/**
+	 * table name:TASKEND
+	 * table type:datetime
+	 * table comment:计划结束时间
+	 */
+	private Date taskend;
+
+	/**
+	 * table name:TASKSTATE
+	 * table type:varchar(20)
+	 * table comment:任务状态
+	 */
+	private String taskstate;
+
+	/**
+	 * table name:MAINTENANCESTATUS
+	 * table type:text
+	 * table comment:保养情况
+	 */
+	private String maintenancestatus;
+
+	/**
+	 * table name:PERFORMANCE
+	 * table type:text
+	 * table comment:完成情况
+	 */
+	private String performance;
+
+	/**
+	 * table name:OTHERENGINEERSID
+	 * table type:text
+	 * table comment:其他工程师ID
+	 */
+	private String otherengineersid;
+
+}

+ 341 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquOverhaulPlanningTasksDo.java

@@ -0,0 +1,341 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.NoArgsConstructor;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author  cyn 
+ * @create 2023-11-24 15:11 
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("equ_overhaul_planning_task")
+public class EquOverhaulPlanningTasksDo implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * table name:ID
+	 * table type:varchar(36)
+	 * table comment:主键
+	 */
+	private String id;
+
+	/**
+	 * table name:TENANTID
+	 * table type:varchar(36)
+	 * table comment:租户ID
+	 */
+	private String tenantid;
+
+	/**
+	 * table name:ROPTION
+	 * table type:longtext
+	 * table comment:扩展json格式配置
+	 */
+	private String roption;
+
+	/**
+	 * table name:DELETED
+	 * table type:char(1)
+	 * table comment:是否删除
+	 */
+	private String deleted;
+
+	/**
+	 * table name:REMARK
+	 * table type:text
+	 * table comment:备注
+	 */
+	private String remark;
+
+	/**
+	 * table name:CREATEDATE
+	 * table type:datetime
+	 * table comment:创建时间
+	 */
+	private Date createdate;
+
+	/**
+	 * table name:CREATEUSERID
+	 * table type:varchar(36)
+	 * table comment:创建用户ID
+	 */
+	private String createuserid;
+
+	/**
+	 * table name:MODIFYDATE
+	 * table type:datetime
+	 * table comment:修改日期
+	 */
+	private Date modifydate;
+
+	/**
+	 * table name:MODIFYUSERID
+	 * table type:varchar(36)
+	 * table comment:修改用户ID
+	 */
+	private String modifyuserid;
+
+	/**
+	 * table name:CREATEUSERNAME
+	 * table type:varchar(50)
+	 * table comment:创建人名称
+	 */
+	private String createusername;
+
+	/**
+	 * table name:MODIFYUSERNAME
+	 * table type:varchar(50)
+	 * table comment:修改人名称
+	 */
+	private String modifyusername;
+
+	/**
+	 * table name:TASKID
+	 * table type:varchar(50)
+	 * table comment:任务号
+	 */
+	private String taskid;
+
+	/**
+	 * table name:PLANTYPE
+	 * table type:varchar(20)
+	 * table comment:计划分类
+	 */
+	private String plantype;
+
+	/**
+	 * table name:MAINTENANCETYPE
+	 * table type:varchar(20)
+	 * table comment:保养检修分类
+	 */
+	private String maintenancetype;
+
+	/**
+	 * table name:OBJECTTYPE
+	 * table type:varchar(20)
+	 * table comment:对象分类
+	 */
+	private String objecttype;
+
+	/**
+	 * table name:EQUIPMENTNAME
+	 * table type:varchar(50)
+	 * table comment:设备名称
+	 */
+	private String equipmentname;
+
+	/**
+	 * table name:EQUIPMENTID
+	 * table type:varchar(36)
+	 * table comment:设备ID
+	 */
+	private String equipmentid;
+
+	/**
+	 * table name:EQUIPMENTNUMBER
+	 * table type:varchar(50)
+	 * table comment:设备编号
+	 */
+	private String equipmentnumber;
+
+	/**
+	 * table name:SPECIFICATION
+	 * table type:varchar(50)
+	 * table comment:规格型号
+	 */
+	private String specification;
+
+	/**
+	 * table name:EQUIPMENTTYPE
+	 * table type:varchar(20)
+	 * table comment:设备分类
+	 */
+	private String equipmenttype;
+
+	/**
+	 * table name:ISOUTSOURCE
+	 * table type:varchar(10)
+	 * table comment:是否委外
+	 */
+	private String isoutsource;
+
+	/**
+	 * table name:AREA
+	 * table type:text
+	 * table comment:区域
+	 */
+	private String area;
+
+	/**
+	 * table name:PLANYEAR
+	 * table type:int
+	 * table comment:计划年份
+	 */
+	private Integer planyear;
+
+	/**
+	 * table name:TASKSTART
+	 * table type:datetime
+	 * table comment:计划开始时间
+	 */
+	private Date taskstart;
+
+	/**
+	 * table name:TASKEND
+	 * table type:datetime
+	 * table comment:计划结束时间
+	 */
+	private Date taskend;
+
+	/**
+	 * table name:MAINTENANCESITE
+	 * table type:text
+	 * table comment:维修部位
+	 */
+	private String maintenancesite;
+
+	/**
+	 * table name:MAINTENANCECONTENT
+	 * table type:text
+	 * table comment:计划大修内容
+	 */
+	private String maintenancecontent;
+
+	/**
+	 * table name:PLANT
+	 * table type:varchar(35)
+	 * table comment:所属工厂
+	 */
+	private String plant;
+
+	/**
+	 * table name:WORKSHOPID
+	 * table type:varchar(36)
+	 * table comment:使用车间ID
+	 */
+	private String workshopid;
+
+	/**
+	 * table name:WORKSHOP
+	 * table type:varchar(50)
+	 * table comment:使用车间
+	 */
+	private String workshop;
+
+	/**
+	 * table name:USERID
+	 * table type:text
+	 * table comment:使用人ID
+	 */
+	private String userid;
+
+	/**
+	 * table name:USER
+	 * table type:text
+	 * table comment:使用人
+	 */
+	private String user;
+
+	/**
+	 * table name:PRINCIPALID
+	 * table type:text
+	 * table comment:责任人ID
+	 */
+	private String principalid;
+
+	/**
+	 * table name:PRINCIPAL
+	 * table type:text
+	 * table comment:大修责任人
+	 */
+	private String principal;
+
+	/**
+	 * table name:OTHERENGINEERS
+	 * table type:text
+	 * table comment:其他工程师
+	 */
+	private String otherengineers;
+
+	/**
+	 * table name:APPLYTYPE
+	 * table type:varchar(20)
+	 * table comment:申请类型
+	 */
+	private String applytype;
+
+	/**
+	 * table name:EQUIPMENTFAULT
+	 * table type:text
+	 * table comment:设备故障图
+	 */
+	private String equipmentfault;
+
+	/**
+	 * table name:ISHAZARDOUSOPERATION
+	 * table type:varchar(10)
+	 * table comment:是否危险作业
+	 */
+	private String ishazardousoperation;
+
+	/**
+	 * table name:OPERATIONALDATA
+	 * table type:text
+	 * table comment:作业相关资料
+	 */
+	private String operationaldata;
+
+	/**
+	 * table name:SAFETYMEASUREITEM
+	 * table type:text
+	 * table comment:安全措施项
+	 */
+	private String safetymeasureitem;
+
+	/**
+	 * table name:IMPLEMENTATION
+	 * table type:text
+	 * table comment:安全措施落实情况
+	 */
+	private String implementation;
+
+	/**
+	 * table name:APPLICATIONDEPTID
+	 * table type:varchar(36)
+	 * table comment:申请部门ID
+	 */
+	private String applicationdeptid;
+
+	/**
+	 * table name:APPLICATIONDEPT
+	 * table type:varchar(50)
+	 * table comment:申请部门
+	 */
+	private String applicationdept;
+
+	/**
+	 * table name:OTHERENGINEERSID
+	 * table type:text
+	 * table comment:其他工程师ID
+	 */
+	private String otherengineersid;
+
+	/**
+	 * table name:TASKSTATUS
+	 * table type:varchar(20)
+	 * table comment:任务状态
+	 */
+	private String taskstatus;
+
+}

+ 180 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquPartsSetoutPlanningTasksDo.java

@@ -0,0 +1,180 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.NoArgsConstructor;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author  cyn 
+ * @create 2023-11-24 15:13 
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("equ_parts_setout_planning_task")
+public class EquPartsSetoutPlanningTasksDo  implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * table name:ID
+	 * table type:varchar(36)
+	 * table comment:主键
+	 */
+	private String id;
+
+	/**
+	 * table name:TENANTID
+	 * table type:varchar(36)
+	 * table comment:租户ID
+	 */
+	private String tenantid;
+
+	/**
+	 * table name:ROPTION
+	 * table type:longtext
+	 * table comment:扩展json格式配置
+	 */
+	private String roption;
+
+	/**
+	 * table name:DELETED
+	 * table type:char(1)
+	 * table comment:是否删除
+	 */
+	private String deleted;
+
+	/**
+	 * table name:REMARK
+	 * table type:text
+	 * table comment:备注
+	 */
+	private String remark;
+
+	/**
+	 * table name:CREATEDATE
+	 * table type:datetime
+	 * table comment:创建时间
+	 */
+	private Date createdate;
+
+	/**
+	 * table name:CREATEUSERID
+	 * table type:varchar(36)
+	 * table comment:创建用户ID
+	 */
+	private String createuserid;
+
+	/**
+	 * table name:MODIFYDATE
+	 * table type:datetime
+	 * table comment:修改日期
+	 */
+	private Date modifydate;
+
+	/**
+	 * table name:MODIFYUSERID
+	 * table type:varchar(36)
+	 * table comment:修改用户ID
+	 */
+	private String modifyuserid;
+
+	/**
+	 * table name:CREATEUSERNAME
+	 * table type:varchar(50)
+	 * table comment:创建人名称
+	 */
+	private String createusername;
+
+	/**
+	 * table name:MODIFYUSERNAME
+	 * table type:varchar(50)
+	 * table comment:修改人名称
+	 */
+	private String modifyusername;
+
+	/**
+	 * table name:MASTERID
+	 * table type:varchar(36)
+	 * table comment:主表ID
+	 */
+	private String masterid;
+
+	/**
+	 * table name:PARTSID
+	 * table type:varchar(36)
+	 * table comment:配件ID
+	 */
+	private String partsid;
+
+	/**
+	 * table name:PARTSCODE
+	 * table type:varchar(30)
+	 * table comment:配件编码
+	 */
+	private String partscode;
+
+	/**
+	 * table name:PARTSNAME
+	 * table type:varchar(50)
+	 * table comment:配件名称
+	 */
+	private String partsname;
+
+	/**
+	 * table name:PARTSIMG
+	 * table type:varchar(100)
+	 * table comment:配件图
+	 */
+	private String partsimg;
+
+	/**
+	 * table name:SPECIFICATION
+	 * table type:varchar(50)
+	 * table comment:规格
+	 */
+	private String specification;
+
+	/**
+	 * table name:MODEL
+	 * table type:varchar(50)
+	 * table comment:型号
+	 */
+	private String model;
+
+	/**
+	 * table name:UNIT
+	 * table type:varchar(10)
+	 * table comment:单位
+	 */
+	private String unit;
+
+	/**
+	 * table name:USENUMBER
+	 * table type:int
+	 * table comment:计划使用数量
+	 */
+	private Integer usenumber;
+
+	/**
+	 * table name:INVENTORYNUMBER
+	 * table type:int
+	 * table comment:当前库存数量
+	 */
+	private Integer inventorynumber;
+
+	/**
+	 * table name:OCCUPYNUMBER
+	 * table type:int
+	 * table comment:维修中占用数量
+	 */
+	private Integer occupynumber;
+
+}

+ 166 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquPartsSetoutStandardDo.java

@@ -0,0 +1,166 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.NoArgsConstructor;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author  cyn 
+ * @create 2023-11-28 15:14 
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("equ_parts_setout_standard")
+public class EquPartsSetoutStandardDo implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * table name:ID
+	 * table type:varchar(36)
+	 * table comment:主键
+	 */
+	private String id;
+
+	/**
+	 * table name:TENANTID
+	 * table type:varchar(36)
+	 * table comment:租户ID
+	 */
+	private String tenantid;
+
+	/**
+	 * table name:ROPTION
+	 * table type:longtext
+	 * table comment:扩展json格式配置
+	 */
+	private String roption;
+
+	/**
+	 * table name:DELETED
+	 * table type:char(1)
+	 * table comment:是否删除
+	 */
+	private String deleted;
+
+	/**
+	 * table name:REMARK
+	 * table type:text
+	 * table comment:备注
+	 */
+	private String remark;
+
+	/**
+	 * table name:CREATEDATE
+	 * table type:datetime
+	 * table comment:创建时间
+	 */
+	private Date createdate;
+
+	/**
+	 * table name:CREATEUSERID
+	 * table type:varchar(36)
+	 * table comment:创建用户ID
+	 */
+	private String createuserid;
+
+	/**
+	 * table name:MODIFYDATE
+	 * table type:datetime
+	 * table comment:修改日期
+	 */
+	private Date modifydate;
+
+	/**
+	 * table name:MODIFYUSERID
+	 * table type:varchar(36)
+	 * table comment:修改用户ID
+	 */
+	private String modifyuserid;
+
+	/**
+	 * table name:CREATEUSERNAME
+	 * table type:varchar(50)
+	 * table comment:创建人名称
+	 */
+	private String createusername;
+
+	/**
+	 * table name:MODIFYUSERNAME
+	 * table type:varchar(50)
+	 * table comment:修改人名称
+	 */
+	private String modifyusername;
+
+	/**
+	 * table name:MASTERID
+	 * table type:varchar(36)
+	 * table comment:主表ID
+	 */
+	private String masterid;
+
+	/**
+	 * table name:PARTSID
+	 * table type:varchar(36)
+	 * table comment:配件ID
+	 */
+	private String partsid;
+
+	/**
+	 * table name:PARTSCODE
+	 * table type:varchar(30)
+	 * table comment:配件编码
+	 */
+	private String partscode;
+
+	/**
+	 * table name:PARTSNAME
+	 * table type:varchar(50)
+	 * table comment:配件名称
+	 */
+	private String partsname;
+
+	/**
+	 * table name:PARTSIMG
+	 * table type:varchar(100)
+	 * table comment:配件图
+	 */
+	private String partsimg;
+
+	/**
+	 * table name:SPECIFICATION
+	 * table type:varchar(50)
+	 * table comment:规格
+	 */
+	private String specification;
+
+	/**
+	 * table name:MODEL
+	 * table type:varchar(50)
+	 * table comment:型号
+	 */
+	private String model;
+
+	/**
+	 * table name:UNIT
+	 * table type:varchar(10)
+	 * table comment:单位
+	 */
+	private String unit;
+
+	/**
+	 * table name:USAGEQUANTITY
+	 * table type:int
+	 * table comment:单台设备使用数量
+	 */
+	private Integer usagequantity;
+
+}

+ 180 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquPartsSetoutTaskDo.java

@@ -0,0 +1,180 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.NoArgsConstructor;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author  cyn 
+ * @create 2023-11-24 15:13 
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("equ_parts_setout_task")
+public class EquPartsSetoutTaskDo implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * table name:ID
+	 * table type:varchar(36)
+	 * table comment:主键
+	 */
+	private String id;
+
+	/**
+	 * table name:TENANTID
+	 * table type:varchar(36)
+	 * table comment:租户ID
+	 */
+	private String tenantid;
+
+	/**
+	 * table name:ROPTION
+	 * table type:longtext
+	 * table comment:扩展json格式配置
+	 */
+	private String roption;
+
+	/**
+	 * table name:DELETED
+	 * table type:char(1)
+	 * table comment:是否删除
+	 */
+	private String deleted;
+
+	/**
+	 * table name:REMARK
+	 * table type:text
+	 * table comment:备注
+	 */
+	private String remark;
+
+	/**
+	 * table name:CREATEDATE
+	 * table type:datetime
+	 * table comment:创建时间
+	 */
+	private Date createdate;
+
+	/**
+	 * table name:CREATEUSERID
+	 * table type:varchar(36)
+	 * table comment:创建用户ID
+	 */
+	private String createuserid;
+
+	/**
+	 * table name:MODIFYDATE
+	 * table type:datetime
+	 * table comment:修改日期
+	 */
+	private Date modifydate;
+
+	/**
+	 * table name:MODIFYUSERID
+	 * table type:varchar(36)
+	 * table comment:修改用户ID
+	 */
+	private String modifyuserid;
+
+	/**
+	 * table name:CREATEUSERNAME
+	 * table type:varchar(50)
+	 * table comment:创建人名称
+	 */
+	private String createusername;
+
+	/**
+	 * table name:MODIFYUSERNAME
+	 * table type:varchar(50)
+	 * table comment:修改人名称
+	 */
+	private String modifyusername;
+
+	/**
+	 * table name:MASTERID
+	 * table type:varchar(36)
+	 * table comment:主表ID
+	 */
+	private String masterid;
+
+	/**
+	 * table name:PARTSID
+	 * table type:varchar(36)
+	 * table comment:配件ID
+	 */
+	private String partsid;
+
+	/**
+	 * table name:PARTSCODE
+	 * table type:varchar(30)
+	 * table comment:配件编码
+	 */
+	private String partscode;
+
+	/**
+	 * table name:PARTSNAME
+	 * table type:varchar(50)
+	 * table comment:配件名称
+	 */
+	private String partsname;
+
+	/**
+	 * table name:PARTSIMG
+	 * table type:varchar(100)
+	 * table comment:配件图
+	 */
+	private String partsimg;
+
+	/**
+	 * table name:SPECIFICATION
+	 * table type:varchar(50)
+	 * table comment:规格
+	 */
+	private String specification;
+
+	/**
+	 * table name:MODEL
+	 * table type:varchar(50)
+	 * table comment:型号
+	 */
+	private String model;
+
+	/**
+	 * table name:UNIT
+	 * table type:varchar(10)
+	 * table comment:单位
+	 */
+	private String unit;
+
+	/**
+	 * table name:USENUMBER
+	 * table type:int
+	 * table comment:计划使用数量
+	 */
+	private Integer usenumber;
+
+	/**
+	 * table name:INVENTORYNUMBER
+	 * table type:int
+	 * table comment:当前库存数量
+	 */
+	private Integer inventorynumber;
+
+	/**
+	 * table name:OCCUPYNUMBER
+	 * table type:int
+	 * table comment:维修中占用数量
+	 */
+	private Integer occupynumber;
+
+}

+ 35 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/BatchCreateDTO.java

@@ -0,0 +1,35 @@
+package com.rongwei.bsentity.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author shangmi
+ * @title BatchCreateDto
+ * @date 2023/11/29 11:48
+ * @description 计划批量生成
+ */
+@Data
+public class BatchCreateDTO implements Serializable {
+    /**
+     * 工厂ID
+     */
+    private String tenantId;
+
+    /**
+     * 设备分类
+     */
+    private String planType;
+
+    /**
+     * 年份
+     */
+    private Integer year;
+
+    /**
+     * 设备ID
+     */
+    private String equipmentId;
+
+}

+ 15 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/IdGeneralDTO.java

@@ -0,0 +1,15 @@
+package com.rongwei.bsentity.dto;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class IdGeneralDTO implements Serializable {
+
+    @JsonSerialize(using = ToStringSerializer.class)
+    private String id;
+
+}

+ 31 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/PlanYearCopyDTO.java

@@ -0,0 +1,31 @@
+package com.rongwei.bsentity.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author shangmi
+ * @title PlanYearCopyDTO
+ * @date 2023/11/30 17:29
+ * @description 年度计划复制
+ */
+@Data
+public class PlanYearCopyDTO implements Serializable {
+
+    /**
+     * 工厂ID
+     */
+    private String tenantId;
+
+    /**
+     * 被复制年份
+     */
+    private int oldYear;
+
+    /**
+     * 复制年份
+     */
+    private int newYear;
+
+}

+ 39 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/TaskCreatorDTO.java

@@ -0,0 +1,39 @@
+package com.rongwei.bsentity.dto;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author shangmi
+ * @title TaskCreatorDTO
+ * @date 2023/11/27 10:08
+ * @description 任务生成
+ */
+@Data
+public class TaskCreatorDTO implements Serializable {
+
+    /**
+     * 年
+     */
+    private Integer year;
+
+    /**
+     * 设备ID
+     */
+    private String equipmentId;
+
+    /**
+     * 计划类型
+     */
+    private String planType;
+
+    /**
+     * 月份
+     */
+    private Integer month;
+
+
+}

+ 11 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/enums/BoolEnum.java

@@ -0,0 +1,11 @@
+package com.rongwei.bsentity.enums;
+
+/**
+ * @author shangmi
+ * @title BoolEnum
+ * @date 2023/11/24 15:35
+ * @description 布尔值枚举
+ */
+public enum BoolEnum {
+    FALSE, TRUE
+}

+ 67 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/enums/EquipmentTypeEnum.java

@@ -0,0 +1,67 @@
+package com.rongwei.bsentity.enums;
+
+import lombok.Data;
+
+import java.util.Arrays;
+import java.util.Objects;
+
+/**
+ * @author shangmi
+ * @title EquipmentTypeEnum
+ * @date 2023/11/29 18:56
+ * @description 设备分类
+ */
+
+public enum EquipmentTypeEnum {
+    PLATFORMTRUCK("地坪车",29),
+    PREHEATING("预热炉",28),
+    ROLLINGMILL("轧机",270),
+    PREHEATER("预热机",260),
+    PAVEMENTMILLER("铣面机",250),
+    ANNEALINGFURNACE("退火炉",240),
+    CASTLINE("熔铸线",230),
+    COMBUSTIONSYSTEM("燃烧系统",220),
+    GRINDINGMACHINE("磨床",210),
+    SAWINGMACHINE("锯切机",200),
+    STRAIGHTENINGMACHINE("矫正机",190),
+    SHEARINGMACHINE("剪切机",180),
+    HEATINGFURNACE("加热炉",170),
+    SEAMING("焊合",160),
+    ASURNAME("公辅",150),
+    PACKAGINGLINE("包装线",140),
+    PRESSUREVESSEL("压力容器",130),
+    SLAGPRESS("压渣机",120),
+    IMPORTEDTHINSHEARINGMACHINE("进口薄剪机",110),
+    GUILLOTINESHEARS("剪板机",100),
+    THICKSHEARS("厚剪机",90),
+    CROSSCUTSHEARS("横剪机",80),
+    WELDINGLINEMACHINE("焊合线机",70),
+    DOMESTICTHINSHEARINGMACHINE("国产薄剪机",60),
+    HIGHPRECISIONSHEARS("高精剪机",60),
+    FILMREWINDER("倒卷机",40),
+    WRAPPINGMACHINE("打包机",30),
+    FORKLIFT("叉车",20),
+    TRAVELLINGCRANE("行车",10)
+;
+
+    private String type;
+    private int massege;
+
+    EquipmentTypeEnum(String type, int massege) {
+        this.type = type;
+        this.massege = massege;
+    }
+
+    public static String typeOf(int massege){
+        return getMessageByEquipmentTypeEnum(massege,null).type;
+    }
+
+    public static EquipmentTypeEnum getMessageByEquipmentTypeEnum(int massege,EquipmentTypeEnum equipmentTypeEnum){
+          return Arrays.stream(values()).filter(info -> massege == info.massege).findFirst().orElse(equipmentTypeEnum);
+    }
+
+
+    public static EquipmentTypeEnum getTypeByEquipmentTypeEnum(String type,EquipmentTypeEnum equipmentTypeEnum){
+        return Arrays.stream(values()).filter(info -> Objects.equals(type, info.type)).findFirst().orElse(equipmentTypeEnum);
+    }
+}

+ 60 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/enums/ErrorCodeEnum.java

@@ -0,0 +1,60 @@
+package com.rongwei.bsentity.enums;
+
+/**
+ * @author Charles
+ * @description: 异常代码
+ * @date 2022/6/8 16:39
+ */
+
+public enum ErrorCodeEnum {
+
+	SUCCESS("0000","请求成功"),
+
+	FAILURE("9999","请求失败"),
+
+	ST00("ST00","服务不可用"),
+	ST01("ST01","服务调用超时"),
+	ST02("ST02","非法调用或无权限访问"),
+	ST03("ST03","服务繁忙"),
+	ST05("ST05","消息发送失败"),
+	ST10("ST10","操作数据库失败"),
+	ST90("ST90","服务限流"),
+
+
+	BT00("BT00","请求参数不合法"),
+	BT01("BT01","请求参数为空"),
+	BT02("BT02","数据不存在"),
+	BT03("BT03","数据已存在"),
+
+
+
+	;
+	ErrorCodeEnum(String code, String message) {
+		this.code = code;
+		this.message = message;
+	}
+
+	public String code;
+	
+	public String message;
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	public void setMessage(String message) {
+		this.message = message;
+	}
+	
+	
+	 
+
+}

+ 68 - 0
cx-equipment/cx-equipment-server/src/main/java/com/rongwei/bsserver/sys/controller/MaintenanceController.java

@@ -0,0 +1,68 @@
+package com.rongwei.bsserver.sys.controller;
+
+import com.rongwei.bscommon.sys.service.MaintenanceService;
+import com.rongwei.bscommon.sys.utils.ExceptionUtils;
+import com.rongwei.bsentity.dto.BatchCreateDTO;
+import com.rongwei.bsentity.dto.PlanYearCopyDTO;
+import com.rongwei.bsentity.dto.TaskCreatorDTO;
+import com.rongwei.rwcommon.base.R;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author shangmi
+ * @title MaintenanceController
+ * @date 2023/11/24 16:45
+ * @description 保养检修
+ */
+@RestController
+@RequestMapping("maintenance")
+public class MaintenanceController {
+
+    private final static Logger log = LoggerFactory.getLogger(MaintenanceController.class);
+
+    @Autowired
+    private MaintenanceService maintenanceService;
+
+    @PostMapping("saveTask")
+    public R saveTask(@RequestBody TaskCreatorDTO taskCreator){
+        try {
+            log.info("进入接口:/maintenance/saveTask,入参:{}",taskCreator);
+            return maintenanceService.saveTask(taskCreator);
+        }catch (Exception e){
+            ExceptionUtils.printExceptionDetail(e,"生成任务失败,请检查传入参数");
+            return R.error(e.getMessage());
+        }
+    }
+
+    @PostMapping("batchSavePlans")
+    public R batchSavePlans(@RequestBody BatchCreateDTO batchCreate){
+        try {
+            log.info("进入接口:/maintenance/batchSavePlans,入参:{}",batchCreate);
+            return maintenanceService.batchSavePlans(batchCreate);
+        }catch (Exception e){
+            ExceptionUtils.printExceptionDetail(e,"生成任务失败,请检查传入参数,问题为:");
+            return R.error(e.getMessage());
+        }
+
+    }
+
+
+    @PostMapping("saveYearByTask")
+    public R saveYearByTask(@RequestBody PlanYearCopyDTO planYearCopy){
+        try {
+            log.info("进入接口:/maintenance/saveYearByTask,入参:{}",planYearCopy);
+            return maintenanceService.saveYearByTask(planYearCopy);
+        }catch (Exception e){
+            ExceptionUtils.printExceptionDetail(e,"生成年度任务失败,请检查传入参数,为题为:");
+            return R.error(e.getMessage());
+        }
+    }
+
+
+}