Explorar o código

Merge remote-tracking branch 'origin/mode-min-unit' into mode-min-unit

fangpy hai 9 meses
pai
achega
8b4466f76e
Modificáronse 34 ficheiros con 2416 adicións e 8 borrados
  1. 9 0
      bs-common/src/main/java/com/rongwei/safecommon/utils/SaveConstans.java
  2. 2 0
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsBlankOrderDao.java
  3. 22 0
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsBlankOrderServiceImpl.java
  4. 9 0
      cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProcessOperationServiceImpl.java
  5. 1 1
      cx-aps/cx-aps-server/src/main/java/com/rongwei/bsserver/controller/ApsProductionOrderController.java
  6. 108 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/config/EquForkliftRepairRecordListener.java
  7. 7 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquForkliftRepairRecordDao.java
  8. 24 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceOrderDao.java
  9. 18 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenancePredictivePlanDao.java
  10. 61 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquMaintenanceReportDao.java
  11. 21 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/dao/EquipmentDisposeDao.java
  12. 62 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/excel/EquForkliftRepairRecordTemplate.java
  13. 15 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquForkliftRepairRecordService.java
  14. 3 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceOrderService.java
  15. 22 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenancePredictivePlanService.java
  16. 12 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquMaintenanceReportService.java
  17. 5 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/EquipmentArchivesService.java
  18. 138 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquForkliftRepairRecordServiceImpl.java
  19. 1 1
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquFrockTestRecordServiceImpl.java
  20. 53 4
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceOrderServiceImpl.java
  21. 132 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenancePredictivePlanServiceImpl.java
  22. 73 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceReportServiceImpl.java
  23. 129 0
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquipmentArchivesServiceImpl.java
  24. 1 1
      cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/MaintenanceServiceImpl.java
  25. 30 0
      cx-equipment/cx-equipment-common/src/main/resources/mybatis/business/EquMaintenancePredictivePlanDao.xml
  26. 369 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquDisposalRequestDo.java
  27. 186 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquForkliftRepairRecordDo.java
  28. 443 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenancePredictivePlanDo.java
  29. 20 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenancePredictivePlanVo.java
  30. 249 0
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceReportDo.java
  31. 12 1
      cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceTaskDo.java
  32. 37 0
      cx-equipment/cx-equipment-server/src/main/java/com/rongwei/bsserver/sys/controller/EquForkliftRepairRecordController.java
  33. 79 0
      cx-equipment/cx-equipment-server/src/main/java/com/rongwei/bsserver/sys/controller/EquMaintenancePredictivePlanController.java
  34. 63 0
      cx-equipment/cx-equipment-server/src/main/java/com/rongwei/bsserver/sys/controller/SendEmailController.java

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

@@ -963,4 +963,13 @@ public class SaveConstans {
         public static final Integer MAINTENANCE_PART_MONTH_Y = 1; //月份选择是,值为1
 
     }
+
+    /**
+     * 人员信息 -默认值
+     */
+    public static class SysUser{
+        //设备子系统ID,NAME
+        public static final String DEVICESUBSYSTEMID = "b6ab1e33b3464fdd996145f8715c605e";
+        public static final String DEVICESUBSYSTEMNAME = "设备子系统";
+    }
 }

+ 2 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsBlankOrderDao.java

@@ -136,4 +136,6 @@ public interface ApsBlankOrderDao extends BaseMapper<ApsBlankOrderDo> {
     @Select("select count(1) from aps_work_in_progress_inventory where DELETED = 0 AND (BLANKBATCHNUMBER =  #{batchNumber} OR BLANKBATCHNUMBER like CONCAT(#{batchNumber},'-%') OR #{batchNumber} like CONCAT(BLANKBATCHNUMBER,'-%'))")
     Integer selectCountWorkIn(@Param("batchNumber") String batchNumber);
 
+    @Select("select GROUP_CONCAT(distinct IF(b.BACHMATERIALPROCESS = '', null,b.BACHMATERIALPROCESS) ) AS 'BACHMATERIALPROCESS' from aps_process_operation a LEFT JOIN aps_process_operation_process_equ b ON b.DELETED = 0 AND a.ID = b.PROCESSID where a.DELETED = 0 AND a.ID = #{processId} AND a.PREVIOUSPROCESSID is null group by a.ID")
+    String selectBatchNumbersByProcessId(@Param("processId") String processId);
 }

+ 22 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsBlankOrderServiceImpl.java

@@ -2979,6 +2979,9 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
             return R.error("领料数量不能大于计划加工卷数-已开工卷数-已取消卷数=" + needStartRoll);
         }
 
+        //查询目前的作业明细包含的批次号
+        String nowNumber = this.baseMapper.selectBatchNumbersByProcessId(apsProcessOperationDo.getId());
+
         //原来的批次号
         String oldBatchNumbers = req.getOldBatchNumbers();
         LinkedList<String> oldBatchNumberList = new LinkedList<>();
@@ -2986,6 +2989,25 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
             oldBatchNumberList = new LinkedList<>(Arrays.asList(oldBatchNumbers.split(",")));
         }
 
+        //判断旧的批次号有没有变化
+        List<String> nowNumberList = new LinkedList<>();
+        if (ObjectUtil.isNotEmpty(nowNumber)) {
+            nowNumberList = new LinkedList<>(Arrays.asList(nowNumber.split(",")));
+        }
+        if (nowNumberList.size() != oldBatchNumberList.size()) {
+            return R.error("领料批次号可能已经被使用,请刷新后重新领料");
+        }
+        for (String s : nowNumberList) {
+            if (!oldBatchNumberList.contains(s)) {
+                return R.error("领料批次号可能已经被使用,请刷新后重新领料");
+            }
+        }
+        for (String s : oldBatchNumberList) {
+            if (!nowNumberList.contains(s)) {
+                return R.error("领料批次号可能已经被使用,请刷新后重新领料");
+            }
+        }
+
         //新的批次号集合
         List<String> addBatchNumberList = new LinkedList<>();
         //删除的批次号集合

+ 9 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProcessOperationServiceImpl.java

@@ -1102,6 +1102,15 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
             req.setProcessOperationId(blanckdata.getStr("ID"));
             apsProcessOperationProcessEquService.updateProductionStatus(req);
 
+            //作业开工完工时间初始化
+            apsProcessOperationService.update(new LambdaUpdateWrapper<ApsProcessOperationDo>()
+                    .eq(ApsProcessOperationDo::getBlankid, blanckdata.getStr("ID"))
+                    .set(ApsProcessOperationDo::getPlanstartdate, null)
+                    .set(ApsProcessOperationDo::getPlanenddate, null)
+                    .set(ApsProcessOperationDo::getActualstartdate, null)
+                    .set(ApsProcessOperationDo::getActualfinishdate, null)
+            );
+
             //更新坯料计划的所选工艺路线相关信息
             ApsCraftRouteDo apsCraftRouteDo = apsProcessOperationDao.getApsCraftRoute(newblankid);
             if (apsCraftRouteDo == null) {

+ 1 - 1
cx-aps/cx-aps-server/src/main/java/com/rongwei/bsserver/controller/ApsProductionOrderController.java

@@ -153,7 +153,7 @@ public class ApsProductionOrderController {
      * 每天凌晨1点执行一次
      * 每天定时任务检查所有订单评审状态=已发布计划的订单,如果订单生产状态=已完工,则更新订单评审状态=已完工关闭(个人工作台的评审消息自动清除)
      */
-    @Scheduled(cron = "0 1 * * *")
+    @Scheduled(cron = "0 0 1 * * *")
     @PostMapping("/closeOrder")
     public R closeOrder(){
         return apsProductionOrderService.closeOrder();

+ 108 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/config/EquForkliftRepairRecordListener.java

@@ -0,0 +1,108 @@
+package com.rongwei.bscommon.sys.config;
+
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.rongwei.bscommon.sys.excel.EquForkliftRepairRecordTemplate;
+import com.rongwei.bsentity.domain.EquForkliftRepairRecordDo;
+import com.rongwei.bsentity.enums.PlantEnum;
+import com.rongwei.rwadmincommon.system.domain.SysDictDo;
+import com.rongwei.rwadmincommon.system.domain.SysOrganizationDo;
+import com.rongwei.rwadmincommon.system.service.SysDictService;
+import com.rongwei.rwadmincommon.system.service.SysOrganizationService;
+import com.rongwei.rwcommon.utils.SecurityUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Field;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @author shangmi
+ * @title ExcelListener
+ * @date 2023/12/7 16:09
+ * @description EquMaintenanceStandard监听器
+ */
+@Slf4j
+public class EquForkliftRepairRecordListener extends AnalysisEventListener<EquForkliftRepairRecordTemplate> {
+
+    private static final String[] NON_SET = {"equipmentnumber","rapairdetail","rapairdate"};
+    private List<EquForkliftRepairRecordDo> forkliftRepairRecordDoList = new ArrayList<>();
+
+    private List<String> errorData = new ArrayList<>();
+
+
+
+
+
+    @Override
+    public void invoke(EquForkliftRepairRecordTemplate forkliftRepairRecordTemplate, AnalysisContext analysisContext) {
+        try {
+            log.info("解析到一条数据:{}", forkliftRepairRecordTemplate);
+          for (Field field : forkliftRepairRecordTemplate.getClass().getDeclaredFields()) {
+                field.setAccessible(true);
+                String name = field.getName();
+                if (Objects.isNull(field.get(forkliftRepairRecordTemplate)) && Arrays.asList(NON_SET).contains(name)) {
+                    errorData.add((analysisContext.readRowHolder().getRowIndex() + 1) + "行存在必填数据为空的情况,请填写完整!");
+                }
+            }
+            EquForkliftRepairRecordDo e = migrateDate(forkliftRepairRecordTemplate);
+            forkliftRepairRecordDoList.add(e);
+        } catch (Exception e) {
+            log.error(e.getMessage());
+        }
+    }
+
+
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
+
+    }
+
+    public List<EquForkliftRepairRecordDo> getForkliftRepairRecordDoList() {
+        return this.forkliftRepairRecordDoList;
+    }
+
+
+    public List<String> getErrorData() {
+        return this.errorData;
+    }
+
+
+    /**
+     * 数据转换
+     *
+     * @param
+     * @param
+     * @param orgMap
+     * @return {@link EquForkliftRepairRecordDo}
+     * @date 2023/12/8 10:14
+     * @author shangmi
+     */
+
+    private EquForkliftRepairRecordDo migrateDate(EquForkliftRepairRecordTemplate forkliftRepairRecordTemplate) {
+        Date date = new Date();
+        StringBuilder planMonth = new StringBuilder();
+        // SysUserVo currentUser = CommonUtils.getCurrentUser();
+        EquForkliftRepairRecordDo equForkliftRepairRecordDo = new EquForkliftRepairRecordDo();
+        BeanUtils.copyProperties(forkliftRepairRecordTemplate, equForkliftRepairRecordDo);
+
+
+        equForkliftRepairRecordDo.setCreatedate(date)
+                .setModifydate(date)
+                .setId(SecurityUtil.getUUID())
+                .setTenantid(PlantEnum.idOf(forkliftRepairRecordTemplate.getOwnedfactory()))
+                .setOwnedfactory(forkliftRepairRecordTemplate.getOwnedfactory())
+                .setEquipmentname(forkliftRepairRecordTemplate.getEquipmentname())
+                .setEquipmentnumber(forkliftRepairRecordTemplate.getEquipmentnumber())
+                .setUsedept(forkliftRepairRecordTemplate.getUsedept())
+                .setRapairname(forkliftRepairRecordTemplate.getRapairname())
+                .setRapairdate(forkliftRepairRecordTemplate.getRapairdate())
+                .setRapairdetail(forkliftRepairRecordTemplate.getRapairdetail())
+               ;
+
+        return equForkliftRepairRecordDo;
+    }
+}

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

@@ -0,0 +1,7 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.EquForkliftRepairRecordDo;
+
+public interface EquForkliftRepairRecordDao extends BaseMapper<EquForkliftRepairRecordDo> {
+}

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

@@ -3,6 +3,7 @@ package com.rongwei.bscommon.sys.dao;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.rongwei.bsentity.domain.EquMaintenanceOrderDo;
 import com.rongwei.bsentity.dto.EquMaintenanceOrderSumDTO;
+import com.rongwei.rwadmincommon.system.domain.SysUserDo;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
@@ -10,6 +11,27 @@ import java.util.Date;
 import java.util.List;
 
 public interface EquMaintenanceOrderDao extends BaseMapper<EquMaintenanceOrderDo> {
+
+    @Select("SELECT\n" +
+            "  DISTINCT\n" +
+            "  u.NAME,\n" +
+            "\tu.EMAIL,\n" +
+            "\tr.NAME AS roleName\n" +
+            "FROM\n" +
+            "\tsys_user u\n" +
+            "LEFT JOIN sys_user_role ur ON u.ID = ur.USERID\n" +
+            "LEFT JOIN sys_role r ON ur.ROLEID = r.ID\n" +
+            "LEFT JOIN sys_user_org uo ON u.ID = uo.USERID\n" +
+            "LEFT JOIN sys_organization org ON uo.ORGID = org.ID\n" +
+            "WHERE \n" +
+            "u.DELETED = 0\n" +
+            "AND ORGID = #{workshopid}\n" +
+            "AND (r.NAME = '车间主任' OR r.NAME = '车间维修主管')\n" +
+            "GROUP BY\n" +
+            "  u.EMAIL")
+    List<SysUserDo> selectEmailList( @Param("workshopid") String workshopid);
+
+
     @Select("SELECT\n" +
             "  d.PLANT,d.DEVICETYPE,d.PROBLEMLOCATION,COUNT(d.ID) 'COUNT',\n" +
             "\tGROUP_CONCAT(d.ID  ) 'IDS' \n" +
@@ -54,4 +76,6 @@ public interface EquMaintenanceOrderDao extends BaseMapper<EquMaintenanceOrderDo
 //            "WHERE sr.NAME in('设备部部长','车间维修主管','设备部维修主管') \n")
     List<String> selectRoleList(@Param("roleCodes") List<String> roleCode);
 
+
+
 }

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

@@ -0,0 +1,18 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.EquMaintenancePredictivePlanDo;
+import com.rongwei.bsentity.domain.EquMaintenancePredictivePlanVo;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+public interface EquMaintenancePredictivePlanDao extends BaseMapper<EquMaintenancePredictivePlanDo> {
+
+
+
+    List<EquMaintenancePredictivePlanVo> queryDateByids(@Param("ids") List<String> ids);
+
+
+}

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

@@ -0,0 +1,61 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.EquMaintenanceReportDo;
+import com.rongwei.rwadmincommon.system.domain.SysUserDo;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.Date;
+import java.util.List;
+
+public interface EquMaintenanceReportDao extends BaseMapper<EquMaintenanceReportDo> {
+
+    @Select("SELECT DISTINCT\n" +
+            "\tu.NAME,\n" +
+            "\tu.EMAIL,\n" +
+            "\tr.NAME AS roleName \n" +
+            "FROM\n" +
+            "\tsys_user u\n" +
+            "\tLEFT JOIN sys_user_role ur ON u.ID = ur.USERID\n" +
+            "\tLEFT JOIN sys_role r ON ur.ROLEID = r.ID\n" +
+            "\tLEFT JOIN sys_user_org uo ON u.ID = uo.USERID\n" +
+            "\tLEFT JOIN sys_organization org ON uo.ORGID = org.ID \n" +
+            "WHERE\n" +
+            "\tu.DELETED = 0 \n" +
+            "\tAND uo.ORGID = #{workshopid} \n" +
+            "\tAND ( r.NAME = '车间主任' OR r.NAME = '车间维修主管') \n" +
+            "GROUP BY\n" +
+            "\tu.EMAIL\n" +
+            "UNION\n" +
+            "SELECT DISTINCT\n" +
+            "    u.NAME,\n" +
+            "    u.EMAIL,\n" +
+            "    r.NAME AS roleName \n" +
+            "FROM\n" +
+            "    sys_user u\n" +
+            "    LEFT JOIN sys_user_role ur ON u.ID = ur.USERID\n" +
+            "    LEFT JOIN sys_role r ON ur.ROLEID = r.ID\n" +
+            "    LEFT JOIN sys_user_org uo ON u.ID = uo.USERID\n" +
+            "    LEFT JOIN sys_organization org ON uo.ORGID = org.ID \n" +
+            "WHERE\n" +
+            "    u.DELETED = 0 \n" +
+            "    AND org.FULLPID LIKE CONCAT('%', (\n" +
+            "        SELECT \n" +
+            "            SUBSTRING_INDEX(\n" +
+            "                SUBSTRING_INDEX(\n" +
+            "                    (SELECT GROUP_CONCAT(FULLPID SEPARATOR ',') \n" +
+            "                     FROM sys_organization o \n" +
+            "                     WHERE o.ID = #{workshopid}), \n" +
+            "                    ',', 2), \n" +
+            "                ',', -1\n" +
+            "            )\n" +
+            "        ), '%')\n" +
+            "    AND r.NAME = '生产计划主任'\n" +
+            "GROUP BY\n" +
+            "    u.EMAIL")
+    List<SysUserDo> selectEmailList( @Param("workshopid") String workshopid);
+
+
+
+}

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

@@ -0,0 +1,21 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.EquDisposalRequestDo;
+import com.rongwei.rwadmincommon.system.domain.SysUserDo;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+public interface EquipmentDisposeDao extends BaseMapper<EquDisposalRequestDo> {
+    @Select({
+            "<script>",
+            "SELECT `NAME`, EMAIL FROM sys_user WHERE DELETED = '0' AND id IN",
+            "<foreach item='item' collection='ids' open='(' separator=',' close=')'>",
+            "#{item}",
+            "</foreach>",
+            "</script>"
+    })
+    List<SysUserDo> selectEmailList(@Param("ids") String[] ids);
+}

+ 62 - 0
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/excel/EquForkliftRepairRecordTemplate.java

@@ -0,0 +1,62 @@
+package com.rongwei.bscommon.sys.excel;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * @author shangmi
+   叉车维修登记
+ */
+@Data
+@EqualsAndHashCode
+public class EquForkliftRepairRecordTemplate {
+
+
+    /**
+     * 所属工厂
+     */
+    @ExcelProperty(index = 0)
+    private String ownedfactory;
+
+    /**
+     * 叉车
+     */
+    @ExcelProperty(index = 1)
+    private String equipmentname;
+
+    /**
+     叉车编号
+     */
+    @ExcelProperty(index = 2)
+    private String equipmentnumber;
+
+    /**
+     使用部门
+     */
+    @ExcelProperty(index = 3)
+    private String usedept;
+
+    /**
+     维修/保养人
+     */
+    @ExcelProperty(index = 4)
+    private String rapairname;
+
+    /**
+     维修/保养日期
+     */
+    @ExcelProperty(index = 5)
+    private Date rapairdate;
+
+    /**
+     维修/保养内容
+     */
+    @ExcelProperty(index = 6)
+    private String rapairdetail;
+
+
+
+}

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

@@ -0,0 +1,15 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.EquForkliftRepairRecordDo;
+import com.rongwei.rwcommon.base.R;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.util.List;
+
+public interface EquForkliftRepairRecordService extends IService<EquForkliftRepairRecordDo> {
+    R equForkliftRepairRecordService(MultipartFile multipartFile) throws IOException;
+
+    List<EquForkliftRepairRecordDo> getUniqueDateByAll();
+}

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

@@ -3,8 +3,10 @@ package com.rongwei.bscommon.sys.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.rongwei.bsentity.domain.EquMaintenanceOrderDo;
 import com.rongwei.bsentity.dto.EquMaintenanceOrderSumDTO;
+import com.rongwei.rwcommon.base.R;
 
 import java.util.List;
+import java.util.Map;
 
 public interface EquMaintenanceOrderService extends IService<EquMaintenanceOrderDo> {
 
@@ -39,4 +41,5 @@ public interface EquMaintenanceOrderService extends IService<EquMaintenanceOrder
     String generateDeviceRepeatedlyFailsExcel(List<EquMaintenanceOrderSumDTO> list, String noticeId);
 
 
+    R sendEmail(Map<String, Object> myObject);
 }

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

@@ -0,0 +1,22 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.EquMaintenancePartDo;
+import com.rongwei.bsentity.domain.EquMaintenancePredictivePlanDo;
+import com.rongwei.bsentity.domain.EquMaintenancePredictivePlanVo;
+import com.rongwei.bsentity.domain.EquMaintenanceTaskDo;
+import com.rongwei.bsentity.dto.TaskCreatorDTO;
+import com.rongwei.rwcommon.base.R;
+
+import java.util.List;
+
+/**
+
+ */
+public interface EquMaintenancePredictivePlanService extends IService<EquMaintenancePredictivePlanDo> {
+
+    R generateMaintenanceTask(List<String> ids);
+
+
+}
+

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

@@ -0,0 +1,12 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.EquMaintenanceReportDo;
+import com.rongwei.rwcommon.base.R;
+
+import java.util.Map;
+
+public interface EquMaintenanceReportService extends IService<EquMaintenanceReportDo> {
+
+    R sendEmail(Map<String, Object> myObject);
+}

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

@@ -3,6 +3,9 @@ package com.rongwei.bscommon.sys.service;
 import com.rongwei.bsentity.dto.EquipmentDisposeDTO;
 import com.rongwei.rwcommon.base.R;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author shangmi
  * @title EquipmentArchivesService
@@ -21,4 +24,6 @@ public interface EquipmentArchivesService {
      */
 
     R updateEquipmentData(EquipmentDisposeDTO equipmentDisposeDTO);
+
+    R sendEmail(Map<String, Object> myObject);
 }

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

@@ -0,0 +1,138 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import cn.hutool.core.date.DateUtil;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.config.EquForkliftRepairRecordListener;
+import com.rongwei.bscommon.sys.dao.EquForkliftRepairRecordDao;
+import com.rongwei.bscommon.sys.excel.EquForkliftRepairRecordTemplate;
+import com.rongwei.bscommon.sys.service.EquForkliftRepairRecordService;
+import com.rongwei.bscommon.sys.utils.CommonUtils;
+import com.rongwei.bscommon.sys.utils.DateUtils;
+import com.rongwei.bsentity.domain.EquForkliftRepairRecordDo;
+import com.rongwei.bsentity.enums.MaintenanceTypeEnum;
+import com.rongwei.bsentity.enums.PlantEnum;
+import com.rongwei.rwadmincommon.system.domain.SysDictDo;
+import com.rongwei.rwadmincommon.system.domain.SysOrganizationDo;
+import com.rongwei.rwadmincommon.system.service.SysDictService;
+import com.rongwei.rwadmincommon.system.service.SysOrganizationService;
+import com.rongwei.rwadmincommon.system.vo.SysUserVo;
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommonentity.commonservers.vo.SysSerialVo;
+import com.rongwei.safecommon.utils.CXCommonUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+import java.io.IOException;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static com.rongwei.safecommon.utils.SaveConstans.DatePattern.DATE_PATTERN_YMD;
+
+@Service
+public class EquForkliftRepairRecordServiceImpl extends ServiceImpl<EquForkliftRepairRecordDao, EquForkliftRepairRecordDo> implements EquForkliftRepairRecordService {
+
+
+    @Autowired
+    EquForkliftRepairRecordService equForkliftRepairRecordService;
+
+    @Autowired
+    EquForkliftRepairRecordDao equForkliftRepairRecordDao;
+
+    @Autowired
+    private SysDictService dictService;
+
+    @Autowired
+    private SysOrganizationService sysOrganizationService;
+
+    @Override
+    public R equForkliftRepairRecordService(MultipartFile multipartFile) throws IOException {
+        Date date = new Date();
+        EquForkliftRepairRecordListener forkliftRepairRecordListener = new EquForkliftRepairRecordListener();
+        // 解析Excel
+        EasyExcel.read(multipartFile.getInputStream(), EquForkliftRepairRecordTemplate.class, forkliftRepairRecordListener).sheet().headRowNumber(3).doRead();
+        // 解析有误信息
+        List<String> errorData = forkliftRepairRecordListener.getErrorData();
+        // 解析数据
+        List<EquForkliftRepairRecordDo> newForkliftRepairRecord = forkliftRepairRecordListener.getForkliftRepairRecordDoList();
+        // 唯一性数据
+        List<EquForkliftRepairRecordDo> oldForkliftRepairRecord = equForkliftRepairRecordService.getUniqueDateByAll();
+        // 将新旧两组数据拼接为一个stream,再对stream进行分组,找到分组数量大于1的(说明又重复),将重复的数据拿到原始数据中找到源数据返回回来
+        List<EquForkliftRepairRecordDo> forkliftRepairRecordDoList = Stream.concat(newForkliftRepairRecord.stream(), oldForkliftRepairRecord.stream()).collect(Collectors.groupingBy(info ->
+                        info.getEquipmentnumber() + info.getRapairdate() + info.getRapairdetail() , Collectors.counting()))
+                .entrySet().stream()
+                .filter(info -> info.getValue() > 1)
+                .map(Map.Entry::getKey)
+                .map(info -> newForkliftRepairRecord.stream()
+                        .filter(item -> ( item.getEquipmentnumber() + item.getRapairdate() + item.getRapairdetail()).equals(info))
+                        .findFirst().orElse(null))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+        // 拼接返回错误数据
+        if (forkliftRepairRecordDoList.size() != 0) {
+            jointErrorData(forkliftRepairRecordDoList, errorData);
+        }
+        // 判断是否又错误数据
+        if (errorData.size() != 0) {
+            return R.error(JSON.toJSONString(errorData));
+        }
+        SysUserVo currentUser = CommonUtils.getCurrentUser();
+
+        List<SysDictDo> repairPersonType = dictService.getByRedis("equ_cxwxbyr");
+        Map<String, String> dictMap = repairPersonType.stream().collect(Collectors.toMap(SysDictDo::getName, SysDictDo::getValue));
+
+        String rapairname ="";
+        String rapairid ="";
+        // 使用 StringBuilder 来构建新的字符串
+        StringBuilder newStr = new StringBuilder();
+        // 生成流水号
+        for (EquForkliftRepairRecordDo forkliftRepairRecord : newForkliftRepairRecord) {
+            rapairname = forkliftRepairRecord.getRapairname()==null?"":forkliftRepairRecord.getRapairname();
+            String[] parts = rapairname.split(",");
+            newStr = new StringBuilder();
+            // 遍历分割后的数组,并根据数据字典进行替换
+            for (String part : parts) {
+                String replacement = dictMap.getOrDefault(part, part); // 如果找不到对应的值,则使用原值
+                newStr.append(replacement).append(",");
+            }
+            // 移除最后一个多余的逗号,并转换为字符串
+             rapairid = newStr.length() > 0 ? newStr.substring(0, newStr.length() - 1) : "";
+
+            forkliftRepairRecord.setTenantid(CXCommonUtils.getCurrentUserFactoryId(currentUser))
+                    .setCreatedate(date)
+                    .setModifydate(date)
+                    .setCreateuserid(currentUser.getId())
+                    .setCreateusername(currentUser.getName())
+                    .setModifyusername(currentUser.getName())
+                    .setRapairid(rapairid)
+                    .setModifyuserid(currentUser.getId());
+        }
+        equForkliftRepairRecordService.saveBatch(newForkliftRepairRecord, 200);
+        return R.ok("导入成功");
+    }
+
+    @Override
+    public List<EquForkliftRepairRecordDo> getUniqueDateByAll() {
+        LambdaQueryWrapper<EquForkliftRepairRecordDo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.select(EquForkliftRepairRecordDo::getEquipmentnumber,
+                EquForkliftRepairRecordDo::getRapairdetail,
+                EquForkliftRepairRecordDo::getRapairdate
+              ).eq(EquForkliftRepairRecordDo::getDeleted,"0");
+
+        return equForkliftRepairRecordDao.selectList(queryWrapper);
+
+    }
+
+    public void jointErrorData(List<EquForkliftRepairRecordDo> forkliftRepairRecordDoList, List<String> errorData) {
+        forkliftRepairRecordDoList.forEach(info -> {
+            errorData.add(PlantEnum.nameOf(info.getTenantid()) + ",已存在了叉车编号" + ":" + info.getEquipmentnumber()+" 维修/保养日期:" +  DateUtil.format(info.getRapairdate(),DATE_PATTERN_YMD) +" 维修/保养内容:" + info.getRapairdetail() + "的数据,不可重复导入,请检查");
+        });
+
+    }
+}

+ 1 - 1
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquFrockTestRecordServiceImpl.java

@@ -250,7 +250,7 @@ public class EquFrockTestRecordServiceImpl extends ServiceImpl<EquFrockTestRecor
             return R.error("无法获取提醒人");
         }
         String mailContent = String.format(MAIL_CONTENT, equFrockTestRecordDo.getUsedept(), equFrockTestRecordDo.getFrockname(),
-                equFrockTestRecordDo.getFrockname(), "100%", params.getOrDefault("imgBase64", ""));
+                equFrockTestRecordDo.getFrocknum(), "100%", params.getOrDefault("imgBase64", ""));
         MailDo mailDo = new MailDo();
         mailDo.setContent(mailContent);
         mailDo.setSubject("工装报废提醒");

+ 53 - 4
cx-equipment/cx-equipment-common/src/main/java/com/rongwei/bscommon/sys/service/impl/EquMaintenanceOrderServiceImpl.java

@@ -2,13 +2,18 @@ package com.rongwei.bscommon.sys.service.impl;
 import cn.hutool.core.io.resource.ClassPathResource;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwei.bscommon.sys.dao.EquMaintenanceOrderDao;
+import com.rongwei.bscommon.sys.dao.EquipmentDisposeDao;
 import com.rongwei.bscommon.sys.service.EquMaintenanceOrderService;
 import com.rongwei.bscommon.sys.utils.ExcelUtils;
 import com.rongwei.bsentity.domain.EquMaintenanceOrderDo;
 import com.rongwei.bsentity.dto.EquMaintenanceOrderSumDTO;
 import com.rongwei.bsentity.enums.PlantEnum;
+import com.rongwei.rwadmincommon.system.domain.SysUserDo;
 import com.rongwei.rwadmincommon.system.service.SysDictService;
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.vo.MailDo;
 import com.rongwei.rwcommonentity.commonservers.domain.SysFileItemDo;
+import com.rongwei.safecommon.fegin.CXCommonFeginClient;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.hssf.usermodel.HSSFRow;
 import org.apache.poi.hssf.usermodel.HSSFSheet;
@@ -17,10 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import java.io.InputStream;
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 import static com.rongwei.safecommon.utils.SaveConstans.DatePattern.DATE_PATTERN_YMD;
@@ -38,6 +40,8 @@ public class EquMaintenanceOrderServiceImpl extends ServiceImpl<EquMaintenanceOr
     @Autowired
     private SysDictService sysDictService;
 
+    @Autowired
+    private CXCommonFeginClient cxCommonFeginClient;
 
     /**
      * 根据故障发生时间自动查询每个工厂近3个月内 (以本月在往前倒推三个月至当前时间)所有 除去 无需维修、已关闭  且  维修对象分类 为 档案设备、工装 的 维修任务记录中,
@@ -143,6 +147,51 @@ public class EquMaintenanceOrderServiceImpl extends ServiceImpl<EquMaintenanceOr
         return "";
     }
 
+    @Override
+    public R sendEmail(Map<String, Object> myObject) {
+        String createusername = (String) myObject.get("CREATEUSERNAME");//申请人
+        String maintenancetime = (String) myObject.get("MAINTENANCETIME");//报修时间
+        String workshop = (String) myObject.get("WORKSHOP");//使用车间
+        String workshopid = (String) myObject.get("WORKSHOPID");//使用车间ID
+        String equipmentname = (String) myObject.get("EQUIPMENTNAME");//工装名称
+        String equipmentnumber = (String) myObject.get("EQUIPMENTNUMBER");//工装编号
+
+        List<SysUserDo> emais = equMaintenanceOrderDao.selectEmailList(workshopid);
+        StringBuilder sb = new StringBuilder();
+        for (SysUserDo user : emais) {
+            // 从 SysUserDo 对象中获取邮件地址,并添加到字符串构建器中
+            String emailAddress = user.getEmail();
+            sb.append(emailAddress).append(",");
+        }
+        // 移除最后一个逗号
+        if (sb.length() > 0) {
+            sb.deleteCharAt(sb.length() - 1);
+        }
+        String[] filteredEmailArray = Arrays.stream(sb.toString().split(","))
+                .map(String::trim) // 去除每个邮件地址的前后空白
+                .filter(email -> !email.isEmpty()) // 过滤掉空字符串
+                .toArray(String[]::new); // 收集为字符串数组
+
+        if (filteredEmailArray.length > 0) {
+            MailDo mailDo = new MailDo();
+            mailDo.setReceiveEmail(filteredEmailArray);
+            mailDo.setNeedTransReceive(false);
+            mailDo.setCcEmail(new String[]{});
+            mailDo.setSubject("维修申请流程审批任务提醒");
+            String content = "尊敬的各位领导," +
+                    "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
+                    createusername + "于 " + maintenancetime +" 对"+workshop+"的"+equipmentname+ "(" + equipmentnumber + ") 的工装进行了保修申请,请各位领导知悉,请及时联系维修工程进行维修" +
+                    "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
+                    "系统登录地址: http://192.168.100.77/#/passport/login";
+            mailDo.setContent(content);
+            // 发送邮件
+            R r = cxCommonFeginClient.sendHtmlMail(mailDo);
+        } else {
+            return R.error("汇报对象邮箱不能为空");
+        }
+        return R.ok();
+    }
+
     /**
      * 填充后3页工厂数据
      *

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

@@ -0,0 +1,132 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.dao.EquMaintenancePredictivePlanDao;
+import com.rongwei.bscommon.sys.feign.RwAdminFeign;
+import com.rongwei.bscommon.sys.service.EquMaintenancePredictivePlanService;
+import com.rongwei.bscommon.sys.service.EquMaintenanceTaskService;
+import com.rongwei.bsentity.domain.EquMaintenancePredictivePlanDo;
+import com.rongwei.bsentity.domain.EquMaintenancePredictivePlanVo;
+import com.rongwei.bsentity.domain.EquMaintenanceTaskDo;
+import com.rongwei.bsentity.enums.PlantEnum;
+import com.rongwei.bsentity.enums.TaskStatusEnum;
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.utils.SecurityUtil;
+import com.rongwei.rwcommonentity.commonservers.vo.SysSerialVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.*;
+import java.util.*;
+
+import static com.rongwei.safecommon.utils.SaveConstans.SysUser.DEVICESUBSYSTEMID;
+import static com.rongwei.safecommon.utils.SaveConstans.SysUser.DEVICESUBSYSTEMNAME;
+
+@Service
+public class EquMaintenancePredictivePlanServiceImpl extends ServiceImpl<EquMaintenancePredictivePlanDao, EquMaintenancePredictivePlanDo> implements EquMaintenancePredictivePlanService {
+
+    private final static Logger log = LoggerFactory.getLogger(EquMaintenancePredictivePlanServiceImpl.class);
+
+    @Autowired
+    EquMaintenancePredictivePlanService equMaintenancePredictivePlanService;
+
+    @Autowired
+    EquMaintenancePredictivePlanDao equMaintenancePredictivePlanDao;
+
+    @Autowired
+    EquMaintenanceTaskService equMaintenanceTaskService;
+
+    @Autowired
+    private RwAdminFeign rwAdminFeign;
+
+
+    @Override
+    public R generateMaintenanceTask(List<String> ids) {
+        List<EquMaintenanceTaskDo> maintenanceTaskDoList =new ArrayList<>();
+        EquMaintenanceTaskDo equMaintenanceTaskDo = null;
+
+        //1.根据选中的id 查询预测保养信息记录
+        List<EquMaintenancePredictivePlanVo> predictivePlanVos= equMaintenancePredictivePlanDao.queryDateByids(ids);
+
+        for (EquMaintenancePredictivePlanVo predictivePlanVo:predictivePlanVos){
+            equMaintenanceTaskDo =new EquMaintenanceTaskDo();
+
+            BeanUtils.copyProperties(predictivePlanVo, equMaintenanceTaskDo);
+
+            //【预测下次保养日期】 >=  当前日期,则取【预测下次保养日期】的年份,否则取  当前日期年份
+           if(predictivePlanVo.getNextmaintenancedate().getTime()>= System.currentTimeMillis()){
+               equMaintenanceTaskDo.setPlanyear(predictivePlanVo.getNextmaintenancedate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().getYear());
+               equMaintenanceTaskDo.setMonth(predictivePlanVo.getNextmaintenancedate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().getMonthValue()+"");
+           }else {
+               equMaintenanceTaskDo.setPlanyear(LocalDate.now().getYear());
+               equMaintenanceTaskDo.setMonth(LocalDate.now().getMonthValue()+"");
+           };
+           //是否要停机
+            equMaintenanceTaskDo.setIshalt(predictivePlanVo.getIshalt());
+            //计划开始时间 计划结束时间
+            if (SetTimeToHourAM(predictivePlanVo.getNextmaintenancedate(),8).getTime()< System.currentTimeMillis()){
+                equMaintenanceTaskDo.setTaskstart(SetTimeToHourAM(new Date(),8));
+                equMaintenanceTaskDo.setTaskend(SetTimeToHourAM(new Date(),12));
+            }else {
+                equMaintenanceTaskDo.setTaskstart(SetTimeToHourAM(predictivePlanVo.getNextmaintenancedate(),8));
+                equMaintenanceTaskDo.setTaskend(SetTimeToHourAM(predictivePlanVo.getNextmaintenancedate(),12));
+            };
+            equMaintenanceTaskDo.setCreateuserid(DEVICESUBSYSTEMID);
+            equMaintenanceTaskDo.setCreateusername(DEVICESUBSYSTEMNAME);
+            equMaintenanceTaskDo.setCreatedate(new Date());
+            equMaintenanceTaskDo.setModifyuserid(DEVICESUBSYSTEMID);
+            equMaintenanceTaskDo.setModifyusername(DEVICESUBSYSTEMNAME);
+            equMaintenanceTaskDo.setModifydate(new Date());
+            equMaintenanceTaskDo.setTaskstate(TaskStatusEnum.EXPORT_DISTRIBUTION.code);
+            equMaintenanceTaskDo.setId(SecurityUtil.getUUID());
+            equMaintenanceTaskDo.setPredictivemaintenanceplanid(predictivePlanVo.getId());
+            //设置流水号
+            setTaskId(equMaintenanceTaskDo);
+            maintenanceTaskDoList.add(equMaintenanceTaskDo);
+
+        }
+        if (maintenanceTaskDoList.size()>0){
+            equMaintenanceTaskService.insertBatch(maintenanceTaskDoList);
+        }
+
+        return R.ok();
+    }
+
+    private void setTaskId(EquMaintenanceTaskDo equMaintenanceTaskDo) {
+        SysSerialVo sysSerialVo = new SysSerialVo();
+        String plantSimp = PlantEnum.addrOf(equMaintenanceTaskDo.getTenantid());
+        String plantype = equMaintenanceTaskDo.getPlantype();
+        sysSerialVo.setModulecode("equ_maintenance_task_aq_code_" + plantSimp);
+        sysSerialVo.setResetrule("date:yyyy");
+        sysSerialVo.setRuleTemplateStr(plantSimp +"-"+plantype+"-@{date:yyyyMM}-@{serialNumber:#00000}");
+        sysSerialVo.setIfautomaticreset("y");
+            R serialNumberCode = rwAdminFeign.getSerialNumberCode(sysSerialVo);
+            if ("200".equals(serialNumberCode.getCode())) {
+                Object data = serialNumberCode.getData();
+                equMaintenanceTaskDo.setTaskid(JSONObject.parseObject(JSONObject.toJSONString(data), Map.class).get("code").toString());
+            }
+
+    }
+
+
+
+    /**
+     * 设置时间时分秒 设值小时整点
+     *
+     * @param originalDate
+     * @param hour
+     * @return
+     */
+    public Date SetTimeToHourAM(Date originalDate, int hour){
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(originalDate);
+        calendar.set(Calendar.HOUR_OF_DAY, hour);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        return calendar.getTime();
+    }
+}

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

@@ -0,0 +1,73 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.dao.EquMaintenanceReportDao;
+import com.rongwei.bscommon.sys.service.EquMaintenanceReportService;
+import com.rongwei.bsentity.domain.EquMaintenanceReportDo;
+import com.rongwei.rwadmincommon.system.domain.SysUserDo;
+import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.vo.MailDo;
+import com.rongwei.safecommon.fegin.CXCommonFeginClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+@Service
+@Slf4j
+public class EquMaintenanceReportServiceImpl extends ServiceImpl<EquMaintenanceReportDao, EquMaintenanceReportDo> implements EquMaintenanceReportService {
+
+    @Autowired
+    private CXCommonFeginClient cxCommonFeginClient;
+    @Autowired
+    private EquMaintenanceReportDao equMaintenanceReportDao;
+
+    @Override
+    public R sendEmail(Map<String, Object> myObject) {
+        String reportueser = (String) myObject.get("REPORTUESER");//上报人
+        String incidenttime = (String) myObject.get("INCIDENTTIME");//申报时间
+        String workshop = (String) myObject.get("WORKSHOP");//使用车间名称
+        String workshopid = (String) myObject.get("WORKSHOPID");//使用车间ID
+        String equipmentname = (String) myObject.get("EQUIPMENTNAME");//设备名称
+        String equipmentnumber = (String) myObject.get("EQUIPMENTNUMBER");//设备编号
+
+
+        List<SysUserDo> emais = equMaintenanceReportDao.selectEmailList(workshopid);
+        StringBuilder sb = new StringBuilder();
+        for (SysUserDo user : emais) {
+            // 从 SysUserDo 对象中获取邮件地址,并添加到字符串构建器中
+            String emailAddress = user.getEmail();
+            sb.append(emailAddress).append(",");
+        }
+        // 移除最后一个逗号
+        if (sb.length() > 0) {
+            sb.deleteCharAt(sb.length() - 1);
+        }
+        String[] filteredEmailArray = Arrays.stream(sb.toString().split(","))
+                .map(String::trim) // 去除每个邮件地址的前后空白
+                .filter(email -> !email.isEmpty()) // 过滤掉空字符串
+                .toArray(String[]::new); // 收集为字符串数组
+
+        if (filteredEmailArray.length > 0) {
+            MailDo mailDo = new MailDo();
+            mailDo.setReceiveEmail(filteredEmailArray);
+            mailDo.setNeedTransReceive(false);
+            mailDo.setCcEmail(new String[]{});
+            mailDo.setSubject("维修上报设备故障流程审批任务提醒");
+            String content = "尊敬的各位领导," +
+                    "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
+                    reportueser + "于 " + incidenttime +" 对"+workshop+"的"+equipmentname+ "(" + equipmentnumber + ") 的设备进行了设备故障上报登记,请各位领导知悉,请车间主管人员及时确认故障是否真实存在,同时请计划人员到设备管理平台子系统中的“维修上报设备故障”模块中对上报的设备故障进行安排时间维修,及时对设备故障进行解决修复,避免设备在生产时出现停机异常。" +
+                    "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
+                    "系统登录地址: http://192.168.100.77/#/passport/login";
+            mailDo.setContent(content);
+            // 发送邮件
+            R r = cxCommonFeginClient.sendHtmlMail(mailDo);
+        } else {
+            return R.error("汇报对象邮箱不能为空");
+        }
+        return R.ok();
+    }
+
+
+}

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

@@ -1,14 +1,25 @@
 package com.rongwei.bscommon.sys.service.impl;
 
+import com.rongwei.bscommon.sys.dao.EquipmentDisposeDao;
 import com.rongwei.bscommon.sys.service.*;
 import com.rongwei.bscommon.sys.utils.ExceptionUtils;
 import com.rongwei.bsentity.domain.AspCheckItemsAreaDo;
+import com.rongwei.bsentity.domain.EquDisposalRequestDo;
 import com.rongwei.bsentity.dto.EquipmentDisposeDTO;
+import com.rongwei.rwadmincommon.system.domain.SysUserDo;
 import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.vo.MailDo;
+import com.rongwei.safecommon.fegin.CXCommonFeginClient;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
 import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * @author shangmi
@@ -41,6 +52,12 @@ public class EquipmentArchivesServiceImpl implements EquipmentArchivesService {
     @Autowired
     private EquipmentSendNotifyService sendNotifyService;
 
+    @Autowired
+    private EquipmentDisposeDao equipmentDisposeDao;
+
+    @Autowired
+    private CXCommonFeginClient cxCommonFeginClient;
+
     /**
      * 更新设备库
      *
@@ -87,4 +104,116 @@ public class EquipmentArchivesServiceImpl implements EquipmentArchivesService {
         }
         return R.ok();
     }
+
+    @Override
+    public R sendEmail(Map<String, Object> myObject) {
+        String type = (String) myObject.get("TYPE");//'1'为发起流程 or 退回重新发起流程、'2'流程中的节点
+        if ("1".equals(type)){
+            String id = (String) myObject.get("FORMID");
+            EquDisposalRequestDo equDisposalRequestDo = equipmentDisposeDao.selectById(id);
+            String mssmanagerid = equDisposalRequestDo.getMssmanagerid();//安全部部长id
+            String workshop = equDisposalRequestDo.getWorkshop();//使用部门名称、车间
+            String equipmentname = equDisposalRequestDo.getEquipmentName();//设备名称
+            String equipmentnumber = equDisposalRequestDo.getEquipmentNumber();//设备编号
+
+            //抄送人 id 数组处理
+            String[] strArray = mssmanagerid.split(",");
+            List<SysUserDo> emais = equipmentDisposeDao.selectEmailList(strArray);
+            StringBuilder sb = new StringBuilder();
+            for (SysUserDo user : emais) {
+                // 从 SysUserDo 对象中获取邮件地址,并添加到字符串构建器中
+                String emailAddress = user.getEmail();
+                sb.append(emailAddress).append(",");
+            }
+            // 移除最后一个逗号
+            if (sb.length() > 0) {
+                sb.deleteCharAt(sb.length() - 1);
+            }
+            String[] filteredEmailArray = Arrays.stream(sb.toString().split(","))
+                    .map(String::trim) // 去除每个邮件地址的前后空白
+                    .filter(email -> !email.isEmpty()) // 过滤掉空字符串
+                    .toArray(String[]::new); // 收集为字符串数组
+
+            if (filteredEmailArray.length > 0) {
+                MailDo mailDo = new MailDo();
+                mailDo.setReceiveEmail(filteredEmailArray);
+                mailDo.setNeedTransReceive(false);
+                mailDo.setCcEmail(new String[]{});
+                mailDo.setSubject("设备处置流程审批任务提醒");
+                String content = "尊敬的各位领导," +
+                        "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
+                        "您有一个" + workshop + "的 " + equipmentname + "(" + equipmentnumber + ") 的设备处置审批任务,请及时到创新智慧工厂平台中的个人工作台中进行任务审批,若是未找到对应审批任务,则为某个领导已审批完成。可在对应APP端或者PC端进行任务审批" +
+                        "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
+                        "系统登录地址: http://192.168.100.77/#/passport/login";
+                mailDo.setContent(content);
+                // 发送邮件
+                R r = cxCommonFeginClient.sendHtmlMail(mailDo);
+            } else {
+                return R.error("汇报对象邮箱不能为空");
+            }
+
+        }else if ("2".equals(type)){
+//            逻辑如下: 在流程的每个节点审批通过后 给下个环节的审批人员 发送 邮件提醒的功能
+//            提醒信息: 尊敬的各位领导,您有一个【车间】的【设备名称(设备编号)】的设备处置审批任务,请及时到创新智慧工厂平台中的个人工作台中进行任务审批,若是未找到对应审批任务,则为某个领导已审批完成。可在对应APP端或者PC端进行任务审批
+//            系统登录地址: 把内部的登录地址弄上
+//            需发送邮件的提醒人:取下个环节的对应审批人,然后去重, 之后给这些人员发送邮件,没有邮箱的就不发送
+//            注意:只发邮件,不生成提醒信息。
+            String taskname = (String) myObject.get("taskname");
+            String formId = (String) myObject.get("formId");
+            //根据 formId 在EquipmentDisposeDTO 中获取数据
+            EquDisposalRequestDo equDisposalRequestDo = equipmentDisposeDao.selectById(formId);
+            String workshop = equDisposalRequestDo.getWorkshop();//使用部门名称、车间
+            String equipmentname = equDisposalRequestDo.getEquipmentName();//设备名称
+            String equipmentnumber = equDisposalRequestDo.getEquipmentNumber();//设备编号
+
+            String recipient = "";
+            if ("安全部".equals(taskname)){
+                recipient = equDisposalRequestDo.getMtqmanagerid();
+            } else if ("技质部".equals(taskname)) {
+                recipient = equDisposalRequestDo.getEqumanagerid();
+            } else if ("设备部".equals(taskname)) {
+                recipient = equDisposalRequestDo.getWdmanagerid();
+            } else if ("仓储部".equals(taskname)) {
+                recipient = equDisposalRequestDo.getVicepresidentid();
+            } else if ("副总经理".equals(taskname)) {
+                recipient = equDisposalRequestDo.getGeneralmanagerid();
+            } else if ("总经理".equals(taskname)) {
+                recipient = equDisposalRequestDo.getFinanceofficeid();
+            }
+            String[] strArray = recipient.split(",");
+            List<SysUserDo> emais = equipmentDisposeDao.selectEmailList(strArray);
+            StringBuilder sb = new StringBuilder();
+            for (SysUserDo user : emais) {
+                // 从 SysUserDo 对象中获取邮件地址,并添加到字符串构建器中
+                String emailAddress = user.getEmail();
+                sb.append(emailAddress).append(",");
+            }
+            // 移除最后一个逗号
+            if (sb.length() > 0) {
+                sb.deleteCharAt(sb.length() - 1);
+            }
+            String[] filteredEmailArray = Arrays.stream(sb.toString().split(","))
+                    .map(String::trim) // 去除每个邮件地址的前后空白
+                    .filter(email -> !email.isEmpty()) // 过滤掉空字符串
+                    .toArray(String[]::new); // 收集为字符串数组
+            if (filteredEmailArray.length > 0) {
+                MailDo mailDo = new MailDo();
+                mailDo.setReceiveEmail(filteredEmailArray);
+                mailDo.setNeedTransReceive(false);
+                mailDo.setCcEmail(new String[]{});
+                mailDo.setSubject("设备处置流程审批任务提醒");
+                String content = "尊敬的各位领导," +
+                        "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
+                        "您有一个" + workshop + "的 " + equipmentname + "(" + equipmentnumber + ") 的设备处置审批任务,请及时到创新智慧工厂平台中的个人工作台中进行任务审批,若是未找到对应审批任务,则为某个领导已审批完成。可在对应APP端或者PC端进行任务审批" +
+                        "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
+                        "系统登录地址: http://192.168.100.77/#/passport/login";
+                mailDo.setContent(content);
+                // 发送邮件
+                R r = cxCommonFeginClient.sendHtmlMail(mailDo);
+            } else {
+                return R.error("汇报对象邮箱不能为空");
+            }
+        }
+        return R.ok();
+    }
 }

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

@@ -485,7 +485,7 @@ public class MaintenanceServiceImpl implements MaintenanceService {
                     .setEquipmentnumber(maintenanceSchedule.getEquipmentnumber())
                     .setCreatedate(newDate)
                     .setModifydate(newDate)
-                    .setPLANCLASSIFICATION(PLANCLASSIFICATION_CONVENTIONALPLAN)
+                    .setPlanclassification(PLANCLASSIFICATION_CONVENTIONALPLAN)
                     .setTenantid(maintenanceSchedule.getTenantid());
             if ("200".equals(serialNumberCode.getCode())) {
                 Object data = serialNumberCode.getData();

+ 30 - 0
cx-equipment/cx-equipment-common/src/main/resources/mybatis/business/EquMaintenancePredictivePlanDao.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.rongwei.bscommon.sys.dao.EquMaintenancePredictivePlanDao">
+
+    <select id="queryDateByids" resultType="com.rongwei.bsentity.domain.EquMaintenancePredictivePlanVo">
+        SELECT
+        a.*,
+        DATE_ADD(a.LASTMAINTENANCEDATE, INTERVAL a.FREQUENCY DAY) AS NEXTMAINTENANCEDATE,
+        b.NEXTTASKID
+        FROM
+        equ_maintenance_predictive_plan a
+        LEFT JOIN (
+        SELECT PREDICTIVEMAINTENANCEPLANID, GROUP_CONCAT(TASKID) AS NEXTTASKID
+        FROM equ_maintenance_task
+        WHERE DELETED = '0' AND TASKSTATE IN ('20', '70', '30', '15', '10')
+        GROUP BY PREDICTIVEMAINTENANCEPLANID
+        ) b ON a.ID = b.PREDICTIVEMAINTENANCEPLANID
+        <where>
+            a.DELETED ='0'
+            and  DATEDIFF(DATE_ADD(a.LASTMAINTENANCEDATE, INTERVAL a.FREQUENCY DAY), CURDATE()) &lt; 30
+            and b.NEXTTASKID is null and a.ISOUTOFSERVICE='启用'
+            <if test="ids != null and ids.size()>0">
+                AND a.ID in
+                <foreach collection="ids" item="id" open="(" close=")" separator=",">
+                    #{id}
+                </foreach>
+            </if>
+        </where>
+    </select>
+</mapper>

+ 369 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquDisposalRequestDo.java

@@ -0,0 +1,369 @@
+package com.rongwei.bsentity.domain;
+
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author  cyn
+ * @create 2024-07-12 09:24
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName("equ_disposal_request")
+public class EquDisposalRequestDo {
+
+	/**
+	 * 主键ID
+	 */
+	private String id;
+
+	/**
+	 * 租户ID
+	 */
+	private String tenantId;
+
+	/**
+	 * 扩展json格式配置
+	 */
+	private String roption;
+
+	/**
+	 * 是否删除Y/N
+	 */
+	private String deleted;
+
+	/**
+	 * 备注
+	 */
+	private String remark;
+
+	/**
+	 * 创建时间
+	 */
+	private Date createDate;
+
+	/**
+	 * 创建用户ID
+	 */
+	private String createUserId;
+
+	/**
+	 * 修改日期
+	 */
+	private Date modifyDate;
+
+	/**
+	 * 修改用户ID
+	 */
+	private String modifyUserId;
+
+	/**
+	 * 创建人
+	 */
+	private String createUserName;
+
+	/**
+	 * 修改人
+	 */
+	private String modifyUserName;
+
+	/**
+	 * 状态
+	 */
+	private String status;
+
+	/**
+	 * 流程ID
+	 */
+	private String processInstId;
+
+	/**
+	 * 设备处置申请单号
+	 */
+	private String disposalRequestNumber;
+
+	/**
+	 * 处置类型
+	 */
+	private String handlingType;
+
+	/**
+	 * 对象分类
+	 */
+	private String objectType;
+
+	/**
+	 * 设备名称
+	 */
+	private String equipmentName;
+
+	/**
+	 * 设备ID
+	 */
+	private String equipmentId;
+
+	/**
+	 * 设备编号
+	 */
+	private String equipmentNumber;
+
+	/**
+	 * 设备分类
+	 */
+	private String equipmentType;
+
+	/**
+	 * 设备位置
+	 */
+	private String area;
+
+	/**
+	 * 使用部门ID
+	 */
+	private String workshopId;
+
+	/**
+	 * 使用部门
+	 */
+	private String workshop;
+
+	/**
+	 * 规格型号
+	 */
+	private String specification;
+
+	/**
+	 * 设备启用时间
+	 */
+	private Date activeTime;
+
+	/**
+	 * 设备运行年限
+	 */
+	private Integer operatingLife;
+
+	/**
+	 * 处置原因
+	 */
+	private String reasonDisposal;
+
+	/**
+	 * 其他处置原因
+	 */
+	private String otherReasonDisposal;
+
+	/**
+	 * 移出工厂
+	 */
+	private String rolloutplantid;
+
+	/**
+	 * 移出部门车间ID
+	 */
+	private String rolloutdeptid;
+
+	/**
+	 * 移出部门车间
+	 */
+	private String rolloutdept;
+
+	/**
+	 * 转出位置
+	 */
+	private String rolloutlocation;
+
+	/**
+	 * 转入工厂
+	 */
+	private String rollinplantid;
+
+	/**
+	 * 转入部门车间ID
+	 */
+	private String rollindeptid;
+
+	/**
+	 * 转入部门车间
+	 */
+	private String rollindept;
+
+	/**
+	 * 转入位置
+	 */
+	private String rollinlocation;
+
+	/**
+	 * 随机技术文件
+	 */
+	private String technicalfile;
+
+	/**
+	 * 申请部门ID
+	 */
+	private String applicationdeptid;
+
+	/**
+	 * 申请部门
+	 */
+	private String applicationdept;
+
+	/**
+	 * 申请人ID
+	 */
+	private String proposerid;
+
+	/**
+	 * 申请人
+	 */
+	private String proposer;
+
+	/**
+	 * 申请时间
+	 */
+	private Date applicationtime;
+
+	/**
+	 * 安全部部长
+	 */
+	private String mssmanagerid;
+
+	/**
+	 * 安全部部长名称
+	 */
+	private String mssmanager;
+
+	/**
+	 * 技质部部长
+	 */
+	private String mtqmanagerid;
+
+	/**
+	 * 技质部部长名称
+	 */
+	private String mtomanager;
+
+	/**
+	 * 设备部部长
+	 */
+	private String equmanagerid;
+
+	/**
+	 * 设备部部长名称
+	 */
+	private String equmanager;
+
+	/**
+	 * 仓储部部长
+	 */
+	private String wdmanagerid;
+
+	/**
+	 * 仓储部部长名称
+	 */
+	private String wdmanager;
+
+	/**
+	 * 副总经理
+	 */
+	private String vicepresidentid;
+
+	/**
+	 * 副总经理名称
+	 */
+	private String vicepresident;
+
+	/**
+	 * 总经理
+	 */
+	private String generalmanagerid;
+
+	/**
+	 * 总经理名称
+	 */
+	private String generalmanager;
+
+	/**
+	 * 财务处部长
+	 */
+	private String financeofficeid;
+
+	/**
+	 * 财务处部长名称
+	 */
+	private String financeoffice;
+
+	/**
+	 * 安全部部长名称审批人
+	 */
+	private String mssmanageraudit;
+
+	/**
+	 * 技质部部长名称审批人
+	 */
+	private String mtomanageraudit;
+
+	/**
+	 * 设备部部长名称审批人
+	 */
+	private String equmanageraudit;
+
+	/**
+	 * 仓储部部长名称审批人
+	 */
+	private String wdmanageraudit;
+
+	/**
+	 * 副总经理名称审批人
+	 */
+	private String vicepresidentaudit;
+
+	/**
+	 * 财务处部长名称审批人
+	 */
+	private String financeofficeaudit;
+
+	/**
+	 * 安全部部长时间
+	 */
+	private Date mssmanagertime;
+
+	/**
+	 * 技质部部长时间
+	 */
+	private Date mtomanagertime;
+
+	/**
+	 * 设备部部长时间
+	 */
+	private Date equmanagertime;
+
+	/**
+	 * 仓储部部长时间
+	 */
+	private Date wdmanagertime;
+
+	/**
+	 * 副总经理时间
+	 */
+	private Date vicepresidenttime;
+
+	/**
+	 * 总经理时间
+	 */
+	private Date generalmanagertime;
+
+	/**
+	 * 财务处部长时间
+	 */
+	private Date financeofficetime;
+
+}

+ 186 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquForkliftRepairRecordDo.java

@@ -0,0 +1,186 @@
+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.util.Date;
+
+/**
+ * 叉车维修保养记录
+ * @author  cyn 
+ * @create 2024-10-22 16:44 
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("equ_forklift_repair_record")
+public class EquForkliftRepairRecordDo {
+
+	/**
+	 * table name:ID
+	 * table type:varchar(36)
+	 * table comment:主键ID
+	 */
+	private String id;
+
+	/**
+	 * table name:TENANTID
+	 * table type:text
+	 * table comment:所属工厂
+	 */
+	private String tenantid;
+
+	/**
+	 * table name:ROPTION
+	 * table type:text
+	 * table comment:扩展json格式配置
+	 */
+	private String roption;
+
+	/**
+	 * table name:DELETED
+	 * table type:varchar(1)
+	 * table comment:是否删除Y/N
+	 */
+	private String deleted;
+
+	/**
+	 * table name:REMARK
+	 * table type:varchar(2000)
+	 * 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(20)
+	 * table comment:创建人
+	 */
+	private String createusername;
+
+	/**
+	 * table name:MODIFYUSERNAME
+	 * table type:varchar(20)
+	 * table comment:修改人
+	 */
+	private String modifyusername;
+
+	/**
+	 * table name:OWNEDFACTORYID
+	 * table type:varchar(36)
+	 * table comment:所属工厂ID
+	 */
+	private String ownedfactoryid;
+
+	/**
+	 * table name:OWNEDFACTORY
+	 * table type:varchar(255)
+	 * table comment:所属工厂
+	 */
+	private String ownedfactory;
+
+	/**
+	 * table name:EQUIPMENTID
+	 * table type:varchar(36)
+	 * table comment:叉车ID
+	 */
+	private String equipmentid;
+
+	/**
+	 * table name:EQUIPMENTNAME
+	 * table type:varchar(255)
+	 * table comment:叉车
+	 */
+	private String equipmentname;
+
+	/**
+	 * table name:EQUIPMENTNUMBER
+	 * table type:varchar(255)
+	 * table comment:叉车编号
+	 */
+	private String equipmentnumber;
+
+	/**
+	 * table name:USEDEPTID
+	 * table type:varchar(255)
+	 * table comment:使用部门ID
+	 */
+	private String usedeptid;
+
+	/**
+	 * table name:USEDEPT
+	 * table type:varchar(255)
+	 * table comment:使用部门
+	 */
+	private String usedept;
+
+	/**
+	 * table name:RAPAIRDATE
+	 * table type:datetime
+	 * table comment:维修/保养日期
+	 */
+	private Date rapairdate;
+
+	/**
+	 * table name:DJDATE
+	 * table type:datetime
+	 * table comment:登记日期
+	 */
+	private Date djdate;
+
+	/**
+	 * table name:RAPAIRID
+	 * table type:varchar(100)
+	 * table comment:维修/保养人ID
+	 */
+	private String rapairid;
+
+	/**
+	 * table name:RAPAIRNAME
+	 * table type:varchar(100)
+	 * table comment:维修/保养人
+	 */
+	private String rapairname;
+
+	/**
+	 * table name:RAPAIRDETAIL
+	 * table type:varchar(2000)
+	 * table comment:维修/保养内容
+	 */
+	private String rapairdetail;
+
+}

+ 443 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenancePredictivePlanDo.java

@@ -0,0 +1,443 @@
+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.util.Date;
+
+/**
+ * @author  cyn 
+ * @create 2024-10-22 13:21 
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("equ_maintenance_predictive_plan")
+public class EquMaintenancePredictivePlanDo {
+
+	/**
+	 * table name:ID
+	 * table type:varchar(36)
+	 * table comment:主键
+	 */
+	private String id;
+
+	/**
+	 * table name:TENANTID
+	 * table type:text
+	 * table comment:null
+	 */
+	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:mediumtext
+	 * 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: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: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;
+
+	/**
+	 * table name:TASKSTARTTIME
+	 * table type:datetime
+	 * table comment:保养开始时间
+	 */
+	private Date taskstarttime;
+
+	/**
+	 * table name:TASKENDTIME
+	 * table type:datetime
+	 * table comment:保养完成时间
+	 */
+	private Date taskendtime;
+
+	/**
+	 * table name:PREVIOUSSITUATION
+	 * table type:text
+	 * table comment:保养前情况
+	 */
+	private String previoussituation;
+
+	/**
+	 * table name:ACCEPTOR
+	 * table type:text
+	 * table comment:验收人
+	 */
+	private String acceptor;
+
+	/**
+	 * table name:ACCEPTORID
+	 * table type:text
+	 * table comment:验收人ID
+	 */
+	private String acceptorid;
+
+	/**
+	 * table name:RESULTCHART
+	 * table type:text
+	 * table comment:保养结果图
+	 */
+	private String resultchart;
+
+	/**
+	 * table name:CONFIRMRESULT
+	 * table type:varchar(20)
+	 * table comment:确认结果
+	 */
+	private String confirmresult;
+
+	/**
+	 * table name:AFFIRMSTATE
+	 * table type:text
+	 * table comment:确认说明
+	 */
+	private String affirmstate;
+
+	/**
+	 * table name:ACCEPTANCETIME
+	 * table type:datetime
+	 * table comment:确认验收时间
+	 */
+	private Date acceptancetime;
+
+	/**
+	 * table name:RETURNMARK
+	 * table type:varchar(255)
+	 * table comment:返工标记
+	 */
+	private String returnmark;
+
+	/**
+	 * table name:ISHALT
+	 * table type:varchar(36)
+	 * table comment:是否要停机
+	 */
+	private String ishalt;
+
+	/**
+	 * table name:YGHFGS
+	 * table type:varchar(36)
+	 * table comment:预估花费工时
+	 */
+	private String yghfgs;
+
+	/**
+	 * table name:PLANCLASSIFICATION
+	 * table type:varchar(36)
+	 * table comment:计划分类
+	 */
+	private String planclassification;
+
+	/**
+	 * table name:LASTMAINTENANCEDATE
+	 * table type:datetime
+	 * table comment:最近保养日期
+	 */
+	private Date lastmaintenancedate;
+
+	/**
+	 * table name:FREQUENCY
+	 * table type:int
+	 * table comment:频次
+	 */
+	private Integer frequency;
+
+	/**
+	 * table name:ISOUTOFSERVICE
+	 * table type:varchar(36)
+	 * table comment:是否停用
+	 */
+	private String isoutofservice;
+
+}

+ 20 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenancePredictivePlanVo.java

@@ -0,0 +1,20 @@
+package com.rongwei.bsentity.domain;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class EquMaintenancePredictivePlanVo  extends EquMaintenancePredictivePlanDo implements Serializable {
+
+    /**
+     * 下次保养日期
+     */
+    private Date nextmaintenancedate;
+
+    /**
+     * 下次任务编号
+     */
+    private String nexttaskid;
+}

+ 249 - 0
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceReportDo.java

@@ -0,0 +1,249 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName("equ_maintenance_report")
+public class EquMaintenanceReportDo {
+    /**
+     * 主键
+     */
+    private String id;
+
+    /**
+     * 工厂
+     */
+    private String tenantid;
+
+    /**
+     * 工厂名称
+     */
+    private String plant;
+
+    /**
+     * 扩展json格式配置
+     */
+    private String roption;
+
+    /**
+     * 是否删除
+     */
+    private String deleted;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 创建时间
+     */
+    private Date createdate;
+
+    /**
+     * 创建用户ID
+     */
+    private String createuserid;
+
+    /**
+     * 修改日期
+     */
+    private Date modifydate;
+
+    /**
+     * 修改用户ID
+     */
+    private String modifyuserid;
+
+    /**
+     * 创建人名称
+     */
+    private String createusername;
+
+    /**
+     * 修改人名称
+     */
+    private String modifyusername;
+
+    /**
+     * 上报编号
+     */
+    private String jobnumber;
+
+    /**
+     * 故障来源
+     */
+    private String faultsource;
+
+    /**
+     * 故障分类
+     */
+    private String faultclassify;
+
+    /**
+     * 维修对象分类
+     */
+    private String maintenanceclassify;
+
+    /**
+     * 设备名称
+     */
+    private String equipmentname;
+
+    /**
+     * 设备ID
+     */
+    private String equipmentid;
+
+    /**
+     * 设备编号
+     */
+    private String equipmentnumber;
+
+    /**
+     * 规格型号
+     */
+    private String specification;
+
+    /**
+     * 区域
+     */
+    private String area;
+
+    /**
+     * 问题发生部位
+     */
+    private String problemlocation;
+
+    /**
+     * 关联维修工单ID
+     */
+    private String relationmaintenanceorderid;
+
+    /**
+     * 维修紧急情况
+     */
+    private String repairurgency;
+
+    /**
+     * 问题上报时间
+     */
+    private Date incidenttime;
+
+    /**
+     * 是否需要停机
+     */
+    private String ishalt;
+
+    /**
+     * 停机时间
+     */
+    private Date halttime;
+
+    /**
+     * 预计维修时长
+     */
+    private BigDecimal repairusingtime;
+
+    /**
+     * 上报状态
+     */
+    private String reportstatus;
+
+    /**
+     * 使用车间ID
+     */
+    private String workshopid;
+
+    /**
+     * 使用车间
+     */
+    private String workshop;
+
+    /**
+     * 工序主管/车间主任ID
+     */
+    private String gxzgid;
+
+    /**
+     * 工序主管/车间主任
+     */
+    private String gxzg;
+
+    /**
+     * 上报人ID
+     */
+    private String reportueserid;
+
+    /**
+     * 上报人
+     */
+    private String reportueser;
+
+    /**
+     * 设备问题
+     */
+    private String faultcondition;
+
+    /**
+     * 故障图
+     */
+    private String equipmentfault;
+
+    /**
+     * 申请部门
+     */
+    private String applicationdept;
+
+    /**
+     * 申请部门ID
+     */
+    private String applicationdeptid;
+
+    /**
+     * 故障发生原因
+     */
+    private String causefailure;
+
+    /**
+     * 计划开始维修时间
+     */
+    private Date planstarttime;
+
+    /**
+     * 计划完成维修时间
+     */
+    private Date planendtime;
+
+    /**
+     * 维修主管ID
+     */
+    private String servicepersionid;
+
+    /**
+     * 维修主管
+     */
+    private String serviceperson;
+
+    /**
+     * 维修工程师ID
+     */
+    private String maintenanceengineerid;
+
+    /**
+     * 维修工程师NAME
+     */
+    private String maintenanceengineername;
+
+
+
+
+}

+ 12 - 1
cx-equipment/cx-equipment-entity/src/main/java/com/rongwei/bsentity/domain/EquMaintenanceTaskDo.java

@@ -418,6 +418,17 @@ public class EquMaintenanceTaskDo implements Serializable {
 	/**
 	 * 计划分类
 	 */
-	private String PLANCLASSIFICATION;
+	private String planclassification;
+
+	/**
+	 * 预测性保养计划ID
+	 */
+	private String predictivemaintenanceplanid;
+
+	/**
+	 * 是否要停机
+	 */
+	private String ishalt;
+
 
 }

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

@@ -0,0 +1,37 @@
+package com.rongwei.bsserver.sys.controller;
+
+import com.rongwei.bscommon.sys.service.EquForkliftRepairRecordService;
+import com.rongwei.bscommon.sys.service.MaintenanceService;
+import com.rongwei.bscommon.sys.utils.ExceptionUtils;
+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.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+@RestController
+@RequestMapping("/equForkliftRepairRecord")
+public class EquForkliftRepairRecordController {
+
+    private final static Logger log = LoggerFactory.getLogger(EquForkliftRepairRecordController.class);
+
+    @Autowired
+    private EquForkliftRepairRecordService equForkliftRepairRecordService;
+
+
+    @PostMapping("/uploadimportForkliftRepairRecordSave")
+    public R uploadimportForkliftRepairRecordSave(@RequestParam("file") MultipartFile multipartFile){
+        try {
+            log.info("进入接口:/equForkliftRepairRecord/importStandardSave,入参:{}", multipartFile);
+            return equForkliftRepairRecordService.equForkliftRepairRecordService(multipartFile);
+            // return null;
+        }catch (Exception e){
+            ExceptionUtils.printExceptionDetail(e,"导入失败,请检查后再导入:");
+            return R.error(e.getMessage());
+        }
+    }
+}

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

@@ -0,0 +1,79 @@
+package com.rongwei.bsserver.sys.controller;
+
+
+import com.rongwei.bscommon.sys.service.EquBomService;
+import com.rongwei.bscommon.sys.service.EquMaintenancePredictivePlanService;
+import com.rongwei.bscommon.sys.utils.ExceptionUtils;
+import com.rongwei.bsentity.dto.EquBomCopyDto;
+import com.rongwei.rwcommon.base.R;
+import lombok.Data;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+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;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>
+ * 设备子系统—— 预测性保养计划
+ * </p>
+ *
+ * @author hp
+ * @since  2024-10-22
+ */
+@RestController
+@RequestMapping("/equMaintenancePredictivePlan")
+public class EquMaintenancePredictivePlanController {
+
+    private static final Logger logger = LoggerFactory.getLogger(EquMaintenancePredictivePlanController.class);
+
+    @Autowired
+    private EquMaintenancePredictivePlanService equMaintenancePredictivePlanService;
+
+
+    /**
+     * 生成保养任务记录
+     * @param ids
+     * @return
+     */
+    @PostMapping("/generateMaintenanceTask")
+    public R updateInventoryReminderStatus(@RequestBody List<String> ids){
+        try {
+            logger.info("预测性保养计划开始生成保养任务记录");
+            R r = equMaintenancePredictivePlanService.generateMaintenanceTask(ids);
+            logger.info("预测性保养计划结束生成保养任务记录");
+            return r;
+        } catch (Exception e) {
+            logger.error("预测性保养计划生成保养任务记录失败:{}"+e.getMessage());
+        }
+        return R.ok();
+    }
+
+
+    /**
+     * 每天早上5点
+     * @return
+     */
+    @Scheduled(cron = "0 0 5 1/1 * ? ")
+   // @Scheduled(cron = "0/15 * * * * ? ")
+    public R updateInventoryReminderStatusCron(){
+        try {
+            logger.info("开始执行定时任务 测性保养计划开始生成保养任务");
+            R r = equMaintenancePredictivePlanService.generateMaintenanceTask(null);
+            return r;
+        } catch (Exception e) {
+            logger.error("预测性保养计划生成保养任务记录失败:{}"+e.getMessage());
+        }
+        return R.ok();
+    }
+
+
+}
+

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

@@ -0,0 +1,63 @@
+package com.rongwei.bsserver.sys.controller;
+
+import com.rongwei.bscommon.sys.service.EquMaintenanceOrderService;
+import com.rongwei.bscommon.sys.service.EquMaintenanceReportService;
+import com.rongwei.bscommon.sys.service.EquipmentArchivesService;
+import com.rongwei.rwcommon.base.R;
+import lombok.extern.slf4j.Slf4j;
+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;
+
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("sendEmail")
+@Slf4j
+public class SendEmailController {
+
+
+    @Autowired
+    private EquipmentArchivesService equipmentArchivesService;
+
+    @Autowired
+    private EquMaintenanceOrderService equMaintenanceOrderService;
+
+    @Autowired
+    private EquMaintenanceReportService equMaintenanceReportService;
+
+
+    /**
+     * 设备处置流程邮件提醒
+     * @return
+     */
+    @PostMapping("/EquipmentDisposalEmail")
+    public R deleteValidate(@RequestBody Map<String,Object> myObject){
+            R r = equipmentArchivesService.sendEmail(myObject);
+            return r.ok();
+    }
+
+
+    /**
+     * 维修申请流程邮件提醒
+     * @return
+     */
+    @PostMapping("/EquMaintenanceOrderEmail")
+    public R equMaintenanceOrderEmail(@RequestBody Map<String,Object> myObject){
+        R r = equMaintenanceOrderService.sendEmail(myObject);
+        return r.ok();
+    }
+
+    /**
+     * 维修上报设备故障流程邮件提醒
+     * @return
+     */
+    @PostMapping("/EquMaintenanceReportEmail")
+    public R equMaintenanceReportEmail(@RequestBody Map<String,Object> myObject){
+        R r = equMaintenanceReportService.sendEmail(myObject);
+        return r.ok();
+    }
+}