lius
2023-07-17 c9d0d76139630252573cdea63fd741d04fad6571
标准时间加工管理
已添加6个文件
已修改4个文件
525 ■■■■■ 文件已修改
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcNoplanCloseController.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcStandardProcessDurationController.java 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcStandardProcessDuration.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcTorqueConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/MdcStandardProcessDurationMapper.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcNoplanCloseMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcStandardProcessDurationMapper.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/IMdcStandardProcessDurationService.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcNoplanCloseServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcStandardProcessDurationServiceImpl.java 154 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcNoplanCloseController.java
@@ -6,20 +6,17 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.aspect.annotation.AutoLog;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.mdc.entity.MdcEquipmentRepair;
import org.jeecg.modules.mdc.entity.MdcNoplanClose;
import org.jeecg.modules.mdc.service.IMdcNoplanCloseService;
@@ -167,7 +164,7 @@
    public ModelAndView exportXls(HttpServletRequest request, MdcNoplanClose mdcNoplanClose) {
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId = user.getId();
        return this.mdcNoplanCloseService.exportXls(userId, mdcNoplanClose);
        return mdcNoplanCloseService.exportXls(userId, mdcNoplanClose);
    }
    /**
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcStandardProcessDurationController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,164 @@
package org.jeecg.modules.mdc.controller;
import java.util.Arrays;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.aspect.annotation.AutoLog;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.mdc.entity.MdcNoplanClose;
import org.jeecg.modules.mdc.entity.MdcStandardProcessDuration;
import org.jeecg.modules.mdc.service.IMdcStandardProcessDurationService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
 * @Description: æ ‡å‡†åŠ å·¥æ—¶é—´è¡¨
 * @Author: Lius
 * @Date: 2023-07-17
 * @Version: V1.0
 */
@Slf4j
@Api(tags = "标准加工时间表")
@RestController
@RequestMapping("/mdc/mdcStandardProcessDuration")
public class MdcStandardProcessDurationController extends JeecgController<MdcStandardProcessDuration, IMdcStandardProcessDurationService> {
    @Resource
    private IMdcStandardProcessDurationService mdcStandardProcessDurationService;
    /**
     * åˆ†é¡µåˆ—表查询
     *
     * @param mdcStandardProcessDuration
     * @param pageNo
     * @param pageSize
     * @param req
     * @return
     */
    @AutoLog(value = "标准加工时间表-分页列表查询")
    @ApiOperation(value = "标准加工时间表-分页列表查询", notes = "标准加工时间表-分页列表查询")
    @GetMapping(value = "/list")
    public Result<?> queryPageList(MdcStandardProcessDuration mdcStandardProcessDuration,
                                   @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();
        Page<MdcStandardProcessDuration> page = new Page<MdcStandardProcessDuration>(pageNo, pageSize);
        IPage<MdcStandardProcessDuration> pageList = mdcStandardProcessDurationService.pageList(userId, page, mdcStandardProcessDuration, req);
        return Result.OK(pageList);
    }
    /**
     * æ·»åŠ 
     *
     * @param mdcStandardProcessDuration
     * @return
     */
    @AutoLog(value = "标准加工时间表-添加")
    @ApiOperation(value = "标准加工时间表-添加", notes = "标准加工时间表-添加")
    @PostMapping(value = "/add")
    public Result<?> add(@RequestBody MdcStandardProcessDuration mdcStandardProcessDuration) {
        mdcStandardProcessDurationService.save(mdcStandardProcessDuration);
        return Result.OK("添加成功!");
    }
    /**
     * ç¼–辑
     *
     * @param mdcStandardProcessDuration
     * @return
     */
    @AutoLog(value = "标准加工时间表-编辑")
    @ApiOperation(value = "标准加工时间表-编辑", notes = "标准加工时间表-编辑")
    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
    public Result<?> edit(@RequestBody MdcStandardProcessDuration mdcStandardProcessDuration) {
        mdcStandardProcessDurationService.updateById(mdcStandardProcessDuration);
        return Result.OK("编辑成功!");
    }
    /**
     * é€šè¿‡id删除
     *
     * @param id
     * @return
     */
    @AutoLog(value = "标准加工时间表-通过id删除")
    @ApiOperation(value = "标准加工时间表-通过id删除", notes = "标准加工时间表-通过id删除")
    @DeleteMapping(value = "/delete")
    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
        mdcStandardProcessDurationService.removeById(id);
        return Result.OK("删除成功!");
    }
    /**
     * æ‰¹é‡åˆ é™¤
     *
     * @param ids
     * @return
     */
    @AutoLog(value = "标准加工时间表-批量删除")
    @ApiOperation(value = "标准加工时间表-批量删除", notes = "标准加工时间表-批量删除")
    @DeleteMapping(value = "/deleteBatch")
    public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
        this.mdcStandardProcessDurationService.removeByIds(Arrays.asList(ids.split(",")));
        return Result.OK("批量删除成功!");
    }
    /**
     * é€šè¿‡id查询
     *
     * @param id
     * @return
     */
    @AutoLog(value = "标准加工时间表-通过id查询")
    @ApiOperation(value = "标准加工时间表-通过id查询", notes = "标准加工时间表-通过id查询")
    @GetMapping(value = "/queryById")
    public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
        MdcStandardProcessDuration mdcStandardProcessDuration = mdcStandardProcessDurationService.getById(id);
        return Result.OK(mdcStandardProcessDuration);
    }
    /**
     * å¯¼å‡ºexcel
     *
     * @param request
     * @param mdcStandardProcessDuration
     */
    @RequestMapping(value = "/exportXls")
    public ModelAndView exportXls(HttpServletRequest request, MdcStandardProcessDuration mdcStandardProcessDuration) {
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId = user.getId();
        return mdcStandardProcessDurationService.exportXls(userId, mdcStandardProcessDuration);
    }
    /**
     * é€šè¿‡excel导入数据
     *
     * @param request
     * @param response
     * @return
     */
    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
        return super.importExcel(request, response, MdcStandardProcessDuration.class);
    }
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcStandardProcessDuration.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package org.jeecg.modules.mdc.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.io.Serializable;
import java.util.List;
/**
 * @Description: æ ‡å‡†åŠ å·¥æ—¶é—´è¡¨
 * @Author: Lius
 * @Date: 2023-07-17
 * @Version: V1.0
 */
@Data
@TableName("mdc_standard_process_duration")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "mdc_standard_process_duration对象", description = "标准加工时间表")
public class MdcStandardProcessDuration extends JeecgEntity implements Serializable {
    private static final long serialVersionUID = -4120597972937450875L;
    /**
     * è®¾å¤‡ç¼–号
     */
    @Excel(name = "设备编号", width = 15)
    @ApiModelProperty(value = "设备编号")
    private String equipmentId;
    /**
     * è®¾å¤‡åç§°
     */
    @Excel(name = "设备名称", width = 15)
    @ApiModelProperty(value = "设备名称")
    private String equipmentName;
    /**
     * é›¶ä»¶å·
     */
    @Excel(name = "零件号", width = 15)
    @ApiModelProperty(value = "零件号")
    private String partsCode;
    /**
     * æ‰¹æ¬¡å·
     */
    @Excel(name = "批次号", width = 15)
    @ApiModelProperty(value = "批次号")
    private String batchCode;
    /**
     * ç¨‹åºå·
     */
    @Excel(name = "程序号", width = 15)
    @ApiModelProperty(value = "程序号")
    private String sequenceNumber;
    /**
     * æ—¶é•¿
     */
    @Excel(name = "时长", width = 15)
    @ApiModelProperty(value = "时长")
    private Integer duration;
    /**
     * å¤‡æ³¨
     */
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * å‰å°ä¼ å…¥ åˆ¤æ–­æ¯ä¸ªid
     */
    @TableField(exist = false)
    private String parentId;
    /**
     * å‰å°ä¼ å…¥ è½¦é—´å±‚级:1 éƒ¨é—¨å±‚级:2
     */
    @TableField(exist = false)
    private String typeTree;
    /**
     * éƒ¨é—¨parentId å…³è”子集id
     */
    @TableField(exist = false)
    private List<String> mdcSectionIds;
    @TableField(exist = false)
    private String equipmentIds;
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/entity/MdcTorqueConfig.java
@@ -29,7 +29,7 @@
@TableName("mdc_torque_config")
@ApiModel(value = "mdc_torque_config对象", description = "扭矩配置管理")
public class MdcTorqueConfig implements Serializable {
    private static final long serialVersionUID = 1L;
    private static final long serialVersionUID = -8646261637017242975L;
    /**
     * ä¸»é”®
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/MdcStandardProcessDurationMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
package org.jeecg.modules.mdc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.mdc.entity.MdcStandardProcessDuration;
/**
 * @Description: æ ‡å‡†åŠ å·¥æ—¶é—´è¡¨
 * @Author: Lius
 * @Date: 2023-07-17
 * @Version: V1.0
 */
public interface MdcStandardProcessDurationMapper extends BaseMapper<MdcStandardProcessDuration> {
    /**
     * åˆ†é¡µæŸ¥è¯¢
     *
     * @param page
     * @param mdcStandardProcessDuration
     * @return
     */
    IPage<MdcStandardProcessDuration> pageList(Page<MdcStandardProcessDuration> page, @Param("mdcStandardProcessDuration") MdcStandardProcessDuration mdcStandardProcessDuration);
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcNoplanCloseMapper.xml
@@ -27,7 +27,7 @@
                    #{ id }
                </foreach>
            </if>
            ORDER BY start_time ASC
        </where>
        ORDER BY start_time ASC
    </select>
</mapper>
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcStandardProcessDurationMapper.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.MdcStandardProcessDurationMapper">
    <!--分页查询-->
    <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcStandardProcessDuration">
        SELECT * FROM mdc_standard_process_duration
        <where>
            <if test="mdcStandardProcessDuration.equipmentId != null and mdcStandardProcessDuration.equipmentId != ''">
                AND equipment_id LIKE CONCAT(CONCAT('%',#{ mdcStandardProcessDuration.equipmentId }),'%')
            </if>
            <if test="mdcStandardProcessDuration.equipmentName != null and mdcStandardProcessDuration.equipmentName != ''">
                AND equipment_name LIKE CONCAT(CONCAT('%',#{ mdcStandardProcessDuration.equipmentName }),'%')
            </if>
            <if test="mdcStandardProcessDuration.partsCode != null and mdcStandardProcessDuration.partsCode != ''">
                AND parts_code LIKE CONCAT(CONCAT('%',#{ mdcStandardProcessDuration.partsCode }),'%')
            </if>
            <if test="mdcStandardProcessDuration.batchCode != null and mdcStandardProcessDuration.batchCode != ''">
                AND batch_code LIKE CONCAT(CONCAT('%',#{ mdcStandardProcessDuration.batchCode }),'%')
            </if>
            <if test="mdcStandardProcessDuration.sequenceNumber != null and mdcStandardProcessDuration.sequenceNumber != ''">
                AND sequence_number LIKE CONCAT(CONCAT('%',#{ mdcStandardProcessDuration.sequenceNumber }),'%')
            </if>
            <if test="mdcStandardProcessDuration.mdcSectionIds != null and mdcStandardProcessDuration.mdcSectionIds.size() > 0 ">
                AND equipment_id IN
                <foreach collection="mdcStandardProcessDuration.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
                    #{ id }
                </foreach>
            </if>
        </where>
        ORDER BY equipment_name ASC
    </select>
</mapper>
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/IMdcStandardProcessDurationService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
package org.jeecg.modules.mdc.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.mdc.entity.MdcStandardProcessDuration;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
/**
 * @Description: æ ‡å‡†åŠ å·¥æ—¶é—´è¡¨
 * @Author: Lius
 * @Date: 2023-07-17
 * @Version: V1.0
 */
public interface IMdcStandardProcessDurationService extends IService<MdcStandardProcessDuration> {
    /**
     * åˆ†é¡µæŸ¥è¯¢
     *
     * @param userId
     * @param page
     * @param mdcStandardProcessDuration
     * @param req
     * @return
     */
    IPage<MdcStandardProcessDuration> pageList(String userId, Page<MdcStandardProcessDuration> page, MdcStandardProcessDuration mdcStandardProcessDuration, HttpServletRequest req);
    /**
     * å¯¼å‡º
     *
     * @param userId
     * @param mdcStandardProcessDuration
     * @return
     */
    ModelAndView exportXls(String userId, MdcStandardProcessDuration mdcStandardProcessDuration);
}
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcNoplanCloseServiceImpl.java
@@ -294,7 +294,7 @@
            queryWrapper.like(MdcNoplanClose::getEquipmentId, mdcNoplanClose.getEquipmentId());
        }
        if (StringUtils.isNotEmpty(mdcNoplanClose.getEquipmentName())) {
            queryWrapper.like(MdcNoplanClose::getEquipmentId, mdcNoplanClose.getEquipmentId());
            queryWrapper.like(MdcNoplanClose::getEquipmentName, mdcNoplanClose.getEquipmentName());
        }
        if (mdcNoplanClose.getEndTime() != null) {
            queryWrapper.le(MdcNoplanClose::getStartTime, mdcNoplanClose.getEndTime());
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcStandardProcessDurationServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,154 @@
package org.jeecg.modules.mdc.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.lang.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.mdc.entity.MdcNoplanClose;
import org.jeecg.modules.mdc.entity.MdcStandardProcessDuration;
import org.jeecg.modules.mdc.mapper.MdcStandardProcessDurationMapper;
import org.jeecg.modules.mdc.service.IMdcEquipmentService;
import org.jeecg.modules.mdc.service.IMdcStandardProcessDurationService;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
 * @Description: æ ‡å‡†åŠ å·¥æ—¶é—´è¡¨
 * @Author: Lius
 * @Date: 2023-07-17
 * @Version: V1.0
 */
@Service
public class MdcStandardProcessDurationServiceImpl extends ServiceImpl<MdcStandardProcessDurationMapper, MdcStandardProcessDuration> implements IMdcStandardProcessDurationService {
    @Resource
    private IMdcEquipmentService mdcEquipmentService;
    /**
     * åˆ†é¡µæŸ¥è¯¢
     *
     * @param userId
     * @param page
     * @param mdcStandardProcessDuration
     * @param req
     * @return
     */
    @Override
    public IPage<MdcStandardProcessDuration> pageList(String userId, Page<MdcStandardProcessDuration> page, MdcStandardProcessDuration mdcStandardProcessDuration, HttpServletRequest req) {
        List<String> equipmentIds = new ArrayList<>();
        if (StringUtils.isNotEmpty(mdcStandardProcessDuration.getParentId()) && StringUtils.isEmpty(mdcStandardProcessDuration.getEquipmentId())) {
            if ("2".equals(mdcStandardProcessDuration.getTypeTree())) {
                //部门层级
                equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, mdcStandardProcessDuration.getParentId());
            } else {
                //产线层级
                equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, mdcStandardProcessDuration.getParentId());
            }
        } else if (StringUtils.isNotEmpty(mdcStandardProcessDuration.getEquipmentId())) {
            //单台设备信息
            mdcStandardProcessDuration.setMdcSectionIds(Collections.singletonList(mdcStandardProcessDuration.getEquipmentId()));
        } else {
            //查询用户拥有的所有设备信息
            if ("2".equals(mdcStandardProcessDuration.getTypeTree())) {
                //部门层级
                equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, null);
            } else {
                //产线层级
                equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, null);
            }
        }
        if (mdcStandardProcessDuration.getMdcSectionIds() == null || mdcStandardProcessDuration.getMdcSectionIds().isEmpty()) {
            mdcStandardProcessDuration.setMdcSectionIds(equipmentIds);
        }
        if (mdcStandardProcessDuration.getMdcSectionIds() == null || mdcStandardProcessDuration.getMdcSectionIds().isEmpty()) {
            return null;
        }
        return this.baseMapper.pageList(page, mdcStandardProcessDuration);
    }
    /**
     * å¯¼å‡º
     *
     * @param userId
     * @param mdcStandardProcessDuration
     * @return
     */
    @Override
    public ModelAndView exportXls(String userId, MdcStandardProcessDuration mdcStandardProcessDuration) {
        LambdaQueryWrapper<MdcStandardProcessDuration> queryWrapper = new LambdaQueryWrapper<>();
        List<String> equipmentIds = new ArrayList<>();
        if (StringUtils.isNotEmpty(mdcStandardProcessDuration.getParentId()) && StringUtils.isEmpty(mdcStandardProcessDuration.getEquipmentId())) {
            if ("2".equals(mdcStandardProcessDuration.getTypeTree())) {
                //部门层级
                equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, mdcStandardProcessDuration.getParentId());
            } else {
                //产线层级
                equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, mdcStandardProcessDuration.getParentId());
            }
        } else if (StringUtils.isNotEmpty(mdcStandardProcessDuration.getEquipmentId())) {
            //单台设备信息
            mdcStandardProcessDuration.setMdcSectionIds(Collections.singletonList(mdcStandardProcessDuration.getEquipmentId()));
        } else {
            //查询用户所拥有的所有设备信息
            if ("2".equals(mdcStandardProcessDuration.getTypeTree())) {
                //部门层级
                equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, null);
            } else {
                equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, null);
            }
        }
        if (mdcStandardProcessDuration.getMdcSectionIds() == null || mdcStandardProcessDuration.getMdcSectionIds().isEmpty()) {
            mdcStandardProcessDuration.setMdcSectionIds(equipmentIds);
        }
        if (mdcStandardProcessDuration.getMdcSectionIds() == null || mdcStandardProcessDuration.getMdcSectionIds().isEmpty()) {
            return null;
        } else {
            queryWrapper.in(MdcStandardProcessDuration::getEquipmentId, mdcStandardProcessDuration.getMdcSectionIds());
        }
        if (StringUtils.isNotEmpty(mdcStandardProcessDuration.getEquipmentId())) {
            queryWrapper.like(MdcStandardProcessDuration::getEquipmentId, mdcStandardProcessDuration.getEquipmentId());
        }
        if (StringUtils.isNotEmpty(mdcStandardProcessDuration.getEquipmentName())) {
            queryWrapper.like(MdcStandardProcessDuration::getEquipmentName, mdcStandardProcessDuration.getEquipmentName());
        }
        if (StringUtils.isNotEmpty(mdcStandardProcessDuration.getPartsCode())) {
            queryWrapper.like(MdcStandardProcessDuration::getPartsCode, mdcStandardProcessDuration.getPartsCode());
        }
        if (StringUtils.isNotEmpty(mdcStandardProcessDuration.getBatchCode())) {
            queryWrapper.like(MdcStandardProcessDuration::getBatchCode, mdcStandardProcessDuration.getBatchCode());
        }
        if (StringUtils.isNotEmpty(mdcStandardProcessDuration.getSequenceNumber())) {
            queryWrapper.like(MdcStandardProcessDuration::getSequenceNumber, mdcStandardProcessDuration.getSequenceNumber());
        }
        queryWrapper.orderByAsc(MdcStandardProcessDuration::getEquipmentName);
        // Step.2 AutoPoi å¯¼å‡ºExcel
        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
        List<MdcStandardProcessDuration> mdcStandardProcessDurations = this.baseMapper.selectList(queryWrapper);
        // å¯¼å‡ºæ–‡ä»¶åç§°
        mv.addObject(NormalExcelConstants.FILE_NAME, "标准加工时间列表");
        mv.addObject(NormalExcelConstants.CLASS, MdcNoplanClose.class);
        //获取当前登录用户
        //update-begin---author:wangshuai ---date:20211227  for:[JTC-116]导出人写死了------------
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("标准加工时间列表数据", "导出人:"+user.getRealname(), "导出信息"));
        //update-end---author:wangshuai ---date:20211227  for:[JTC-116]导出人写死了------------
        mv.addObject(NormalExcelConstants.DATA_LIST, mdcStandardProcessDurations);
        return mv;
    }
}