|
|
|
@ -4,12 +4,14 @@ import cn.afterturn.easypoi.entity.ImageEntity;
|
|
|
|
|
import cn.afterturn.easypoi.word.WordExportUtil; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity; |
|
|
|
|
import com.hnac.hzims.operational.access.entity.OperConstructionEntity; |
|
|
|
|
import com.hnac.hzims.operational.access.mapper.ConstructionMapper; |
|
|
|
|
import com.hnac.hzims.operational.access.service.ConstructionService; |
|
|
|
|
import com.hnac.hzims.operational.access.service.IOperAccessTaskService; |
|
|
|
|
import com.hnac.hzims.operational.access.vo.ConstructionVo; |
|
|
|
|
import com.hnac.hzims.operational.util.PdfUtils; |
|
|
|
|
import com.hnac.hzims.operational.util.WordUtils; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.io.IOUtils; |
|
|
|
@ -32,6 +34,7 @@ import java.io.*;
|
|
|
|
|
import java.net.HttpURLConnection; |
|
|
|
|
import java.net.URL; |
|
|
|
|
import java.net.URLEncoder; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
@ -43,6 +46,9 @@ import java.util.Map;
|
|
|
|
|
@RequiredArgsConstructor |
|
|
|
|
public class ConstructionServiceImpl extends BaseServiceImpl<ConstructionMapper, OperConstructionEntity> implements ConstructionService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final IOperAccessTaskService accessTaskService; |
|
|
|
|
|
|
|
|
|
@Value("${hzims.operation.construction.save.img}") |
|
|
|
|
private String constructionSaveImgPath; |
|
|
|
|
|
|
|
|
@ -106,6 +112,23 @@ public class ConstructionServiceImpl extends BaseServiceImpl<ConstructionMapper,
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean accessSave(OperConstructionEntity entity) { |
|
|
|
|
entity.setCode("SGRZ" + DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME_MINI)); |
|
|
|
|
entity.setConstructionTime(entity.getOverhaulTime()); |
|
|
|
|
boolean saveFlag = this.save(entity); |
|
|
|
|
if(!saveFlag){ |
|
|
|
|
throw new ServiceException("保存失败!"); |
|
|
|
|
} |
|
|
|
|
if(ObjectUtil.isNotEmpty(entity.getTaskId())){ |
|
|
|
|
return accessTaskService.update(Wrappers.<OperAccessTaskEntity>lambdaUpdate() |
|
|
|
|
.set(OperAccessTaskEntity::getConstructionId,entity.getId()) |
|
|
|
|
.eq(OperAccessTaskEntity::getId,entity.getTaskId()) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询施工日志记录 |
|
|
|
|
* @param id |
|
|
|
|