|
@@ -63,6 +63,7 @@ import org.springblade.resource.vo.NewBladeFile;
|
|
|
import org.springblade.system.cache.ParamCache;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
@@ -1965,13 +1966,17 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParam(name = "pkeyId", value = "主键id", required = true),
|
|
|
@ApiImplicitParam(name = "status", value = "状态(1显示 2隐藏)", required = true)
|
|
|
})
|
|
|
- public R showBussTab(Long pkeyId, int status) throws FileNotFoundException {
|
|
|
+ @Transactional
|
|
|
+ public R showBussTab(Long pkeyId, int status,String nodeId,String classify) throws Exception {
|
|
|
WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
.eq(WbsTreeContract::getPKeyId, pkeyId));
|
|
|
UpdateWrapper<WbsTreeContract> updateWrapper = new UpdateWrapper<>();
|
|
|
updateWrapper.in("p_key_id", pkeyId);
|
|
|
updateWrapper.set("is_buss_show", status);
|
|
|
wbsTreeContractService.update(updateWrapper);
|
|
|
+ excelTabService.getBussPdfInfo(pkeyId);
|
|
|
+ //重新生成PDF修改queryInfo
|
|
|
+ excelTabService.getBussPdfs(nodeId, classify, wbsTreeContract.getContractId(), wbsTreeContract.getProjectId());
|
|
|
return R.data("成功");
|
|
|
}
|
|
|
|
|
@@ -1984,7 +1989,25 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParam(name = "contractId", value = "合同段Id", required = true)
|
|
|
})
|
|
|
public R getPdfS(String nodeId, String classify, String contractId) throws FileNotFoundException {
|
|
|
- String sql = "select pdf_url,e_visa_pdf_url,pdf_trial_url,pdf_trial_url_position from u_information_query where classify='" + classify + "' and wbs_id='" + nodeId + "' and contract_id='" + contractId + "'";
|
|
|
+ //获取节点下的所有表单,和附件,如果表单全是隐藏的,并且没有附件,则提示暂无数据
|
|
|
+// WbsTreeContract node = wbsTreeContractService.getOne(new LambdaQueryWrapper<WbsTreeContract>().eq(WbsTreeContract::getPKeyId,nodeId));
|
|
|
+// List<WbsTreeContract> list = wbsTreeContractService.list(new LambdaQueryWrapper<WbsTreeContract>().eq(WbsTreeContract::getParentId, node.getId()).eq(WbsTreeContract::getContractId, contractId));
|
|
|
+// tableInfoService.list(new LambdaQueryWrapper<ta>())
|
|
|
+// if (list != null && list.size() > 0){
|
|
|
+// Boolean isShow = true;
|
|
|
+// for (WbsTreeContract contract : list) {
|
|
|
+// if (contract.getIsBussShow() == 1){
|
|
|
+// isShow = false;
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (isShow){
|
|
|
+// return R.fail("无历史数据预览,请保存数据");
|
|
|
+// }
|
|
|
+// }else {
|
|
|
+// return R.fail("无历史数据预览,请保存数据");
|
|
|
+// }
|
|
|
+ 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);
|
|
|
if (maps.size() >= 1) {
|
|
|
Map<String, Object> stringObjectMap = maps.get(0);
|
|
@@ -2000,7 +2023,7 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isEmpty(pdfUrl) || pdfUrl.equals("null")) {
|
|
|
- return R.fail("获取PDF失败");
|
|
|
+ return R.fail("暂无PDF数据");
|
|
|
} else {
|
|
|
return R.data(pdfUrl);
|
|
|
}
|