|
@@ -4301,17 +4301,20 @@ public class ExcelTabController extends BladeController {
|
|
|
}else {
|
|
|
WbsTreeContract wbsInfo = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
.eq(WbsTreeContract::getPKeyId, pkeyId));
|
|
|
- String sql="select * from m_wbs_tree_contract where p_id="+wbsInfo.getPId()+" and is_type_private_pid="+wbsInfo.getIsTypePrivatePid();
|
|
|
- List<WbsTreeContract> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
|
|
|
- if(!list.isEmpty()){
|
|
|
- for (WbsTreeContract wbsTreeContract : list) {
|
|
|
- String tabName = wbsTreeContract.getInitTableName();
|
|
|
- if (StringUtils.isNotEmpty(tabName)) {
|
|
|
- String delSql = "delete from " + tabName + " where p_key_id = " + wbsTreeContract.getPKeyId();
|
|
|
- jdbcTemplate.execute(delSql);
|
|
|
+ if(wbsInfo.getIsTypePrivatePid()!=null){
|
|
|
+ String sql="select * from m_wbs_tree_contract where p_id="+wbsInfo.getPId()+" and is_type_private_pid="+wbsInfo.getIsTypePrivatePid()+" and project_id="+wbsInfo.getProjectId();
|
|
|
+ List<WbsTreeContract> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
|
|
|
+ if(!list.isEmpty()){
|
|
|
+ for (WbsTreeContract wbsTreeContract : list) {
|
|
|
+ String tabName = wbsTreeContract.getInitTableName();
|
|
|
+ if (StringUtils.isNotEmpty(tabName)) {
|
|
|
+ String delSql = "delete from " + tabName + " where p_key_id = " + wbsTreeContract.getPKeyId();
|
|
|
+ jdbcTemplate.execute(delSql);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
return R.data("成功!");
|
|
|
}
|