|
@@ -394,11 +394,15 @@ public class TextdictInfoController extends BladeController {
|
|
|
String isExitSql = " select * from information_schema.TABLES where TABLE_NAME='" + tabName + "'";
|
|
|
List<Map<String, Object>> tablist = jdbcTemplate.queryForList(isExitSql);
|
|
|
if (tablist != null && tablist.size() > 0 && wbsTreePrivate.getType() != 10) {
|
|
|
- String clarSql = "update " + tabName + " set " + keyname.split("__")[0] + "=null where p_key_id in(SELECT p_key_id FROM m_wbs_tree_contract WHERE is_type_private_pid ='" + wbsTreePrivate.getPKeyId() + "' and project_id='" + wbsTreePrivate.getProjectId() + "'UNION ALL SELECT 1 )";
|
|
|
+ String[] split = keyname.split("__");
|
|
|
+ String clarSql = "update " + tabName + " set " + split[0] + "=null where p_key_id in(SELECT p_key_id FROM m_wbs_tree_contract WHERE is_type_private_pid ='" + wbsTreePrivate.getPKeyId() + "' and project_id='" + wbsTreePrivate.getProjectId() + "'UNION ALL SELECT 1 )";
|
|
|
+ if (split.length > 1 && StringUtil.isNumeric(split[1]) && Integer.parseInt(split[1]) > 80) {
|
|
|
+ clarSql = "update " + tabName + " set key_201 = REPLACE(key_201, '" + split[0] + ":' , ':') where p_key_id in(SELECT p_key_id FROM m_wbs_tree_contract WHERE is_type_private_pid ='" + wbsTreePrivate.getPKeyId() + "' and project_id='" + wbsTreePrivate.getProjectId() + "'UNION ALL SELECT 1 )";
|
|
|
+ }
|
|
|
try {
|
|
|
jdbcTemplate.execute(clarSql);
|
|
|
} catch (DataAccessException e) {
|
|
|
- throw new RuntimeException("该实体信息无对应字段");
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
}
|