|
@@ -1246,22 +1246,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
if (wbsTreeContractByP != null) {
|
|
|
//处理文件提名
|
|
|
String fileName = this.wbsParamService.createFileTitle(wbsTreeContractByP);
|
|
|
- String sql="select template_type from m_contract_info where id="+wbsTreeContractByP.getContractId();
|
|
|
- Integer type = jdbcTemplate.query(sql, rs -> {
|
|
|
- if (rs.next()) {
|
|
|
- return rs.getObject(1, Integer.class);
|
|
|
- } else {
|
|
|
- return 0; // 默认值
|
|
|
- }
|
|
|
- });
|
|
|
- if(type==2){
|
|
|
- if(wbsTreeContractByP.getMajorDataType()!=null&&wbsTreeContractByP.getMajorDataType()==4){
|
|
|
- if(tableInfo.getClassify()!=null&&tableInfo.getClassify().equals("1")){
|
|
|
- //查询是否是底层节点
|
|
|
- fileName=fileName+"检验申请批复单及附件";
|
|
|
- }else {
|
|
|
- fileName=fileName+"抽检记录";
|
|
|
- }
|
|
|
+ String sql1="Select sg_suffix,jl_suffix from m_project_info where id="+wbsTreeContractByP.getProjectId()+" and is_deleted=0";
|
|
|
+ List<ProjectInfo> query = jdbcTemplate.query(sql1, new BeanPropertyRowMapper<>(ProjectInfo.class));
|
|
|
+ if(query.size()>0){
|
|
|
+ if(tableInfo.getClassify()!=null&&tableInfo.getClassify().equals("1")){
|
|
|
+ fileName=fileName+(query.get(0).getSgSuffix()==null?"":query.get(0).getSgSuffix());
|
|
|
+ }else {
|
|
|
+ fileName=fileName+(query.get(0).getJlSuffix()==null?"":query.get(0).getJlSuffix());
|
|
|
}
|
|
|
}
|
|
|
//huangjn 保存成功后调用生成资料查询列表数据
|
|
@@ -1300,22 +1291,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
.eq(WbsTreeContract::getId, wbsTreeContract.getParentId()).eq(WbsTreeContract::getContractId, wbsTreeContract.getContractId()));
|
|
|
//处理文件提名
|
|
|
fileName1= this.wbsParamService.createFileTitle(wbsTreeContractByP);
|
|
|
- String sql="select template_type from m_contract_info where id="+wbsTreeContractByP.getContractId();
|
|
|
- Integer type = jdbcTemplate.query(sql, rs -> {
|
|
|
- if (rs.next()) {
|
|
|
- return rs.getObject(1, Integer.class);
|
|
|
- } else {
|
|
|
- return 0; // 默认值
|
|
|
- }
|
|
|
- });
|
|
|
- if(type==2){
|
|
|
- if(wbsTreeContractByP.getMajorDataType()!=null&&wbsTreeContractByP.getMajorDataType()==4){
|
|
|
- if(tableInfoList.get(0).getClassify()!=null&&tableInfoList.get(0).getClassify().equals("1")){
|
|
|
- //查询是否是底层节点
|
|
|
- fileName1=fileName1+"检验申请批复单及附件";
|
|
|
- }else {
|
|
|
- fileName1=fileName1+"抽检记录";
|
|
|
- }
|
|
|
+ String sql1="Select sg_suffix,jl_suffix from m_project_info where id="+wbsTreeContractByP.getProjectId()+" and is_deleted=0";
|
|
|
+ List<ProjectInfo> query = jdbcTemplate.query(sql1, new BeanPropertyRowMapper<>(ProjectInfo.class));
|
|
|
+ if(query.size()>0){
|
|
|
+ if(tableInfoList.get(0).getClassify()!=null&&tableInfoList.get(0).getClassify().equals("1")){
|
|
|
+ fileName1=fileName1+(query.get(0).getSgSuffix()==null?"":query.get(0).getSgSuffix());
|
|
|
+ }else {
|
|
|
+ fileName1=fileName1+(query.get(0).getJlSuffix()==null?"":query.get(0).getJlSuffix());
|
|
|
}
|
|
|
}
|
|
|
//huangjn 保存成功后调用生成资料查询列表数据
|