| | |
| | | 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.dto.MdcProcessQuantityDto; |
| | | import org.jeecg.modules.mdc.entity.MdcProcessQuantity; |
| | | import org.jeecg.modules.mdc.entity.MdcStandardProcessDuration; |
| | | import org.jeecg.modules.mdc.service.IMdcProcessQuantityService; |
| | | |
| | | |
| | |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<MdcProcessQuantity> queryWrapper = QueryGenerator.initQueryWrapper(mdcProcessQuantity, req.getParameterMap()); |
| | | Page<MdcProcessQuantity> page = new Page<MdcProcessQuantity>(pageNo, pageSize); |
| | | IPage<MdcProcessQuantity> pageList = mdcProcessQuantityService.page(page, queryWrapper); |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | Page<MdcProcessQuantityDto> page = new Page<MdcProcessQuantityDto>(pageNo, pageSize); |
| | | IPage<MdcProcessQuantityDto> pageList = mdcProcessQuantityService.pageList(userId, page, mdcProcessQuantity, req); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "å å·¥æ°é表-éè¿idæ¥è¯¢", notes = "å å·¥æ°é表-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |
| | | MdcProcessQuantity mdcProcessQuantity = mdcProcessQuantityService.getById(id); |
| | | return Result.OK(mdcProcessQuantity); |
| | | MdcProcessQuantityDto dto = mdcProcessQuantityService.findById(id); |
| | | return Result.OK(dto); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, MdcProcessQuantity mdcProcessQuantity) { |
| | | return super.exportXls(request, mdcProcessQuantity, MdcProcessQuantity.class, "å å·¥æ°é表"); |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | return mdcProcessQuantityService.exportXls(userId, mdcProcessQuantity); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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.core.toolkit.StringUtils; |
| | | 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; |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.mdc.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author: LiuS |
| | | * @create: 2023-07-17 15:08 |
| | | */ |
| | | @Data |
| | | public class MdcProcessQuantityDto { |
| | | private String id; |
| | | @Excel(name = "设å¤ç¼å·", width = 15) |
| | | private String equipmentId; |
| | | @Excel(name = "设å¤åç§°", width = 15) |
| | | private String equipmentName; |
| | | @Excel(name = "é¶ä»¶å·", width = 15) |
| | | private String partsCode; |
| | | @Excel(name = "æ¹æ¬¡å·", width = 15) |
| | | private String batchCode; |
| | | @Excel(name = "ç¨åºå·", width = 15) |
| | | private String sequenceNumber; |
| | | private String standardId; |
| | | @Excel(name = "æ¥æ", width = 15) |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date efficientDate; |
| | | @Excel(name = "å å·¥æ°é", width = 15) |
| | | private Integer processQuantity; |
| | | @Excel(name = "æ¶é¿ï¼åéï¼", width = 15) |
| | | private Integer duration; |
| | | @Excel(name = "夿³¨", width = 15) |
| | | private String remark; |
| | | private String createBy; |
| | | private Date createTime; |
| | | private String updateBy; |
| | | private Date updateTime; |
| | | } |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | @TableField(exist = false) |
| | | private String equipmentId; |
| | | |
| | | @TableField(exist = false) |
| | | private String startTime; |
| | | |
| | | @TableField(exist = false) |
| | | private String endTime; |
| | | |
| | | /** |
| | | * åå°ä¼ å
¥ 夿æ¯ä¸ª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; |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | 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.dto.MdcProcessQuantityDto; |
| | | import org.jeecg.modules.mdc.entity.MdcProcessQuantity; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: å å·¥æ°é表 |
| | |
| | | */ |
| | | public interface MdcProcessQuantityMapper extends BaseMapper<MdcProcessQuantity> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param page |
| | | * @param mdcProcessQuantity |
| | | * @return |
| | | */ |
| | | IPage<MdcProcessQuantityDto> pageList(Page<MdcProcessQuantityDto> page, @Param("mdcProcessQuantity") MdcProcessQuantity mdcProcessQuantity); |
| | | |
| | | /** |
| | | * å¯¼åºæ°æ® |
| | | * |
| | | * @param mdcProcessQuantity |
| | | * @return |
| | | */ |
| | | List<MdcProcessQuantityDto> list(@Param("mdcProcessQuantity") MdcProcessQuantity mdcProcessQuantity); |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | MdcProcessQuantityDto findById(@Param("id") String id); |
| | | |
| | | } |
| | |
| | | <!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.MdcProcessQuantityMapper"> |
| | | |
| | | <!--å页æ¥è¯¢--> |
| | | <select id="pageList" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto"> |
| | | SELECT |
| | | mpq.id id, |
| | | mspd.equipment_id equipmentId, |
| | | mspd.equipment_name equipmentName, |
| | | mspd.parts_code partsCode, |
| | | mspd.batch_code batchCode, |
| | | mspd.sequence_number sequenceNumber, |
| | | mpq.standard_id standardId, |
| | | mpq.efficient_date efficientDate, |
| | | mpq.process_quantity processQuantity, |
| | | mspd.duration duration, |
| | | mpq.remark remark, |
| | | mpq.create_by createBy, |
| | | mpq.create_time createTime, |
| | | mpq.update_by updateBy, |
| | | mpq.update_time updateTime |
| | | FROM mdc_process_quantity mpq LEFT JOIN mdc_standard_process_duration mspd ON mpq.standard_id = mspd.id |
| | | <where> |
| | | <if test="mdcProcessQuantity.equipmentId != null and mdcProcessQuantity.equipmentId != ''"> |
| | | AND mspd.equipment_id LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentId }),'%') |
| | | </if> |
| | | <if test="mdcProcessQuantity.equipmentName != null and mdcProcessQuantity.equipmentName != ''"> |
| | | AND mspd.equipment_name LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentName }),'%') |
| | | </if> |
| | | <if test="mdcProcessQuantity.partsCode != null and mdcProcessQuantity.partsCode != ''"> |
| | | AND mspd.parts_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.partsCode }),'%') |
| | | </if> |
| | | <if test="mdcProcessQuantity.batchCode != null and mdcProcessQuantity.batchCode != ''"> |
| | | AND mspd.batch_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.batchCode }),'%') |
| | | </if> |
| | | <if test="mdcProcessQuantity.sequenceNumber != null and mdcProcessQuantity.sequenceNumber != ''"> |
| | | AND mspd.sequence_number LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.sequenceNumber }),'%') |
| | | </if> |
| | | <if test="mdcProcessQuantity.startTime != null and mdcProcessQuantity.endTime != null"> |
| | | AND mpq.efficient_date BETWEEN #{ mdcProcessQuantity.startTime } AND #{ mdcProcessQuantity.endTime } |
| | | </if> |
| | | <if test="mdcProcessQuantity.processQuantity != null and mdcProcessQuantity.processQuantity != ''"> |
| | | AND mpq.process_quantity = #{ mdcProcessQuantity.processQuantity } |
| | | </if> |
| | | <if test="mdcProcessQuantity.mdcSectionIds != null and mdcProcessQuantity.mdcSectionIds.size() > 0 "> |
| | | AND mspd.equipment_id IN |
| | | <foreach collection="mdcProcessQuantity.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY mspd.equipment_name ASC, mpq.efficient_date DESC |
| | | </select> |
| | | |
| | | <!--å¯¼åºæ°æ®æ¥è¯¢--> |
| | | <select id="list" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto"> |
| | | SELECT |
| | | mpq.id id, |
| | | mspd.equipment_id equipmentId, |
| | | mspd.equipment_name equipmentName, |
| | | mspd.parts_code partsCode, |
| | | mspd.batch_code batchCode, |
| | | mspd.sequence_number sequenceNumber, |
| | | mpq.standard_id standardId, |
| | | mpq.efficient_date efficientDate, |
| | | mpq.process_quantity processQuantity, |
| | | mspd.duration duration, |
| | | mpq.remark remark, |
| | | mpq.create_by createBy, |
| | | mpq.create_time createTime, |
| | | mpq.update_by updateBy, |
| | | mpq.update_time updateTime |
| | | FROM mdc_process_quantity mpq LEFT JOIN mdc_standard_process_duration mspd ON mpq.standard_id = mspd.id |
| | | <where> |
| | | <if test="mdcProcessQuantity.equipmentId != null and mdcProcessQuantity.equipmentId != ''"> |
| | | AND mspd.equipment_id LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentId }),'%') |
| | | </if> |
| | | <if test="mdcProcessQuantity.equipmentName != null and mdcProcessQuantity.equipmentName != ''"> |
| | | AND mspd.equipment_name LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentName }),'%') |
| | | </if> |
| | | <if test="mdcProcessQuantity.partsCode != null and mdcProcessQuantity.partsCode != ''"> |
| | | AND mspd.parts_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.partsCode }),'%') |
| | | </if> |
| | | <if test="mdcProcessQuantity.batchCode != null and mdcProcessQuantity.batchCode != ''"> |
| | | AND mspd.batch_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.batchCode }),'%') |
| | | </if> |
| | | <if test="mdcProcessQuantity.sequenceNumber != null and mdcProcessQuantity.sequenceNumber != ''"> |
| | | AND mspd.sequence_number LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.sequenceNumber }),'%') |
| | | </if> |
| | | <if test="mdcProcessQuantity.startTime != null and mdcProcessQuantity.endTime != null"> |
| | | AND mpq.efficient_date BETWEEN #{ mdcProcessQuantity.startTime } AND #{ mdcProcessQuantity.endTime } |
| | | </if> |
| | | <if test="mdcProcessQuantity.processQuantity != null and mdcProcessQuantity.processQuantity != ''"> |
| | | AND mpq.process_quantity = #{ mdcProcessQuantity.processQuantity } |
| | | </if> |
| | | <if test="mdcProcessQuantity.mdcSectionIds != null and mdcProcessQuantity.mdcSectionIds.size() > 0 "> |
| | | AND mspd.equipment_id IN |
| | | <foreach collection="mdcProcessQuantity.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY mspd.equipment_name ASC, mpq.efficient_date DESC |
| | | </select> |
| | | |
| | | <!--æ ¹æ®idæ¥è¯¢--> |
| | | <select id="findById" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto"> |
| | | SELECT |
| | | mpq.id id, |
| | | mspd.equipment_id equipmentId, |
| | | mspd.equipment_name equipmentName, |
| | | mspd.parts_code partsCode, |
| | | mspd.batch_code batchCode, |
| | | mspd.sequence_number sequenceNumber, |
| | | mpq.standard_id standardId, |
| | | mpq.efficient_date efficientDate, |
| | | mpq.process_quantity processQuantity, |
| | | mspd.duration duration, |
| | | mpq.remark remark, |
| | | mpq.create_by createBy, |
| | | mpq.create_time createTime, |
| | | mpq.update_by updateBy, |
| | | mpq.update_time updateTime |
| | | FROM mdc_process_quantity mpq LEFT JOIN mdc_standard_process_duration mspd ON mpq.standard_id = mspd.id |
| | | WHERE mpq.id = { id } |
| | | </select> |
| | | </mapper> |
| | |
| | | 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.dto.MdcProcessQuantityDto; |
| | | import org.jeecg.modules.mdc.entity.MdcProcessQuantity; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * @Description: å å·¥æ°é表 |
| | |
| | | */ |
| | | public interface IMdcProcessQuantityService extends IService<MdcProcessQuantity> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param userId |
| | | * @param page |
| | | * @param mdcProcessQuantity |
| | | * @param req |
| | | * @return |
| | | */ |
| | | IPage<MdcProcessQuantityDto> pageList(String userId, Page<MdcProcessQuantityDto> page, MdcProcessQuantity mdcProcessQuantity, HttpServletRequest req); |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * |
| | | * @param userId |
| | | * @param mdcProcessQuantity |
| | | * @return |
| | | */ |
| | | ModelAndView exportXls(String userId, MdcProcessQuantity mdcProcessQuantity); |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | MdcProcessQuantityDto findById(String id); |
| | | } |
| | |
| | | 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.lang.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.mdc.dto.MdcProcessQuantityDto; |
| | | import org.jeecg.modules.mdc.entity.MdcProcessQuantity; |
| | | import org.jeecg.modules.mdc.mapper.MdcProcessQuantityMapper; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentService; |
| | | import org.jeecg.modules.mdc.service.IMdcProcessQuantityService; |
| | | 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; |
| | | |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class MdcProcessQuantityServiceImpl extends ServiceImpl<MdcProcessQuantityMapper, MdcProcessQuantity> implements IMdcProcessQuantityService { |
| | | |
| | | @Resource |
| | | private IMdcEquipmentService mdcEquipmentService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param userId |
| | | * @param page |
| | | * @param mdcProcessQuantity |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<MdcProcessQuantityDto> pageList(String userId, Page<MdcProcessQuantityDto> page, MdcProcessQuantity mdcProcessQuantity, HttpServletRequest req) { |
| | | List<String> equipmentIds = new ArrayList<>(); |
| | | if (StringUtils.isNotEmpty(mdcProcessQuantity.getParentId()) && StringUtils.isEmpty(mdcProcessQuantity.getEquipmentId())) { |
| | | if ("2".equals(mdcProcessQuantity.getTypeTree())) { |
| | | //é¨é¨å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, mdcProcessQuantity.getParentId()); |
| | | } else { |
| | | //产线å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, mdcProcessQuantity.getParentId()); |
| | | } |
| | | } else if (StringUtils.isNotEmpty(mdcProcessQuantity.getEquipmentId())) { |
| | | //åå°è®¾å¤ä¿¡æ¯ |
| | | mdcProcessQuantity.setMdcSectionIds(Collections.singletonList(mdcProcessQuantity.getEquipmentId())); |
| | | } else { |
| | | //æ¥è¯¢ç¨æ·æ¥æçææè®¾å¤ä¿¡æ¯ |
| | | if ("2".equals(mdcProcessQuantity.getTypeTree())) { |
| | | //é¨é¨å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, null); |
| | | } else { |
| | | //产线å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, null); |
| | | } |
| | | } |
| | | |
| | | if (mdcProcessQuantity.getMdcSectionIds() == null || mdcProcessQuantity.getMdcSectionIds().isEmpty()) { |
| | | mdcProcessQuantity.setMdcSectionIds(equipmentIds); |
| | | } |
| | | |
| | | if (mdcProcessQuantity.getMdcSectionIds() == null || mdcProcessQuantity.getMdcSectionIds().isEmpty()) { |
| | | return null; |
| | | } |
| | | return this.baseMapper.pageList(page, mdcProcessQuantity); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * |
| | | * @param userId |
| | | * @param mdcProcessQuantity |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ModelAndView exportXls(String userId, MdcProcessQuantity mdcProcessQuantity) { |
| | | List<String> equipmentIds = new ArrayList<>(); |
| | | if (StringUtils.isNotEmpty(mdcProcessQuantity.getParentId()) && StringUtils.isEmpty(mdcProcessQuantity.getEquipmentId())) { |
| | | if ("2".equals(mdcProcessQuantity.getTypeTree())) { |
| | | //é¨é¨å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, mdcProcessQuantity.getParentId()); |
| | | } else { |
| | | //产线å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, mdcProcessQuantity.getParentId()); |
| | | } |
| | | } else if (StringUtils.isNotEmpty(mdcProcessQuantity.getEquipmentId())) { |
| | | //åå°è®¾å¤ä¿¡æ¯ |
| | | mdcProcessQuantity.setMdcSectionIds(Collections.singletonList(mdcProcessQuantity.getEquipmentId())); |
| | | } else { |
| | | //æ¥è¯¢ç¨æ·æ¥æçææè®¾å¤ä¿¡æ¯ |
| | | if ("2".equals(mdcProcessQuantity.getTypeTree())) { |
| | | //é¨é¨å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, null); |
| | | } else { |
| | | //产线å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, null); |
| | | } |
| | | } |
| | | if (mdcProcessQuantity.getMdcSectionIds() == null || mdcProcessQuantity.getMdcSectionIds().isEmpty()) { |
| | | mdcProcessQuantity.setMdcSectionIds(equipmentIds); |
| | | } |
| | | if (mdcProcessQuantity.getMdcSectionIds() == null || mdcProcessQuantity.getMdcSectionIds().isEmpty()) { |
| | | return null; |
| | | } |
| | | // Step.2 AutoPoi 导åºExcel |
| | | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
| | | List<MdcProcessQuantityDto> processQuantityDtos = this.baseMapper.list(mdcProcessQuantity); |
| | | // å¯¼åºæä»¶åç§° |
| | | mv.addObject(NormalExcelConstants.FILE_NAME, "å å·¥æ°éå表"); |
| | | mv.addObject(NormalExcelConstants.CLASS, MdcProcessQuantityDto.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, processQuantityDtos); |
| | | return mv; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢ |
| | | */ |
| | | @Override |
| | | public MdcProcessQuantityDto findById(String id) { |
| | | return this.baseMapper.findById(id); |
| | | } |
| | | } |
| | |
| | | List<MdcStandardProcessDuration> mdcStandardProcessDurations = this.baseMapper.selectList(queryWrapper); |
| | | // å¯¼åºæä»¶åç§° |
| | | mv.addObject(NormalExcelConstants.FILE_NAME, "æ åå å·¥æ¶é´å表"); |
| | | mv.addObject(NormalExcelConstants.CLASS, MdcNoplanClose.class); |
| | | mv.addObject(NormalExcelConstants.CLASS, MdcStandardProcessDuration.class); |
| | | //è·åå½åç»å½ç¨æ· |
| | | //update-begin---author:wangshuai ---date:20211227 forï¼[JTC-116]导åºäººåæ»äº------------ |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |