|
@@ -256,6 +256,16 @@ public class ExcelTabController extends BladeController {
|
|
|
return R.data(tree);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 清表模板树节点排序
|
|
|
+ */
|
|
|
+ @PostMapping("/tab-sort")
|
|
|
+ @ApiOperationSupport(order = 8)
|
|
|
+ @ApiOperation(value = "清表模板树节点排序", notes = "传入节点ids字符串,英文逗号分割")
|
|
|
+ public R<Object> tabSort(@RequestParam String ids) {
|
|
|
+ return R.status(excelTabService.tabSort(Func.toStrList(ids)));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 上传文件
|
|
|
*
|
|
@@ -409,7 +419,7 @@ public class ExcelTabController extends BladeController {
|
|
|
wbsTreePrivateService.update(updateWrapper);
|
|
|
}
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
excelTabService.saveOrUpdate(excelTab);
|
|
|
}
|
|
|
|
|
@@ -440,7 +450,7 @@ public class ExcelTabController extends BladeController {
|
|
|
})
|
|
|
public R<List<ExceTabTreVO>> saveLinkeTab(Long exceTabId, Long tabId) throws IOException {
|
|
|
//String file_path ="C:\\Users\\Administrator\\Desktop\\fsdownload\\"; //ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
- String file_path =ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
+ String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
|
|
|
// 关联 私有项目 wbs 数据信息
|
|
|
WbsTreePrivate wbsTree = new WbsTreePrivate();
|
|
@@ -460,7 +470,7 @@ public class ExcelTabController extends BladeController {
|
|
|
|
|
|
// 复制模版htmlURL
|
|
|
File file_in = ResourceUtil.getFile(excelTab.getHtmlUrl());
|
|
|
- // File file_in = ResourceUtil.getFile(file_path+"1542338623020961794.html");
|
|
|
+ // File file_in = ResourceUtil.getFile(file_path+"1542338623020961794.html");
|
|
|
String filecode = SnowFlakeUtil.getId() + "";
|
|
|
String thmlUrl = file_path + "/privateUrl/" + filecode + ".html";
|
|
|
File file_out = ResourceUtil.getFile(thmlUrl);
|
|
@@ -541,7 +551,7 @@ public class ExcelTabController extends BladeController {
|
|
|
|
|
|
|
|
|
//由于日志无法拿到基本节点,将 关联html的id 放入在父节点excelId 处理
|
|
|
- if (aPrivate.getType()!=10 && aPrivate.getWbsType().equals("4")) {
|
|
|
+ if (aPrivate.getType() != 10 && aPrivate.getWbsType().equals("4")) {
|
|
|
WbsTreePrivate wbsTreePrivate = wbsTreePrivateService.getBaseMapper().selectOne(Wrappers.<WbsTreePrivate>query().lambda()
|
|
|
.eq(WbsTreePrivate::getId, aPrivate.getParentId()) // 获取父节点Id
|
|
|
.eq(WbsTreePrivate::getWbsType, "4") // 内型为4
|
|
@@ -554,7 +564,7 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
wbsTreePrivateService.update(updateWrapper);
|
|
|
//关联项目下所有的合同段
|
|
|
- if(aPrivate.getType()!=10){
|
|
|
+ if (aPrivate.getType() != 10) {
|
|
|
aPrivate.setHtmlUrl(thmlUrl);
|
|
|
wbsTreeContractService.updateAllNodeTabById(aPrivate);
|
|
|
}
|
|
@@ -606,7 +616,7 @@ public class ExcelTabController extends BladeController {
|
|
|
// 标题解决
|
|
|
ProjectInfo projectInfo = projectInfoService.getById(wbsTreeContract.getProjectId());
|
|
|
// 添加标题显示
|
|
|
- // Elements dwtitle = doc.getElementsByAttributeValueMatching("style", "18.0pt");
|
|
|
+ // Elements dwtitle = doc.getElementsByAttributeValueMatching("style", "18.0pt");
|
|
|
Elements trs = table.select("tr");
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
Element tr = trs.get(i);
|
|
@@ -615,10 +625,10 @@ public class ExcelTabController extends BladeController {
|
|
|
Element data = tds.get(j);
|
|
|
int colspan = data.attr("COLSPAN").equals("") ? 0 : Integer.parseInt(data.attr("COLSPAN"));
|
|
|
String style = data.attr("style");
|
|
|
- if(style.indexOf("font-size")>=0){
|
|
|
- int fontsize = Integer.parseInt(style.substring(style.indexOf("font-size:")+10,style.indexOf(".0pt")));
|
|
|
- if (StringUtils.isNotEmpty(data.text()) && fontsize>=12) {
|
|
|
- trs.get(i-1).select("td").get(0).text(projectInfo.getProjectName());
|
|
|
+ if (style.indexOf("font-size") >= 0) {
|
|
|
+ int fontsize = Integer.parseInt(style.substring(style.indexOf("font-size:") + 10, style.indexOf(".0pt")));
|
|
|
+ if (StringUtils.isNotEmpty(data.text()) && fontsize >= 12) {
|
|
|
+ trs.get(i - 1).select("td").get(0).text(projectInfo.getProjectName());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1250,7 +1260,7 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParams(value = {
|
|
|
@ApiImplicitParam(name = "pkeyId", value = "pkeyId", required = true)
|
|
|
})
|
|
|
- public R copeBussTab(Long pkeyId){
|
|
|
+ public R copeBussTab(Long pkeyId) {
|
|
|
WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
.eq(WbsTreeContract::getPKeyId, pkeyId));
|
|
|
|
|
@@ -1289,7 +1299,7 @@ public class ExcelTabController extends BladeController {
|
|
|
// 复制表数据
|
|
|
String querySql = "select " + colkeys + " from " + tabName + " where p_key_id=" + pkeyId;
|
|
|
List<Map<String, Object>> dataList = jdbcTemplate.queryForList(querySql);
|
|
|
- if (dataList != null && dataList.size()>=1) {
|
|
|
+ if (dataList != null && dataList.size() >= 1) {
|
|
|
Map<String, Object> dataMap2 = dataList.get(0);
|
|
|
|
|
|
dataMap2.remove("p_key_id");
|
|
@@ -1421,7 +1431,7 @@ public class ExcelTabController extends BladeController {
|
|
|
String sql = "select pdf_url, e_visa_pdf_url from u_information_query where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
|
|
|
|
|
|
List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
|
|
|
- if(maps!=null && maps.size()>=1){
|
|
|
+ if (maps != null && maps.size() >= 1) {
|
|
|
Map<String, Object> stringObjectMap = maps.get(0);
|
|
|
Object pdfUrl = stringObjectMap.get("pdf_url");
|
|
|
if (stringObjectMap.get("e_visa_pdf_url") != null) {
|
|
@@ -1429,7 +1439,7 @@ public class ExcelTabController extends BladeController {
|
|
|
pdfUrl = stringObjectMap.get("e_visa_pdf_url");
|
|
|
}
|
|
|
return R.data(pdfUrl);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return R.fail("无历史数据预览,请保存数据");
|
|
|
}
|
|
|
}
|
|
@@ -1473,7 +1483,7 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
|
|
|
R info = this.excelTabService.saveOrUpdateInfo(tableInfoList);
|
|
|
- if(!info.isSuccess()){
|
|
|
+ if (!info.isSuccess()) {
|
|
|
return info;
|
|
|
}
|
|
|
//单个 pdf加载
|
|
@@ -1772,11 +1782,11 @@ public class ExcelTabController extends BladeController {
|
|
|
//数据结果
|
|
|
Map<String, Object> reData = new HashMap<>();
|
|
|
|
|
|
- String id = mysqlData.get("id")+"" ;
|
|
|
- String querySqlx = "SELECT tree_primary_key_id as primaryKeyId,title as path from u_contract_log_wbs where business_id ='"+id+"' and is_deleted=0";
|
|
|
+ String id = mysqlData.get("id") + "";
|
|
|
+ String querySqlx = "SELECT tree_primary_key_id as primaryKeyId,title as path from u_contract_log_wbs where business_id ='" + id + "' and is_deleted=0";
|
|
|
List<Map<String, Object>> businessDat = this.jdbcTemplate.queryForList(querySqlx);
|
|
|
- if(businessDat!=null){
|
|
|
- reData.put("linkTabIds",businessDat);
|
|
|
+ if (businessDat != null) {
|
|
|
+ reData.put("linkTabIds", businessDat);
|
|
|
}
|
|
|
|
|
|
for (String key : mysqlData.keySet()) {
|
|
@@ -2554,8 +2564,8 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParam(name = "linkids", value = "节点信息表", required = true),
|
|
|
@ApiImplicitParam(name = "type", value = "(1 元素表关联 2表示新增 3 表示项目节点关联)", required = true)
|
|
|
})
|
|
|
- public R saveLinkeTableInfo(String tabId, String linkids,String type){
|
|
|
- return wbsTreePrivateService.saveLinkeTableInfo(tabId,linkids,type);
|
|
|
+ public R saveLinkeTableInfo(String tabId, String linkids, String type) {
|
|
|
+ return wbsTreePrivateService.saveLinkeTableInfo(tabId, linkids, type);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -2565,10 +2575,9 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParams(value = {
|
|
|
@ApiImplicitParam(name = "pkeyId", value = "pkeyId", required = true)
|
|
|
})
|
|
|
- public R getBussDataInfoTrial(Long pkeyId){
|
|
|
+ public R getBussDataInfoTrial(Long pkeyId) {
|
|
|
return excelTabService.getBussDataInfoTrial(pkeyId);
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
}
|