|
@@ -137,7 +137,7 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
@ApiOperation(value = "详情", notes = "传入excelTab")
|
|
|
public R<ExcelTabVO> detail(ExcelTab excelTab) {
|
|
|
- ExcelTab detail = excelTabService.getOne(Condition.getQueryWrapper(excelTab) );
|
|
|
+ ExcelTab detail = excelTabService.getOne(Condition.getQueryWrapper(excelTab));
|
|
|
return R.data(ExcelTabWrapper.build().entityVO(detail));
|
|
|
}
|
|
|
|
|
@@ -283,7 +283,7 @@ public class ExcelTabController extends BladeController {
|
|
|
})
|
|
|
public R putFileAttach(@RequestParam("file") MultipartFile file, Long nodeId) {
|
|
|
|
|
|
- String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
+ String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
//String file_path = "/Users/hongchuangyanfa/Desktop/";
|
|
|
|
|
|
ExcelTab detail = excelTabService.getById(nodeId);
|
|
@@ -551,9 +551,9 @@ public class ExcelTabController extends BladeController {
|
|
|
.attr("@blur", "getRegularExpression(" + regularExpression + ",'" + filedLength + "')")
|
|
|
.attr("v-model", "formData." + attrInfo)
|
|
|
.attr("maxlength", filedLength);
|
|
|
- if(element.html().indexOf("el-input") >= 0){
|
|
|
+ if (element.html().indexOf("el-input") >= 0) {
|
|
|
String mousedown = "$event" + "," + "'" + attrInfo + "'";
|
|
|
- element.children().get(0).attr("@mouseup.left", "inputLeftClick("+mousedown+")");
|
|
|
+ element.children().get(0).attr("@mouseup.left", "inputLeftClick(" + mousedown + ")");
|
|
|
}
|
|
|
} else {
|
|
|
element.children().get(0).attr("placeholder", lastName)
|
|
@@ -623,10 +623,11 @@ public class ExcelTabController extends BladeController {
|
|
|
String fileUrl = wbsTreeContract.getHtmlUrl();
|
|
|
File file1 = ResourceUtil.getFile(fileUrl);
|
|
|
InputStream fileInputStream = null;
|
|
|
- if(file1.exists()){
|
|
|
- fileInputStream = new FileInputStream(file1);;
|
|
|
- }else{
|
|
|
- String path = sys_file_net_url+fileUrl.replaceAll("//","/").replaceAll(file_path,"");
|
|
|
+ if (file1.exists()) {
|
|
|
+ fileInputStream = new FileInputStream(file1);
|
|
|
+ ;
|
|
|
+ } else {
|
|
|
+ String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path, "");
|
|
|
fileInputStream = CommonUtil.getOSSInputStream(path);
|
|
|
}
|
|
|
|
|
@@ -986,46 +987,46 @@ public class ExcelTabController extends BladeController {
|
|
|
dataInfo = x1 + ":" + x2;
|
|
|
} else {
|
|
|
dataInfo = dataInfo + "," + x1 + ":" + x2;
|
|
|
- String[] arr= dataInfo.split(",");
|
|
|
+ String[] arr = dataInfo.split(",");
|
|
|
//排序
|
|
|
- for(int r=0;r<arr.length-1;r++) {
|
|
|
- for(int q = arr.length-2;q>=r;q--) {
|
|
|
- Integer jval = Integer.parseInt(arr[q+1].split(":")[0]);
|
|
|
+ for (int r = 0; r < arr.length - 1; r++) {
|
|
|
+ for (int q = arr.length - 2; q >= r; q--) {
|
|
|
+ Integer jval = Integer.parseInt(arr[q + 1].split(":")[0]);
|
|
|
Integer jval1 = Integer.parseInt(arr[q].split(":")[0]);
|
|
|
- if(jval<jval1) {
|
|
|
- String temp = arr[q+1];
|
|
|
- arr[q+1] = arr[q];
|
|
|
+ if (jval < jval1) {
|
|
|
+ String temp = arr[q + 1];
|
|
|
+ arr[q + 1] = arr[q];
|
|
|
arr[q] = temp;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//组合
|
|
|
- String newDataInfo ="";
|
|
|
- for(int r=0;r<arr.length;r++) {
|
|
|
- if(r==0){
|
|
|
+ String newDataInfo = "";
|
|
|
+ for (int r = 0; r < arr.length; r++) {
|
|
|
+ if (r == 0) {
|
|
|
newDataInfo = arr[0];
|
|
|
- }else{
|
|
|
- int StrMax = Integer.parseInt(newDataInfo.substring(newDataInfo.lastIndexOf(":")+1,newDataInfo.length()));
|
|
|
+ } else {
|
|
|
+ int StrMax = Integer.parseInt(newDataInfo.substring(newDataInfo.lastIndexOf(":") + 1, newDataInfo.length()));
|
|
|
Integer nowMin = Integer.parseInt(arr[r].split(":")[0]);
|
|
|
Integer nowMax = Integer.parseInt(arr[r].split(":")[1]);
|
|
|
- if((StrMax+1) == nowMin){
|
|
|
+ if ((StrMax + 1) == nowMin) {
|
|
|
String lastStr = "";
|
|
|
- if(newDataInfo.indexOf(",")>=0){
|
|
|
- lastStr = newDataInfo.substring(newDataInfo.lastIndexOf(",")+1,newDataInfo.length());
|
|
|
- newDataInfo = newDataInfo.substring(0,newDataInfo.lastIndexOf(","));
|
|
|
- }else{
|
|
|
- lastStr= newDataInfo;
|
|
|
+ if (newDataInfo.indexOf(",") >= 0) {
|
|
|
+ lastStr = newDataInfo.substring(newDataInfo.lastIndexOf(",") + 1, newDataInfo.length());
|
|
|
+ newDataInfo = newDataInfo.substring(0, newDataInfo.lastIndexOf(","));
|
|
|
+ } else {
|
|
|
+ lastStr = newDataInfo;
|
|
|
newDataInfo = "";
|
|
|
}
|
|
|
int lastmin = Integer.parseInt(lastStr.split(":")[0]);
|
|
|
- if(StringUtils.isNotEmpty(newDataInfo)){
|
|
|
- newDataInfo = newDataInfo +"," +lastmin+":"+nowMax;
|
|
|
- }else{
|
|
|
- newDataInfo = lastmin+":"+nowMax;
|
|
|
+ if (StringUtils.isNotEmpty(newDataInfo)) {
|
|
|
+ newDataInfo = newDataInfo + "," + lastmin + ":" + nowMax;
|
|
|
+ } else {
|
|
|
+ newDataInfo = lastmin + ":" + nowMax;
|
|
|
}
|
|
|
- }else{
|
|
|
- newDataInfo = newDataInfo +"," +nowMin+":"+nowMax;
|
|
|
+ } else {
|
|
|
+ newDataInfo = newDataInfo + "," + nowMin + ":" + nowMax;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1124,7 +1125,7 @@ public class ExcelTabController extends BladeController {
|
|
|
ExctabCell exctabCell = new ExctabCell();
|
|
|
if ((textInfo.indexOf("年") >= 0 && textInfo.indexOf("月") >= 0 && textInfo.indexOf("日") >= 0) || inputText.indexOf("日期") >= 0) {
|
|
|
if (inputText.indexOf("日期") >= 0) {
|
|
|
- data.empty().append("<el-date-picker type='date' @keyDowns='dateKeydown()' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='contextmenuClick("+parm+")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder='" + inputText + "'> </el-date-picker>");
|
|
|
+ data.empty().append("<el-date-picker type='date' @keyDowns='dateKeydown()' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder='" + inputText + "'> </el-date-picker>");
|
|
|
} else if (textInfo.indexOf("年") >= 0 && textInfo.indexOf("月") >= 0 && textInfo.indexOf("日") >= 0) {
|
|
|
if (inputText.indexOf("专业监理工程师") >= 0) {
|
|
|
inputText = "专业监理工程师_年月日";
|
|
@@ -1134,7 +1135,7 @@ public class ExcelTabController extends BladeController {
|
|
|
inputText = "年月日";
|
|
|
}
|
|
|
}
|
|
|
- data.empty().append("<el-date-picker @keyDowns='dateKeydown()' type='date' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='contextmenuClick("+parm+")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder='年月日'> </el-date-picker>");
|
|
|
+ data.empty().append("<el-date-picker @keyDowns='dateKeydown()' type='date' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder='年月日'> </el-date-picker>");
|
|
|
exctabCell.setTextInfo(inputText);
|
|
|
exctabCell.setExctabId(excelId);
|
|
|
exctabCell.setIsDeleted(0);
|
|
@@ -1171,32 +1172,32 @@ public class ExcelTabController extends BladeController {
|
|
|
objs.add(jsonObject);
|
|
|
}
|
|
|
|
|
|
- String checkbox = "<hc-form-checkbox-group @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' :objs='" + objs + "' @change='checkboxGroupChange' @contextmenu.prevent.native='contextmenuClick("+parm+")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " placeholder=''> </hc-form-checkbox-group>";
|
|
|
+ String checkbox = "<hc-form-checkbox-group @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' :objs='" + objs + "' @change='checkboxGroupChange' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " placeholder=''> </hc-form-checkbox-group>";
|
|
|
data.empty().append(checkbox);
|
|
|
|
|
|
} else {
|
|
|
if (index_state) { // 区域内
|
|
|
if (rowspan >= 1) {
|
|
|
- data.empty().append("<el-input type='textarea' @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' @contextmenu.prevent.native='contextmenuClick("+parm+")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' :rows=" + rowspan * 2 + " placeholder=''> </el-input>");
|
|
|
+ data.empty().append("<el-input type='textarea' @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' :rows=" + rowspan * 2 + " placeholder=''> </el-input>");
|
|
|
} else {
|
|
|
- data.empty().append("<el-input type='text' @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' @contextmenu.prevent.native='contextmenuClick("+parm+")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder=''> </el-input>");
|
|
|
+ data.empty().append("<el-input type='text' @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder=''> </el-input>");
|
|
|
}
|
|
|
} else { // 区域外
|
|
|
if (j == 0) {
|
|
|
if (colspan == maxCol && i >= 1) {
|
|
|
if (rowspan >= 1) {
|
|
|
- data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='textarea' @contextmenu.prevent.native='contextmenuClick("+parm+")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' :rows=" + rowspan * 2 + " placeholder=''> </el-input>");
|
|
|
+ data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='textarea' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' :rows=" + rowspan * 2 + " placeholder=''> </el-input>");
|
|
|
} else {
|
|
|
- data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='text' @contextmenu.prevent.native='contextmenuClick("+parm+")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder=''> </el-input>");
|
|
|
+ data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='text' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder=''> </el-input>");
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
Element bforData = tds.get(j - 1);
|
|
|
if (!bforData.text().isEmpty() || bforData.html().indexOf("hc-form-checkbox-group") >= 0) {
|
|
|
if (rowspan >= 1) {
|
|
|
- data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='textarea' @contextmenu.prevent.native='contextmenuClick("+parm+")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' :rows=" + rowspan * 2 + " placeholder=''> </el-input>");
|
|
|
+ data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='textarea' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' :rows=" + rowspan * 2 + " placeholder=''> </el-input>");
|
|
|
} else {
|
|
|
- data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='text' @contextmenu.prevent.native='contextmenuClick("+parm+")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder=''> </el-input>");
|
|
|
+ data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='text' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder=''> </el-input>");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1726,10 +1727,13 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
// 合并pdf加载
|
|
|
excelTabService.getBussPdfs(nodeid, classify, contractId, projectId);
|
|
|
- }catch (Exception e){
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
+ //更新缓存
|
|
|
+ informationQueryClient.delAsyncWbsTree(contractId);
|
|
|
+
|
|
|
return R.data("操作成功");
|
|
|
}
|
|
|
|
|
@@ -2063,9 +2067,9 @@ public class ExcelTabController extends BladeController {
|
|
|
// 匹配关联
|
|
|
try {
|
|
|
// File file1 = ResourceUtil.getFile(wbsTreeContract.getHtmlUrl());
|
|
|
- File file1 = ResourceUtil.getFile(tableNode2.getHtmlUrl());
|
|
|
+ File file1 = ResourceUtil.getFile(tableNode2.getHtmlUrl());
|
|
|
// File file1 = ResourceUtil.getFile("C:\\Users\\泓创研发01\\Desktop\\privateUrl\\1633285246067671040.html");
|
|
|
- if(file1.exists()){
|
|
|
+ if (file1.exists()) {
|
|
|
|
|
|
String htmlString = IoUtil.readToString(new FileInputStream(file1));
|
|
|
Document doc = Jsoup.parse(htmlString);
|
|
@@ -2677,7 +2681,7 @@ public class ExcelTabController extends BladeController {
|
|
|
String nodeid = tableInfo1.getString("nodeId");
|
|
|
List<TableInfo> tableInfoList = this.excelTabService.getTableInfoList(dataArray);
|
|
|
try {
|
|
|
- this.excelTabService.formulaFillData(tableInfoList, Long.parseLong(nodeid),ExecuteType.FAI);
|
|
|
+ this.excelTabService.formulaFillData(tableInfoList, Long.parseLong(nodeid), ExecuteType.FAI);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -2971,8 +2975,8 @@ public class ExcelTabController extends BladeController {
|
|
|
File imgFile = ResourceUtil.getFile(imgUrl);
|
|
|
imgFile.delete();
|
|
|
} else {*/
|
|
|
- // bladeFile = this.newIOSSClient.uploadFileByInputStream(file);
|
|
|
- // }
|
|
|
+ // bladeFile = this.newIOSSClient.uploadFileByInputStream(file);
|
|
|
+ // }
|
|
|
BladeFile bladeFile = new BladeFile();
|
|
|
bladeFile = this.newIOSSClient.uploadFileByInputStream(file);
|
|
|
return R.data(bladeFile);
|
|
@@ -3103,7 +3107,7 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParams(value = {
|
|
|
@ApiImplicitParam(name = "contractId", value = "contractId", required = true)
|
|
|
})
|
|
|
- public R getHtmlBussCols(String contractId){
|
|
|
+ public R getHtmlBussCols(String contractId) {
|
|
|
excelTabService.updateContractById(contractId);
|
|
|
return R.data("成功");
|
|
|
}
|