|
@@ -72,10 +72,12 @@ import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import javax.imageio.ImageIO;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.validation.Valid;
|
|
@@ -91,7 +93,9 @@ import java.nio.file.StandardCopyOption;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.List;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.CompletableFuture;
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
+import java.util.concurrent.ThreadPoolExecutor;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.regex.Matcher;
|
|
@@ -162,6 +166,11 @@ public class ExcelTabController extends BladeController {
|
|
|
private final TaskClient taskClient;
|
|
|
|
|
|
|
|
|
+ // 线程池
|
|
|
+ @Resource(name = "taskExecutor1")
|
|
|
+ private ThreadPoolExecutor executor;
|
|
|
+
|
|
|
+
|
|
|
@Autowired
|
|
|
StringRedisTemplate RedisTemplate;
|
|
|
|
|
@@ -1746,7 +1755,6 @@ public class ExcelTabController extends BladeController {
|
|
|
informationQueryClient.saveInfo(query);
|
|
|
}
|
|
|
excelTabService.getBussPdfs(nodeId, classify, contractId, projectId);
|
|
|
-
|
|
|
return R.data(tableFile.getId());
|
|
|
}
|
|
|
|
|
@@ -1771,6 +1779,8 @@ public class ExcelTabController extends BladeController {
|
|
|
return R.data("成功");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
@GetMapping("/get-buss-pdfs")
|
|
|
@ApiOperationSupport(order = 21)
|
|
|
@ApiOperation(value = "多表预览", notes = "多表预览")
|
|
@@ -1816,7 +1826,7 @@ public class ExcelTabController extends BladeController {
|
|
|
for (TableFileVO tabsx : data) {
|
|
|
datainfo.add(tabsx.getUrl());
|
|
|
}
|
|
|
- String listPdf = file_path + "/pdf/" + nodeId + ".pdf";
|
|
|
+ String listPdf = file_path + "/nodePDF/" + nodeId + ".pdf";
|
|
|
File tabpdf2 = ResourceUtil.getFile(listPdf);
|
|
|
if (tabpdf2.exists()) {
|
|
|
tabpdf2.delete();
|
|
@@ -1832,9 +1842,10 @@ public class ExcelTabController extends BladeController {
|
|
|
}else{
|
|
|
netUrl = FileUtils.getNetUrl(listPdf);
|
|
|
}
|
|
|
-
|
|
|
+ jdbcTemplate.execute(" update u_information_query set node_pdf_url='"+netUrl+"' where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id='" + contractId + "'");
|
|
|
return R.data(netUrl);
|
|
|
} else {
|
|
|
+ jdbcTemplate.execute(" update u_information_query set node_pdf_url='"+pdfUrl+"' where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id='" + contractId + "'");
|
|
|
return R.data(pdfUrl);
|
|
|
}
|
|
|
}
|
|
@@ -2662,6 +2673,29 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 日期默认值
|
|
|
+ Elements dateTitle = doc.select("el-date-picker[placeholder~=日期]");
|
|
|
+ //日期默认
|
|
|
+ if (dateTitle.size() >= 1) {
|
|
|
+ for (Element element : dateTitle) {
|
|
|
+ int trindex = Integer.parseInt(element.attr("trindex"));
|
|
|
+ if (trindex <= 10) {
|
|
|
+ reData.put(element.attr("keyName"), recordTime);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 添加默认值
|
|
|
+ Elements elements = doc.getElementsByAttribute("defText");
|
|
|
+ if(Func.isNotEmpty(elements) && elements.size()>=1){
|
|
|
+ for(Element eleme: elements){
|
|
|
+ String id = Func.isNull(eleme.attr("id"))?eleme.attr("keyname"):eleme.attr("id");
|
|
|
+ if(Func.isNotEmpty(id)){
|
|
|
+ reData.put(id, eleme.attr("defText"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
@@ -2713,20 +2747,6 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 获取默认值
|
|
|
- QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("type", 4);
|
|
|
- queryWrapper.eq("tab_id", node.getPKeyId());
|
|
|
- final List<TextdictInfo> textDictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
|
- if (!textDictInfos.isEmpty()) {
|
|
|
- for (TextdictInfo textdictInfo : textDictInfos) {
|
|
|
- if (reData.containsKey(textdictInfo.getColKey())) {
|
|
|
- String keyVal = reData.get(textdictInfo.getColKey()) + "";
|
|
|
- } else {
|
|
|
- reData.put(textdictInfo.getColKey() + "", textdictInfo.getSigRoleName());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
//移除id和p_key_id
|
|
|
reData.remove("p_key_id");
|
|
|
reData.remove("classify");
|
|
@@ -2741,18 +2761,7 @@ public class ExcelTabController extends BladeController {
|
|
|
} else {
|
|
|
Map<String, Object> reData2 = new HashMap<>();
|
|
|
//获取默认值
|
|
|
- QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("type", 4);
|
|
|
- queryWrapper.eq("tab_id", tableNode2.getPKeyId());
|
|
|
- final List<TextdictInfo> textDictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
|
- if (!textDictInfos.isEmpty()) {
|
|
|
- for (TextdictInfo textdictInfo : textDictInfos) {
|
|
|
- reData2.put(textdictInfo.getColKey() + "", textdictInfo.getSigRoleName());
|
|
|
- }
|
|
|
- if (reData2.size() > 0) {
|
|
|
- resultMapList.add(reData2);
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
@@ -2775,6 +2784,8 @@ public class ExcelTabController extends BladeController {
|
|
|
htdtitle.addAll(htdtitle1);
|
|
|
|
|
|
Elements jltitle = doc.select("el-input[placeholder~=监理单位.*]");
|
|
|
+ Elements jltit = doc.select("el-input[placeholder~=监理机构.*]");
|
|
|
+ jltitle.addAll(jltit);
|
|
|
|
|
|
Elements bhtitle = doc.select("el-input[placeholder~=^编号]");
|
|
|
Elements bhtitle1 = doc.select("el-input[placeholder~=合同编号.*]");
|
|
@@ -2783,6 +2794,9 @@ public class ExcelTabController extends BladeController {
|
|
|
|
|
|
Elements xmtitle = doc.select("el-input[placeholder~=^项目名称]");
|
|
|
|
|
|
+ // 日期默认值
|
|
|
+ Elements dateTitle = doc.select("el-date-picker[placeholder~=日期]");
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 承包单位 承包单位、施工单位:引用施工单位名称 ,
|
|
@@ -2838,6 +2852,28 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //日期默认
|
|
|
+ if (dateTitle.size() >= 1) {
|
|
|
+ for (Element element : dateTitle) {
|
|
|
+ int trindex = Integer.parseInt(element.attr("trindex"));
|
|
|
+ if (trindex <= 10) {
|
|
|
+ reData.put(element.attr("keyName"), recordTime);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 添加默认值
|
|
|
+ Elements elements = doc.getElementsByAttribute("defText");
|
|
|
+ if(Func.isNotEmpty(elements) && elements.size()>=1){
|
|
|
+ for(Element eleme: elements){
|
|
|
+ String id = Func.isNull(eleme.attr("id"))?eleme.attr("keyname"):eleme.attr("id");
|
|
|
+ if(Func.isNotEmpty(id)){
|
|
|
+ reData.put(id, eleme.attr("defText"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
@@ -3558,21 +3594,8 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiOperationSupport(order = 32)
|
|
|
@ApiOperation(value = "表单填写图片上传", notes = "表单填写图片上传")
|
|
|
public R addBussFile(@RequestParam MultipartFile file) {
|
|
|
- /*String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
- //String file_path = "/Users/hongchuangyanfa/Desktop/";//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
- BladeFile bladeFile = new BladeFile();
|
|
|
- if (file.getSize() >= 1024) {
|
|
|
- String filecode = SnowFlakeUtil.getId() + "";
|
|
|
- String imgUrl = file_path + "/pdf/" + filecode + ".jpg";
|
|
|
- FileUtils.CompressImage(imgUrl, file.getInputStream());
|
|
|
- bladeFile = this.newIOSSClient.uploadFile(file.getOriginalFilename(), imgUrl);
|
|
|
- File imgFile = ResourceUtil.getFile(imgUrl);
|
|
|
- imgFile.delete();
|
|
|
- } else {*/
|
|
|
- // bladeFile = this.newIOSSClient.uploadFileByInputStream(file);
|
|
|
- // }
|
|
|
- BladeFile bladeFile = new BladeFile();
|
|
|
- bladeFile = this.newIOSSClient.uploadFileByInputStream(file);
|
|
|
+
|
|
|
+ BladeFile bladeFile = this.newIOSSClient.uploadFileByInputStream(file);
|
|
|
return R.data(bladeFile);
|
|
|
}
|
|
|
|
|
@@ -3742,64 +3765,6 @@ public class ExcelTabController extends BladeController {
|
|
|
return R.data("成功!");
|
|
|
}
|
|
|
|
|
|
-// @PostMapping("/batchUploadExcelTab")
|
|
|
-// @ApiOperationSupport(order = 39)
|
|
|
-// @ApiOperation(value = "批量上传清表", notes = "传入id、fileList")
|
|
|
-// public R<Object> batchUploadExcelTab(@RequestParam Long id, @RequestPart("file") MultipartFile[] file) throws IOException {
|
|
|
-// if (ObjectUtil.isEmpty(id)) {
|
|
|
-// throw new ServiceException("获取节点信息失败");
|
|
|
-// }
|
|
|
-// if (file.length <= 0) {
|
|
|
-// throw new ServiceException("未获取到需要上传的文件信息");
|
|
|
-// }
|
|
|
-// ExcelTab excelTabParentNode = excelTabService.getBaseMapper().selectById(id);
|
|
|
-// List<ExcelTab> excelTabs = excelTabService.getBaseMapper().selectList(Wrappers.<ExcelTab>lambdaQuery().select(ExcelTab::getSort).eq(ExcelTab::getParentId, excelTabParentNode.getId()));
|
|
|
-// Optional<Integer> maxSort = excelTabs.stream().map(ExcelTab::getSort).max(Integer::compare);
|
|
|
-// int maxValue = 1;
|
|
|
-// if (maxSort.isPresent()) {
|
|
|
-// maxValue = maxSort.get();
|
|
|
-// }
|
|
|
-// for (MultipartFile fileDTO : file) {
|
|
|
-// if (ObjectUtil.isEmpty(fileDTO.getOriginalFilename())) {
|
|
|
-// throw new ServiceException("文件名不能为空");
|
|
|
-// }
|
|
|
-// if (!this.isExcelFormat(fileDTO.getOriginalFilename())) {
|
|
|
-// throw new ServiceException("文件名后缀不是.xlsx或者.xls格式,请重新填写");
|
|
|
-// }
|
|
|
-// if (!this.isExcelFile(fileDTO)) {
|
|
|
-// throw new ServiceException("【" + fileDTO.getOriginalFilename() + "】文件不是excel格式文件,上传终止");
|
|
|
-// }
|
|
|
-// try {
|
|
|
-// R<BladeFile> bladeFile = iossClient.addFileInfo(fileDTO);
|
|
|
-// if (ObjectUtil.isNotEmpty(bladeFile.getData())) {
|
|
|
-// //创建节点,并上传excel文件到节点上
|
|
|
-// ExcelTab excelTabNode = new ExcelTab();
|
|
|
-// excelTabNode.setId(SnowFlakeUtil.getId());
|
|
|
-// excelTabNode.setParentId(excelTabParentNode.getId());
|
|
|
-// excelTabNode.setFileType(3); //不要上传按钮 默认=3
|
|
|
-// excelTabNode.setName(fileDTO.getOriginalFilename().split(".xls")[0]);
|
|
|
-// excelTabNode.setAlias(excelTabParentNode.getAlias() + "," + excelTabParentNode.getId());
|
|
|
-// excelTabNode.setFileUrl(bladeFile.getData().getLink());
|
|
|
-// excelTabNode.setExtension(fileDTO.getOriginalFilename());
|
|
|
-// excelTabNode.setCreateTime(new Date());
|
|
|
-// excelTabNode.setUpdateTime(new Date());
|
|
|
-// excelTabNode.setCreateUser(SecureUtil.getUserId());
|
|
|
-// excelTabNode.setUpdateUser(SecureUtil.getUserId());
|
|
|
-// excelTabNode.setCreateDept(SecureUtil.getUser().getDeptId().contains(",") ? Long.parseLong(SecureUtil.getUser().getDeptId().split(",")[0]) : Long.parseLong(SecureUtil.getUser().getDeptId()));
|
|
|
-// excelTabNode.setStatus(1);
|
|
|
-// excelTabNode.setIsDeleted(0);
|
|
|
-// excelTabNode.setTabType(excelTabParentNode.getTabType());
|
|
|
-// excelTabNode.setTenantId(SecureUtil.getTenantId());
|
|
|
-// excelTabNode.setSort(maxValue++);
|
|
|
-// excelTabService.save(excelTabNode);
|
|
|
-// }
|
|
|
-// } catch (Exception e) {
|
|
|
-// throw new ServiceException("【" + fileDTO.getOriginalFilename() + "】文件上传失败,上传终止" + e.getMessage());
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return R.success("操作成功");
|
|
|
-// }
|
|
|
-
|
|
|
|
|
|
@PostMapping("/batchUploadExcelTab")
|
|
|
@ApiOperationSupport(order = 39)
|
|
@@ -3937,7 +3902,6 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -4044,26 +4008,6 @@ public class ExcelTabController extends BladeController {
|
|
|
List<AppWbsTreeContractVO> tableAll = wbsTreeContractService.searchNodeAllTable(noId, classify, contractId, projectId, null);
|
|
|
JSONArray array = new JSONArray();
|
|
|
if (tableAll != null && tableAll.size() >= 1) {
|
|
|
- /* for (AppWbsTreeContractVO tab : tableAll) {
|
|
|
- try {
|
|
|
- Map<String, Object> jo = excelTabService.getBussDataInfo(tab.getPKeyId(), 0);
|
|
|
- String s = new Gson().toJson(jo);
|
|
|
- //字符串转jsonobject
|
|
|
- JSONObject obj = JSON.parseObject(s);
|
|
|
- obj.put("classify", classify);
|
|
|
- obj.put("nodeId", noId);
|
|
|
- obj.put("contractId", contractId);
|
|
|
- obj.put("pkeyId", tab.getPKeyId());
|
|
|
- obj.put("projectId", projectId);
|
|
|
- obj.put("isCollapseLoad", true);
|
|
|
- obj.put("isRenderForm", true);
|
|
|
- array.add(obj);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- } finally {
|
|
|
- continue;
|
|
|
- }
|
|
|
- }*/
|
|
|
/*只需加载第一张即可,生效会自动补全*/
|
|
|
AppWbsTreeContractVO tab =tableAll.get(0);
|
|
|
Map<String, Object> jo = excelTabService.getBussDataInfo(tab.getPKeyId(), 0);
|
|
@@ -4155,4 +4099,142 @@ public class ExcelTabController extends BladeController {
|
|
|
List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrialentrust(id, pkeyId, contractId);
|
|
|
return R.data(bussDataInfoTrial);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @Scheduled(cron = "0/20 * * * * ?")
|
|
|
+ public void SignInfo() {
|
|
|
+ //执行代码
|
|
|
+ String sql = "SELECT a.* from u_information_query a,m_wbs_tree_contract b where a.wbs_id=b.p_key_id and a.project_id='1681859557657550850' and a.create_dept=100 LIMIT 5";
|
|
|
+ List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
|
|
|
+ if (maps != null && maps.size() >= 1) {
|
|
|
+ for (Map<String, Object> dataInfo : maps) {
|
|
|
+ if (executor.getQueue().size()<=40 ) {
|
|
|
+ String idkey = dataInfo.get("id")+"";
|
|
|
+ Boolean aBoolean = RedisTemplate.hasKey("sign-" + idkey);
|
|
|
+ if(!aBoolean){
|
|
|
+ RedisTemplate.opsForValue().set("sign-" + idkey, "1",30, TimeUnit.SECONDS);
|
|
|
+ CompletableFuture<Void> runAsync = CompletableFuture.runAsync(() -> {
|
|
|
+ try {
|
|
|
+ /*===============执行批量任务===============*/
|
|
|
+ this.checkIsExsitTaskBatch(dataInfo);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }, executor);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ System.out.println("队列数量" + executor.getQueue().size());
|
|
|
+ System.out.println("活跃数量" + executor.getActiveCount());
|
|
|
+ System.out.println("总共数量" + executor.getTaskCount());
|
|
|
+ System.out.println("完成数量" + executor.getCompletedTaskCount());
|
|
|
+ }
|
|
|
+
|
|
|
+ public void checkIsExsitTaskBatch(Map<String, Object> dataInfo) {
|
|
|
+ // 数据
|
|
|
+ String file_path = "/Users/hongchuangyanfa/Desktop/";
|
|
|
+ String nodeId = dataInfo.get("wbs_id")+"";
|
|
|
+ String classify = dataInfo.get("classify")+"";
|
|
|
+ String contractId = dataInfo.get("contract_id")+"";
|
|
|
+ String projectId = dataInfo.get("project_id")+"";
|
|
|
+ String pdfUrl = dataInfo.get("pdf_url") + "";
|
|
|
+ try {
|
|
|
+
|
|
|
+ if (dataInfo.get("e_visa_pdf_url") != null) {
|
|
|
+ //优先使用电签的pdf
|
|
|
+ pdfUrl = dataInfo.get("e_visa_pdf_url") + "";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dataInfo.get("pdf_trial_url") != null || dataInfo.get("pdf_trial_url_position") != null) {
|
|
|
+ //合并试验关联文件、试验工程部位信息的pdf
|
|
|
+ pdfUrl = this.mergePdfShow(pdfUrl, dataInfo) + "";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(pdfUrl) || pdfUrl.equals("null")) {
|
|
|
+ System.out.println("");
|
|
|
+ } else {
|
|
|
+ // 由于独立附件 需要追加最后
|
|
|
+ List<TableFileVO> data = tableFileService.selectTableFileListByTen(Long.valueOf(nodeId + ""));
|
|
|
+ List<String> datainfo = new ArrayList<>();
|
|
|
+ datainfo.add(pdfUrl);
|
|
|
+ if (data != null && data.size() >= 1) {
|
|
|
+ for (TableFileVO tabsx : data) {
|
|
|
+ datainfo.add(tabsx.getUrl());
|
|
|
+ }
|
|
|
+ String listPdf = file_path + "/nodePDF/" + nodeId + ".pdf";
|
|
|
+ File tabpdf2 = ResourceUtil.getFile(listPdf);
|
|
|
+ if (tabpdf2.exists()) {
|
|
|
+ tabpdf2.delete();
|
|
|
+ }
|
|
|
+
|
|
|
+ FileUtils.mergePdfPublicMethods(datainfo, listPdf);
|
|
|
+ String netUrl = "";
|
|
|
+
|
|
|
+ BladeFile bladeFile = this.newIOSSClient.uploadFile(nodeId + ".pdf", listPdf);
|
|
|
+ if (bladeFile != null && ObjectUtils.isNotEmpty(bladeFile.getLink())) {
|
|
|
+ netUrl = bladeFile.getLink();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ List<String> list = Arrays.asList(nodeId.split(","));
|
|
|
+ Long userId = 1777156889464066049L;
|
|
|
+ String dateInfo = "";
|
|
|
+ for (String iId : list) {
|
|
|
+ //获取
|
|
|
+ /* if(StringUtils.isNotBlank(dataInfo.get("file_user_id_and_name")+"")){
|
|
|
+ String userIdAndName = dataInfo.get("file_user_id_and_name")+"";
|
|
|
+ String[] split = userIdAndName.split("-");
|
|
|
+ userId = Long.parseLong(split[0]);
|
|
|
+ }*/
|
|
|
+
|
|
|
+ List<AppWbsTreeContractVO> WbsTreeContract = wbsTreeContractService.searchNodeAllTable(nodeId+":"+userId, classify, contractId, projectId ,null);
|
|
|
+
|
|
|
+ Map<String, String> idMap = new HashMap<>();
|
|
|
+ String wbsSql = "select * from m_tab_busstime_info where is_deleted = 0 and tab_en_name IN('111111'";
|
|
|
+
|
|
|
+ for (AppWbsTreeContractVO appWbsTreeContractVO : WbsTreeContract) {
|
|
|
+
|
|
|
+ wbsSql+=",'"+appWbsTreeContractVO.getInitTableName()+"'";
|
|
|
+ idMap.put(appWbsTreeContractVO.getInitTableName(), appWbsTreeContractVO.getPKeyId() + "");
|
|
|
+ }
|
|
|
+ wbsSql+=")";
|
|
|
+ List<Map<String, Object>> tabussTimeInfo = jdbcTemplate.queryForList(wbsSql);
|
|
|
+
|
|
|
+
|
|
|
+ if (tabussTimeInfo != null && tabussTimeInfo.size() >= 1) {
|
|
|
+ Map<String, Object> tabBusstimeInfo = tabussTimeInfo.get(0);
|
|
|
+
|
|
|
+ String querySql = "select " + tabBusstimeInfo.get("col_key") + " from " + tabBusstimeInfo.get("tab_en_name") + " where p_key_id=" + idMap.get(tabBusstimeInfo.get("tab_en_name"));
|
|
|
+ Map<String, Object> maps = jdbcTemplate.queryForMap(querySql);
|
|
|
+ if (maps != null) {
|
|
|
+ String keyData = maps.get(tabBusstimeInfo.get("col_key")) + "";
|
|
|
+ if (StringUtils.isNotEmpty(keyData)) {
|
|
|
+ dateInfo = keyData.split("_\\^_")[0];
|
|
|
+ if (dateInfo.indexOf("年") >= 0) {
|
|
|
+ dateInfo = dateInfo.replace("年", "-");
|
|
|
+ }
|
|
|
+ if (dateInfo.indexOf("月") >= 0) {
|
|
|
+ dateInfo = dateInfo.replace("月", "-");
|
|
|
+ }
|
|
|
+ if (dateInfo.indexOf("日") >= 0) {
|
|
|
+ dateInfo = dateInfo.replace("日", "");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(pdfUrl!=null && pdfUrl.length()>=20){
|
|
|
+ String pdfPage = commonFileClient.getPdfNum(pdfUrl);
|
|
|
+ long pdfSize = CommonUtil.getResourceLength(pdfUrl);
|
|
|
+ jdbcTemplate.execute(" update u_information_query set e_visa_pdf_size="+pdfSize+",e_visa_pdf_page="+pdfPage+", node_pdf_url='" + pdfUrl + "',create_dept=11 where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id='" + contractId + "'");
|
|
|
+ }
|
|
|
+ }catch (Exception e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|