Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

fangpy 1 éve
szülő
commit
ddb8d8ac82
50 módosított fájl, 3638 hozzáadás és 125 törlés
  1. 22 0
      bs-common/src/main/java/com/rongwei/safecommon/utils/SaveConstans.java
  2. 31 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenancePartDao.java
  3. 30 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceScheduleDao.java
  4. 13 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceStandardDao.java
  5. 13 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceTaskDao.java
  6. 13 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquPartsSetoutStandardDao.java
  7. 27 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquPartsSetoutTaskDao.java
  8. 41 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenancePartService.java
  9. 24 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceScheduleService.java
  10. 27 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceStandardService.java
  11. 19 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceTaskService.java
  12. 27 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquPartsSetoutStandardService.java
  13. 26 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquPartsSetoutTaskService.java
  14. 49 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/MaintenanceService.java
  15. 59 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenancePartServiceImpl.java
  16. 88 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceScheduleServiceImpl.java
  17. 34 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceStandardServiceImpl.java
  18. 57 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceTaskServiceImpl.java
  19. 44 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquPartsSetoutStandardServiceImpl.java
  20. 28 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquPartsSetoutTaskServiceImpl.java
  21. 386 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/MaintenanceServiceImpl.java
  22. 54 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/utils/CommonUtils.java
  23. 291 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenancePartDo.java
  24. 215 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceScheduleDo.java
  25. 263 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceStandardDo.java
  26. 348 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceTaskDo.java
  27. 341 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquOverhaulPlanningTasksDo.java
  28. 180 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquPartsSetoutPlanningTasksDo.java
  29. 166 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquPartsSetoutStandardDo.java
  30. 180 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquPartsSetoutTaskDo.java
  31. 35 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/BatchCreateDTO.java
  32. 15 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/IdGeneralDTO.java
  33. 31 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/PlanYearCopyDTO.java
  34. 39 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/dto/TaskCreatorDTO.java
  35. 11 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/enums/BoolEnum.java
  36. 67 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/enums/EquipmentTypeEnum.java
  37. 60 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/enums/ErrorCodeEnum.java
  38. 68 0
      cx-equipment/cx-equipment-server/src/main/java/com/rongwei/bsserver/sys/controller/MaintenanceController.java
  39. 1 1
      cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/CheckTemplateService.java
  40. 107 88
      cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/CheckTemplateServiceImpl.java
  41. 14 11
      cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/PointCheckServiceImpl.java
  42. 48 5
      cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/utils/CommonUtil.java
  43. 8 0
      cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/utils/MlConstants.java
  44. 2 0
      cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/domian/HiddenDangerTrackDo.java
  45. 15 3
      cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/domian/PointCheckDo.java
  46. 2 0
      cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/domian/PointCheckItemDo.java
  47. 12 11
      cx-safe-check/cx-save-check-server/src/main/java/com/rongwei/savecheck/controller/CheckTemplateController.java
  48. 3 3
      rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/service/impl/TrainingDemandServiceImpl.java
  49. 1 1
      rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/utils/TrainingUtils.java
  50. 3 2
      rw-training/training-server/src/main/java/com/rongwei/training/controller/PlanController.java

+ 22 - 0
bs-common/src/main/java/com/rongwei/safecommon/utils/SaveConstans.java

@@ -1,5 +1,8 @@
 package com.rongwei.safecommon.utils;
 
+import java.util.HashMap;
+import java.util.Map;
+
 public class SaveConstans {
 
     // 部门类型:集团
@@ -20,6 +23,25 @@ public class SaveConstans {
     public static final String MINUS_ONE = "-1";
     public static final String AND = "and";
 
+    /**
+     * orgId和 code的对应关系
+     */
+    public static final Map<String,String> ORG_CODE_MAP=new HashMap<String,String>(){{
+        /**
+         * 山东创新箔材科技有限公司
+         */
+        put("0001651000000015EFDD","BK");
+        /**
+         * 山东创新精铝金属制造有限公司
+         */
+        put("0001651000000017DRZ1","JL");
+        /**
+         * 山东创新板材有限公司
+         */
+        put("0001S31000000000J0TR","BC");
+    }};
+
+
     /**
      * 问卷调查状态
      */

+ 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());
+        }
+    }
+
+
+}

+ 1 - 1
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/CheckTemplateService.java

@@ -20,7 +20,7 @@ public interface CheckTemplateService extends IService<CheckTemplateDo> {
 
     void saveByVersion(CheckTemplateVo checkTemplateVo);
 
-    void pointCheckCreate();
+    void pointCheckCreate(Map<String,Object> map);
 
     void updateStatusByHiId(Map<String,Object> map);
 

+ 107 - 88
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/CheckTemplateServiceImpl.java

@@ -2,13 +2,13 @@ package com.rongwei.sfcommon.sys.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwe.scentity.domian.*;
 import com.rongwe.scentity.vo.CheckTemplateItemsVo;
 import com.rongwe.scentity.vo.CheckTemplateVo;
 import com.rongwei.commonservice.serial.service.CommonDictService;
 import com.rongwei.commonservice.serial.service.SysSerialNumberService;
 import com.rongwei.rwadmincommon.system.dao.SysUserDao;
-import com.rongwei.rwadmincommon.system.vo.SysUserVo;
 import com.rongwei.rwcommon.utils.SecurityUtil;
 import com.rongwei.rwcommon.utils.StringUtils;
 import com.rongwei.rwcommon.vo.generalsql.GeneralApiParameter;
@@ -21,10 +21,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
 import java.util.*;
 
+import static com.rongwei.sfcommon.utils.CommonUtil.streamCodeGeneration;
+
 @Service("checkTemplateService")
 public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, CheckTemplateDo> implements CheckTemplateService {
 
@@ -105,31 +106,49 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
     /**
      * 定时调度(每天)创建点检任务
      */
-    public void pointCheckCreate(){
+    public void pointCheckCreate(Map<String, Object> map) {
         logger.info("点检定时任务生成开始.....");
-        Map<String,Object> map = new HashMap<>();
-        map.put("TEMPLATETYPE",MlConstants.TEMPLATETYPE_POINT_CHECK);
-        map.put("ENABLESTATUS",MlConstants.TEMPLATE_STATUS_OPEM);
+        if (map == null) {
+            map = new HashMap<>();
+        }
+        // 是否为定时任务
+        boolean runTask = false;
+        // 如果参数为空则为定时任务
+        if (map.isEmpty()) {
+            //map.put("TEMPLATETYPE",MlConstants.TEMPLATETYPE_POINT_CHECK);
+            // 模板状态
+            map.put("ENABLESTATUS", MlConstants.TEMPLATE_STATUS_OPEM);
+            // 任务生成类型
+            map.put("JOBSTARTTYPE", MlConstants.JOB_START_TYPE_AUTO);
+            runTask = true;
+        } else {
+            String checkTemplateId = map.getOrDefault("ID", "").toString();
+            if (StringUtils.isBlank(checkTemplateId)) {
+                log.error("参数异常");
+                return;
+            }
+        }
         // 查询所有点检类型的检查模板
-        List<CheckTemplateDo> list = (List<CheckTemplateDo>)this.listByMap(map);
-        if(list != null && list.size()>0){
+        List<CheckTemplateDo> list = (List<CheckTemplateDo>) this.listByMap(map);
+        if (list.size() == 0) {
             // 根据点检模板定时生成点检任务
-            for(CheckTemplateDo checkTemplate:list){
-                logger.info("点检模板编号:"+checkTemplate.getTemplatecode());
-                // 检查模板的检查项
-                Map<String,Object> itemMap = new HashMap<>();
-                itemMap.put("CHECKTEMPLATEID",checkTemplate.getId());
-                List<CheckTemplateItemsDo> items = (List<CheckTemplateItemsDo>)checkTemplateItemsService.listByMap(itemMap);
-                // 根据检查模板和相应的检查项生成点检任务
-                pointCheckCreateByItems(checkTemplate,items);
-            }
+            return;
+        }
+        for (CheckTemplateDo checkTemplate : list) {
+            logger.info("点检模板编号:" + checkTemplate.getTemplatecode());
+            // 检查模板的检查项
+            Map<String, Object> itemMap = new HashMap<>();
+            itemMap.put("CHECKTEMPLATEID", checkTemplate.getId());
+            List<CheckTemplateItemsDo> items = (List<CheckTemplateItemsDo>) checkTemplateItemsService.listByMap(itemMap);
+            // 根据检查模板和相应的检查项生成点检任务
+            pointCheckCreateByItems(checkTemplate, items, runTask);
         }
         // 检查是否有延期点检任务,如有则发邮件提醒
-        pointCheckService.pintCheckDelayReminder();
+        //pointCheckService.pintCheckDelayReminder();
     }
 
     // 根据检查模板和相应的检查项生成点检任务
-    private void pointCheckCreateByItems(CheckTemplateDo checkTemplate,List<CheckTemplateItemsDo> items){
+    private void pointCheckCreateByItems(CheckTemplateDo checkTemplate, List<CheckTemplateItemsDo> items, boolean runTask) {
         /**
          * 根据检查模板所有检查项的频次决定最终生成多少点检任务
          * 通过对需求分析总结模型如下:
@@ -142,57 +161,63 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
         List<List<CheckTemplateItemsDo>> middleItems = new ArrayList<>();
         // 夜班检查项
         List<List<CheckTemplateItemsDo>> nightItems = new ArrayList<>();
-
-        if(items != null && items.size()>0){
-            // 循环处理检查内容到白、中、夜三班任务里
-            for(CheckTemplateItemsDo checkTemplateItem:items){
-                // 频次
-                String frequency = checkTemplateItem.getFrequencyids();
-                // 班次
-                String shift = checkTemplateItem.getShift();
-                // 次数
-                Integer shiftcount = checkTemplateItem.getShiftcount();
-                if(shiftcount == null){
-                    shiftcount = 1;
-                }
-                // 当前检查项是否生成任务
-                if(StringUtils.isNotEmpty(frequency) && isNowCreateByFrequency(frequency)){
-                    // 白班
-                    if(MlConstants.CHECK_SHIFT_EVERY_SHIFT.equals(shift) || MlConstants.CHECK_SHIFT_EVERY_DAY_SHIFT.equals(shift)){
-                        addCheckItems(dayItems,shiftcount,checkTemplateItem);
-                    }
-                    // 夜班
-                    if(MlConstants.CHECK_SHIFT_EVERY_SHIFT.equals(shift) || MlConstants.CHECK_SHIFT_EVERY_NIGHT_SHIFT.equals(shift)){
-                        addCheckItems(nightItems,shiftcount,checkTemplateItem);
-                    }
-                    // 中班
-                    if(MlConstants.CHECK_SHIFT_EVERY_SHIFT.equals(shift) || MlConstants.CHECK_SHIFT_EVERY_MIDDLE_SHIFT.equals(shift)){
-                        addCheckItems(middleItems,shiftcount,checkTemplateItem);
-                    }
-                }
+        if (items == null || items.size() == 0) {
+            return;
+        }
+        // 循环处理检查内容到白、中、夜三班任务里
+        for (CheckTemplateItemsDo checkTemplateItem : items) {
+            // 频次
+            String frequency = checkTemplateItem.getFrequencyids();
+            // 班次
+            String shift = checkTemplateItem.getShift();
+            // 次数
+            Integer shiftcount = checkTemplateItem.getShiftcount();
+            if (shiftcount == null) {
+                shiftcount = 1;
+            }
+            // 如果是定时任务 (频次为空或者根据频次判断不应该生产任务时 直接返回)
+            if (runTask && (StringUtils.isBlank(frequency) || !isNowCreateByFrequency(frequency))) {
+                return;
+            }
+            // 白班
+            if (MlConstants.CHECK_SHIFT_EVERY_SHIFT.equals(shift) || MlConstants.CHECK_SHIFT_EVERY_DAY_SHIFT.equals(shift)) {
+                addCheckItems(dayItems, shiftcount, checkTemplateItem);
+            }
+            // 夜班
+            if (MlConstants.CHECK_SHIFT_EVERY_SHIFT.equals(shift) || MlConstants.CHECK_SHIFT_EVERY_NIGHT_SHIFT.equals(shift)) {
+                addCheckItems(nightItems, shiftcount, checkTemplateItem);
+            }
+            // 中班
+            if (MlConstants.CHECK_SHIFT_EVERY_SHIFT.equals(shift) || MlConstants.CHECK_SHIFT_EVERY_MIDDLE_SHIFT.equals(shift)) {
+                addCheckItems(middleItems, shiftcount, checkTemplateItem);
             }
-            // 生成点检任务
-            System.out.println("dayItems:"+dayItems.size()+"***"+"middleItems:"+middleItems.size()+"***"+"nightItems:"+nightItems.size());
-            // 白班任务
-            createPointCheckByTemplate(checkTemplate,dayItems,MlConstants.CHECK_SHIFT_EVERY_DAY_SHIFT);
-            // 中班任务
-            createPointCheckByTemplate(checkTemplate,middleItems,MlConstants.CHECK_SHIFT_EVERY_MIDDLE_SHIFT);
-            // 夜班任务
-            createPointCheckByTemplate(checkTemplate,nightItems,MlConstants.CHECK_SHIFT_EVERY_NIGHT_SHIFT);
         }
+        // 生成点检任务
+        System.out.println("dayItems:" + dayItems.size() + "***" + "middleItems:" + middleItems.size() + "***" + "nightItems:" + nightItems.size());
+        // 白班任务
+        createPointCheckByTemplate(checkTemplate, dayItems, MlConstants.CHECK_SHIFT_EVERY_DAY_SHIFT);
+        // 中班任务
+        createPointCheckByTemplate(checkTemplate, middleItems, MlConstants.CHECK_SHIFT_EVERY_MIDDLE_SHIFT);
+        // 夜班任务
+        createPointCheckByTemplate(checkTemplate, nightItems, MlConstants.CHECK_SHIFT_EVERY_NIGHT_SHIFT);
     }
 
-    // 根据频次判断当前检查项是否生成点检任务
-    private boolean isNowCreateByFrequency(String frequency){
+    /**
+     * 根据频次判断当前检查项是否生成点检任务
+     *
+     * @param frequency
+     * @return 是否可以生成任务
+     */
+    private boolean isNowCreateByFrequency(String frequency) {
         boolean isCreate = true;
         String[] frequencys = frequency.split("/");
-        if(frequencys != null && frequencys.length>0){
+        if (frequencys != null && frequencys.length > 0) {
             // 每天
-            if("day".equals(frequencys[0])){
+            if ("day".equals(frequencys[0])) {
                 isCreate = true;
             }
             // 每周
-            else if("week".equals(frequencys[0])){
+            else if ("week".equals(frequencys[0])) {
                 String weekday = frequencys[1];
                 // 当前时间是星期几
                 String w = DateUtil.dayOfWeek(new Date())+"";
@@ -262,24 +287,25 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
                 String checkitemsids = checkTemplate.getCheckitemids();
                 if(StringUtils.isNotEmpty(checkitemsids)){
                     String[] checkitemsidArray = checkitemsids.split(",");
-                    for(String checkitemsid:checkitemsidArray){
+                    for (String checkitemsid : checkitemsidArray) {
                         // 每个设备生成一条点检任务
                         CheckItemsDo checkItemsdo = checkItemsService.getById(checkitemsid);
                         // 如当前设备未禁用状态则不生成点检任务
-                        if(checkItemsdo != null && MlConstants.CHECKITEM_STATUS_DISABLE.equals(checkItemsdo.getEnabled())){
+                        if (checkItemsdo != null && MlConstants.CHECKITEM_STATUS_DISABLE.equals(checkItemsdo.getEnabled())) {
                             continue;
                         }
 
                         // 点检编号
-                        SysSerialVo sysSerialVo = new SysSerialVo();
-                        sysSerialVo.setModulecode("asp_point_check_POINTCHECKCODE");
-                        sysSerialVo.setRuleTemplateStr("@{date:yyyyMMdd}@{serialNumber:#0000000}");
-                        String pointcheckcode = sysSerialNumberService.getCodeByTemplate(sysSerialVo);
+
+                        String pointcheckcode = streamCodeGeneration("asp_point_check_POINTCHECKCODE",
+                                "@{date:yyyyMMdd}@{serialNumber:#0000000}","date:yyyy", checkTemplate.getTenantid());
                         // 点检生成
                         PointCheckDo pointCheckDo = new PointCheckDo();
                         pointCheckDo.setId(SecurityUtil.getUUID());
                         pointCheckDo.setPointcheckname(poName);
                         pointCheckDo.setPointcheckcode(pointcheckcode);
+                        pointCheckDo.setWorkshopid(checkTemplate.getYjorgid());
+                        pointCheckDo.setWorkshopname(checkTemplate.getYjorgname());
                         //设备ID
                         pointCheckDo.setCheckitemid(checkItemsdo.getId());
                         //班次
@@ -288,23 +314,26 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
                         pointCheckDo.setCheckstatus(MlConstants.POINT_CHECK_STATUS_WAIT);
                         // 点检预警状态默认正常
                         pointCheckDo.setCheckwarnstatus(MlConstants.POINTCEHCK_WARNSTATUS_NORMAL);
+                        pointCheckDo.setTenantid(checkTemplate.getTenantid());
+                        pointCheckDo.setSource("1");
+                        pointCheckDo.setTemplatetype(checkTemplate.getTemplatetype());
                         //设备负责人
-                        Map<String,Object> duMap = new HashMap<>();
-                        duMap.put("CHECKITEMID",checkItemsdo.getId());
-                        List<CheckItemsDutyuserDo> checkItemsDutyusers = (List<CheckItemsDutyuserDo>)checkItemsDutyuserService.listByMap(duMap);
+                        Map<String, Object> duMap = new HashMap<>();
+                        duMap.put("CHECKITEMID", checkItemsdo.getId());
+                        List<CheckItemsDutyuserDo> checkItemsDutyusers = (List<CheckItemsDutyuserDo>) checkItemsDutyuserService.listByMap(duMap);
                         //设置点检人
                         String pcids = null;
                         String pcnames = null;
-                        if(checkItemsDutyusers != null && checkItemsDutyusers.size()>0){
-                            for(CheckItemsDutyuserDo checkItemsDutyuser:checkItemsDutyusers){
+                        if (checkItemsDutyusers != null && checkItemsDutyusers.size() > 0) {
+                            for (CheckItemsDutyuserDo checkItemsDutyuser : checkItemsDutyusers) {
                                 // 生产属性的员工为点检人
-                                if(MlConstants.USER_ATTR_PRODUCTION.equals(checkItemsDutyuser.getDutyuserattribute())){
-                                    if(pcids == null){
+                                if (MlConstants.USER_ATTR_PRODUCTION.equals(checkItemsDutyuser.getDutyuserattribute())) {
+                                    if (pcids == null) {
                                         pcids = checkItemsDutyuser.getDutyuserid();
                                         pcnames = checkItemsDutyuser.getDutyusername();
-                                    }else{
-                                        pcids = pcids+","+checkItemsDutyuser.getDutyuserid();
-                                        pcnames = pcnames+","+checkItemsDutyuser.getDutyusername();
+                                    } else {
+                                        pcids = pcids + "," + checkItemsDutyuser.getDutyuserid();
+                                        pcnames = pcnames + "," + checkItemsDutyuser.getDutyusername();
                                     }
                                 }
                             }
@@ -347,6 +376,7 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
                                 PointCheckItemDo pointCheckItemDo = new PointCheckItemDo();
                                 pointCheckItemDo.setId(SecurityUtil.getUUID());
                                 pointCheckItemDo.setPointcheckid(pointCheckDo.getId());
+                                pointCheckItemDo.setTenantid(checkTemplate.getTenantid());
                                 // 检查内容模板
                                 CheckItemContentDo checkItemContent = checkItemContentService.getById(v.getCheckitemcontentid());
                                 pointCheckItemDo.setCheckitemcontentid(v.getCheckitemcontentid());
@@ -363,6 +393,7 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
                                 pointCheckItemDo.setShiftcount(v.getShiftcount());
                                 // 排序字段
                                 pointCheckItemDo.setItemsort(v.getItemsort());
+                                pointCheckItemDo.setSource("1");
                                 pointCheckItems.add(pointCheckItemDo);
                             });
                         }
@@ -391,17 +422,5 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
             checkTemplate.setEnablestatus(MlConstants.TEMPLATE_STATUS_CLOSE);
             this.updateById(checkTemplate);
         }
-        if(map.get("newId") != null){
-            String newId = map.get("newId").toString();
-            // 模板编号
-            SysSerialVo sysSerialVo = new SysSerialVo();
-            sysSerialVo.setModulecode("asp_check_template_TEMPLATECODE");
-            sysSerialVo.setRuleTemplateStr("@{date:yyyyMMdd}@{serialNumber:#000000}");
-            String code = sysSerialNumberService.getCodeByTemplate(sysSerialVo);
-            CheckTemplateDo checkTemplate = new CheckTemplateDo();
-            checkTemplate.setId(newId);
-            checkTemplate.setTemplatecode(code);
-            this.updateById(checkTemplate);
-        }
     }
 }

+ 14 - 11
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/PointCheckServiceImpl.java

@@ -36,6 +36,8 @@ import org.springframework.transaction.annotation.Transactional;
 import java.lang.reflect.InvocationTargetException;
 import java.util.*;
 
+import static com.rongwei.sfcommon.utils.CommonUtil.streamCodeGeneration;
+
 @Service("pointCheckService")
 public class PointCheckServiceImpl extends ServiceImpl<PointCheckDao, PointCheckDo> implements PointCheckService {
 
@@ -309,30 +311,31 @@ public class PointCheckServiceImpl extends ServiceImpl<PointCheckDao, PointCheck
                 }
                 hiddenDangerTrack.setHiddendangercontent(hiddendangercontent.toString());
                 // 任务工段
-                hiddenDangerTrack.setDangerworkpark(checkItemsDo.getChargeorgid());
-                hiddenDangerTrack.setDangerworkparkname(checkItemsDo.getChargeorgname());
+                hiddenDangerTrack.setDangerworkpark(pointCheck.getWorkshopid());
+                hiddenDangerTrack.setDangerworkparkname(pointCheck.getWorkshopname());
             }
             // 指派跟踪人取点检人的所属工段的工段主管
             if(StringUtils.isNotEmpty(pointCheck.getCheckuserid())){
                 List<Map<String,Object>> umap = pointCheckDao.getGdzgByUserId(pointCheck.getCheckuserid());
                 if(umap != null && umap.size()>0){
-                    hiddenDangerTrack.setTrackuserid(umap.get(0).get("USERID").toString());
-                    hiddenDangerTrack.setTrackusername(umap.get(0).get("USERNAME").toString());
+                    hiddenDangerTrack.setTrackuserid(umap.get(0).getOrDefault("USERID","").toString());
+                    hiddenDangerTrack.setTrackusername(umap.get(0).getOrDefault("USERNAME","").toString());
                     // 设置最初指派跟踪人
-                    hiddenDangerTrack.setFirsttrackuserid(umap.get(0).get("USERID").toString());
-                    hiddenDangerTrack.setFirsttrackusername(umap.get(0).get("USERNAME").toString());
+                    hiddenDangerTrack.setFirsttrackuserid(umap.get(0).getOrDefault("USERID","").toString());
+                    hiddenDangerTrack.setFirsttrackusername(umap.get(0).getOrDefault("USERNAME","").toString());
                 }
             }
             // 默认待关闭
             hiddenDangerTrack.setStatus(MlConstants.HIDDEN_DANGER_STATUS_NOTCLOSE);
+            hiddenDangerTrack.setSource("1");
             hiddenDangerTrack.setCheckphoto(pointCheck.getCheckphoto());
             // 隐患类型默认为一般
             hiddenDangerTrack.setHiddendangertype(MlConstants.HIDDEN_DANGER_TYPE_NORMAL);
-            // 总编号生成
-            SysSerialVo sysSerialVo = new SysSerialVo();
-            sysSerialVo.setRuleTemplateStr("@{date:yyyyMMdd}@{serialNumber:#000000}");
-            sysSerialVo.setModulecode("asp_hidden_danger_track_CODE");
-            hiddenDangerTrack.setCode(sysSerialNumberService.getCodeByTemplate(sysSerialVo));
+
+            String code = streamCodeGeneration("asp_hidden_danger_track_CODE",
+                    "@{date:yyyyMMdd}@{serialNumber:#000000}","date:yyyy", pointCheck.getTenantid());
+
+            hiddenDangerTrack.setCode(code);
             hiddenDangerTrackService.save(hiddenDangerTrack);
         }
     }

+ 48 - 5
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/utils/CommonUtil.java

@@ -1,8 +1,9 @@
 package com.rongwei.sfcommon.utils;
 
+import com.rongwei.commonservice.serial.service.SysSerialNumberService;
 import com.rongwei.commonservice.service.RedisService;
 import com.rongwei.rwadmincommon.system.vo.SysUserVo;
-import lombok.extern.slf4j.Slf4j;
+import com.rongwei.rwcommonentity.commonservers.vo.SysSerialVo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -12,21 +13,25 @@ import org.springframework.web.context.request.ServletRequestAttributes;
 
 import javax.annotation.PostConstruct;
 import javax.servlet.http.HttpServletRequest;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
 
+import static com.rongwei.safecommon.utils.SaveConstans.ORG_CODE_MAP;
+
 /**
  * CommonUtil class
  *
  * @author XH
  * @date 2021/01/08
  */
-@Slf4j
 @Component
 public class CommonUtil {
 
+    private static final Logger log = LoggerFactory.getLogger(CommonUtil.class.getName());
+    @Autowired
+    private SysSerialNumberService autoSysSerialNumberService;
+
+    private static SysSerialNumberService sysSerialNumberService;
 
     @Autowired
     private RedisService autoRedisService;
@@ -36,7 +41,7 @@ public class CommonUtil {
     @PostConstruct
     public void init() {
         redisService = autoRedisService;
-
+        sysSerialNumberService = autoSysSerialNumberService;
     }
 
     public static String getWeekForYear(boolean returnLastWeek) {
@@ -87,4 +92,42 @@ public class CommonUtil {
         }
         return currUser;
     }
+    /**
+     * 流水码生成
+     *
+     * @param moduleCode      流水码CODE
+     * @param ruleTemplateStr 流水码编码规则
+     * @param tenantId        租户id
+     * @return
+     */
+    public static String streamCodeGeneration(String moduleCode, String ruleTemplateStr, String tenantId) {
+        String orgCode = ORG_CODE_MAP.getOrDefault(tenantId, "");
+        log.info("开始生成流水码");
+        SysSerialVo sysSerialVo = new SysSerialVo();
+        sysSerialVo.setModulecode(String.format("%s_%s", moduleCode, orgCode));
+        sysSerialVo.setRuleTemplateStr(String.format("%s-%s", orgCode, ruleTemplateStr));
+        String streamCode = sysSerialNumberService.getCodeByTemplate(sysSerialVo);
+        log.info("流水码生成成功:{}", streamCode);
+        return streamCode;
+    }
+
+    /**
+     * 流水码生成
+     *
+     * @param moduleCode      流水码CODE
+     * @param ruleTemplateStr 流水码编码规则
+     * @param tenantId        租户id
+     * @return
+     */
+    public static String streamCodeGeneration(String moduleCode, String ruleTemplateStr, String resetRule, String tenantId) {
+        String orgCode = ORG_CODE_MAP.getOrDefault(tenantId, "");
+        log.info("开始生成流水码");
+        SysSerialVo sysSerialVo = new SysSerialVo();
+        sysSerialVo.setModulecode(String.format("%s_%s", moduleCode, orgCode));
+        sysSerialVo.setRuleTemplateStr(String.format("%s-%s", orgCode, ruleTemplateStr));
+        sysSerialVo.setResetrule(resetRule);
+        String streamCode = sysSerialNumberService.getCodeByTemplate(sysSerialVo);
+        log.info("流水码生成成功:{}", streamCode);
+        return streamCode;
+    }
 }

+ 8 - 0
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/utils/MlConstants.java

@@ -102,5 +102,13 @@ public class MlConstants {
      * 安全管理员
      */
     public static final String  SAFETY_MANAGER_CODE ="code-safe";
+    /**
+     * 自动生成
+     */
+    public static final String JOB_START_TYPE_AUTO ="10";
 
+    /**
+     * 零时一次性任务
+     */
+    public static final String JOB_START_TYPE_DISPOSABLE ="20";
 }

+ 2 - 0
cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/domian/HiddenDangerTrackDo.java

@@ -178,4 +178,6 @@ public class HiddenDangerTrackDo extends BaseDo implements Serializable {
 	 */
 	private String shopfacilitatorid;
 
+	private String source;
+
 }

+ 15 - 3
cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/domian/PointCheckDo.java

@@ -2,10 +2,11 @@ package com.rongwe.scentity.domian;
 
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
-import lombok.Data;
-import com.rongwei.rwcommon.base.BaseDo;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import lombok.Data;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -42,6 +43,10 @@ public class PointCheckDo extends BaseDo implements Serializable {
 	 * 点检车间ID
 	 */
 	private String workshopid;
+	/**
+	 * 点检车间名称
+	 */
+	private String workshopname;
 	/**
 	 * 点检工段ID
 	 */
@@ -91,5 +96,12 @@ public class PointCheckDo extends BaseDo implements Serializable {
 	 * 扩展json格式配置
 	 */
 	private String roption;
-
+	/**
+	 * 来源
+	 */
+	private String source;
+	/**
+	 * 检查类型
+	 */
+	private String templatetype;
 }

+ 2 - 0
cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/domian/PointCheckItemDo.java

@@ -97,4 +97,6 @@ public class PointCheckItemDo extends BaseDo implements Serializable {
 	 */
 	private String roption;
 
+	private String source;
+
 }

+ 12 - 11
cx-safe-check/cx-save-check-server/src/main/java/com/rongwei/savecheck/controller/CheckTemplateController.java

@@ -1,21 +1,21 @@
 package com.rongwei.savecheck.controller;
 
-import java.util.List;
-import java.util.Map;
-
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.rongwe.scentity.domian.CheckTemplateDo;
 import com.rongwe.scentity.domian.CheckTemplateItemsDo;
+import com.rongwei.rwcommon.base.QueryPar;
+import com.rongwei.rwcommon.base.R;
 import com.rongwei.rwcommon.utils.StringUtils;
 import com.rongwei.sfcommon.sys.service.CheckItemContentService;
 import com.rongwei.sfcommon.sys.service.CheckTemplateItemsService;
 import com.rongwei.sfcommon.sys.service.CheckTemplateService;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import com.rongwei.rwcommon.base.QueryPar;
-import com.rongwei.rwcommon.base.R;
-import lombok.extern.slf4j.Slf4j;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * 检查模板表
@@ -132,16 +132,17 @@ public class CheckTemplateController {
 
     /**
      * 点检任务生成
+     * 定时非定时
      * @param map
      * @return
      */
     @PostMapping("/pointCheckCreate")
-    public R pointCheckCreate(@RequestBody Map<String,Object> map){
-        System.out.println("定时生成点检任务开始...");
-        try{
-            checkTemplateService.pointCheckCreate();
+    public R pointCheckCreate(@RequestBody(required = false) Map<String,Object> map) {
+        log.info("生成点检任务参数为:{}", map);
+        try {
+            checkTemplateService.pointCheckCreate(map);
             return R.ok();
-        }catch (Exception e){
+        } catch (Exception e) {
             e.printStackTrace();
             log.error(StringUtils.spliceErrorMsg(e), e.fillInStackTrace());
             return R.error();

+ 3 - 3
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/service/impl/TrainingDemandServiceImpl.java

@@ -7,7 +7,7 @@ import com.rongwei.rwcommon.utils.StringUtils;
 import com.rongwei.training.domain.*;
 import com.rongwei.trainingcommon.sys.dao.*;
 import com.rongwei.trainingcommon.sys.service.TrainingDemandService;
-import com.rongwei.trainingcommon.sys.utils.TrainingUtils;
+import com.rongwei.trainingcommon.sys.utils.TrainingListCopyUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
@@ -110,7 +110,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
         /************调查主表备份*************/
         TrainingDemandSurveyBackupsDo saveDemandSurveyBackupsDo = generateSurveyBackups(trainingDemandSurveyDo, userIds, userNames);
         /************自定义内容备份*************/
-        List<TrainingDemandSurveyCustomDetailBackupsDo> saveDemandSurveyCustomDetailBackupsDos = TrainingUtils.copyListProperties(surveyCustomDetailDos, TrainingDemandSurveyCustomDetailBackupsDo::new);
+        List<TrainingDemandSurveyCustomDetailBackupsDo> saveDemandSurveyCustomDetailBackupsDos = TrainingListCopyUtils.copyListProperties(surveyCustomDetailDos, TrainingDemandSurveyCustomDetailBackupsDo::new);
         saveDemandSurveyCustomDetailBackupsDos.forEach(info -> info.setSurverid(saveDemandSurveyBackupsDo.getId()));
         /************其他数据备份*************/
         // 保存问题数据备份
@@ -158,7 +158,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
                         .filter(info -> trainingDemandTempDetailDo.getQuestionid().equals(info.getQuestionid()) &&
                                 trainingDemandTempDetailDo.getId().equals(info.getDemandtempdetailid())
                         ).collect(Collectors.toList());
-                List<TrainingDemandQuestionOptionBackupsDo> addOptions = TrainingUtils.copyListProperties(questionOptions, TrainingDemandQuestionOptionBackupsDo::new);
+                List<TrainingDemandQuestionOptionBackupsDo> addOptions = TrainingListCopyUtils.copyListProperties(questionOptions, TrainingDemandQuestionOptionBackupsDo::new);
                 addOptions.forEach(info -> {
                     info.setQuestionid(questionBackupsDo.getId());
                 });

+ 1 - 1
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/utils/TrainingUtils.java

@@ -15,7 +15,7 @@ import java.util.function.Supplier;
  * @date 2023/11/24
  */
 @Component
-public class TrainingUtils  extends BeanUtils {
+public class TrainingListCopyUtils extends BeanUtils {
     /**
      * 集合数据的拷贝
      * @param sources: 数据源类

+ 3 - 2
rw-training/training-server/src/main/java/com/rongwei/training/controller/PlanController.java

@@ -293,7 +293,8 @@ public class PlanController {
                 if (planUserIdsFromPlan.isEmpty()) {
                     return;
                 }
-                // 获取员工信息
+                // modify at [ 2023-11-29 10:37:38 ] by xh: 取消邮件发送提醒
+              /*  // 获取员工信息
                 List<SysUserDo> list = sysUserService.list(new LambdaQueryWrapper<SysUserDo>().eq(BaseDo::getDeleted, "0").in(SysUserDo::getId, planUserIdsFromPlan));
                 // 发送邮件信息
                 MailDo mail = new MailDo();
@@ -308,7 +309,7 @@ public class PlanController {
                 mailContent.append("详见智能安全监控平台:http://192.168.0.205:8000");
                 mail.setContent(mailContent.toString());
                 // 邮件发送服务调用
-                sysConfigFeignService.sendTextMail(mail);
+                sysConfigFeignService.sendTextMail(mail);*/
             });
             planService.removeByIds(planIds);
             return R.ok();