Merge branch 'dev' into pr@dev@oracle

This commit is contained in:
taojinlong
2021-07-01 12:30:25 +08:00
63 changed files with 14030 additions and 107 deletions

View File

@@ -7,6 +7,7 @@ import io.dataease.plugins.common.entity.XpackGridRequest;
import io.dataease.plugins.config.SpringContextUtil;
import io.dataease.plugins.xpack.dept.dto.request.XpackCreateDept;
import io.dataease.plugins.xpack.dept.dto.request.XpackDeleteDept;
import io.dataease.plugins.xpack.dept.dto.request.XpackMoveDept;
import io.dataease.plugins.xpack.dept.dto.response.XpackDeptTreeNode;
import io.dataease.plugins.xpack.dept.dto.response.XpackSysDept;
import io.dataease.plugins.xpack.dept.service.DeptXpackService;
@@ -77,4 +78,10 @@ public class XDeptServer {
DeptXpackService deptService = SpringContextUtil.getBean(DeptXpackService.class);
return deptService.searchTree(deptId);
}
@PostMapping("/move")
public void move(@RequestBody XpackMoveDept xpackMoveDept){
DeptXpackService deptService = SpringContextUtil.getBean(DeptXpackService.class);
deptService.move(xpackMoveDept);
}
}

View File

@@ -974,6 +974,38 @@ public class DataSetTableService {
return "";
}
CellType cellTypeEnum = cell.getCellTypeEnum();
if (cellTypeEnum.equals(CellType.FORMULA)) {
try {
double d = cell.getNumericCellValue();
try {
Double value = new Double(d);
double eps = 1e-10;
if (value - Math.floor(value) < eps) {
if (cellType) {
tableFiled.setFieldType("LONG");
}
return value.longValue() + "";
} else {
if (cellType) {
tableFiled.setFieldType("DOUBLE");
}
NumberFormat nf = NumberFormat.getInstance();
nf.setGroupingUsed(false);
return nf.format(value);
}
} catch (Exception e) {
BigDecimal b = new BigDecimal(d);
return b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() + "";
}
} catch (IllegalStateException e) {
String s = String.valueOf(cell.getRichStringCellValue());
if (cellType) {
tableFiled.setFieldType("TEXT");
tableFiled.setFieldSize(65533);
}
return s;
}
}
if (cellTypeEnum.equals(CellType.STRING)) {
if (cellType) {
tableFiled.setFieldType("TEXT");