模版下载接口bug修改
This commit is contained in:
parent
a4c65116e6
commit
f1d24da67a
|
|
@ -124,4 +124,6 @@ public class TbCompanyPerfVo {
|
||||||
private String personName;
|
private String personName;
|
||||||
|
|
||||||
private List<String> perfIds;
|
private List<String> perfIds;
|
||||||
|
|
||||||
|
private Long perfId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.bonus.tool.mapper.StateGridMapper;
|
||||||
import com.bonus.tool.mapper.TbCompanyPerfMapper;
|
import com.bonus.tool.mapper.TbCompanyPerfMapper;
|
||||||
import com.bonus.tool.service.EpcService;
|
import com.bonus.tool.service.EpcService;
|
||||||
import com.bonus.tool.template.util.FreeMarkerUtil;
|
import com.bonus.tool.template.util.FreeMarkerUtil;
|
||||||
|
import com.bonus.tool.template.util.SnowflakeIdWorker;
|
||||||
import com.bonus.tool.template.util.WordUtils;
|
import com.bonus.tool.template.util.WordUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
@ -38,6 +39,8 @@ public class EpcServiceImpl implements EpcService {
|
||||||
@Resource
|
@Resource
|
||||||
private StateGridMapper stateGridMapper;
|
private StateGridMapper stateGridMapper;
|
||||||
|
|
||||||
|
SnowflakeIdWorker idWorker = new SnowflakeIdWorker(2, 2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Epc模版列表查询
|
* Epc模版列表查询
|
||||||
*
|
*
|
||||||
|
|
@ -180,6 +183,11 @@ public class EpcServiceImpl implements EpcService {
|
||||||
String[] split = perfId.split(",");
|
String[] split = perfId.split(",");
|
||||||
tbCompanyPerfVo.setPerfIds(Arrays.asList(split));
|
tbCompanyPerfVo.setPerfIds(Arrays.asList(split));
|
||||||
List<TbCompanyPerfVo> personPerfList = tbCompanyPerfMapper.getTbCompanyPerfListByPersonId(tbCompanyPerfVo);
|
List<TbCompanyPerfVo> personPerfList = tbCompanyPerfMapper.getTbCompanyPerfListByPersonId(tbCompanyPerfVo);
|
||||||
|
//业绩还有图片
|
||||||
|
personPerfList.forEach(perfItem -> {
|
||||||
|
List<TbFileSourceVo> perfList = stateGridMapper.getFileSourceList(perfItem.getPerfId(),TableType.TB_COMPANY_PERF_REL.getCode());
|
||||||
|
perfItem.setTbFileSourceVoList(perfList);
|
||||||
|
});
|
||||||
item.setPeoplePerfList(personPerfList);
|
item.setPeoplePerfList(personPerfList);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -236,7 +244,7 @@ public class EpcServiceImpl implements EpcService {
|
||||||
map.put("level", item.getLevel() != null ? item.getLevel() : "");
|
map.put("level", item.getLevel() != null ? item.getLevel() : "");
|
||||||
map.put("zh", item.getDiplomaNum() != null ? item.getDiplomaNum() : "");
|
map.put("zh", item.getDiplomaNum() != null ? item.getDiplomaNum() : "");
|
||||||
map.put("zy", item.getMajor() != null ? item.getMajor() : "");
|
map.put("zy", item.getMajor() != null ? item.getMajor() : "");
|
||||||
map.put("ylbx", item.getIsNormal() != null ? (item.getIsNormal() == 1 ? "异常" : "正常") : "异常");
|
map.put("ylbx", item.getIsNormal() != null ? (item.getIsNormal() == 1 ? "异常" : "正常") : "");
|
||||||
map.put("bz", "");
|
map.put("bz", "");
|
||||||
list.add(map);
|
list.add(map);
|
||||||
}
|
}
|
||||||
|
|
@ -255,7 +263,7 @@ public class EpcServiceImpl implements EpcService {
|
||||||
map.put("level", item.getLevel() != null ? item.getLevel() : "");
|
map.put("level", item.getLevel() != null ? item.getLevel() : "");
|
||||||
map.put("zh", item.getDiplomaNum() != null ? item.getDiplomaNum() : "");
|
map.put("zh", item.getDiplomaNum() != null ? item.getDiplomaNum() : "");
|
||||||
map.put("zy", item.getMajor() != null ? item.getMajor() : "");
|
map.put("zy", item.getMajor() != null ? item.getMajor() : "");
|
||||||
map.put("ylbx", item.getIsNormal() != null ? (item.getIsNormal() == 1 ? "异常" : "正常") : "异常");
|
map.put("ylbx", item.getIsNormal() != null ? (item.getIsNormal() == 1 ? "异常" : "正常") : "");
|
||||||
map.put("bz", "");
|
map.put("bz", "");
|
||||||
list.add(map);
|
list.add(map);
|
||||||
}
|
}
|
||||||
|
|
@ -274,7 +282,7 @@ public class EpcServiceImpl implements EpcService {
|
||||||
map.put("level", item.getLevel() != null ? item.getLevel() : "");
|
map.put("level", item.getLevel() != null ? item.getLevel() : "");
|
||||||
map.put("zh", item.getDiplomaNum() != null ? item.getDiplomaNum() : "");
|
map.put("zh", item.getDiplomaNum() != null ? item.getDiplomaNum() : "");
|
||||||
map.put("zy", item.getMajor() != null ? item.getMajor() : "");
|
map.put("zy", item.getMajor() != null ? item.getMajor() : "");
|
||||||
map.put("ylbx", item.getIsNormal() != null ? (item.getIsNormal() == 1 ? "异常" : "正常") : "异常");
|
map.put("ylbx", item.getIsNormal() != null ? (item.getIsNormal() == 1 ? "异常" : "正常") : "");
|
||||||
map.put("bz", "");
|
map.put("bz", "");
|
||||||
list.add(map);
|
list.add(map);
|
||||||
}
|
}
|
||||||
|
|
@ -310,14 +318,13 @@ public class EpcServiceImpl implements EpcService {
|
||||||
}
|
}
|
||||||
// 处理证件图片
|
// 处理证件图片
|
||||||
List<Map<String, Object>> imgList = new ArrayList<>();
|
List<Map<String, Object>> imgList = new ArrayList<>();
|
||||||
int imgIndex = 1;
|
|
||||||
// 处理身份证图片
|
// 处理身份证图片
|
||||||
if (item.getIdCardFileList() != null) {
|
if (item.getIdCardFileList() != null) {
|
||||||
for (TbFileSourceVo file : item.getIdCardFileList()) {
|
for (TbFileSourceVo file : item.getIdCardFileList()) {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("width", "375.35");
|
imgMap.put("width", "375.35");
|
||||||
imgMap.put("height", "207.85");
|
imgMap.put("height", "207.85");
|
||||||
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ?
|
imgMap.put("base64Url", file.getFilePath() != null ?
|
||||||
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
||||||
imgList.add(imgMap);
|
imgList.add(imgMap);
|
||||||
|
|
@ -329,7 +336,7 @@ public class EpcServiceImpl implements EpcService {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ?
|
imgMap.put("base64Url", file.getFilePath() != null ?
|
||||||
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
||||||
imgList.add(imgMap);
|
imgList.add(imgMap);
|
||||||
|
|
@ -342,7 +349,7 @@ public class EpcServiceImpl implements EpcService {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ?
|
imgMap.put("base64Url", file.getFilePath() != null ?
|
||||||
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
||||||
imgList.add(imgMap);
|
imgList.add(imgMap);
|
||||||
|
|
@ -351,18 +358,19 @@ public class EpcServiceImpl implements EpcService {
|
||||||
// 处理业绩信息
|
// 处理业绩信息
|
||||||
map.put("yjTitle", item.getPostName() != null ? item.getPostName() + "业绩" : "项目经理业绩");
|
map.put("yjTitle", item.getPostName() != null ? item.getPostName() + "业绩" : "项目经理业绩");
|
||||||
List<Map<String, Object>> yjList = new ArrayList<>();
|
List<Map<String, Object>> yjList = new ArrayList<>();
|
||||||
if (item.getProPerf() != null && !item.getProPerf().isEmpty()) {
|
if (item.getPeoplePerfList() != null && !item.getPeoplePerfList().isEmpty()) {
|
||||||
String[] perfList = item.getProPerf().split(",");
|
List<TbCompanyPerfVo> perfList = item.getPeoplePerfList();
|
||||||
for (int j = 0; j < perfList.length; j++) {
|
for (int j = 0; j < perfList.size(); j++) {
|
||||||
|
TbCompanyPerfVo tbCompanyPerfVo = perfList.get(j);
|
||||||
Map<String, Object> yjMap = new HashMap<>();
|
Map<String, Object> yjMap = new HashMap<>();
|
||||||
yjMap.put("yj", "业绩" + (j + 1) + ":" + perfList[j]);
|
yjMap.put("yj", "业绩" + (j + 1) + ":" + tbCompanyPerfVo.getProName());
|
||||||
// 业绩相关图片 - 如果没有特定的业绩图片,可以复用证书图片或者不添加
|
// 业绩相关图片 - 如果没有特定的业绩图片,可以复用证书图片或者不添加
|
||||||
List<Map<String, Object>> imgList2 = new ArrayList<>();
|
List<Map<String, Object>> imgList2 = new ArrayList<>();
|
||||||
if (item.getOtherFileList() != null) {
|
if (tbCompanyPerfVo.getTbFileSourceVoList() != null) {
|
||||||
for (int k = 0; k < item.getOtherFileList().size(); k++) {
|
for (int k = 0; k < tbCompanyPerfVo.getTbFileSourceVoList().size(); k++) {
|
||||||
TbFileSourceVo file = item.getOtherFileList().get(k);
|
TbFileSourceVo file = tbCompanyPerfVo.getTbFileSourceVoList().get(k);
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("index", (10000 * (j + 1)) + (k + 1));
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ?
|
imgMap.put("base64Url", file.getFilePath() != null ?
|
||||||
|
|
@ -401,7 +409,7 @@ public class EpcServiceImpl implements EpcService {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("width", "375.35");
|
imgMap.put("width", "375.35");
|
||||||
imgMap.put("height", "207.85");
|
imgMap.put("height", "207.85");
|
||||||
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ?
|
imgMap.put("base64Url", file.getFilePath() != null ?
|
||||||
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
||||||
imgList.add(imgMap);
|
imgList.add(imgMap);
|
||||||
|
|
@ -413,7 +421,7 @@ public class EpcServiceImpl implements EpcService {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ?
|
imgMap.put("base64Url", file.getFilePath() != null ?
|
||||||
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
||||||
imgList.add(imgMap);
|
imgList.add(imgMap);
|
||||||
|
|
@ -425,7 +433,7 @@ public class EpcServiceImpl implements EpcService {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ?
|
imgMap.put("base64Url", file.getFilePath() != null ?
|
||||||
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
|
||||||
imgList.add(imgMap);
|
imgList.add(imgMap);
|
||||||
|
|
@ -439,7 +447,7 @@ public class EpcServiceImpl implements EpcService {
|
||||||
// 业绩相关图片 - 如果没有特定的业绩图片,可以复用证书图片或者不添加
|
// 业绩相关图片 - 如果没有特定的业绩图片,可以复用证书图片或者不添加
|
||||||
List<Map<String, Object>> imgList2 = new ArrayList<>();
|
List<Map<String, Object>> imgList2 = new ArrayList<>();
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("index", 10000) ;
|
imgMap.put("index", idWorker.nextId()) ;
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
imgMap.put("base64Url", "");
|
imgMap.put("base64Url", "");
|
||||||
|
|
@ -477,12 +485,13 @@ public class EpcServiceImpl implements EpcService {
|
||||||
int fileType = Integer.parseInt(file.getFileType());
|
int fileType = Integer.parseInt(file.getFileType());
|
||||||
switch (fileType) {
|
switch (fileType) {
|
||||||
case 1:
|
case 1:
|
||||||
|
case 2:
|
||||||
type1List.add(file);
|
type1List.add(file);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
type2List.add(file);
|
type2List.add(file);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 4:
|
||||||
type3List.add(file);
|
type3List.add(file);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -183,6 +183,11 @@ public class SouthServiceImpl implements SouthService {
|
||||||
String[] split = perfId.split(",");
|
String[] split = perfId.split(",");
|
||||||
tbCompanyPerfVo.setPerfIds(Arrays.asList(split));
|
tbCompanyPerfVo.setPerfIds(Arrays.asList(split));
|
||||||
List<TbCompanyPerfVo> personPerfList = tbCompanyPerfMapper.getTbCompanyPerfListByPersonId(tbCompanyPerfVo);
|
List<TbCompanyPerfVo> personPerfList = tbCompanyPerfMapper.getTbCompanyPerfListByPersonId(tbCompanyPerfVo);
|
||||||
|
//业绩还有图片
|
||||||
|
personPerfList.forEach(perfItem -> {
|
||||||
|
List<TbFileSourceVo> perfList = stateGridMapper.getFileSourceList(perfItem.getPerfId(),TableType.TB_COMPANY_PERF_REL.getCode());
|
||||||
|
perfItem.setTbFileSourceVoList(perfList);
|
||||||
|
});
|
||||||
item.setPeoplePerfList(personPerfList);
|
item.setPeoplePerfList(personPerfList);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -217,12 +222,13 @@ public class SouthServiceImpl implements SouthService {
|
||||||
int fileType = Integer.parseInt(file.getFileType());
|
int fileType = Integer.parseInt(file.getFileType());
|
||||||
switch (fileType) {
|
switch (fileType) {
|
||||||
case 1:
|
case 1:
|
||||||
|
case 2:
|
||||||
type1List.add(file);
|
type1List.add(file);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
type2List.add(file);
|
type2List.add(file);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 4:
|
||||||
type3List.add(file);
|
type3List.add(file);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -291,10 +291,10 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
data.put("title", tbData.getName());
|
data.put("title", tbData.getName());
|
||||||
// 处理公司业绩数据(近年完成的类似项目情况表)
|
// 处理公司业绩数据(近年完成的类似项目情况表)
|
||||||
if (tbData.getComPerfList() != null && !tbData.getComPerfList().isEmpty()) {
|
if (tbData.getComPerfList() != null && !tbData.getComPerfList().isEmpty()) {
|
||||||
int index = 1;
|
int index = 0;
|
||||||
for (ComPerformanceBean item : tbData.getComPerfList()) {
|
for (ComPerformanceBean item : tbData.getComPerfList()) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("i", index++);
|
map.put("i", ++index);
|
||||||
map.put("proName", item.getProName() != null ? item.getProName() : "");
|
map.put("proName", item.getProName() != null ? item.getProName() : "");
|
||||||
map.put("dy", item.getVoltage() != null ? item.getVoltage() : "");
|
map.put("dy", item.getVoltage() != null ? item.getVoltage() : "");
|
||||||
map.put("num", item.getStationNum() != null ? item.getStationNum() : "");
|
map.put("num", item.getStationNum() != null ? item.getStationNum() : "");
|
||||||
|
|
@ -310,10 +310,9 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
Map<String, Object> perfImgMap = new HashMap<>();
|
Map<String, Object> perfImgMap = new HashMap<>();
|
||||||
perfImgMap.put("proName", index + "." + item.getProName());
|
perfImgMap.put("proName", index + "." + item.getProName());
|
||||||
List<Map<String, Object>> imgList = new ArrayList<>();
|
List<Map<String, Object>> imgList = new ArrayList<>();
|
||||||
int imgIndex = 1;
|
|
||||||
for (TbFileSourceVo file : item.getFileList()) {
|
for (TbFileSourceVo file : item.getFileList()) {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("index", 100 * index + imgIndex++);
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
String bast64=FreeMarkerUtil.getImageBase(filePath+file.getFilePath());
|
String bast64=FreeMarkerUtil.getImageBase(filePath+file.getFilePath());
|
||||||
|
|
@ -369,7 +368,6 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
map3.put("index", idWorker.nextId());
|
map3.put("index", idWorker.nextId());
|
||||||
map3.put("width", "481.15");
|
map3.put("width", "481.15");
|
||||||
map3.put("height", "634.5");
|
map3.put("height", "634.5");
|
||||||
System.err.println("处理业绩证明材料图片:"+filePath+file.getFilePath());
|
|
||||||
map3.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
map3.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
||||||
imgList.add(map3);
|
imgList.add(map3);
|
||||||
}
|
}
|
||||||
|
|
@ -383,7 +381,7 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
int zzIndex = 1;
|
int zzIndex = 1;
|
||||||
for (TbFileSourceVo file : item.getSubFileList()) {
|
for (TbFileSourceVo file : item.getSubFileList()) {
|
||||||
Map<String, Object> zzMap = new HashMap<>();
|
Map<String, Object> zzMap = new HashMap<>();
|
||||||
zzMap.put("index", 1000 * subIndex + zzIndex++);
|
zzMap.put("index", idWorker.nextId());
|
||||||
zzMap.put("width", "481.15");
|
zzMap.put("width", "481.15");
|
||||||
zzMap.put("height", "634.5");
|
zzMap.put("height", "634.5");
|
||||||
zzMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
zzMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
||||||
|
|
@ -406,57 +404,13 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
personList.add(personMap);
|
personList.add(personMap);
|
||||||
// 处理拟派人员证件图片
|
// 处理拟派人员证件图片
|
||||||
Map<String, Object> personImgMap = new HashMap<>();
|
Map<String, Object> personImgMap = new HashMap<>();
|
||||||
personImgMap.put("userType", personItem.getPostName() != null ? personItem.getPostName() : "");
|
personImgMap.put("userType", personItem.getPostName() != null ? personItem.getPostName() + "---" + personItem.getUserName() : "");
|
||||||
List<Map<String, Object>> imgList = new ArrayList<>();
|
List<Map<String, Object>> imgList = new ArrayList<>();
|
||||||
int imgIndex = 1;
|
int imgIndex = 1;
|
||||||
// 处理身份证
|
// 处理身份证
|
||||||
if (personItem.getIdCardFileList() != null && !personItem.getIdCardFileList().isEmpty()) {
|
if (personItem.getIdCardFileList() != null && !personItem.getIdCardFileList().isEmpty()) {
|
||||||
for (TbFileSourceVo file : personItem.getIdCardFileList()) {
|
for (TbFileSourceVo file : personItem.getIdCardFileList()) {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("index", 10000 * personIndex + imgIndex++);
|
|
||||||
imgMap.put("width", "375.35");
|
|
||||||
imgMap.put("height", "207.85");
|
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
|
||||||
imgList.add(imgMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 处理资格证书
|
|
||||||
if (personItem.getDiplomaFileList() != null && !personItem.getDiplomaFileList().isEmpty()) {
|
|
||||||
for (TbFileSourceVo file : personItem.getDiplomaFileList()) {
|
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
|
||||||
imgMap.put("index", 10000 * personIndex + imgIndex++);
|
|
||||||
imgMap.put("width", "481.15");
|
|
||||||
imgMap.put("height", "634.5");
|
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
|
||||||
imgList.add(imgMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 处理其他资质
|
|
||||||
if (personItem.getOtherFileList() != null && !personItem.getOtherFileList().isEmpty()) {
|
|
||||||
for (TbFileSourceVo file : personItem.getOtherFileList()) {
|
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
|
||||||
imgMap.put("index", 10000 * personIndex + imgIndex++);
|
|
||||||
imgMap.put("width", "481.15");
|
|
||||||
imgMap.put("height", "634.5");
|
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
|
||||||
imgList.add(imgMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!imgList.isEmpty()) {
|
|
||||||
personImgMap.put("imgList", imgList);
|
|
||||||
personImgList.add(personImgMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//再循环图片
|
|
||||||
for (SubOtherPeopleBean personItem : item.getSubPersonList()) {
|
|
||||||
// 处理拟派人员证件图片
|
|
||||||
Map<String, Object> personImgMap = new HashMap<>();
|
|
||||||
personImgMap.put("userType", personItem.getPostName() != null ? personItem.getPostName() : "");
|
|
||||||
List<Map<String, Object>> imgList = new ArrayList<>();
|
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
|
||||||
// 处理身份证
|
|
||||||
if (personItem.getIdCardFileList() != null && !personItem.getIdCardFileList().isEmpty()) {
|
|
||||||
for (TbFileSourceVo file : personItem.getIdCardFileList()) {
|
|
||||||
imgMap.put("index", idWorker.nextId());
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("width", "375.35");
|
imgMap.put("width", "375.35");
|
||||||
imgMap.put("height", "207.85");
|
imgMap.put("height", "207.85");
|
||||||
|
|
@ -467,6 +421,7 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
// 处理资格证书
|
// 处理资格证书
|
||||||
if (personItem.getDiplomaFileList() != null && !personItem.getDiplomaFileList().isEmpty()) {
|
if (personItem.getDiplomaFileList() != null && !personItem.getDiplomaFileList().isEmpty()) {
|
||||||
for (TbFileSourceVo file : personItem.getDiplomaFileList()) {
|
for (TbFileSourceVo file : personItem.getDiplomaFileList()) {
|
||||||
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("index", idWorker.nextId());
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
|
|
@ -477,6 +432,7 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
// 处理其他资质
|
// 处理其他资质
|
||||||
if (personItem.getOtherFileList() != null && !personItem.getOtherFileList().isEmpty()) {
|
if (personItem.getOtherFileList() != null && !personItem.getOtherFileList().isEmpty()) {
|
||||||
for (TbFileSourceVo file : personItem.getOtherFileList()) {
|
for (TbFileSourceVo file : personItem.getOtherFileList()) {
|
||||||
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("index", idWorker.nextId());
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
|
|
@ -489,6 +445,48 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
personImgList.add(personImgMap);
|
personImgList.add(personImgMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// //再循环图片
|
||||||
|
// for (SubOtherPeopleBean personItem : item.getSubPersonList()) {
|
||||||
|
// // 处理拟派人员证件图片
|
||||||
|
// Map<String, Object> personImgMap = new HashMap<>();
|
||||||
|
// personImgMap.put("userType", personItem.getPostName() != null ? personItem.getPostName()+personItem.getUserName() : "");
|
||||||
|
// List<Map<String, Object>> imgList = new ArrayList<>();
|
||||||
|
// Map<String, Object> imgMap = new HashMap<>();
|
||||||
|
// // 处理身份证
|
||||||
|
// if (personItem.getIdCardFileList() != null && !personItem.getIdCardFileList().isEmpty()) {
|
||||||
|
// for (TbFileSourceVo file : personItem.getIdCardFileList()) {
|
||||||
|
// imgMap.put("index", idWorker.nextId());
|
||||||
|
// imgMap.put("width", "375.35");
|
||||||
|
// imgMap.put("height", "207.85");
|
||||||
|
// imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
||||||
|
// imgList.add(imgMap);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // 处理资格证书
|
||||||
|
// if (personItem.getDiplomaFileList() != null && !personItem.getDiplomaFileList().isEmpty()) {
|
||||||
|
// for (TbFileSourceVo file : personItem.getDiplomaFileList()) {
|
||||||
|
// imgMap.put("index", idWorker.nextId());
|
||||||
|
// imgMap.put("width", "481.15");
|
||||||
|
// imgMap.put("height", "634.5");
|
||||||
|
// imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
||||||
|
// imgList.add(imgMap);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // 处理其他资质
|
||||||
|
// if (personItem.getOtherFileList() != null && !personItem.getOtherFileList().isEmpty()) {
|
||||||
|
// for (TbFileSourceVo file : personItem.getOtherFileList()) {
|
||||||
|
// imgMap.put("index", idWorker.nextId());
|
||||||
|
// imgMap.put("width", "481.15");
|
||||||
|
// imgMap.put("height", "634.5");
|
||||||
|
// imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
||||||
|
// imgList.add(imgMap);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (!imgList.isEmpty()) {
|
||||||
|
// personImgMap.put("imgList", imgList);
|
||||||
|
// personImgList.add(personImgMap);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
subMap.put("yjList", yjList);
|
subMap.put("yjList", yjList);
|
||||||
|
|
@ -519,15 +517,16 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
otherMap.put("bh", "");
|
otherMap.put("bh", "");
|
||||||
// 处理证书列表
|
// 处理证书列表
|
||||||
List<Map<String, Object>> zsList = new ArrayList<>();
|
List<Map<String, Object>> zsList = new ArrayList<>();
|
||||||
if (item.getDiploma() != null || item.getDiplomaNum() != null || item.getMajor() != null || item.getLevel() != null) {
|
//表设计是不可能有两个证件,后续修改,将item.getDiploma()改成集合存储
|
||||||
Map<String, Object> zsMap = new HashMap<>();
|
// if (item.getDiploma() != null || item.getDiplomaNum() != null || item.getMajor() != null || item.getLevel() != null) {
|
||||||
zsMap.put("zs", item.getDiploma() != null ? item.getDiploma() : "");
|
// Map<String, Object> zsMap = new HashMap<>();
|
||||||
zsMap.put("jb", item.getLevel() != null ? item.getLevel() : "");
|
// zsMap.put("zs", item.getDiploma() != null ? item.getDiploma() : "");
|
||||||
zsMap.put("zh", item.getDiplomaNum() != null ? item.getDiplomaNum() : "");
|
// zsMap.put("jb", item.getLevel() != null ? item.getLevel() : "");
|
||||||
zsMap.put("zy", item.getMajor() != null ? item.getMajor() : "");
|
// zsMap.put("zh", item.getDiplomaNum() != null ? item.getDiplomaNum() : "");
|
||||||
zsMap.put("bh", "");
|
// zsMap.put("zy", item.getMajor() != null ? item.getMajor() : "");
|
||||||
zsList.add(zsMap);
|
// zsMap.put("bh", "");
|
||||||
}
|
// zsList.add(zsMap);
|
||||||
|
// }
|
||||||
otherMap.put("zsList", zsList);
|
otherMap.put("zsList", zsList);
|
||||||
otherUserList.add(otherMap);
|
otherUserList.add(otherMap);
|
||||||
// 处理人员证件图片
|
// 处理人员证件图片
|
||||||
|
|
@ -537,7 +536,7 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
if (item.getIdCardFileList() != null) {
|
if (item.getIdCardFileList() != null) {
|
||||||
for (TbFileSourceVo file : item.getIdCardFileList()) {
|
for (TbFileSourceVo file : item.getIdCardFileList()) {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("index", 1000000 * otherIndex + imgIndex++);
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("width", "375.35");
|
imgMap.put("width", "375.35");
|
||||||
imgMap.put("height", "207.85");
|
imgMap.put("height", "207.85");
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
||||||
|
|
@ -554,7 +553,7 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
|
|
||||||
for (TbFileSourceVo file : allImages) {
|
for (TbFileSourceVo file : allImages) {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("index", 1000000 * otherIndex + imgIndex++);
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
||||||
|
|
@ -650,12 +649,8 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
jlMap.put("yjList", yjList);
|
jlMap.put("yjList", yjList);
|
||||||
jlList.add(jlMap);
|
jlList.add(jlMap);
|
||||||
// 处理人员证件图片
|
// 处理人员证件图片
|
||||||
int imgIndex = 1;
|
|
||||||
// 处理身份证、资格证书和其他资质的图片
|
// 处理身份证、资格证书和其他资质的图片
|
||||||
List<TbFileSourceVo> allImages = new ArrayList<>();
|
List<TbFileSourceVo> allImages = new ArrayList<>();
|
||||||
if (item.getIdCardFileList() != null) {
|
|
||||||
allImages.addAll(item.getIdCardFileList());
|
|
||||||
}
|
|
||||||
if (item.getDiplomaFileList() != null) {
|
if (item.getDiplomaFileList() != null) {
|
||||||
allImages.addAll(item.getDiplomaFileList());
|
allImages.addAll(item.getDiplomaFileList());
|
||||||
}
|
}
|
||||||
|
|
@ -664,6 +659,16 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
}
|
}
|
||||||
Map<String, Object> map2 = new HashMap<>();
|
Map<String, Object> map2 = new HashMap<>();
|
||||||
List<Map<String, Object>> imgList = new ArrayList<>();
|
List<Map<String, Object>> imgList = new ArrayList<>();
|
||||||
|
if (item.getIdCardFileList() != null) {
|
||||||
|
for (TbFileSourceVo file : item.getIdCardFileList()) {
|
||||||
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
|
imgMap.put("index", idWorker.nextId());
|
||||||
|
imgMap.put("width", "375.35");
|
||||||
|
imgMap.put("height", "207.85");
|
||||||
|
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
||||||
|
imgList.add(imgMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
// 根据分组人数设置zmcl
|
// 根据分组人数设置zmcl
|
||||||
if (personList.size() == 1) {
|
if (personList.size() == 1) {
|
||||||
map2.put("zmcl", "");
|
map2.put("zmcl", "");
|
||||||
|
|
@ -672,7 +677,7 @@ public class StateGridServiceImpl implements StateGridService {
|
||||||
}
|
}
|
||||||
for (TbFileSourceVo file : allImages) {
|
for (TbFileSourceVo file : allImages) {
|
||||||
Map<String, Object> imgMap = new HashMap<>();
|
Map<String, Object> imgMap = new HashMap<>();
|
||||||
imgMap.put("index", imgIndex++);
|
imgMap.put("index", idWorker.nextId());
|
||||||
imgMap.put("width", "481.15");
|
imgMap.put("width", "481.15");
|
||||||
imgMap.put("height", "634.5");
|
imgMap.put("height", "634.5");
|
||||||
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ public class TestEPCDOC {
|
||||||
Map<String, Object> map3 = new HashMap<>();
|
Map<String, Object> map3 = new HashMap<>();
|
||||||
map3.put("width", "375.35");
|
map3.put("width", "375.35");
|
||||||
map3.put("height", "207.85");
|
map3.put("height", "207.85");
|
||||||
|
|
||||||
map3.put("index",(100 * (i + 1)) + (j + 1));
|
map3.put("index",(100 * (i + 1)) + (j + 1));
|
||||||
if(j == 0){
|
if(j == 0){
|
||||||
map3.put("base64Url", FreeMarkerUtil.getImageBase("C:\\Users\\10488\\Desktop\\图片3.png"));
|
map3.put("base64Url", FreeMarkerUtil.getImageBase("C:\\Users\\10488\\Desktop\\图片3.png"));
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
from
|
from
|
||||||
tb_epc_mdel where del_flag =0
|
tb_epc_mdel where del_flag =0
|
||||||
<if test="name != '' and name != null">
|
<if test="name != '' and name != null">
|
||||||
and name = #{name}
|
and locate(#{name},name)
|
||||||
</if>
|
</if>
|
||||||
<if test="startDate != null and startDate != null and endDate != null and endDate != null">
|
<if test="startDate != null and startDate != null and endDate != null and endDate != null">
|
||||||
and STR_TO_DATE(create_time, '%Y-%m-%d') between #{startDate} and #{endDate}
|
and STR_TO_DATE(create_time, '%Y-%m-%d') between #{startDate} and #{endDate}
|
||||||
|
|
@ -137,6 +137,7 @@
|
||||||
tgku.position as post_name,
|
tgku.position as post_name,
|
||||||
tkp.major,
|
tkp.major,
|
||||||
tkp.`level`,
|
tkp.`level`,
|
||||||
|
tkp.is_normal,
|
||||||
tgku.perf_id,
|
tgku.perf_id,
|
||||||
tgku.pro_perf
|
tgku.pro_perf
|
||||||
FROM tb_epc_company_user tgku
|
FROM tb_epc_company_user tgku
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
from
|
from
|
||||||
tb_south_mdel where del_flag =0
|
tb_south_mdel where del_flag =0
|
||||||
<if test="name != '' and name != null">
|
<if test="name != '' and name != null">
|
||||||
and name = #{name}
|
and locate(#{name},name)
|
||||||
</if>
|
</if>
|
||||||
<if test="startDate != null and startDate != null and endDate != null and endDate != null">
|
<if test="startDate != null and startDate != null and endDate != null and endDate != null">
|
||||||
and STR_TO_DATE(create_time, '%Y-%m-%d') between #{startDate} and #{endDate}
|
and STR_TO_DATE(create_time, '%Y-%m-%d') between #{startDate} and #{endDate}
|
||||||
|
|
@ -137,6 +137,7 @@
|
||||||
tgku.position as post_name,
|
tgku.position as post_name,
|
||||||
tkp.major,
|
tkp.major,
|
||||||
tkp.`level`,
|
tkp.`level`,
|
||||||
|
tkp.is_normal,
|
||||||
tgku.perf_id,
|
tgku.perf_id,
|
||||||
tgku.pro_perf
|
tgku.pro_perf
|
||||||
FROM tb_south_company_user tgku
|
FROM tb_south_company_user tgku
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@
|
||||||
from
|
from
|
||||||
tb_gw_model where del_flag =0
|
tb_gw_model where del_flag =0
|
||||||
<if test="name != '' and name != null">
|
<if test="name != '' and name != null">
|
||||||
and name = #{name}
|
and locate(#{name},name)
|
||||||
</if>
|
</if>
|
||||||
<if test="startDate != null and startDate != null and endDate != null and endDate != null">
|
<if test="startDate != null and startDate != null and endDate != null and endDate != null">
|
||||||
and STR_TO_DATE(create_time, '%Y-%m-%d') between #{startDate} and #{endDate}
|
and STR_TO_DATE(create_time, '%Y-%m-%d') between #{startDate} and #{endDate}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,8 @@
|
||||||
tcp.contract_rang,
|
tcp.contract_rang,
|
||||||
tcp.owner_unit,
|
tcp.owner_unit,
|
||||||
tcp.owner_phone,
|
tcp.owner_phone,
|
||||||
tcp.voltage
|
tcp.voltage,
|
||||||
|
tcpr.id as perfId
|
||||||
FROM
|
FROM
|
||||||
tb_key_people tkp
|
tb_key_people tkp
|
||||||
LEFT JOIN tb_company_perf_rel tcpr ON tcpr.key_user = tkp.id and tcpr.source = '1'
|
LEFT JOIN tb_company_perf_rel tcpr ON tcpr.key_user = tkp.id and tcpr.source = '1'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue