Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 9 months ago
parent
commit
34738209ba
  1. 9
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyLogServiceImpl.java

9
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyLogServiceImpl.java

@ -14,6 +14,7 @@ import org.apache.commons.io.IOUtils;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.*;
import java.net.HttpURLConnection;
@ -30,6 +31,8 @@ import java.util.*;
@Service
public class ImsDutyLogServiceImpl extends BaseServiceImpl<ImsDutyLogMapper, ImsDutyLogEntity> implements IImsDutyLogService {
@Value("${hzims.duty.file-path}")
private String savePath;
@Override
public void exportDutyLog(String dutyId, HashMap<String, Object> map) {
ImsDutyLogEntity res = this.baseMapper.selectOne(new LambdaQueryWrapper<ImsDutyLogEntity>() {{
@ -107,12 +110,14 @@ public class ImsDutyLogServiceImpl extends BaseServiceImpl<ImsDutyLogMapper, Ims
if (StringUtils.isNotBlank(res.getDutyPic())) {
String[] dutyPicSplit = res.getDutyPic().split(",");
for (String string : dutyPicSplit) {
ImageEntity imageEntity = new ImageEntity(imgToByte("/template/img" + downloadFileByUrl(string, "/template/img")), 225, 163);
ImageEntity imageEntity = new ImageEntity(imgToByte(savePath + downloadFileByUrl(string, savePath)), 225, 163);
imageEntity.setUrl(string);
imageEntityList.add(imageEntity);
}
map.put("dutyPic",imageEntityList);
}else {
imageEntityList.add(new ImageEntity());
}
map.put("dutyPic",imageEntityList);
}
}

Loading…
Cancel
Save