Lius
2024-12-31 078e94627c72eb6cada22a6e5478b003cff57f4c
update
已修改4个文件
40 ■■■■ 文件已修改
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcImplementLedgers.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/job/TransferTableDataJob.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentRunningSectionServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcOverallEquipmentEfficiencyServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcImplementLedgers.java
@@ -77,7 +77,7 @@
    /**
     * 设备安放位置
     */
    @Excel(name = "设备安放位置", width = 15)
    @Excel(name = "设备安放位置", width = 20)
    @ApiModelProperty(value = "设备安放位置")
    private String equipmentPosition;
    /**
@@ -89,13 +89,13 @@
    /**
     * MDC安装情况(是/否)
     */
    @Excel(name = "MDC安装情况(是/否)", width = 15)
    @Excel(name = "MDC安装情况", width = 15, replace={"是_Y","否_N"})
    @ApiModelProperty(value = "MDC安装情况(是/否)")
    private String isMdcInstall;
    /**
     * MDC硬件安装(是/否)
     */
    @Excel(name = "MDC硬件安装(是/否)", width = 15)
    @Excel(name = "MDC硬件安装", width = 15, replace={"是_Y","否_N"})
    @ApiModelProperty(value = "MDC硬件安装(是/否)")
    private String isMdcHardwareInstall;
    /**
@@ -107,13 +107,13 @@
    /**
     * DNC安装情况(是/否)
     */
    @Excel(name = "DNC安装情况(是/否)", width = 15)
    @Excel(name = "DNC安装情况", width = 15, replace={"是_Y","否_N"})
    @ApiModelProperty(value = "DNC安装情况(是/否)")
    private String isDncInstall;
    /**
     * DNC硬件安装(是/否)
     */
    @Excel(name = "DNC硬件安装(是/否)", width = 15)
    @Excel(name = "DNC硬件安装", width = 15, replace={"是_Y","否_N"})
    @ApiModelProperty(value = "DNC硬件安装(是/否)")
    private String isDncHardwareInstall;
    /**
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/job/TransferTableDataJob.java
@@ -27,6 +27,15 @@
@Slf4j
public class TransferTableDataJob implements Job {
    /**
     * 若参数变量名修改 QuartzJobController中也需对应修改  迁移时间  例: 30
     */
    private String parameter;
    public void setParameter(String parameter) {
        this.parameter = parameter;
    }
    @Resource
    private ISysQuartzLogService sysQuartzLogService;
@@ -48,6 +57,7 @@
        if (byJobClassName != null && !byJobClassName.isEmpty()) {
            quartzLog.setJobId(byJobClassName.get(0).getId());
        }
        quartzLog.setParams(this.parameter);
        log.info("数据迁移任务 TransferTableDataJob start!  时间:" + DateUtils.getNow());
        long startTime = System.currentTimeMillis();
        try {
@@ -55,7 +65,15 @@
            Equipment info = new Equipment();
            info.setSavetablename("EquipmentLog");
            list.add(info);
            String day = DateUtils.format(DateUtils.plusTime(DateUtils.getNow(), -30), DateUtils.STR_DATE_TIME_SMALL);
            int dayNum = 30;
            if (StringUtils.isNotBlank(this.parameter)) {
                try {
                    dayNum = Integer.parseInt(this.parameter);
                } catch (Exception e) {
                    log.error("参数格式不对", e);
                }
            }
            String day = DateUtils.format(DateUtils.plusTime(DateUtils.getNow(), -dayNum), DateUtils.STR_DATE_TIME_SMALL);
            for (Equipment equipment : list) {
                if (StringUtils.isNotBlank(equipment.getSavetablename())) {
                    String tableName = equipmentService.checkTableExists(equipment.getSavetablename());
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentRunningSectionServiceImpl.java
@@ -519,9 +519,13 @@
            //获取running运行的日志记录
            List<MdcEquipmentRunningSection> list = this.equipmentRunningTracesLog(equipment.getEquipmentid());
            if (list != null && !list.isEmpty()) {
                try {
                List<MdcEquipmentRunningSection> equipList = addSequenceNumber(list); //添加程序号
                this.ergodicTrim(equipList);
                super.saveBatch(equipList);
                } catch (Exception e) {
                    log.error("添加程序号出现异常:", e);
                }
            }
            //获取报警的日志记录
            List<MdcEquipmentRunningSection> errorList = this.equipmentRunningTracesErrorLog(equipment.getEquipmentid());
@@ -964,9 +968,9 @@
                ert.setStartTime(logList.get(i).getCollectTime());
                ert.setEndTime(logList.get(i + 1).getCollectTime());
                ert.setDuration(DateUtils.differentSecond(ert.getStartTime(), ert.getEndTime()));
//                if (ert.getDuration() > 0) {
                erts.add(ert);
//                }
            } else {
                long count = differentSecond / 86400;
                if (count % 86400 > 0) {
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcOverallEquipmentEfficiencyServiceImpl.java
@@ -174,7 +174,7 @@
             */
            // mdcOverallEquipmentEfficiency.getShiftTimeCount() - plannedMaintenanceDuration - conferenceTrainingDuration - otherRestDuration
            // 负荷时间(分钟)
            BigDecimal loadTime = mdcOverallEquipmentEfficiency.getMonthActualWorkDayTimeCount().subtract(plannedMaintenanceDuration).subtract(conferenceTrainingDuration).subtract(otherRestDuration).add(overtime);
            BigDecimal loadTime = mdcOverallEquipmentEfficiency.getMonthActualWorkDayTimeCount().subtract(plannedMaintenanceDuration).subtract(conferenceTrainingDuration).subtract(otherRestDuration);
            if (loadTime.compareTo(BigDecimal.ZERO) < 0) {
                loadTime = BigDecimal.ZERO;
            }