Lius
2024-11-07 81eae83295642387de38a97fdc5a35f485307587
license
已修改9个文件
88 ■■■■ 文件已修改
lxzn-boot-base-core/src/main/java/org/jeecg/config/LicenseConfig.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/dto/EquipmentAlarmDto.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcFakeDataSub.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentAlarmMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/EquipmentAlarmServiceImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcOeeInfoServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdcJc/service/impl/MdcProductDayScheduleServiceImpl.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/screen/service/impl/MdcLargeScreenServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-boot-base-core/src/main/java/org/jeecg/config/LicenseConfig.java
@@ -24,9 +24,9 @@
        //添加要拦截的url
        registry.addInterceptor(licenseCheckInterceptor)
                // 拦截的路径
                .addPathPatterns("/**")
                .addPathPatterns("/sys/login");
                // 放行的路径
                .excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**", "/doc.html")//swagger
                .excludePathPatterns("/base/license/**");//生成license和获取服务器硬件信息
//                .excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**", "/doc.html")//swagger
//                .excludePathPatterns("/base/license/**");//生成license和获取服务器硬件信息
    }
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/dto/EquipmentAlarmDto.java
@@ -25,4 +25,6 @@
    private String alarmNo;
    @Excel(name = "报警描述", width = 50)
    private String alarmContent;
    private String driveType;
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcFakeDataSub.java
@@ -1,5 +1,7 @@
package org.jeecg.modules.mdc.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -32,16 +34,19 @@
     * label
     */
    @ApiModelProperty("label")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String label;
    /**
     * value1
     */
    @ApiModelProperty("value1")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String value1;
    /**
     * value2
     */
    @ApiModelProperty("value2")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String value2;
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentAlarmMapper.xml
@@ -8,7 +8,8 @@
            t2.equipment_name,
            t1.collectTime,
            t1.AlarmNo,
            t1.AlarmContent
            t1.AlarmContent,
            t2.drive_type
        FROM
            EquipmentAlarm t1 LEFT JOIN mdc_equipment t2 ON t1.EquipmentID = t2.equipment_id
        <where>
@@ -41,7 +42,8 @@
        t2.equipment_name,
        t1.collectTime,
        t1.AlarmNo,
        t1.AlarmContent
        t1.AlarmContent,
        t2.drive_type
        FROM
        EquipmentAlarm t1 LEFT JOIN mdc_equipment t2 ON t1.EquipmentID = t2.equipment_id
        <where>
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/EquipmentAlarmServiceImpl.java
@@ -93,12 +93,14 @@
        }
        IPage<EquipmentAlarmDto> pageList = this.baseMapper.pageList(page, equipmentAlarmVo);
        pageList.getRecords().forEach(item -> {
            List<MdcAlarmInfo> mdcAlarmInfoList = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getAlarmCode, item.getAlarmNo()).eq(MdcAlarmInfo::getIsUse, CommonConstant.STATUS_0));
            if (mdcAlarmInfoList != null && !mdcAlarmInfoList.isEmpty()) {
                item.setAlarmContent(mdcAlarmInfoList.get(0).getAlarmContent());
            if (StringUtils.isBlank(item.getAlarmContent())) {
                List<MdcAlarmInfo> mdcAlarmInfoList = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getAlarmCode, item.getAlarmNo()).eq(MdcAlarmInfo::getDriveType, item.getDriveType()).eq(MdcAlarmInfo::getIsUse, CommonConstant.STATUS_0));
                if (mdcAlarmInfoList != null && !mdcAlarmInfoList.isEmpty()) {
                    item.setAlarmContent(mdcAlarmInfoList.get(0).getAlarmContent());
                }
            }
        });
        return this.baseMapper.pageList(page, equipmentAlarmVo);
        return pageList;
    }
    @Override
@@ -136,6 +138,16 @@
        // Step.2 AutoPoi 导出Excel
        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
        List<EquipmentAlarmDto> equipmentAlarmDtos = this.baseMapper.list(equipmentAlarmVo);
        if (equipmentAlarmDtos != null && !equipmentAlarmDtos.isEmpty()) {
            for (EquipmentAlarmDto equipmentAlarmDto : equipmentAlarmDtos) {
                if (StringUtils.isBlank(equipmentAlarmDto.getAlarmContent())) {
                    List<MdcAlarmInfo> mdcAlarmInfoList = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getAlarmCode, equipmentAlarmDto.getAlarmNo()).eq(MdcAlarmInfo::getDriveType, equipmentAlarmDto.getDriveType()).eq(MdcAlarmInfo::getIsUse, CommonConstant.STATUS_0));
                    if (mdcAlarmInfoList != null && !mdcAlarmInfoList.isEmpty()) {
                        equipmentAlarmDto.setAlarmContent(mdcAlarmInfoList.get(0).getAlarmContent());
                    }
                }
            }
        }
        // 导出文件名称
        mv.addObject(NormalExcelConstants.FILE_NAME, "设备报警列表");
        mv.addObject(NormalExcelConstants.CLASS, EquipmentAlarmDto.class);
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java
@@ -438,16 +438,16 @@
                        }
                        map.put("value", value);
                        runData.add(map);
                        if ("spindlebeilv".equals(englishName)) {
                        if ("spindlebeilv".equals(englishName) || "Sfeed".equals(englishName)) {
                            result.put("spindlebeilv", value);
                        }
                        if ("feedbeilv".equals(englishName)) {
                        if ("feedbeilv".equals(englishName) || "Ffeed".equals(englishName)) {
                            result.put("feedbeilv", value);
                        }
                        if ("spindleload".equals(englishName)) {
                            result.put("spindleload", value);
                        }
                        if ("rapidfeed".equals(englishName)) {
                        if ("rapidfeed".equals(englishName) || "Rapidfeed".equals(englishName)) {
                            result.put("rapidfeed", value);
                        }
                    }
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcOeeInfoServiceImpl.java
@@ -217,7 +217,7 @@
                        mdcOeeInfo.setOpenLong(mdcEquipmentStatisticalShiftInfo.getOpenLong());
                        mdcOeeInfo.setCloseLong(mdcEquipmentStatisticalShiftInfo.getCloseLong());
                        //获取设备生产计划
                        mdcProductDayschedule = productDayScheduleList.stream().filter(productDayschedule -> productDayschedule.getOrderId().substring(8, 10).equals(id)).findAny().orElse(null);
                        mdcProductDayschedule = productDayScheduleList.stream().filter(productDayschedule -> productDayschedule.getOrderId().substring(productDayschedule.getOrderId().length() - 5, productDayschedule.getOrderId().length() - 3).equals(id)).findAny().orElse(null);
                        if (mdcProductDayschedule == null) {
                            continue;
                        }
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdcJc/service/impl/MdcProductDayScheduleServiceImpl.java
@@ -1,6 +1,7 @@
package org.jeecg.modules.mdcJc.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.mdc.mapper.MdcEquipmentMapper;
import org.jeecg.modules.mdc.util.DateUtils;
import org.jeecg.modules.mdcJc.entity.MdcProductDayschedule;
import org.jeecg.modules.mdcJc.entity.ProductDayschedule;
@@ -14,8 +15,7 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.*;
/**
 * @author Lius
@@ -26,6 +26,9 @@
    @Resource
    private IClassMonthlyScheduleService classMonthlyScheduleService;
    @Resource
    private MdcEquipmentMapper mdcEquipmentMapper;
    @Override
@@ -40,10 +43,28 @@
            this.removeBatchByIds(mdcListIds);
        }
        List<MdcProductDayschedule> mesC = new ArrayList<>();
        Map<String, String> map = new HashMap<>();
        map.put("5899-8026", "1818119280110690306");
        map.put("5899-8027", "1818119094416269313");
        map.put("5899-8060", "1818118942234337281");
        map.put("5899-8061", "1818119019862515714");
        for (ProductDayschedule c : list) {
            MdcProductDayschedule mdc = new MdcProductDayschedule();
            BeanMapper.copy(c, mdc);
            mesC.add(mdc);
            if (map.containsKey(c.getEquipmentId())) {
                List<String> productionIds = Arrays.asList(map.get(c.getEquipmentId()).split(","));
                List<String> equipmentList = mdcEquipmentMapper.queryIdsByProductions(productionIds);
                if (equipmentList != null && !equipmentList.isEmpty()) {
                    for (String equipmentId : equipmentList) {
                        MdcProductDayschedule mdc = new MdcProductDayschedule();
                        BeanMapper.copy(c, mdc);
                        mdc.setEquipmentId(equipmentId);
                        mesC.add(mdc);
                    }
                }
            } else {
                MdcProductDayschedule mdc = new MdcProductDayschedule();
                BeanMapper.copy(c, mdc);
                mesC.add(mdc);
            }
        }
        boolean b = this.saveBatch(mesC);
        return b;
lxzn-module-mdc/src/main/java/org/jeecg/modules/screen/service/impl/MdcLargeScreenServiceImpl.java
@@ -18,6 +18,7 @@
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @author Lius
@@ -61,7 +62,7 @@
        BigDecimal processCount = mdcLargeScreenMapper.findYesterdayProcessCount(yesterday);
        BigDecimal utilizationRate = BigDecimal.ZERO;
        if (equipmentCount != null && processCount != null) {
            utilizationRate = processCount.divide(new BigDecimal("86400").multiply(equipmentCount), 0, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP);
            utilizationRate = processCount.divide(new BigDecimal("86400").multiply(equipmentCount), 4, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).setScale(0, RoundingMode.HALF_UP);
        }
        yesterdayOverviewDto.setUtilizationRate(utilizationRate);
        return yesterdayOverviewDto;
@@ -93,7 +94,9 @@
                if (mdcProductDayschedule.getCompletionCount() != 0) {
                    todayProductionPassRateDto.setPassRate(new BigDecimal(mdcProductDayschedule.getQualifiedCount()).divide(new BigDecimal(mdcProductDayschedule.getCompletionCount()), 0, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP));
                }
                result.add(todayProductionPassRateDto);
                if (!(todayProductionPassRateDto.getPassRate().compareTo(BigDecimal.ZERO) == 0)) {
                    result.add(todayProductionPassRateDto);
                }
            }
        }
        return result;
@@ -106,7 +109,8 @@
     */
    @Override
    public List<ClazzCompletionCountDto> todayClazzCompletionCount() {
        return mdcLargeScreenMapper.todayClazzCompletionCount(today);
        List<ClazzCompletionCountDto> result = mdcLargeScreenMapper.todayClazzCompletionCount(today);
        return result.stream().filter(clazzCompletionCountDto -> clazzCompletionCountDto.getCompletionCount() != 0).collect(Collectors.toList());
    }
    /**