Lius
8 天以前 0a19d4923b0a048aee0cda91c37f25bc6e140d54
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
@@ -26,8 +26,6 @@
import org.jeecg.modules.eam.service.IEamEquipmentService;
import org.jeecg.modules.eam.vo.EamEquipmentTree;
import org.jeecg.modules.eam.vo.EquipmentSearchResult;
//import org.jeecg.modules.mdc.entity.MdcEquipment;
//import org.jeecg.modules.mdc.service.IMdcEquipmentService;
import org.jeecg.modules.system.entity.BaseFactory;
import org.jeecg.modules.system.entity.EamBaseRepairDepart;
import org.jeecg.modules.system.service.IBaseFactoryService;
@@ -230,6 +228,19 @@
        equipmentList.forEach(item -> {
            EamEquipmentDto eamEquipmentDto = new EamEquipmentDto();
            BeanUtils.copyProperties(item,eamEquipmentDto);
            if (eamEquipmentDto.getFactoryOrgCode().length()==12){
                eamEquipmentDto.setFactoryOrgCode(
                        baseFactoryService.factoryDataNameByOrgCode(eamEquipmentDto.getZxfactoryOrgCode())
                        +"/"+baseFactoryService.factoryDataNameByOrgCode(eamEquipmentDto.getGqfactoryOrgCode())+"/"+
                                baseFactoryService.factoryDataNameByOrgCode(eamEquipmentDto.getFactoryOrgCode()));
            }else {
                eamEquipmentDto.setFactoryOrgCode(
                        baseFactoryService.factoryDataNameByOrgCode(eamEquipmentDto.getZxfactoryOrgCode())
                                +"/"+ baseFactoryService.factoryDataNameByOrgCode(eamEquipmentDto.getFactoryOrgCode()));
            }
            if (eamEquipmentDto.getEquipmentWeight()!=null){
                eamEquipmentDto.setEquipmentWeightStr(eamEquipmentDto.getEquipmentWeight().toEngineeringString());
            }
            eamEquipmentDtos.add(eamEquipmentDto);
        });
        // Step.3 AutoPoi 导出Excel