|
@@ -445,7 +445,7 @@ public class ExcelTabController extends BladeController {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 关联清表-保存1
|
|
|
+ * 关联清表-保存
|
|
|
*/
|
|
|
@GetMapping("/save-linkTab")
|
|
|
@ApiOperationSupport(order = 14)
|
|
@@ -455,7 +455,7 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParam(name = "tabId", value = "表Id", required = true),
|
|
|
})
|
|
|
public R<List<ExceTabTreVO>> saveLinkeTab(Long exceTabId, Long tabId) throws IOException {
|
|
|
- String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
+ String file_path =ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
//String file_path = "C:\\Users\\泓创开发\\Desktop";
|
|
|
|
|
|
// 关联 私有项目 wbs 数据信息
|
|
@@ -492,11 +492,11 @@ public class ExcelTabController extends BladeController {
|
|
|
//解析
|
|
|
Element table = doc.select("table").first();
|
|
|
Elements trs = table.select("tr");
|
|
|
- if (aPrivate.getInitTableId() == null) {
|
|
|
+ if (aPrivate.getInitTableId() == null){
|
|
|
org.springblade.manager.entity.TableInfo tableInfo = tableInfoService.getOne(new LambdaQueryWrapper<org.springblade.manager.entity.TableInfo>()
|
|
|
.eq(org.springblade.manager.entity.TableInfo::getTabEnName, aPrivate.getInitTableName()));
|
|
|
- aPrivate.setInitTableId(tableInfo.getId() + "");
|
|
|
- updateWrapper.set("init_table_id", tableInfo.getId() + "");
|
|
|
+ aPrivate.setInitTableId(tableInfo.getId()+"");
|
|
|
+ updateWrapper.set("init_table_id", tableInfo.getId()+"");
|
|
|
}
|
|
|
|
|
|
List<WbsFormElement> elementList = wbsFormElementService.selectElementListByFid(aPrivate.getInitTableId() + "");
|
|
@@ -1076,7 +1076,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' @keyup.shift.up='keyupShiftUp' @keyup.shift.down='keyupShiftDown' @keyup.shift.left='keyupShiftLeft' @keyup.shift.right='keyupShiftRight' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='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' popper-class='hc-table-form-date-picker' @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='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 = "专业监理工程师_年月日";
|
|
@@ -1086,7 +1086,7 @@ public class ExcelTabController extends BladeController {
|
|
|
inputText = "年月日";
|
|
|
}
|
|
|
}
|
|
|
- data.empty().append("<el-date-picker @keyup.shift.up='keyupShiftUp' @keyup.shift.down='keyupShiftDown' @keyup.shift.left='keyupShiftLeft' @keyup.shift.right='keyupShiftRight' type='date' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='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 popper-class='hc-table-form-date-picker' @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' type='date' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='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);
|
|
@@ -1144,7 +1144,7 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
} else {
|
|
|
Element bforData = tds.get(j - 1);
|
|
|
- if (!bforData.text().isEmpty() || bforData.html().indexOf("hc-form-checkbox-group") >= 0) {
|
|
|
+ if (!bforData.text().isEmpty() || bforData.html().indexOf("hc-form-checkbox-group")>=0) {
|
|
|
if (rowspan >= 1) {
|
|
|
data.empty().append("<el-input @keyup.shift.up='keyupShiftUp' @keyup.shift.down='keyupShiftDown' @keyup.shift.left='keyupShiftLeft' @keyup.shift.right='keyupShiftRight' type='textarea' @contextmenu.prevent.native='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 {
|
|
@@ -1408,13 +1408,13 @@ public class ExcelTabController extends BladeController {
|
|
|
String tabName = wbsTreeContract.getInitTableName();
|
|
|
// 字段查询 并去掉公式字段
|
|
|
|
|
|
- String colkeys = "SELECT GROUP_CONCAT(e_key) as colkeys from m_table_info a ,m_wbs_form_element b WHERE a.tab_en_name = '" + tabName + "' and a.id=b.f_id ";
|
|
|
+ String colkeys = "SELECT GROUP_CONCAT(e_key) as colkeys from m_table_info a ,m_wbs_form_element b WHERE a.tab_en_name = '"+tabName+"' and a.id=b.f_id ";
|
|
|
Map<String, Object> stringObjectMap = jdbcTemplate.queryForMap(colkeys);
|
|
|
colkeys = stringObjectMap.get("colkeys") + "";
|
|
|
|
|
|
// 复制表数据
|
|
|
|
|
|
- String querySql = "insert into " + tabName + " (id,p_key_id," + colkeys + ") select '" + newPkId + "','" + newPkId + "'," + colkeys + " from " + tabName + " where p_key_id=" + pkeyId;
|
|
|
+ String querySql = "insert into "+tabName+" (id,p_key_id,"+colkeys+") select '"+newPkId+"','"+newPkId+"'," + colkeys + " from " + tabName + " where p_key_id=" + pkeyId;
|
|
|
jdbcTemplate.execute(querySql);
|
|
|
|
|
|
wbsTreeContractService.save(wbsTreeContract);
|
|
@@ -1528,9 +1528,9 @@ public class ExcelTabController extends BladeController {
|
|
|
//优先使用电签的PDF
|
|
|
pdfUrl = stringObjectMap.get("e_visa_pdf_url");
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(pdfUrl + "")) {
|
|
|
- return R.fail(300, "无数据");
|
|
|
- } else {
|
|
|
+ if(StringUtils.isEmpty(pdfUrl+"")){
|
|
|
+ return R.fail(300,"无数据");
|
|
|
+ }else{
|
|
|
return R.data(pdfUrl);
|
|
|
}
|
|
|
|
|
@@ -1645,7 +1645,7 @@ public class ExcelTabController extends BladeController {
|
|
|
})
|
|
|
public R<String> getTheLogPdInfo(String theLogId, String nodePrimaryKeyId, String recordTime, String contractId) throws Exception {
|
|
|
//获取配置的路径
|
|
|
- String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
+ String file_path =ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
|
|
|
//获取对应的日志
|
|
|
JSONObject theLogJson;
|
|
@@ -1797,7 +1797,7 @@ public class ExcelTabController extends BladeController {
|
|
|
String key = e.getColKey();
|
|
|
String[] keys = key.split("__");
|
|
|
String[] trtd = keys[1].split("_");
|
|
|
- if (trs.size() > (Integer.parseInt(trtd[0]))) {
|
|
|
+ if ( trs.size() > (Integer.parseInt(trtd[0]))) {
|
|
|
Element trData = trs.get(Integer.parseInt(trtd[0]));
|
|
|
Elements tdDatas = trData.select("td");
|
|
|
if (tdDatas.size() > Integer.parseInt(trtd[1])) {
|
|
@@ -1816,8 +1816,7 @@ public class ExcelTabController extends BladeController {
|
|
|
cellRange.getCellStyle().getFont().setColor(Color.white);
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
- });
|
|
|
+ }});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1977,10 +1976,10 @@ public class ExcelTabController extends BladeController {
|
|
|
resultMapList.add(reData);
|
|
|
}
|
|
|
}
|
|
|
- } else {
|
|
|
+ }else {
|
|
|
WbsTreePrivate node = this.wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId, nodePrimaryKeyId));
|
|
|
WbsTreePrivate tableNode = this.wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery()
|
|
|
- .eq(WbsTreePrivate::getParentId, node.getId()).eq(WbsTreePrivate::getProjectId, node.getProjectId()));
|
|
|
+ .eq(WbsTreePrivate::getParentId, node.getId()).eq(WbsTreePrivate::getProjectId,node.getProjectId()));
|
|
|
Map<String, Object> reData = new HashMap<>();
|
|
|
// 获取默认值
|
|
|
QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
|
|
@@ -1996,6 +1995,7 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
return R.data(resultMapList);
|
|
|
}
|
|
|
|
|
@@ -2735,27 +2735,12 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParam(name = "id", value = "记录id-当做groupId", required = true)
|
|
|
})
|
|
|
public R<List<Map<String, Object>>> getBussDataInfoTrial(Long id, Long pkeyId) {
|
|
|
- List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrial(id, pkeyId);
|
|
|
+ List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrial(id, pkeyId );
|
|
|
return R.data(bussDataInfoTrial);
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/get-buss-dataInfo-list-trial")
|
|
|
- @ApiOperationSupport(order = 34)
|
|
|
- @ApiOperation(value = "获取试验用户保存数据-质检关联", notes = "获取试验用户保存数据")
|
|
|
- @ApiImplicitParams(value = {
|
|
|
- @ApiImplicitParam(name = "pkeyId", value = "表id", required = true),
|
|
|
- @ApiImplicitParam(name = "id", value = "记录id-当做groupId", required = true)
|
|
|
- })
|
|
|
- public R<Map<String, Object>> getBussDataInfoListTrial(Long id, Long pkeyId) {
|
|
|
- List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrial(id, pkeyId);
|
|
|
- bussDataInfoTrial.get(0).remove("group_id");
|
|
|
- return R.data(bussDataInfoTrial.get(0));
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 在线excel 修改回调
|
|
|
- *
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@PostMapping(value = "/callbackSave")
|
|
@@ -2766,4 +2751,60 @@ public class ExcelTabController extends BladeController {
|
|
|
return excelTabService.callbackSave(callback);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 质检 获取坐标位置
|
|
|
+ */
|
|
|
+ @GetMapping("/get-html-buss-cols")
|
|
|
+ @ApiOperationSupport(order = 36)
|
|
|
+ @ApiOperation(value = "获取坐标位置", notes = "获取坐标位置")
|
|
|
+ @ApiImplicitParams(value = {
|
|
|
+ @ApiImplicitParam(name = "pkeyId", value = "pkeyId", required = true)
|
|
|
+ })
|
|
|
+ public R getHtmlBussCols(Long pkeyId) throws FileNotFoundException {
|
|
|
+
|
|
|
+ WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
+ .eq(WbsTreeContract::getPKeyId, pkeyId));
|
|
|
+ if (wbsTreeContract == null) {
|
|
|
+ return R.fail("该数据下无此节点!");
|
|
|
+ }
|
|
|
+ if (wbsTreeContract.getHtmlUrl() == null) {
|
|
|
+ return R.fail("暂无表单!");
|
|
|
+ }
|
|
|
+
|
|
|
+ File file1 = ResourceUtil.getFile(wbsTreeContract.getHtmlUrl());
|
|
|
+ FileInputStream fileInputStream = new FileInputStream(file1);
|
|
|
+ String htmlString = IoUtil.readToString(fileInputStream);
|
|
|
+ // 解析 style
|
|
|
+ Document doc = Jsoup.parse(htmlString);
|
|
|
+ Element table = doc.select("table").first();
|
|
|
+ Elements trs = table.select("tr");
|
|
|
+
|
|
|
+ List<List<String>> redata = new ArrayList<>();
|
|
|
+ for (int i = 0; i < trs.size(); i++) {
|
|
|
+ Element tr = trs.get(i);
|
|
|
+ Elements tds = tr.select("td");
|
|
|
+ List<String> tdList = new ArrayList<>();
|
|
|
+ for (int j = 0; j < tds.size(); j++) {
|
|
|
+ Element element = tds.get(j);
|
|
|
+ if (element.html().indexOf("el-tooltip") >= 0) {
|
|
|
+ element = element.children().get(0);
|
|
|
+ }
|
|
|
+ if (element.children().size() >= 1) {
|
|
|
+ String keyname = element.children().get(0).attr("keyname");
|
|
|
+ if (StringUtils.isNotEmpty(keyname)) {
|
|
|
+ tdList.add(keyname);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(tdList!=null && tdList.size()>=1){
|
|
|
+ redata.add(tdList) ;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ String[][] res = new String[redata.size()][]; // 存放转换结果的 二维数组
|
|
|
+ for(int i=0; i<res.length; i++){ // 转换方法
|
|
|
+ res[i] = redata.get(i).toArray(new String[redata.get(i).size()]);
|
|
|
+ }
|
|
|
+ return R.data(res);
|
|
|
+ }
|
|
|
}
|