|
@@ -1646,7 +1646,9 @@ public class ExcelTabController extends BladeController {
|
|
//拿到所有的名字
|
|
//拿到所有的名字
|
|
Set<String> strings = wbsTreeContractList.stream().map(o -> o.getNodeName()).collect(Collectors.toSet());
|
|
Set<String> strings = wbsTreeContractList.stream().map(o -> o.getNodeName()).collect(Collectors.toSet());
|
|
//根据实际排序
|
|
//根据实际排序
|
|
- List<WbsTreeContract> wbsTreeContractList2 = wbsTreeContractList.stream().sorted(Comparator.comparing(WbsTreeContract::getCreateTime)).collect(Collectors.toList());
|
|
|
|
|
|
+ boolean flag = wbsInfo.getNodeName().contains("_PL_");
|
|
|
|
+ List<WbsTreeContract> wbsTreeContractList2 = wbsTreeContractList.stream().filter(wbs -> flag || (wbs.getNodeName()!= null && !wbs.getNodeName().contains("_PL_")))
|
|
|
|
+ .sorted(Comparator.comparing(WbsTreeContract::getCreateTime)).collect(Collectors.toList());
|
|
//如果数量对不上说明有错的情况就进来,进行修改,现在wbsTreeContractList2就是正常的
|
|
//如果数量对不上说明有错的情况就进来,进行修改,现在wbsTreeContractList2就是正常的
|
|
if (strings.size() != wbsTreeContractList2.size()) {
|
|
if (strings.size() != wbsTreeContractList2.size()) {
|
|
for (int i = 0; i < wbsTreeContractList2.size(); i++) {
|
|
for (int i = 0; i < wbsTreeContractList2.size(); i++) {
|
|
@@ -1687,7 +1689,7 @@ public class ExcelTabController extends BladeController {
|
|
String tabName = wbsTreeContract.getInitTableName();
|
|
String tabName = wbsTreeContract.getInitTableName();
|
|
// 字段查询 并去掉公式字段
|
|
// 字段查询 并去掉公式字段
|
|
|
|
|
|
- String colkeys = "SELECT GROUP_CONCAT(COLUMN_NAME) as colkeys from information_schema.COLUMNS c where c.table_name='" + tabName + "' and COLUMN_NAME not in('id','p_key_id')";
|
|
|
|
|
|
+ String colkeys = "SELECT GROUP_CONCAT(distinct COLUMN_NAME) as colkeys from information_schema.COLUMNS c where c.table_name='" + tabName + "' and COLUMN_NAME not in('id','p_key_id')";
|
|
Map<String, Object> stringObjectMap = jdbcTemplate.queryForMap(colkeys);
|
|
Map<String, Object> stringObjectMap = jdbcTemplate.queryForMap(colkeys);
|
|
colkeys = stringObjectMap.get("colkeys") + "";
|
|
colkeys = stringObjectMap.get("colkeys") + "";
|
|
// 复制表数据
|
|
// 复制表数据
|