|
|
@ -3,28 +3,29 @@ package com.hnac.hzinfo.inspect.obj.services.impl; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.google.zxing.BarcodeFormat; |
|
|
|
import com.google.zxing.BarcodeFormat; |
|
|
|
import com.hnac.hzims.equipment.feign.IEmInfoClient; |
|
|
|
import com.hnac.hzims.equipment.feign.IEmInfoClient; |
|
|
|
import com.hnac.hzinfo.inspect.Constants; |
|
|
|
import com.hnac.hzinfo.inspect.Constants; |
|
|
|
import com.hnac.hzinfo.inspect.obj.ObjectConstants; |
|
|
|
import com.hnac.hzinfo.inspect.obj.ObjectConstants; |
|
|
|
import com.hnac.hzinfo.inspect.obj.entity.*; |
|
|
|
import com.hnac.hzinfo.inspect.obj.entity.*; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.inspect.obj.mapper.InspectObjectMapper; |
|
|
|
import com.hnac.hzinfo.inspect.obj.services.*; |
|
|
|
import com.hnac.hzinfo.inspect.obj.services.*; |
|
|
|
import com.hnac.hzinfo.inspect.obj.utils.CodeUtils; |
|
|
|
import com.hnac.hzinfo.inspect.obj.utils.CodeUtils; |
|
|
|
import com.hnac.hzinfo.inspect.obj.vo.*; |
|
|
|
import com.hnac.hzinfo.inspect.obj.vo.ObjectDto; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.inspect.obj.vo.ObjectExcelInputVo; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.inspect.obj.vo.ObjectOfflineVO; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.inspect.obj.vo.ProjectContentDto; |
|
|
|
import com.hnac.hzinfo.inspect.plan.PlanContants; |
|
|
|
import com.hnac.hzinfo.inspect.plan.PlanContants; |
|
|
|
import com.hnac.hzinfo.inspect.utils.HtmlModule; |
|
|
|
import com.hnac.hzinfo.inspect.utils.HtmlModule; |
|
|
|
import com.hnac.hzinfo.inspect.utils.HtmltoPdf; |
|
|
|
import com.hnac.hzinfo.inspect.utils.HtmltoPdf; |
|
|
|
import com.hnac.hzinfo.inspect.utils.ZxingGenCode; |
|
|
|
import com.hnac.hzinfo.inspect.utils.ZxingGenCode; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
|
|
|
import org.springblade.core.tool.utils.*; |
|
|
|
import org.springblade.core.tool.utils.*; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import com.hnac.hzinfo.inspect.obj.mapper.InspectObjectMapper; |
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.Assert; |
|
|
|
import org.springframework.util.Assert; |
|
|
|
|
|
|
|
|
|
|
@ -242,6 +243,29 @@ public class ObjectServiceImpl extends ServiceImpl<InspectObjectMapper, ObjectEn |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|
|
|
|
* 查询列表数据 |
|
|
|
|
|
|
|
* @param entity |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public List<ObjectEntity> objects(ObjectEntity entity) { |
|
|
|
|
|
|
|
List<ObjectDto> objects = this.baseMapper.getList(entity); |
|
|
|
|
|
|
|
if(CollectionUtil.isEmpty(objects)){ |
|
|
|
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return objects.stream().map(object ->{ |
|
|
|
|
|
|
|
ObjectEntity vo = BeanUtil.copy(object, ObjectEntity.class); |
|
|
|
|
|
|
|
if(Func.isNotEmpty(object.getRealId())){ |
|
|
|
|
|
|
|
vo.setName(object.getOtherName()); |
|
|
|
|
|
|
|
vo.setAddress(Optional.ofNullable(object.getOtherAddress()).orElse(vo.getAddress())); |
|
|
|
|
|
|
|
vo.setLgtd(Optional.ofNullable(object.getOtherLgtd()).orElse(vo.getLgtd())); |
|
|
|
|
|
|
|
vo.setLttd(Optional.ofNullable(object.getOtherLttd()).orElse(vo.getLttd())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return vo; |
|
|
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 根据巡检对象生成一条同名巡检模板 |
|
|
|
* 根据巡检对象生成一条同名巡检模板 |
|
|
|
* @param object 巡检对象 |
|
|
|
* @param object 巡检对象 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|