|
@@ -42,6 +42,7 @@ import org.jsoup.nodes.Document;
|
|
|
import org.jsoup.nodes.Element;
|
|
|
import org.jsoup.select.Elements;
|
|
|
import org.springblade.business.entity.InformationQuery;
|
|
|
+import org.springblade.business.entity.TrialSelfInspectionRecord;
|
|
|
import org.springblade.business.feign.ContractLogClient;
|
|
|
import org.springblade.business.feign.InformationQueryClient;
|
|
|
import org.springblade.business.feign.OperationLogClient;
|
|
@@ -945,7 +946,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
for (Element element : bhtitle) {
|
|
|
int trindex = Integer.parseInt(element.attr("trindex"));
|
|
|
if (trindex <= 10) {
|
|
|
- reData.put(element.attr("keyName"), node.getPartitionCode()==null?"":node.getPartitionCode());
|
|
|
+ reData.put(element.attr("keyName"), node.getPartitionCode() == null ? "" : node.getPartitionCode());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1114,13 +1115,12 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
newStyle.cloneStyleFrom(cell.getCellStyle());
|
|
|
|
|
|
|
|
|
-
|
|
|
short fontHeightInPoints = redFont.getFontHeightInPoints();
|
|
|
- if (fontHeightInPoints >= 14 && StringUtils.isEmpty(cell.getStringCellValue()) && fisRow<=8) {
|
|
|
+ if (fontHeightInPoints >= 14 && StringUtils.isEmpty(cell.getStringCellValue()) && fisRow <= 8) {
|
|
|
|
|
|
- String title=projectInfo.getProjectName();
|
|
|
- if(title.length()>=30){
|
|
|
- sheet.getRow(fisRow).setHeight((short)900);
|
|
|
+ String title = projectInfo.getProjectName();
|
|
|
+ if (title.length() >= 30) {
|
|
|
+ sheet.getRow(fisRow).setHeight((short) 900);
|
|
|
newStyle.setWrapText(true);
|
|
|
}
|
|
|
redFont.setBold(true);
|
|
@@ -1147,7 +1147,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
if (val.indexOf("__") >= 0) {
|
|
|
String[] DataVal = val.split("__");
|
|
|
String[] xy = DataVal[1].split("_");
|
|
|
- if (Integer.parseInt(xy[0])<trs.size()) {
|
|
|
+ if (Integer.parseInt(xy[0]) < trs.size()) {
|
|
|
Element ytzData = trs.get(Integer.parseInt(xy[0]));
|
|
|
if (ytzData != null) {
|
|
|
Elements tdsx = ytzData.select("td");
|
|
@@ -1258,11 +1258,11 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
String key = e.getColKey();
|
|
|
String[] keys = key.split("__");
|
|
|
String[] trtd = keys[1].split("_");
|
|
|
- if (Integer.parseInt(trtd[0])<trs.size()) {
|
|
|
+ if (Integer.parseInt(trtd[0]) < trs.size()) {
|
|
|
Element ytzData = trs.get(Integer.parseInt(trtd[0]));
|
|
|
if (ytzData != null) {
|
|
|
Elements tdsx = ytzData.select("td");
|
|
|
- if (Integer.parseInt(trtd[1])<tdsx.size()) {
|
|
|
+ if (Integer.parseInt(trtd[1]) < tdsx.size()) {
|
|
|
Element data = ytzData.select("td").get(Integer.parseInt(trtd[1]));
|
|
|
int x1 = Integer.parseInt(data.children().get(0).attr("x1"));
|
|
|
if (x1 == 0) {
|
|
@@ -1381,6 +1381,25 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
if (tabpdf2.exists()) {
|
|
|
tabpdf2.delete();
|
|
|
}
|
|
|
+
|
|
|
+ //TODO ------ 试验pdf关联部位工程及信息 liuYC 2023-03-13 ------
|
|
|
+ //获取试验记录id
|
|
|
+ List<String> recordIds = baseMapper.queryTrialRecordId(nodeId).stream().distinct().collect(Collectors.toList());
|
|
|
+ if (recordIds.size() > 0) {
|
|
|
+ String recordInfoSql = "select detection_category,detection_result,task_status,pdf_url from u_trial_self_inspection_record where id in(" + StringUtils.join(recordIds, ",") + ")";
|
|
|
+ List<TrialSelfInspectionRecord> query = jdbcTemplate.query(recordInfoSql, new BeanPropertyRowMapper<>(TrialSelfInspectionRecord.class));
|
|
|
+ if (query.size() > 0) {
|
|
|
+ //只获取已审批合格自检记录,追加试验pdf到质检后面
|
|
|
+ List<String> pdfUrlsTrail = query.stream().filter(f -> ("已审批").equals(f.getTaskStatus())
|
|
|
+ && (new Integer(1).equals(f.getDetectionResult()))
|
|
|
+ && (new Integer(1).equals(f.getDetectionCategory()))).map(TrialSelfInspectionRecord::getPdfUrl).collect(Collectors.toList());
|
|
|
+ if (pdfUrlsTrail.size() > 0) {
|
|
|
+ data.addAll(pdfUrlsTrail);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
FileUtils.mergePdfPublicMethods(data, listPdf);
|
|
|
BladeFile bladeFile = this.newIOSSClient.uploadFile(nodeId + ".pdf", listPdf);
|
|
|
|
|
@@ -1388,13 +1407,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, nodeId));
|
|
|
|
|
|
// 获取顺序
|
|
|
- int sort =0;
|
|
|
- if(ObjectUtil.isNotEmpty(wbsTreeContract)){
|
|
|
- if(wbsTreeContract.getSort()!=null){
|
|
|
+ int sort = 0;
|
|
|
+ if (ObjectUtil.isNotEmpty(wbsTreeContract)) {
|
|
|
+ if (wbsTreeContract.getSort() != null) {
|
|
|
sort = wbsTreeContract.getSort();
|
|
|
}
|
|
|
}
|
|
|
- String sql = "update u_information_query set pdf_url ='" + bladeFile.getLink() + "' ,sort = "+ sort +" where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
|
|
|
+ String sql = "update u_information_query set pdf_url ='" + bladeFile.getLink() + "' ,sort = " + sort + " where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
|
|
|
jdbcTemplate.execute(sql);
|
|
|
}
|
|
|
|