|
@@ -313,7 +313,7 @@ public class ExcelTabController extends BladeController {
|
|
BladeFile bladeFile = newIOSSClient.uploadFile(file.getOriginalFilename(), exceUrl);
|
|
BladeFile bladeFile = newIOSSClient.uploadFile(file.getOriginalFilename(), exceUrl);
|
|
// 解析原始excel
|
|
// 解析原始excel
|
|
|
|
|
|
- // BladeFile bladeFileR = newIOSSClient.uploadFileByInputStream(file);
|
|
|
|
|
|
+ // BladeFile bladeFileR = newIOSSClient.uploadFileByInputStream(file);
|
|
detail.setExtension(file.getOriginalFilename());
|
|
detail.setExtension(file.getOriginalFilename());
|
|
detail.setFileUrl(bladeFile.getLink());
|
|
detail.setFileUrl(bladeFile.getLink());
|
|
detail.setFileType(3); // 表示为清表信息 1 表示祖节点 2 表示为节点信息 3 表示清表
|
|
detail.setFileType(3); // 表示为清表信息 1 表示祖节点 2 表示为节点信息 3 表示清表
|
|
@@ -1801,7 +1801,7 @@ public class ExcelTabController extends BladeController {
|
|
// 解析 style
|
|
// 解析 style
|
|
Document doc = Jsoup.parse(htmlString);
|
|
Document doc = Jsoup.parse(htmlString);
|
|
Element table = doc.select("table").first();
|
|
Element table = doc.select("table").first();
|
|
- table.select("table").attr("min-width","-webkit-fill-available");
|
|
|
|
|
|
+ table.select("table").attr("min-width", "-webkit-fill-available");
|
|
doc.select("Col").remove();
|
|
doc.select("Col").remove();
|
|
fileInputStream.close();
|
|
fileInputStream.close();
|
|
return R.data(table + "");
|
|
return R.data(table + "");
|
|
@@ -1960,7 +1960,7 @@ public class ExcelTabController extends BladeController {
|
|
String sql = "select pdf_url,e_visa_pdf_url,pdf_trial_url,pdf_trial_url_position,status from u_information_query where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id='" + contractId + "'";
|
|
String sql = "select pdf_url,e_visa_pdf_url,pdf_trial_url,pdf_trial_url_position,status from u_information_query where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id='" + contractId + "'";
|
|
List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
|
|
List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
|
|
if (maps == null || maps.size() == 0) {
|
|
if (maps == null || maps.size() == 0) {
|
|
- WbsTreeContract contract = wbsTreeContractService.getOne(new LambdaQueryWrapper<WbsTreeContract>().eq(WbsTreeContract::getPKeyId,nodeId));
|
|
|
|
|
|
+ WbsTreeContract contract = wbsTreeContractService.getOne(new LambdaQueryWrapper<WbsTreeContract>().eq(WbsTreeContract::getPKeyId, nodeId));
|
|
String fileName = this.wbsParamService.createFileTitle(contract);
|
|
String fileName = this.wbsParamService.createFileTitle(contract);
|
|
InformationQuery query = new InformationQuery();
|
|
InformationQuery query = new InformationQuery();
|
|
query.setId(SnowFlakeUtil.getId());
|
|
query.setId(SnowFlakeUtil.getId());
|
|
@@ -1972,7 +1972,7 @@ public class ExcelTabController extends BladeController {
|
|
query.setType((contract.getIsExpernode() == null || contract.getIsExpernode() <= 0) ? 1 : 2);
|
|
query.setType((contract.getIsExpernode() == null || contract.getIsExpernode() <= 0) ? 1 : 2);
|
|
query.setName(fileName);
|
|
query.setName(fileName);
|
|
query.setCreateTime(new Date());
|
|
query.setCreateTime(new Date());
|
|
- query.setFileUserIdAndName(AuthUtil.getUserId()+"-"+AuthUtil.getUserName());
|
|
|
|
|
|
+ query.setFileUserIdAndName(AuthUtil.getUserId() + "-" + AuthUtil.getUserName());
|
|
informationQueryClient.saveInfo(query);
|
|
informationQueryClient.saveInfo(query);
|
|
}
|
|
}
|
|
excelTabService.getBussPdfs(nodeId, classify, contractId, projectId);
|
|
excelTabService.getBussPdfs(nodeId, classify, contractId, projectId);
|
|
@@ -2031,11 +2031,11 @@ public class ExcelTabController extends BladeController {
|
|
return R.fail("暂无PDF数据");
|
|
return R.fail("暂无PDF数据");
|
|
} else {
|
|
} else {
|
|
// 由于独立附件 需要追加最后
|
|
// 由于独立附件 需要追加最后
|
|
- List<TableFileVO> data = tableFileService.selectTableFileListByTen(Long.valueOf(nodeId+""));
|
|
|
|
|
|
+ List<TableFileVO> data = tableFileService.selectTableFileListByTen(Long.valueOf(nodeId + ""));
|
|
List<String> datainfo = new ArrayList<>();
|
|
List<String> datainfo = new ArrayList<>();
|
|
datainfo.add(pdfUrl);
|
|
datainfo.add(pdfUrl);
|
|
- if(data!=null && data.size()>=1){
|
|
|
|
- for(TableFileVO tabsx :data){
|
|
|
|
|
|
+ if (data != null && data.size() >= 1) {
|
|
|
|
+ for (TableFileVO tabsx : data) {
|
|
datainfo.add(tabsx.getUrl());
|
|
datainfo.add(tabsx.getUrl());
|
|
}
|
|
}
|
|
String listPdf = file_path + "/pdf/" + nodeId + ".pdf";
|
|
String listPdf = file_path + "/pdf/" + nodeId + ".pdf";
|
|
@@ -2046,7 +2046,7 @@ public class ExcelTabController extends BladeController {
|
|
FileUtils.mergePdfPublicMethods(datainfo, listPdf);
|
|
FileUtils.mergePdfPublicMethods(datainfo, listPdf);
|
|
String netUrl = FileUtils.getNetUrl(listPdf);
|
|
String netUrl = FileUtils.getNetUrl(listPdf);
|
|
return R.data(netUrl);
|
|
return R.data(netUrl);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
return R.data(pdfUrl);
|
|
return R.data(pdfUrl);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2106,9 +2106,6 @@ public class ExcelTabController extends BladeController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
@PostMapping("/save_buss_data")
|
|
@PostMapping("/save_buss_data")
|
|
@ApiOperationSupport(order = 13)
|
|
@ApiOperationSupport(order = 13)
|
|
@ApiOperation(value = "填报页面数据保存", notes = "填报页面数据保存")
|
|
@ApiOperation(value = "填报页面数据保存", notes = "填报页面数据保存")
|
|
@@ -2189,7 +2186,7 @@ public class ExcelTabController extends BladeController {
|
|
if (errorPKeyIds.size() > 0) {
|
|
if (errorPKeyIds.size() > 0) {
|
|
List<AppWbsTreeContractVO> errorTabs = new LinkedList<>();
|
|
List<AppWbsTreeContractVO> errorTabs = new LinkedList<>();
|
|
for (AppWbsTreeContractVO appWbsTreeContractVO : tableAll) {
|
|
for (AppWbsTreeContractVO appWbsTreeContractVO : tableAll) {
|
|
- if (errorPKeyIds.contains(appWbsTreeContractVO.getPKeyId().toString())){
|
|
|
|
|
|
+ if (errorPKeyIds.contains(appWbsTreeContractVO.getPKeyId().toString())) {
|
|
errorTabs.add(appWbsTreeContractVO);
|
|
errorTabs.add(appWbsTreeContractVO);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2411,8 +2408,8 @@ public class ExcelTabController extends BladeController {
|
|
sheet.getCellRange(y1, x1).getStyle().setShrinkToFit(true);
|
|
sheet.getCellRange(y1, x1).getStyle().setShrinkToFit(true);
|
|
|
|
|
|
} else if (data.html().indexOf("hc-form-checkbox-group") >= 0) {
|
|
} else if (data.html().indexOf("hc-form-checkbox-group") >= 0) {
|
|
- CellRange cellRange = sheet.getCellRange(y1, x1);
|
|
|
|
- String exceVal = cellRange.getValue().replaceAll(" ", "");
|
|
|
|
|
|
+ CellRange cellRange = sheet.getCellRange(y1, x1);
|
|
|
|
+ String exceVal = cellRange.getValue().replaceAll(" ", "");
|
|
//如果有□ 代表 自动生成 如果没有 代表后期添加 需要显示html 中的值
|
|
//如果有□ 代表 自动生成 如果没有 代表后期添加 需要显示html 中的值
|
|
if (exceVal.indexOf("□") >= 0) {
|
|
if (exceVal.indexOf("□") >= 0) {
|
|
if (myData.equals("1")) {
|
|
if (myData.equals("1")) {
|
|
@@ -2420,7 +2417,7 @@ public class ExcelTabController extends BladeController {
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
List<Node> nodes = data.childNodes();
|
|
List<Node> nodes = data.childNodes();
|
|
- Node node = nodes.get(nodes.size() -1);
|
|
|
|
|
|
+ Node node = nodes.get(nodes.size() - 1);
|
|
String dataJson = node.attr(":objs");
|
|
String dataJson = node.attr(":objs");
|
|
if (StringUtils.isNotEmpty(dataJson)) {
|
|
if (StringUtils.isNotEmpty(dataJson)) {
|
|
JSONArray jsonArray = JSONArray.parseArray(dataJson);
|
|
JSONArray jsonArray = JSONArray.parseArray(dataJson);
|
|
@@ -3800,47 +3797,48 @@ public class ExcelTabController extends BladeController {
|
|
@PostMapping("/save_sigpdfInfo12313213")
|
|
@PostMapping("/save_sigpdfInfo12313213")
|
|
@ApiOperationSupport(order = 72)
|
|
@ApiOperationSupport(order = 72)
|
|
@ApiOperation(value = "pdf", notes = "pdf")
|
|
@ApiOperation(value = "pdf", notes = "pdf")
|
|
- public void synPDFInfo(@RequestParam String contractid,@RequestParam String typeinfo){
|
|
|
|
- String sqlInfo = "SELECT DISTINCT wbs_id,classify,contract_id,project_id,type from u_information_query where contract_id='"+contractid+"' and is_deleted=0 and type=1 and classify='"+typeinfo+"' and wbs_id in(SELECT p_key_id from m_wbs_tree_contract where is_deleted=0 and contract_id='"+contractid+"')";
|
|
|
|
|
|
+ public void synPDFInfo(@RequestParam String contractid, @RequestParam String typeinfo) {
|
|
|
|
+ String sqlInfo = "SELECT DISTINCT wbs_id,classify,contract_id,project_id,type from u_information_query where contract_id='" + contractid + "' and is_deleted=0 and type=1 and classify='" + typeinfo + "' and wbs_id in(SELECT p_key_id from m_wbs_tree_contract where is_deleted=0 and contract_id='" + contractid + "')";
|
|
List<Map<String, Object>> maps = jdbcTemplate.queryForList(sqlInfo);
|
|
List<Map<String, Object>> maps = jdbcTemplate.queryForList(sqlInfo);
|
|
System.out.println(maps.size());
|
|
System.out.println(maps.size());
|
|
|
|
|
|
- int i=0;
|
|
|
|
- if(maps!=null && maps.size()>=1){
|
|
|
|
- for(Map<String, Object> dataMap:maps){
|
|
|
|
- String nodeId = dataMap.get("wbs_id")+"";
|
|
|
|
- String classify = dataMap.get("classify")+"";
|
|
|
|
- String contractId = dataMap.get("contract_id")+"";
|
|
|
|
- String projectId = dataMap.get("project_id")+"";
|
|
|
|
- List<AppWbsTreeContractVO> tableAll = wbsTreeContractService.searchNodeAllTable(nodeId, classify, contractId, projectId);
|
|
|
|
- if(tableAll!=null && tableAll.size()>=1){
|
|
|
|
- for(AppWbsTreeContractVO tab:tableAll){
|
|
|
|
- try {
|
|
|
|
- excelTabService.getBussPdfInfo(Long.parseLong(tab.getPKeyId()+""));
|
|
|
|
- }catch (Exception e){
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }finally {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
|
|
+ int i = 0;
|
|
|
|
+ if (maps != null && maps.size() >= 1) {
|
|
|
|
+ for (Map<String, Object> dataMap : maps) {
|
|
|
|
+ String nodeId = dataMap.get("wbs_id") + "";
|
|
|
|
+ String classify = dataMap.get("classify") + "";
|
|
|
|
+ String contractId = dataMap.get("contract_id") + "";
|
|
|
|
+ String projectId = dataMap.get("project_id") + "";
|
|
|
|
+ List<AppWbsTreeContractVO> tableAll = wbsTreeContractService.searchNodeAllTable(nodeId, classify, contractId, projectId);
|
|
|
|
+ if (tableAll != null && tableAll.size() >= 1) {
|
|
|
|
+ for (AppWbsTreeContractVO tab : tableAll) {
|
|
|
|
+ try {
|
|
|
|
+ excelTabService.getBussPdfInfo(Long.parseLong(tab.getPKeyId() + ""));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ } finally {
|
|
|
|
+ continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- i=i+1;
|
|
|
|
- System.out.println("完成1---="+i);
|
|
|
|
- try {
|
|
|
|
- excelTabService.getBussPdfs(nodeId, classify, contractId, projectId);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- continue;
|
|
|
|
- }finally {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ i = i + 1;
|
|
|
|
+ System.out.println("完成1---=" + i);
|
|
|
|
+ try {
|
|
|
|
+ excelTabService.getBussPdfs(nodeId, classify, contractId, projectId);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ continue;
|
|
|
|
+ } finally {
|
|
|
|
+ continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 用户保存新接口
|
|
* 用户保存新接口
|
|
|
|
+ *
|
|
* @param dataInfo
|
|
* @param dataInfo
|
|
* @return
|
|
* @return
|
|
* @throws Exception
|
|
* @throws Exception
|
|
@@ -3856,13 +3854,14 @@ public class ExcelTabController extends BladeController {
|
|
} else { //单个保存
|
|
} else { //单个保存
|
|
dataArray.add(dataInfo);
|
|
dataArray.add(dataInfo);
|
|
}
|
|
}
|
|
- this.excelTabService.formulaFillData2(dataArray,ExecuteType.INSPECTION);
|
|
|
|
|
|
+ this.excelTabService.formulaFillData2(dataArray, ExecuteType.INSPECTION);
|
|
return excelTabService.saveBussData(dataArray);
|
|
return excelTabService.saveBussData(dataArray);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 质检附件追加
|
|
* 质检附件追加
|
|
|
|
+ *
|
|
* @return ObjectStat
|
|
* @return ObjectStat
|
|
*/
|
|
*/
|
|
@SneakyThrows
|
|
@SneakyThrows
|
|
@@ -3876,8 +3875,8 @@ public class ExcelTabController extends BladeController {
|
|
})
|
|
})
|
|
public R addBussFile(@RequestParam("file") MultipartFile[] file, String nodeId) {
|
|
public R addBussFile(@RequestParam("file") MultipartFile[] file, String nodeId) {
|
|
List<TableFile> fileList = new ArrayList<>();
|
|
List<TableFile> fileList = new ArrayList<>();
|
|
- if(file!=null && file.length>=1){
|
|
|
|
- for (MultipartFile multipartFile:file){
|
|
|
|
|
|
+ if (file != null && file.length >= 1) {
|
|
|
|
+ for (MultipartFile multipartFile : file) {
|
|
R<BladeFile> bladeFile = iossClient.addFileInfo(multipartFile);
|
|
R<BladeFile> bladeFile = iossClient.addFileInfo(multipartFile);
|
|
BladeFile bladeFile1 = bladeFile.getData();
|
|
BladeFile bladeFile1 = bladeFile.getData();
|
|
|
|
|
|
@@ -3894,7 +3893,7 @@ public class ExcelTabController extends BladeController {
|
|
}
|
|
}
|
|
tableFileService.saveOrUpdateBatch(fileList);
|
|
tableFileService.saveOrUpdateBatch(fileList);
|
|
return R.data("操作成功");
|
|
return R.data("操作成功");
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
return R.data("请上传pdf");
|
|
return R.data("请上传pdf");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3910,21 +3909,21 @@ public class ExcelTabController extends BladeController {
|
|
@ApiImplicitParam(name = "classify", value = "classify", required = true),
|
|
@ApiImplicitParam(name = "classify", value = "classify", required = true),
|
|
@ApiImplicitParam(name = "projectId", value = "projectId", required = true)
|
|
@ApiImplicitParam(name = "projectId", value = "projectId", required = true)
|
|
})
|
|
})
|
|
- public R synPDFInfo(String contractId,String nodeIds, String classify, String projectId) {
|
|
|
|
|
|
+ public R synPDFInfo(String contractId, String nodeIds, String classify, String projectId) {
|
|
|
|
|
|
- if( contractId==null && StringUtils.isEmpty(contractId)){
|
|
|
|
|
|
+ if (contractId == null && StringUtils.isEmpty(contractId)) {
|
|
return R.data("contractId不能为空");
|
|
return R.data("contractId不能为空");
|
|
}
|
|
}
|
|
|
|
|
|
- if(nodeIds==null && StringUtils.isEmpty(nodeIds)){
|
|
|
|
|
|
+ if (nodeIds == null && StringUtils.isEmpty(nodeIds)) {
|
|
return R.data("nodeId不能为空");
|
|
return R.data("nodeId不能为空");
|
|
}
|
|
}
|
|
|
|
|
|
- if(classify==null && StringUtils.isEmpty(classify)){
|
|
|
|
|
|
+ if (classify == null && StringUtils.isEmpty(classify)) {
|
|
return R.data("classify不能为空");
|
|
return R.data("classify不能为空");
|
|
}
|
|
}
|
|
|
|
|
|
- if(projectId==null && StringUtils.isEmpty(projectId)){
|
|
|
|
|
|
+ if (projectId == null && StringUtils.isEmpty(projectId)) {
|
|
return R.data("projectId不能为空");
|
|
return R.data("projectId不能为空");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3962,7 +3961,7 @@ public class ExcelTabController extends BladeController {
|
|
js.put("dataInfo", js2);
|
|
js.put("dataInfo", js2);
|
|
this.saveBussData2(js);
|
|
this.saveBussData2(js);
|
|
}
|
|
}
|
|
- }catch (Exception e){
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
return R.data("成功");
|
|
return R.data("成功");
|