ZKBH
2 天以前 25a0ff7d2398f5b11b85549097cd20446e51f0ce
倍率统计服务
已添加8个文件
已修改3个文件
494 ■■■■■ 文件已修改
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentMagnificationController.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcEquipmentMagnification.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/job/EquipmentMagnificationJob.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/MdcEquipmentMagnificationMapper.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMagnificationMapper.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/IMdcDriveTypeParamConfigService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/IMdcEquipmentMagnificationService.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/IMdcEquipmentWorkLineService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcDriveTypeParamConfigServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentMagnificationServiceImpl.java 204 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/vo/MdcEquipmentMagnificationVo.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentMagnificationController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,51 @@
package org.jeecg.modules.mdc.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.mdc.entity.MdcEquipmentMagnification;
import org.jeecg.modules.mdc.service.IMdcEquipmentMagnificationService;
import org.jeecg.modules.mdc.vo.MdcEquipmentMagnificationVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Slf4j
@Api(tags = "倍率统计")
@RestController
@RequestMapping("/mdc/magnification")
public class MdcEquipmentMagnificationController extends JeecgController<MdcEquipmentMagnification, IMdcEquipmentMagnificationService> {
    /**
     * åˆ†é¡µåˆ—表查询
     *
     * @param magnificationVo
     * @param pageNo
     * @param pageSize
     * @param req
     * @return
     */
    @AutoLog(value = "分页列表查询")
    @ApiOperation(value = "分页列表查询", notes = "分页列表查询")
    @GetMapping(value = "/list")
    public Result<IPage<MdcEquipmentMagnification>> queryPageList(MdcEquipmentMagnificationVo magnificationVo,
                                                                  @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                                  @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                                  HttpServletRequest req) {
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId = user.getId();
        IPage<MdcEquipmentMagnification> pageList = service.pageList(userId,magnificationVo,pageNo, pageSize, req);
        return Result.OK(pageList);
    }
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcEquipmentMagnification.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
package org.jeecg.modules.mdc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName("mdc_equipment_magnification")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "mdc_equipment_magnification对象", description = "倍率统计")
public class MdcEquipmentMagnification implements Serializable {
    private static final long serialVersionUID = 4440281782659062056L;
    /**
     * ä¸»é”®
     */
    private String id;
    private String equipmentId;
    //主轴倍率   å€¼å’Œ
    private BigDecimal spindlebeilvValue;
    //主轴倍率 æ•°é‡
    private Integer spindlebeilvNumber;
    //主轴倍率   æ•°é‡
    private BigDecimal feedbeilvValue;
    //进给倍率   æ•°é‡
    private Integer feedbeilvNumber;
    //  ä¸»è½´å€çŽ‡å¹³å‡å€¼
    private BigDecimal spindlebeilv = new BigDecimal(0);
    //进给倍率平均值
    private BigDecimal feedbeilv = new BigDecimal(0);
    //有效日期
    @ApiModelProperty(value = "有效日期")
    private String theDate;
    //创建时间
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/job/EquipmentMagnificationJob.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
package org.jeecg.modules.mdc.job;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.mdc.service.IMdcEquipmentMagnificationService;
import org.jeecg.modules.mdc.util.ThrowableUtil;
import org.jeecg.modules.quartz.entity.QuartzJob;
import org.jeecg.modules.quartz.entity.SysQuartzLog;
import org.jeecg.modules.quartz.service.IQuartzJobService;
import org.jeecg.modules.quartz.service.ISysQuartzLogService;
import org.jeecg.modules.system.service.ISysAnnouncementService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Slf4j
public class EquipmentMagnificationJob implements Job {
    @Resource
    private IMdcEquipmentMagnificationService mdcEquipmentMagnificationService;
    @Resource
    private ISysQuartzLogService sysQuartzLogService;
    @Resource
    private IQuartzJobService quartzJobService;
    @Resource
    private ISysAnnouncementService sysAnnouncementService;
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        SysQuartzLog quartzLog = new SysQuartzLog();
        quartzLog.setCreateTime(new Date());
        List<QuartzJob> byJobClassName = this.quartzJobService.findByJobClassName(this.getClass().getName());
        if (byJobClassName != null && !byJobClassName.isEmpty()) {
            quartzLog.setJobId(byJobClassName.get(0).getId());
        }
        log.info("倍率统计 EquipmentMagnificationJob start!  æ—¶é—´:" + DateUtils.now());
        long startTime = System.currentTimeMillis();
        try {
            mdcEquipmentMagnificationService.savesEquipmentMagnifications();
            quartzLog.setIsSuccess(0);
        } catch (Exception e) {
            quartzLog.setIsSuccess(-1);
            quartzLog.setExceptionDetail(ThrowableUtil.getStackTrace(e));
            // å‘送消息通知
            sysAnnouncementService.jobSendMessage("倍率统计", quartzLog.getExceptionDetail());
        }
        long endTime = System.currentTimeMillis();
        quartzLog.setExecutionTime(Integer.parseInt(String.valueOf(endTime - startTime)));
        sysQuartzLogService.save(quartzLog);
    }
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/MdcEquipmentMagnificationMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
package org.jeecg.modules.mdc.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.mdc.entity.MdcEquipmentMagnification;
import org.jeecg.modules.mdc.vo.MdcEquipmentMagnificationVo;
import java.util.Date;
import java.util.List;
public interface MdcEquipmentMagnificationMapper extends BaseMapper<MdcEquipmentMagnification> {
    MdcEquipmentMagnification getMaxStaticsData(@Param("equipmentId") String equipmentId);
    @InterceptorIgnore(tenantLine = "1")
    @Select("select DISTINCT  ${englishName} from  ${tableName} " +
            " where CollectTime > #{startTime} and CollectTime <= #{endTime} and ${englishName} is not null and ${englishName} != ''" )
    List<Object> getEquipmentSequenceNumber(@Param("tableName") String tableName, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("englishName") String englishName);
    IPage<MdcEquipmentMagnification> pageList(IPage<MdcEquipmentMagnification> pageData, @Param("magnificationVo") MdcEquipmentMagnificationVo magnificationVo);
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMagnificationMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
<?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="org.jeecg.modules.mdc.mapper.MdcEquipmentMagnificationMapper">
    <select id="getMaxStaticsData" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentMagnification">
        SELECT TOP 1 * FROM mdc_equipment_magnification WHERE equipment_id = #{equipmentId} ORDER BY the_date DESC
    </select>
    <!--分页列表查询-->
    <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentMagnification">
        SELECT
            *
        FROM
        mdc_equipment_magnification t1
        WHERE 1=1
        <if test="magnificationVo.equipmentId != null and magnificationVo.equipmentId != ''">
            AND t1.equipment_id = #{ magnificationVo.equipmentId }
        </if>
        <if test="magnificationVo.startTime != null and magnificationVo.startTime != ''">
            AND t1.the_date &gt;= #{ magnificationVo.startTime }
        </if>
        <if test="magnificationVo.endTime != null and magnificationVo.endTime != ''">
            AND t1.the_date &lt;= #{ magnificationVo.endTime }
        </if>
        <if test="magnificationVo.equipmentIdList != null and magnificationVo.equipmentIdList.size() > 0 ">
            AND t1.equipment_id IN
            <foreach collection="magnificationVo.equipmentIdList" item="id" index="index" open="(" close=")" separator=",">
                #{ id }
            </foreach>
        </if>
        ORDER BY t1.the_date ASC
    </select>
</mapper>
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/IMdcDriveTypeParamConfigService.java
@@ -29,6 +29,9 @@
     */
    List<MdcDriveTypeParamConfig> getByTypeCodeMdcShowCode(String codeTypeId);
    //根据中文名称查询数据
    MdcDriveTypeParamConfig getEnglishName(String chineseName,String driveType );
    /**
     * èŽ·å–æŽ§åˆ¶ç³»ç»Ÿç±»åž‹ä¸‹æ‹‰æ¡†é€‰é¡¹
     */
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/IMdcEquipmentMagnificationService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
package org.jeecg.modules.mdc.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.mdc.entity.MdcEquipmentMagnification;
import org.jeecg.modules.mdc.vo.MdcDeviceCalendarQueryVo;
import org.jeecg.modules.mdc.vo.MdcDeviceCalendarVo;
import org.jeecg.modules.mdc.vo.MdcEquipmentMagnificationVo;
import javax.servlet.http.HttpServletRequest;
public interface IMdcEquipmentMagnificationService extends IService<MdcEquipmentMagnification> {
    /**
     * ç»Ÿè®¡ æŠ¥è¡¨æ•°æ®
     */
    void savesEquipmentMagnifications();
    IPage<MdcEquipmentMagnification> pageList(String userId, MdcEquipmentMagnificationVo magnificationVo, Integer pageNo, Integer pageSize, HttpServletRequest req);
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/IMdcEquipmentWorkLineService.java
@@ -15,4 +15,7 @@
     * æŸ¥æ‰¾æŒ‡å®šæ—¥æœŸçš„æ•°æ®
     */
    List<EquipmentMachingDto> getWorkLineList(MdcWorkChartVo mdcWorkChartVo);
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcDriveTypeParamConfigServiceImpl.java
@@ -43,6 +43,18 @@
        return this.baseMapper.selectBatchIds(Arrays.asList(codeTypeId.split(",")));
    }
    @Override
    public MdcDriveTypeParamConfig getEnglishName(String chineseName,String driveType ) {
        List<MdcDriveTypeParamConfig> list = lambdaQuery()
                .eq(MdcDriveTypeParamConfig::getChineseName, chineseName).
                eq(MdcDriveTypeParamConfig::getShowFlag, CommonConstant.YN_Y).
                eq(MdcDriveTypeParamConfig::getControlSystemType,driveType).orderByAsc(MdcDriveTypeParamConfig::getSortNo).list();
        if (list.isEmpty() || list.size() > 1) {
            return null;
        }
        return list.get(0);
    }
    /**
     * èŽ·å–æŽ§åˆ¶ç³»ç»Ÿç±»åž‹ä¸‹æ‹‰æ¡†é€‰é¡¹
     */
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentMagnificationServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,204 @@
package org.jeecg.modules.mdc.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.modules.mdc.entity.*;
import org.jeecg.modules.mdc.mapper.MdcEquipmentMagnificationMapper;
import org.jeecg.modules.mdc.service.*;
import org.jeecg.modules.mdc.util.DateUtils;
import org.jeecg.modules.mdc.vo.MdcDeviceCalendarVo;
import org.jeecg.modules.mdc.vo.MdcEquipmentMagnificationVo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.*;
@Service
public class MdcEquipmentMagnificationServiceImpl extends ServiceImpl<MdcEquipmentMagnificationMapper, MdcEquipmentMagnification> implements IMdcEquipmentMagnificationService {
    @Resource
    private IEquipmentService equipmentService;
    @Resource
    private IMdcDriveTypeParamConfigService mdcDriveTypeParamConfigService;
    @Resource
    private IMdcEquipmentRunningSectionService mdcEquipmentRunningSectionService;
    @Resource
    private IMdcEquipmentService mdcEquipmentService;
    private static String spindlebeilv = "主轴倍率";
    private static String feedbeilv = "进给倍率";
    @Override
    public void savesEquipmentMagnifications() {
        List<MdcEquipmentMagnification> magnifications = new ArrayList<>();
        //主轴倍率
        //进给倍率
       /* Equipment e = equipmentService.getById("12345678");
        List<Equipment> equipmentList = new ArrayList<>();
        equipmentList.add(e);*/
        List<Equipment> equipmentList = equipmentService.list();
        Map<String,List<MdcDriveTypeParamConfig>> map = new HashMap<>();
        Date now =  DateUtils.plusTime(DateUtils.getNow(), -1);
        for (Equipment equipment : equipmentList) {
            Date start = null;
            //查询最后一条记录
            MdcEquipmentMagnification mdcMagnification = super.baseMapper.getMaxStaticsData(equipment.getEquipmentid());
            if (mdcMagnification == null) {
                start = DateUtils.plusTime(DateUtils.getNow(), -5);
            } else {
                if (now.toString().equals(start.toString())) {
                    continue;
                }
                start = DateUtils.toDate(mdcMagnification.getTheDate(),DateUtils.STR_DATE );
            }
            List<String> dates = DateUtils.getDatesStringList(start,now);
            List<MdcDriveTypeParamConfig> list = new ArrayList<>();
            if (!map.containsKey(equipment.getDrivetype())) {
                MdcDriveTypeParamConfig config1 = mdcDriveTypeParamConfigService.getEnglishName(spindlebeilv,equipment.getDrivetype());
                MdcDriveTypeParamConfig config2 = mdcDriveTypeParamConfigService.getEnglishName(feedbeilv,equipment.getDrivetype());
                if (config1 != null) {
                    list.add(config1);
                }
                if (config2 != null ) {
                    list.add(config2);
                }
                if (list == null || list.size() == 0) {
                    for (String date : dates) {
                        MdcEquipmentMagnification info = new MdcEquipmentMagnification();
                        info.setEquipmentId(equipment.getEquipmentid());
                        info.setTheDate(date);
                        info.setSpindlebeilv(new BigDecimal(0));
                        info.setFeedbeilv(new BigDecimal(0));
                        magnifications.add(info);
                    }
                    continue;
                } else {
                    map.put(equipment.getDrivetype(), list);
                }
            } else {
                list = map.get(equipment.getDrivetype());
            }
            //循环时间
            //查询字段 MAP ä¿å­˜
            for (String date : dates) {
                MdcEquipmentMagnification magnification = selectMagnification(equipment.getEquipmentid(),date,equipment.getDrivetype(), list);
                magnifications.add(magnification);
            }
        }
        if (!magnifications.isEmpty() && magnifications.size() > 0) {
            saveBatch(magnifications);
        }
        //数据保存
        return;
    }
    @Override
    public IPage<MdcEquipmentMagnification> pageList(String userId, MdcEquipmentMagnificationVo magnificationVo, Integer pageNo, Integer pageSize, HttpServletRequest req) {
        IPage<MdcEquipmentMagnification> pageData = new Page<>(pageNo, pageSize);
        List<String> equipmentIds = new ArrayList<>();
        if (StringUtils.isNotEmpty(magnificationVo.getParentId()) && StringUtils.isEmpty(magnificationVo.getEquipmentId())) {
            if ("2".equals(magnificationVo.getTypeTree())) {
                // éƒ¨é—¨å±‚级
                equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, magnificationVo.getParentId());
            } else {
                // äº§çº¿å±‚级
                equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, magnificationVo.getParentId());
            }
        } else if (StringUtils.isNotEmpty(magnificationVo.getEquipmentId())) {
            // å•台设备信息
            magnificationVo.setEquipmentIdList(Collections.singletonList(magnificationVo.getEquipmentId()));
        } else {
            // æŸ¥è¯¢ç”¨æˆ·æ‹¥æœ‰çš„æ‰€æœ‰è®¾å¤‡ä¿¡æ¯
            if ("2".equals(magnificationVo.getTypeTree())) {
                //部门层级
                equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, null);
            } else {
                //产线层级
                equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, null);
            }
        }
        if (magnificationVo.getEquipmentIdList() == null || magnificationVo.getEquipmentIdList().isEmpty()) {
            magnificationVo.setEquipmentIdList(equipmentIds);
        }
        if (magnificationVo.getEquipmentIdList() == null || magnificationVo.getEquipmentIdList().isEmpty()) {
            return null;
        }
        return this.baseMapper.pageList(pageData, magnificationVo);
    }
    private MdcEquipmentMagnification selectMagnification(String equipmentId,String date,String drivetype,List<MdcDriveTypeParamConfig> list) {
        Date startTime = DateUtils.plusTime(DateUtils.getShortDate(date), 0);
        Date endTime = DateUtils.plusTime(DateUtils.getShortDate(date), 1);
        List<MdcEquipmentRunningSection> sectionList = mdcEquipmentRunningSectionService.selectRunningData(equipmentId,startTime,endTime);
        if (sectionList.isEmpty() || sectionList.size() < 1) {
            MdcEquipmentMagnification info = new MdcEquipmentMagnification();
            info.setEquipmentId(equipmentId);
            info.setTheDate(date);
            info.setSpindlebeilv(new BigDecimal(0));
            info.setFeedbeilv(new BigDecimal(0));
            return info;
        } else {
            //需要时间截取
            if (sectionList.get(0).getStartTime().before(startTime)) {
                sectionList.get(0).setStartTime(startTime);
            }
            if (sectionList.size() > 1) {
                if (sectionList.get(sectionList.size() - 1).getEndTime().after(endTime)) {
                    sectionList.get(sectionList.size() - 1).setEndTime(endTime);
                }
            } else {
                if (sectionList.get(0).getEndTime().after(endTime)) {
                    sectionList.get(0).setEndTime(endTime);
                }
            }
            MdcEquipmentMagnification info = new MdcEquipmentMagnification();
            for (MdcDriveTypeParamConfig config : list) {
                info.setTheDate(date);
                info.setEquipmentId(equipmentId);
                BigDecimal bigDecimal = new BigDecimal(0);
                int numberSizeList = 0;
                for (MdcEquipmentRunningSection section : sectionList) {
                    List<Object> objects = super.baseMapper.getEquipmentSequenceNumber(drivetype+ "_" + equipmentId,section.getStartTime(),
                            section.getEndTime(),config.getEnglishName());
                    BigDecimal s = objNumberList(objects);
                    bigDecimal = bigDecimal.add(s);
                    numberSizeList += objects.size();
                }
                if (config.getChineseName().equals(spindlebeilv)) {
                    info.setSpindlebeilvValue(bigDecimal);
                    info.setSpindlebeilvNumber(numberSizeList);
                    if (bigDecimal.compareTo(BigDecimal.ZERO) >0  && new BigDecimal(numberSizeList).compareTo(BigDecimal.ZERO) > 0) {
                        info.setSpindlebeilv(bigDecimal.divide(new BigDecimal(numberSizeList)));
                    }
                }
                if (config.getChineseName().equals(feedbeilv)) {
                    info.setFeedbeilvValue(bigDecimal);
                    info.setFeedbeilvNumber(numberSizeList);
                    if (bigDecimal.compareTo(BigDecimal.ZERO) >0  && new BigDecimal(numberSizeList).compareTo(BigDecimal.ZERO) > 0) {
                        info.setFeedbeilv(bigDecimal.divide(new BigDecimal(numberSizeList)));
                    }
                }
            }
            return info;
        }
    }
    private BigDecimal objNumberList(List<Object> objects) {
        if (objects == null || objects.size() == 0) {
            return new BigDecimal(0);
        } else {
            BigDecimal bigDecimal = new BigDecimal(0);
            for (Object object : objects) {
                if (object != null && object.toString().length() > 0) {
                    bigDecimal = bigDecimal.add(new BigDecimal(object.toString()));
                }
            }
            return bigDecimal;
        }
    }
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/vo/MdcEquipmentMagnificationVo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
package org.jeecg.modules.mdc.vo;
import lombok.Data;
import java.util.List;
@Data
public class MdcEquipmentMagnificationVo {
    /**
     * å¼€å§‹æ—¶é—´  ->  2025-01-01
     */
    private String startTime;
    /**
     * ç»“束时间  ->  2025-01-01
     */
    private String endTime;
    /**
     * æ ‘类型    ->  1:车间层级   2:部门层级
     */
    private String typeTree;
    /**
     * å±‚级ID
     */
    private String parentId;
    /**
     * è®¾å¤‡Id
     */
    private String equipmentId;
    /**
     * è®¾å¤‡ids
     */
    private List<String> equipmentIdList;
}