1.事务添加
2.亦庄bug修改 3.业务系统添加逻辑变更
This commit is contained in:
@@ -448,7 +448,7 @@
|
||||
|
||||
</div>
|
||||
<div class="box_2">
|
||||
<input type="button" class=btn3_mouseout
|
||||
<!-- <input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
@@ -464,13 +464,14 @@
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:importXls();" value="i18n_dsil.button.importXls_n81i"/>
|
||||
|
||||
-->
|
||||
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:showDiv();" value="i18n_dsil.button.showDiv_n81i"/>
|
||||
onclick="javascript:showDiv();" value="i18n_dsil.button.showDiv_n81i" style="float: right"/>
|
||||
<br/>
|
||||
<div style="float: left">
|
||||
<jsp:include page="/include/include.jsp" />
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/layer.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/raphael.js'/>"></script>
|
||||
<link rel="stylesheet"
|
||||
@@ -221,9 +223,16 @@ body {
|
||||
success:function (data,textStatus){
|
||||
if(textStatus == "success" && (data!= null && data!= "" )){
|
||||
$("#nodeBoxs").html("");
|
||||
var t =$("#nodeBox").dialog("options").title;
|
||||
$("#nodeBox").dialog("setTitle", params[1]);
|
||||
$("#nodeBox").dialog("open");
|
||||
// var t =$("#nodeBox").dialog("options").title;
|
||||
/* $("#nodeBox").dialog("setTitle", params[1]);
|
||||
$("#nodeBox").dialog("open"); */
|
||||
window.top.layer.open({
|
||||
title:params[1],
|
||||
type:1,
|
||||
content:$("#nodeBox"),
|
||||
shade:0.3
|
||||
});
|
||||
|
||||
var length = $(data).length;
|
||||
var raphaelBox = Raphael("nodeBoxs",boxWidth,boxHeight);
|
||||
//raphaelBox.rect(0,0,boxWidth,boxHeight).attr({'stroke-width':1,stroke: "#FFFFFF", fill: "#FBFBEA"});
|
||||
@@ -308,6 +317,7 @@ body {
|
||||
nodeIndex++;
|
||||
nodeIndexs[nodeIndex]={"x":subBoxStartX-5,"y":subBoxY+5};
|
||||
}
|
||||
console.log("rephaelBox:"+raphaelBox);
|
||||
}else{
|
||||
var title="i18n_snr.message.UBit_n81i"+item.nodeposition;
|
||||
raphaelBox.rect(subBoxStartX,subBoxY,subWidth,newHeight).attr({stroke: "#CEDBEF",'stroke-width':0.1,title:title, fill: "#ffffff"})
|
||||
|
||||
@@ -39,16 +39,20 @@
|
||||
}
|
||||
|
||||
function doUpdate(yhid,yhbh){
|
||||
if(yhForm.email.value!=""){
|
||||
if(!checkEmail(yhForm.email.value.toLowerCase())){
|
||||
$("#email").next().html('i18n_usi.message.email_n81i');
|
||||
yhForm.email.focus();
|
||||
return false;
|
||||
var emailFlag=${session.emailFlag};
|
||||
if(emailFlag==0){
|
||||
if(yhForm.email.value!=""){
|
||||
if(!checkEmail(yhForm.email.value.toLowerCase())){
|
||||
$("#email").next().html('i18n_usi.message.email_n81i');
|
||||
yhForm.email.focus();
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
$("#email").next().html('i18n_usi.message.emailInput_n81i');
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
$("#email").next().html('i18n_usi.message.emailInput_n81i');
|
||||
return;
|
||||
}
|
||||
|
||||
if($("#y").attr('checked')==true){
|
||||
if($id("yhmm","","i18n_usi.text.yhmm_n81i")&&$id("confirm","","i18n_usi.text.confirm_n81i")){
|
||||
var yhmm = document.getElementById("yhmm").value;
|
||||
|
||||
@@ -350,8 +350,10 @@
|
||||
</c:if>
|
||||
</td>
|
||||
<td class="${tdClassR }">
|
||||
<c:if test="${aji.jsbh gt 100100}">
|
||||
<img src="<c:url value='/images/logo_1.png'/>" class="img_middle" />
|
||||
<a href="javascript:openUpdateRecord('${aji.jsbh}')">i18n_gil.text.updateInfo_n81i</a>
|
||||
</c:if>
|
||||
</td >
|
||||
</tr>
|
||||
<c:set var="index" value="${index + 1}" />
|
||||
|
||||
@@ -450,7 +450,6 @@
|
||||
if(type == 9){
|
||||
if(da[3]!=null && da[3]==0){//服务器/pc
|
||||
td1 ="<input id='nodeIds' name='nodeCheckBoxName' class='alldisabled' type='checkbox' disabled='disabled' value='"+da[0]+"'/>"+index;
|
||||
tit="这特么是服务器!";
|
||||
}else if(da[3]!=null && da[3]==1 ){//交换机
|
||||
td1 ="<input id='nodeIds' name='nodeCheckBoxName' type='checkbox' value='"+da[0]+"' checked />"+index;
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ public class DeptManageAction extends BaseAction {
|
||||
// 进行修改模块信息操作
|
||||
public void update() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(dept.getDeptid()!=null && !dept.getDeptid().toString().equals("1")){
|
||||
if(dept.getDeptstate()!=null){
|
||||
if(dept.getDeptstate().equals("1")){//置为无效,则其下部门全部职位无效
|
||||
@@ -128,10 +129,12 @@ public class DeptManageAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
}
|
||||
commonService.commit();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeptManageAction.update.success_n81i');this.location='deptManage!execute.do?action=queryDeptInfo'</script>");
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeptManageAction.update.faild_n81i');this.location='deptManage!execute.do?action=queryDeptInfo'</script>");
|
||||
}
|
||||
}
|
||||
@@ -139,6 +142,7 @@ public class DeptManageAction extends BaseAction {
|
||||
// 添加模块信息操作
|
||||
public void add() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
TableDepartment dptDepartment = new TableDepartment();
|
||||
dptDepartment.setDeptname(dept.getDeptname());
|
||||
dptDepartment.setDeptstate(dept.getDeptstate());
|
||||
@@ -151,10 +155,12 @@ public class DeptManageAction extends BaseAction {
|
||||
this.commonService.save(dptDepartment);
|
||||
// 将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "TABLEDEPARTMENT", "INSERT",dptDepartment.getDeptid());
|
||||
commonService.commit();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeptManageAction.update.success_n81i');this.location='deptManage!execute.do?action=queryDeptInfo'</script>");
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeptManageAction.update.faild_n81i');this.location='deptManage!execute.do?action=queryDeptInfo'</script>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,6 +592,7 @@ public class CheckTypeSetAction extends BaseAction {
|
||||
String desc = "";
|
||||
Metadata metadata = new Metadata();
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
String hql = "from CheckTypeInfo where checkTypeName1=?";
|
||||
List<CheckTypeInfo> list = commonService.find(hql, checkTypeName1);
|
||||
if(list==null||list.size()==0){
|
||||
@@ -672,8 +673,7 @@ public class CheckTypeSetAction extends BaseAction {
|
||||
this.commonService.save(metadata);
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService,"metadata", "INSERT", metadata.getId());
|
||||
//与NMSServer通信
|
||||
this.sendCheckTypeId(checkTypeInfo.getId()+"",commonService);
|
||||
|
||||
|
||||
//如果表已经生成,则需要修改表的结构
|
||||
if(new MetaDataSetAction().hasCreatedTable(checkTypeInfo.getTableName())){
|
||||
@@ -687,9 +687,14 @@ public class CheckTypeSetAction extends BaseAction {
|
||||
//执行添加字段
|
||||
this.commonService.updateBatchBySql(sqlString.toString());
|
||||
}
|
||||
commonService.commit();
|
||||
//与NMSServer通信
|
||||
this.sendCheckTypeId(checkTypeInfo.getId()+"",commonService);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
commonService.rollback();
|
||||
desc = getI18nText("i18n_CheckTypeSetAction.downloadExample.importInfo_n81i");
|
||||
}
|
||||
return desc;
|
||||
@@ -699,6 +704,7 @@ public class CheckTypeSetAction extends BaseAction {
|
||||
String desc = "";
|
||||
CheckTypeInfo checkTypeInfo = new CheckTypeInfo();
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// 保存节点信息
|
||||
checkTypeInfo.setCheckTypeName(checkTypeName);
|
||||
checkTypeInfo.setCheckTypeName1(checkTypeName1);
|
||||
@@ -800,8 +806,10 @@ public class CheckTypeSetAction extends BaseAction {
|
||||
}else{
|
||||
this.commonService.save(checkTypeInfo);
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
commonService.rollback();
|
||||
// logger.error(e.getStackTrace());//i18nlog
|
||||
desc = getI18nText("i18n_CheckTypeSetAction.downloadExample.importInfo_n81i");
|
||||
}
|
||||
@@ -1086,6 +1094,7 @@ public class CheckTypeSetAction extends BaseAction {
|
||||
Date createDate = null;
|
||||
Date dNow=null;
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
dNow = new Date();
|
||||
createDate = sdf.parse(sdf.format(dNow));
|
||||
@@ -1216,9 +1225,11 @@ public class CheckTypeSetAction extends BaseAction {
|
||||
// outHtmlString("<script type=\"text/javascript\">alert('操作成功');this.location='boxSet.do?action=query'</script>");
|
||||
// }
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeptManageAction.update.faild_n81i');this.location='checkTypeSet.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
}
|
||||
}
|
||||
@@ -1313,6 +1324,7 @@ public class CheckTypeSetAction extends BaseAction {
|
||||
|
||||
public void doUpdateCheckTypeSet()throws Exception{
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
CheckTypeInfo cti = (CheckTypeInfo)this.commonService.get(CheckTypeInfo.class, checkTypeInfo.getId());
|
||||
if(!cti.getTableName().equals(checkTypeInfo.getTableName().trim().toUpperCase())){
|
||||
//与NMSServer通信
|
||||
@@ -1331,16 +1343,19 @@ public class CheckTypeSetAction extends BaseAction {
|
||||
this.commonService.update(cti);
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService,"check_type_info", "UPDATE", checkTypeInfo.getId());
|
||||
commonService.commit();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_CheckTypeSetAction.downloadExample.success_n81i');this.location='checkTypeSet.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeptManageAction.update.faild_n81i');this.location='checkTypeSet.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
}
|
||||
}
|
||||
|
||||
public void delCheckTypeSetInfo()throws Exception{
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(ids!=null && ids.length>0){
|
||||
for(Long setid : ids){
|
||||
CheckTypeInfo cti = (CheckTypeInfo)this.commonService.get(CheckTypeInfo.class,setid);
|
||||
@@ -1374,9 +1389,11 @@ public class CheckTypeSetAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
}
|
||||
commonService.commit();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_CheckTypeSetAction.downloadExample.success_n81i');this.location='checkTypeSet.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getStackTrace());
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeptManageAction.update.faild_n81i');this.location='checkTypeSet.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,6 +587,7 @@ public class DetectionSetAction extends BaseAction {
|
||||
String desc = "";
|
||||
DetectionSetInfo detectionSetInfo = new DetectionSetInfo();
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// 保存节点信息
|
||||
detectionSetInfo.setProcessIdenName(processIdenName);
|
||||
detectionSetInfo.setProcessIden(processIden);
|
||||
@@ -803,10 +804,12 @@ public class DetectionSetAction extends BaseAction {
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "detection_Set_Info",
|
||||
"INSERT", detectionSetInfo.getId());
|
||||
commonService.commit();
|
||||
// 用来实现即时向客户端发送配置信息
|
||||
sendSetInfo(null, detectionSetInfo, commonService);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
commonService.rollback();
|
||||
desc = getI18nText("i18n_DetectionSetAction.downloadExample.nodeInfoImportErr_n81i");
|
||||
}
|
||||
return desc;
|
||||
@@ -1205,6 +1208,7 @@ public class DetectionSetAction extends BaseAction {
|
||||
StringBuffer hqlBuffer = null;
|
||||
StringBuffer errBuffer = null;
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
//先判断设置的节点范围是否重复
|
||||
if (detectionSetInfo.getNodeIpsId() != null
|
||||
&& !"".equals(detectionSetInfo.getNodeIpsId())) {//节点组和节点都不为空
|
||||
@@ -1341,7 +1345,7 @@ public class DetectionSetAction extends BaseAction {
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "detection_Set_Info",
|
||||
"INSERT", detectionSetInfo.getId());
|
||||
|
||||
commonService.commit();
|
||||
// 保存并更新上传的脚本文件
|
||||
saveScriptFile(myFile, detectionSetInfo);
|
||||
|
||||
@@ -1360,9 +1364,11 @@ public class DetectionSetAction extends BaseAction {
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.success_n81i');this.location='detectionSet.do?action=query&pageNo="
|
||||
+ pageNo + "&pageSize=" + pageSize + "'</script>");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.faild_n81i');this.location='detectionSet.do?action=query&pageNo="
|
||||
+ pageNo + "&pageSize=" + pageSize + "'</script>");
|
||||
}
|
||||
@@ -1758,7 +1764,7 @@ public class DetectionSetAction extends BaseAction {
|
||||
// String hql="";
|
||||
|
||||
try {
|
||||
|
||||
commonService.beginTransaction();
|
||||
// 判断记录是否存在-end
|
||||
|
||||
// 获取修改后检测类别信息
|
||||
@@ -1840,7 +1846,7 @@ public class DetectionSetAction extends BaseAction {
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "detection_Set_Info",
|
||||
"UPDATE", setInfo.getId());
|
||||
|
||||
commonService.commit();
|
||||
// 保存并更新上传的脚本文件
|
||||
saveScriptFile(myFile, detectionSetInfo);
|
||||
|
||||
@@ -1850,11 +1856,13 @@ public class DetectionSetAction extends BaseAction {
|
||||
// 用来实现即时向客户端发送配置信息
|
||||
sendSetInfo(setInfo2, setInfo, commonService);
|
||||
}
|
||||
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.success_n81i');this.location='detectionSet.do?action=query&pIden="+pIden+"&ctn="+ctn+"&ip="+ip+"&pageNo="
|
||||
+ pageNo + "&pageSize=" + pageSize + "'</script>");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.faild_n81i');this.location='detectionSet.do?action=query&pIden="+pIden+"&ctn="+ctn+"&ip="+ip+"&pageNo="
|
||||
+ pageNo + "&pageSize=" + pageSize + "'</script>");
|
||||
}
|
||||
@@ -1865,6 +1873,7 @@ public class DetectionSetAction extends BaseAction {
|
||||
public void handleDetectInfoValid(Long detectSetId,String newSeqIds,String tableName) {
|
||||
if(detectSetId!=null&&tableName!=null&&!"".equals(tableName)) {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
String updateValidSeqIds = "";
|
||||
String updateInvalidSeqIds = "";
|
||||
//监测数据表:数据是否有效的更新
|
||||
@@ -1896,7 +1905,9 @@ public class DetectionSetAction extends BaseAction {
|
||||
this.commonService.updateBySql(updateDetectSql);
|
||||
}
|
||||
}
|
||||
commonService.commit();
|
||||
}catch(Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("Update monitoring data validity",e);
|
||||
}
|
||||
}
|
||||
@@ -2049,6 +2060,7 @@ public class DetectionSetAction extends BaseAction {
|
||||
|
||||
public String stop(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(ids !=null && ids.length>0){
|
||||
for(int i= 0;i<ids.length;i++){
|
||||
List dsList = this.commonService.find(
|
||||
@@ -2090,16 +2102,18 @@ public class DetectionSetAction extends BaseAction {
|
||||
|
||||
//将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "detection_set_info", "UPDATE", ds.getId());
|
||||
|
||||
commonService.commit();
|
||||
// 用来实现即时向客户端发送配置信息
|
||||
sendSetInfo(dsOld, ds, commonService);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.success_n81i');this.location='detectionSet.do?action=query&pageNo="
|
||||
+ pageNo + "&pageSize=" + pageSize + "'</script>");
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -2108,6 +2122,7 @@ public class DetectionSetAction extends BaseAction {
|
||||
|
||||
public String start(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(ids !=null && ids.length>0){
|
||||
for(int i= 0;i<ids.length;i++){
|
||||
List dsList = this.commonService.find(
|
||||
@@ -2150,18 +2165,20 @@ public class DetectionSetAction extends BaseAction {
|
||||
|
||||
//将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "detection_set_info", "UPDATE", ds.getId());
|
||||
commonService.commit();
|
||||
|
||||
// 用来实现即时向客户端发送脚本文件
|
||||
sendPluginFile(dsOld, ds, myFile, commonService);
|
||||
|
||||
// 用来实现即时向客户端发送配置信息
|
||||
sendSetInfo(dsOld, ds, commonService);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DetectionSetAction.downloadExample.success_n81i');this.location='detectionSet.do?action=query&pageNo="
|
||||
+ pageNo + "&pageSize=" + pageSize + "'</script>");
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -278,6 +278,7 @@ public class MetaDataSetAction extends BaseAction {
|
||||
HttpSession session =null;
|
||||
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
dNow = new Date();
|
||||
createDate = sdf.parse(sdf.format(dNow));
|
||||
@@ -306,8 +307,7 @@ public class MetaDataSetAction extends BaseAction {
|
||||
this.commonService.save(metadata);
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService,"metadata", "INSERT", metadata.getId());
|
||||
//与NMSServer通信
|
||||
this.sendCheckTypeId(typeInfo.getId()+"",commonService);
|
||||
|
||||
|
||||
//如果表已经生成,则需要修改表的结构
|
||||
if(hasCreatedTable(typeInfo.getTableName())){
|
||||
@@ -330,8 +330,11 @@ public class MetaDataSetAction extends BaseAction {
|
||||
}else{
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_MetaDataSetAction.queryCheckTypeSource.success_n81i');this.location='metaDataSet.do?action=oppAdd&typeids="+checkTypeInfo.getId()+"'</script>");
|
||||
}
|
||||
|
||||
commonService.commit();
|
||||
//与NMSServer通信
|
||||
this.sendCheckTypeId(typeInfo.getId()+"",commonService);
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_MetaDataSetAction.queryCheckTypeSource.faild_n81i');this.location='checkTypeSet.do?action=query'</script>");
|
||||
@@ -496,6 +499,7 @@ public class MetaDataSetAction extends BaseAction {
|
||||
int max =0;
|
||||
boolean d = false;
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
dNow = new Date();
|
||||
updateDate = sdf.parse(sdf.format(dNow));
|
||||
@@ -631,9 +635,11 @@ public class MetaDataSetAction extends BaseAction {
|
||||
this.outHtmlString("<script>alert('i18n_MetaDataSetAction.queryCheckTypeSource.updateTable_n81i');history.back();</script>");
|
||||
return;
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_MetaDataSetAction.queryCheckTypeSource.faild_n81i');this.location='metaDataSet.do?action=query&typeids="+checkTypeInfo.getId()+"'</script>");
|
||||
}
|
||||
this.checkTable();
|
||||
@@ -674,6 +680,7 @@ public class MetaDataSetAction extends BaseAction {
|
||||
public void doUpdateMetaDataInfoList()throws Exception{
|
||||
if(metadataList!=null){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
Map<String,String> map = this.getAllDictionary();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date dNow = new Date();
|
||||
@@ -761,9 +768,11 @@ public class MetaDataSetAction extends BaseAction {
|
||||
// return null;
|
||||
// }
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_MetaDataSetAction.queryCheckTypeSource.faild_n81i');this.location='metaDataSet.do?action=query&typeids="+typeids[0]+"'</script>");
|
||||
}
|
||||
this.checkTable();
|
||||
@@ -880,6 +889,7 @@ public class MetaDataSetAction extends BaseAction {
|
||||
String oneFiledString="";
|
||||
StringBuffer fileds = new StringBuffer();
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(typeids!=null && typeids.length>0){
|
||||
String hql = "from Metadata where 1=1 and checkTypeInfo.id="+typeids[0];
|
||||
metaList = this.commonService.find(hql);
|
||||
@@ -936,10 +946,11 @@ public class MetaDataSetAction extends BaseAction {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
commonService.rollback();
|
||||
}
|
||||
return this.queryCheckTypeSource();
|
||||
}
|
||||
@@ -954,6 +965,7 @@ public class MetaDataSetAction extends BaseAction {
|
||||
StringBuffer sql= new StringBuffer();
|
||||
StringBuffer cIndexFileds = new StringBuffer("data_check_time:seq_id:detection_set_info_id:");
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
//所有的字段名均不可为空
|
||||
if(typeids!=null&&typeids.length>0) {
|
||||
String isFieldNullHql = "from Metadata where checkTypeInfo.id = " + typeids[0] + " and state = '0' and filedName is null ";
|
||||
@@ -1011,10 +1023,11 @@ public class MetaDataSetAction extends BaseAction {
|
||||
this.outHtmlString("<script>alert('i18n_MetaDataSetAction.queryCheckTypeSource.pleaseAddField_n81i');history.back();</script>");
|
||||
return;
|
||||
}
|
||||
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_MetaDataSetAction.queryCheckTypeSource.faild_n81i');this.location='metaDataSet.do?action=query&typeids="+typeids[0]+"'</script>");
|
||||
}
|
||||
this.checkTable();
|
||||
|
||||
@@ -80,6 +80,7 @@ public class OidDictionaryAction extends BaseAction {
|
||||
|
||||
public void addOidDictionary(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(checkOid(od.getOid())){
|
||||
this.commonService.save(od);
|
||||
// 将添加操作写到操作日志中
|
||||
@@ -90,7 +91,9 @@ public class OidDictionaryAction extends BaseAction {
|
||||
this.outHtmlString("<script>alert('i18n_OidDictionaryAction.queryDictionary.oidExists_n81i');history.back();</script>");
|
||||
return;
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
this.outHtmlString("<script>alert('i18n_OidDictionaryAction.queryDictionary.addBoxFaild_n81i');history.back();</script>");
|
||||
return;
|
||||
@@ -118,6 +121,7 @@ public class OidDictionaryAction extends BaseAction {
|
||||
|
||||
public void doUpdOidDictionary(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
List list = this.commonService.find("from OidDictionary where oid=? and id<>?",
|
||||
od.getOid().trim(),od.getId());
|
||||
if (list != null && list.size() > 0){
|
||||
@@ -132,8 +136,10 @@ public class OidDictionaryAction extends BaseAction {
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "oid_dictionary", "UPDATE",
|
||||
md.getId());
|
||||
commonService.commit();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_OidDictionaryAction.queryDictionary.success_n81i');this.location='oidDictionary.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
this.outHtmlString("<script>alert('i18n_OidDictionaryAction.queryDictionary.updateFaild_n81i');history.back();</script>");
|
||||
return;
|
||||
|
||||
@@ -228,6 +228,7 @@ public class PoliceSetAction extends BaseAction {
|
||||
public void addPoliceSetInfo() throws Exception{
|
||||
DetectionSetInfo dsi = null;
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
String sql = "select count(*) from data_police_relation t where DETECTION_SET_INFO_ID ="
|
||||
+ setId
|
||||
+ " and METADATA_ID ="
|
||||
@@ -247,8 +248,10 @@ public class PoliceSetAction extends BaseAction {
|
||||
this.commonService.save(dataPoliceRelation);
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService,"data_police_relation", "INSERT", dataPoliceRelation.getId());
|
||||
commonService.commit();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_PoliceSetAction.queryPoliceSetInfo.success_n81i');this.location='policeSet.do?action=query&pIden="+pIden+"&ctn="+ctn+"&ip="+ip+"&pageNo="+pageNo+"&pageSize="+pageSize+"&setId="+setId+"'</script>");
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_PoliceSetAction.queryPoliceSetInfo.faild_n81i');this.location='policeSet.do?action=query&pIden="+pIden+"&ctn="+ctn+"&ip="+ip+"&pageNo="+pageNo+"&pageSize="+pageSize+"&setId="+setId+"'</script>");
|
||||
@@ -276,6 +279,7 @@ public class PoliceSetAction extends BaseAction {
|
||||
|
||||
public void doUpdatePoliceSet() throws Exception{
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
List list = this.commonService
|
||||
.find(
|
||||
"from DataPoliceRelation where detectionSetInfo.id=? and metadata.id=? and id<>?",
|
||||
@@ -309,6 +313,7 @@ public class PoliceSetAction extends BaseAction {
|
||||
dpRelation.setMarker(dataPoliceRelation.getMarker());
|
||||
dpRelation.setMarkerFiledId(dataPoliceRelation.getMarkerFiledId());
|
||||
this.commonService.update(dpRelation);
|
||||
commonService.commit();
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService,"data_police_relation", "UPDATE", dpRelation.getId());
|
||||
sendSetInfo(null,ds,commonService);
|
||||
@@ -316,9 +321,11 @@ public class PoliceSetAction extends BaseAction {
|
||||
if(setId != null){
|
||||
setIdStr = "&setId="+setId;
|
||||
}
|
||||
|
||||
String str = "<script type=\"text/javascript\">alert('i18n_PoliceSetAction.queryPoliceSetInfo.success_n81i');this.location='policeSet.do?action=query&pIden="+pIden+"&ctn="+ctn+"&ip="+ip+"&pageNo="+pageNo+"&pageSize="+pageSize+setIdStr+"'</script>";
|
||||
outHtmlString(str);
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
String setIdStr = "";
|
||||
|
||||
@@ -2512,6 +2512,7 @@ public class SwitchDetectionAction extends BaseAction {
|
||||
|
||||
public void addSpecialDeviceConfig() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if (StringUtils.isNotBlank(seqId) && rootDevice != null && deviceConfigList.size() > 0) {
|
||||
// 第一步:配置之前,先从node_figure_info表里删除seqId的相应配置
|
||||
this.commonService.delete(NodeFigureInfo.class, "seqid", Long.parseLong(seqId));
|
||||
@@ -2562,9 +2563,11 @@ public class SwitchDetectionAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
}
|
||||
commonService.commit();
|
||||
outHtmlString(
|
||||
"<script type=\"text/javascript\">alert(\"i18n_SwitchDetectionAction.emportXls.configSuccess_n81i\");this.location='switchDetection.do?action=toConfigSpecialDevice'</script>");
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("Get subdevice of device model " + deviceBrandTypeCode + " exception", e);
|
||||
}
|
||||
}
|
||||
@@ -2723,6 +2726,7 @@ public class SwitchDetectionAction extends BaseAction {
|
||||
private void configAndSaveNodeFigureInfo(List<DeviceInfo> devConfigList, Date createDate, Long nodePid,
|
||||
String devParShowIndex, String parDevCode, String posiIndex, Long parX, Long parY) {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if (devConfigList != null && devConfigList.size() > 0 && StringUtils.isNotBlank(devParShowIndex)
|
||||
&& StringUtils.isNotBlank(parDevCode) && nodePid != null && createDate != null) {
|
||||
|
||||
@@ -2750,7 +2754,9 @@ public class SwitchDetectionAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("Recursive generation of nodeFigureInfo records exception", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ public class FunctionManagerAction extends BaseAction {
|
||||
XtMkJbxx xt = null;
|
||||
List<XtMkJbxx> newFunctionlists = null;
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// 判断是否是修改排序
|
||||
if (sort != null) {
|
||||
// 上升
|
||||
@@ -134,8 +135,9 @@ public class FunctionManagerAction extends BaseAction {
|
||||
}else{
|
||||
updateMKInfo();
|
||||
}
|
||||
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("2");
|
||||
//outHtmlString("<script type=\"text/javascript\">alert('操作失败');this.location='functionManager.do?action=queryMkInfo'</script>");
|
||||
@@ -168,6 +170,7 @@ public class FunctionManagerAction extends BaseAction {
|
||||
|
||||
public String updateMKInfo(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
XtMkJbxx md = (XtMkJbxx) commonService.get(XtMkJbxx.class, module
|
||||
.getId());
|
||||
md.setMkmc(module.getMkmc());
|
||||
@@ -202,8 +205,10 @@ public class FunctionManagerAction extends BaseAction {
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "XT_MK_JBXX", "UPDATE",module.getId());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_FunctionManagerAction.updateMKInfo.success_n81i');this.location='functionManager.do?action=queryMkInfo'</script>");
|
||||
commonService.commit();
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_FunctionManagerAction.updateMKInfo.faild_n81i');this.location='functionManager.do?action=queryMkInfo'</script>");
|
||||
return null;
|
||||
@@ -213,6 +218,7 @@ public class FunctionManagerAction extends BaseAction {
|
||||
// 添加模块信息操作
|
||||
public String addMk() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(module.getPid()==null){
|
||||
module.setPid(0l);
|
||||
}
|
||||
@@ -226,9 +232,11 @@ public class FunctionManagerAction extends BaseAction {
|
||||
this.commonService.save(module);
|
||||
// 将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "XT_MK_JBXX", "INSERT",module.getId());
|
||||
commonService.commit();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_FunctionManagerAction.updateMKInfo.success_n81i');this.location='functionManager.do?action=queryMkInfo'</script>");
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_FunctionManagerAction.updateMKInfo.faild_n81i');this.location='functionManager.do?action=queryMkInfo'</script>");
|
||||
return null;
|
||||
@@ -238,6 +246,7 @@ public class FunctionManagerAction extends BaseAction {
|
||||
// 注销模块信息操作
|
||||
public String delMk() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
XtMkJbxx md = (XtMkJbxx) commonService.get(XtMkJbxx.class, module.getId());
|
||||
md.setZxbz("1");
|
||||
this.commonService.update(md);
|
||||
@@ -246,8 +255,10 @@ public class FunctionManagerAction extends BaseAction {
|
||||
module.getId());
|
||||
this.addDBOperationRpt(commonService, "XT_MK_JBXX", "INSERT",module.getId());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_FunctionManagerAction.updateMKInfo.success_n81i');this.location='functionManager.do?action=queryMkInfo'</script>");
|
||||
commonService.commit();
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_FunctionManagerAction.updateMKInfo.faild_n81i');this.location='functionManager.do?action=queryMkInfo'</script>");
|
||||
return null;
|
||||
|
||||
@@ -293,6 +293,7 @@ public class SimpleMissionAction extends BaseAction{
|
||||
@SuppressWarnings("static-access")
|
||||
private String addMissionParameter1(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
XtYhJbxx user = this.getUser();
|
||||
//保存上传文件
|
||||
String uploadFilePath = getConfigValue("uploadServerPath");
|
||||
@@ -343,7 +344,9 @@ public class SimpleMissionAction extends BaseAction{
|
||||
MSG = "i18n_SimpleMissionAction.check.message1_n81i";
|
||||
outHtmlString("<script type=\"text/javascript\">alert('"+MSG+"');this.history.go(-1);</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
@@ -351,6 +354,7 @@ public class SimpleMissionAction extends BaseAction{
|
||||
//配置验证任务添加方法
|
||||
private String addMissionParameter2(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
XtYhJbxx user = this.getUser();
|
||||
|
||||
// String uploadFilePath = getConfigValue("uploadServerPath");
|
||||
@@ -410,7 +414,9 @@ public class SimpleMissionAction extends BaseAction{
|
||||
MSG = "i18n_SimpleMissionAction.check.message2_n81i";
|
||||
outHtmlString("<script type=\"text/javascript\">alert('"+MSG+"');this.history.go(-1);</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -129,6 +129,7 @@ public class NmsErrorInfoAction extends BaseAction {
|
||||
private String changeState(){
|
||||
if(ids != null){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
/* 当前用户ID */
|
||||
this.getUserID();
|
||||
/* 当前用户ID */
|
||||
@@ -159,8 +160,10 @@ public class NmsErrorInfoAction extends BaseAction {
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_NmsErrorInfoAction.query.faild_n81i');"
|
||||
+ "this.location='nmsErrorInfo.do?action=query&pageNo="
|
||||
+ pageNo + "&pageSize=" + pageSize + "&position=" + position + "&errorCodeStr=" + errorCodeStr + "&errorIp=" + errorIp + "&eiState=" + (eiState==null?"":eiState) + "'</script>");
|
||||
commonService.commit();
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
this.outHtmlString("<script>alert('i18n_NmsErrorInfoAction.query.queryFaild_n81i');history.back();</script>");
|
||||
return null;
|
||||
|
||||
@@ -1386,6 +1386,7 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
private void updateLoopMissionStateAndDescByMissId(String missionId) {
|
||||
if (StringUtils.isNotBlank(missionId)) {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// 第一步--更新任务的状态描述
|
||||
/*
|
||||
* String selectSql =
|
||||
@@ -1520,8 +1521,9 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
// 发送邮件-------------------
|
||||
commonService.sendEmailForMission(Long.parseLong(missionId), getI18nText("i18n_NmsTaskManagerAction.executeAction.missionExec_n81i"), getI18nText("i18n_NmsTaskManagerAction.executeAction.missionComplete_n81i"));
|
||||
}
|
||||
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("After determining failure,the state of the current task is recounted and the status description(non cyclical) exception is described", e);
|
||||
}
|
||||
}
|
||||
@@ -2225,6 +2227,7 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
|
||||
public void updateDate() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if (missionstatetable.getMissionType() == 1) {// 文件推送
|
||||
MissionStateTable missionstate = (MissionStateTable) this.commonService.get(MissionStateTable.class,
|
||||
missionstatetable.getMissionId());
|
||||
@@ -2277,7 +2280,9 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
this.addDBOperationRpt(commonService, "mission_parameter_table1", "UPDATE",
|
||||
missionstatetable.getMissionId());
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString(
|
||||
"<script type=\"text/javascript\">alert('i18n_NmsTaskManagerAction.executeAction.faild_n81i');this.location='nmsTaskManager.do?action=query'</script>");
|
||||
@@ -2303,6 +2308,7 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
*/
|
||||
public String updateState() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// - 状态变更操作标识 1(已创建) <--> (准备撤销)5
|
||||
String curstate = this.getRequest().getParameter("curstate");
|
||||
|
||||
@@ -2375,6 +2381,7 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "mission_state_table", "UPDATE", pid[i]);
|
||||
commonService.commit();
|
||||
sendMissionInfoId(pid[i], 0l, commonService);
|
||||
// sendMissionInfoId(missionstatetable.getMissionId(),1l);
|
||||
}
|
||||
@@ -2388,6 +2395,7 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_NmsTaskManagerAction.executeAction.faild_n81i');"
|
||||
+ "this.location='nmsTaskManager.do?action=query&pageNo=" + pageNo + "&pageSize=" + pageSize
|
||||
+ "'</script>");
|
||||
@@ -4144,6 +4152,7 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
|
||||
public void saveFailedNodesTask() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
String oldMissionIdStr = this.getRequest().getParameter("oldMissionId");
|
||||
Long oldMissionId = Long.parseLong(oldMissionIdStr);
|
||||
MissionStateTable missionStateTable0 = (MissionStateTable) this.commonService.get(MissionStateTable.class,
|
||||
@@ -4241,8 +4250,10 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
commonService.commit();
|
||||
sendMissionInfoId(stateTable.getMissionId(), 0l, commonService);
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_NmsTaskManagerAction.executeAction.faild_n81i');window.history.go(-1);</script>");
|
||||
}
|
||||
@@ -4253,6 +4264,7 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
@SuppressWarnings("static-access")
|
||||
public void saveTaskbyType() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// -- 命令参数格式校验
|
||||
// -- 2012-3-7 修改界面参数显示形式后不在进行格式校验,默认设置值为0
|
||||
commandParaCheck = 0;
|
||||
@@ -4690,6 +4702,7 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
missionstatetable.getMissionId());
|
||||
// sendInfo(missionstatetable.getMissionId(),0l,new
|
||||
// File(fileName));
|
||||
commonService.commit();
|
||||
logger.debug("开始发送任务信息,任务id:" + missionstatetable.getMissionId());
|
||||
sendMissionInfoId(missionstatetable.getMissionId(), 0l, commonService);
|
||||
}
|
||||
@@ -4704,7 +4717,9 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
outHtmlString(
|
||||
"<script type=\"text/javascript\">alert('i18n_NmsTaskManagerAction.executeAction.success_n81i');this.location='nmsTaskManager.do?action=query'</script>");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString(
|
||||
"<script type=\"text/javascript\">alert('i18n_NmsTaskManagerAction.executeAction.faild_n81i');this.location='nmsTaskManager.do?action=query'</script>");
|
||||
@@ -4720,6 +4735,7 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
*/
|
||||
public void saveConverseTask() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// -- 2012-3-9
|
||||
// 修改界面参数显示形式后相应参数的处理:为有文件推送的List列表的各对象设置文件名,并将各对象转换为JSon字符串??
|
||||
|
||||
@@ -4847,8 +4863,9 @@ public class NmsTaskManagerAction extends BaseAction {
|
||||
outHtmlString(
|
||||
"<script type=\"text/javascript\">alert('i18n_NmsTaskManagerAction.executeAction.success_n81i');this.location='nmsTaskManager.do?action=query'</script>");
|
||||
}
|
||||
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString(
|
||||
"<script type=\"text/javascript\">alert('操作失败');this.location='nmsTaskManager.do?action=query'</script>");
|
||||
|
||||
@@ -293,6 +293,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
String desc = "";
|
||||
NodegroupTable nodegroupTable=new NodegroupTable();
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// 保存节点信息
|
||||
nodegroupTable.setGroupName(groupName);
|
||||
nodegroupTable.setViewLevel(3l);
|
||||
@@ -398,13 +399,14 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
|
||||
//将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "nodegroup_table", "INSERT", nodegroupTable.getGroupId());
|
||||
|
||||
commonService.commit();
|
||||
// 用来实现即时向客户端发送脚本文件
|
||||
this.sendPluginFile(nodegroupTable.getGroupId(), null,commonService);
|
||||
|
||||
this.sendNodeAndGroupId(nodegroupTable.getGroupId(), null,commonService);//通知NMSServer更新节点组的监控信息
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
desc = getI18nText("i18n_NodeGroupManageAction.downloadExample.nodeInfoExportErr_n81i");
|
||||
}
|
||||
@@ -792,7 +794,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
//添加节点组
|
||||
public String addNodeGroupInfo(){
|
||||
try{
|
||||
|
||||
commonService.beginTransaction();
|
||||
//创建子节点组(父节点id!=0)时有节点的节点组不能添加子节点组
|
||||
if(nodeGroup.getParentGroupId()!=0) {
|
||||
List subNodeList = this.commonService.find("from NodeTable where groupId=?", nodeGroup.getParentGroupId());
|
||||
@@ -884,7 +886,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
|
||||
//将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "nodegroup_table", "INSERT", nodeGroup.getGroupId());
|
||||
|
||||
commonService.commit();
|
||||
// 用来实现即时向客户端发送脚本文件
|
||||
this.sendPluginFile(nodeGroup.getGroupId(), null,commonService);
|
||||
|
||||
@@ -898,7 +900,9 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
}else{
|
||||
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.downloadExample.success_n81i');this.location='nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup="+showStopNGroup+"'</script>");
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.downloadExample.faild_n81i');this.location='nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup="+showStopNGroup+"'</script>");
|
||||
@@ -910,6 +914,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
//修改节点组
|
||||
public String updateNodeGroupInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
//判断同一父亲节点组下的子节点组是否重名
|
||||
List list = this.commonService.find("from NodegroupTable where groupName=? and parentGroupId=? and systemId =? and groupId <>?",
|
||||
nodeGroup.getGroupName(),nodeGroup.getParentGroupId(),this.getSystemID(),nodeGroup.getGroupId());
|
||||
@@ -970,6 +975,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
|
||||
//将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "nodegroup_table", "UPDATE", nodeGroup.getGroupId());
|
||||
commonService.commit();
|
||||
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.downloadExample.success_n81i');this.location='nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup="+showStopNGroup+"'</script>");
|
||||
}
|
||||
if(flag){
|
||||
@@ -981,6 +987,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.downloadExample.faild_n81i');this.location='nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup="+showStopNGroup+"'</script>");
|
||||
@@ -1036,6 +1043,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
//停用节点组:
|
||||
public String stopNodeGroupInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
if(ids!=null && ids.length>0){
|
||||
String allIds = "";
|
||||
//获得所有节点组及子节点组的id
|
||||
@@ -1053,7 +1061,9 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
stopNode(allIds);
|
||||
}
|
||||
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.downloadExample.success_n81i');this.location='nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup="+showStopNGroup+"'</script>");
|
||||
commonService.commit();
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.downloadExample.faild_n81i');this.location='nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup="+showStopNGroup+"'</script>");
|
||||
@@ -1117,6 +1127,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
// 停用节点:先找出叶子节点,再找出所有叶子节点的节点id,再进行更新. NODE_STATE=1表示节点为下线(停用)状态,此时显示可以的操作为上线
|
||||
private String stopNode(String allIds) {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
String leafNodeGroupIds = getLeafNodeGroupId(allIds);
|
||||
String[] leafNodeGroupArray = leafNodeGroupIds.split(",");//所有叶子节点
|
||||
for(int i=0;i<leafNodeGroupArray.length;i++) {
|
||||
@@ -1146,7 +1157,9 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
//将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, sqlCondition, "NODE_TABLE");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
@@ -1157,6 +1170,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
//启用节点组
|
||||
public String startNodeGroupInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
if(ids!=null && ids.length>0){
|
||||
if(isStartSubNodeGroup!=null&&"1".equals(isStartSubNodeGroup)) {//启用节点组的同时启用子节点组??
|
||||
String allIds = "";
|
||||
@@ -1185,7 +1199,9 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
}
|
||||
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.downloadExample.success_n81i');this.location='nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup="+showStopNGroup+"'</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.downloadExample.faild_n81i');this.location='nodeGroupManage!execute.do?action=queryNodeGroupInfo&showStopNGroup="+showStopNGroup+"'</script>");
|
||||
@@ -1197,6 +1213,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
// 启用节点: NODE_STATE=0表示节点为上线(启用)状态,此时显示可以的操作为下线
|
||||
public String startNode(String allIds) {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
String leafNodeGroupIds = getLeafNodeGroupId(allIds);//获取所有叶子节点组id
|
||||
String[] leafNodeGroupArray = leafNodeGroupIds.split(",");//所有叶子节点
|
||||
for(int i=0;i<leafNodeGroupArray.length;i++) {
|
||||
@@ -1224,7 +1241,7 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
String sqlCondition = "where NODE_ID in (" + allIds + ")";
|
||||
//将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, sqlCondition, "NODE_TABLE");
|
||||
|
||||
commonService.commit();
|
||||
//通知NMSServer更新节点组的监控信息
|
||||
for(String str : leafNodeGroupArray){
|
||||
// 用来实现即时向客户端发送脚本文件
|
||||
@@ -1233,8 +1250,10 @@ public class NodeGroupManageAction extends BaseAction {
|
||||
this.sendNodeAndGroupId(Long.valueOf(str), null,commonService);
|
||||
}
|
||||
}
|
||||
|
||||
//this.outHtmlString("<script>alert('操作成功!');this.location='"+path+"/nodeGroupManage/nodeGroupManage.do?action=queryNodeGroupInfo'</script>");
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
//this.outHtmlString("<script>alert('操作失败!');this.location='"+path+"/nodeGroupManage/nodeGroupManage.do?action=queryNodeGroupInfo'</script>");
|
||||
|
||||
@@ -408,6 +408,7 @@ public class NodeManageAction extends BaseAction {
|
||||
// 打开添加节点页面
|
||||
public String openAddNodeInfo() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// 如果没有指定具体的节点组,即不在节点组查看详情页面点击新增
|
||||
if (nodeGroupId == null || nodeGroupId.equals("")) {
|
||||
// 查询节点组
|
||||
@@ -454,7 +455,9 @@ public class NodeManageAction extends BaseAction {
|
||||
this.getRequest().setAttribute("jsbh",true);
|
||||
}
|
||||
this.addDBOperationRpt(commonService, sql, "option_table");
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
}
|
||||
@@ -467,6 +470,7 @@ public class NodeManageAction extends BaseAction {
|
||||
*/
|
||||
public void addNodeInfo() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if (nodeGroupId != null && !nodeGroupId.equals("")) {
|
||||
mkid = nodeGroupId;
|
||||
}
|
||||
@@ -608,7 +612,10 @@ public class NodeManageAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table",
|
||||
"INSERT", nodeTable.getNodeId());
|
||||
commonService.commit();
|
||||
if (new Long(1).equals(group.getIsValid())) { // 节点组有效
|
||||
|
||||
// 用来实现即时向客户端发送脚本文件
|
||||
@@ -619,9 +626,7 @@ public class NodeManageAction extends BaseAction {
|
||||
nodeTable.getNodeId(), commonService); // 通知NMSServer更新节点组的监控信息
|
||||
}
|
||||
|
||||
// 将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table",
|
||||
"INSERT", nodeTable.getNodeId());
|
||||
|
||||
}
|
||||
// 记录用户操作用于设置向导
|
||||
if (fromWhere != null && !"".equals(fromWhere)) {
|
||||
@@ -638,7 +643,9 @@ public class NodeManageAction extends BaseAction {
|
||||
.outHtmlString("<script>alert('i18n_NodeManageAction.addNodeInfo.nodeHadIp_n81i');history.back();</script>");
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_NodeManageAction.addNodeInfo.faild_n81i');this.location='nodeManage.do?action=query&nodeGroupId="
|
||||
+ mkid + "&isValid=" + isValid + "&showStopNGroup="+showStopNGroup+ "'</script>");
|
||||
@@ -975,6 +982,7 @@ public class NodeManageAction extends BaseAction {
|
||||
*/
|
||||
public void updateNodeInfo() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if (nodeGroupId != null && !nodeGroupId.equals("")) {
|
||||
mkid = nodeGroupId;
|
||||
}
|
||||
@@ -1127,7 +1135,10 @@ public class NodeManageAction extends BaseAction {
|
||||
sb.append(" ,t.special_server_type="+nodeTable.getSpecialServerType());
|
||||
sb.append(" WHERE t.seq_id=" + seqId);
|
||||
commonService.updateBySql(sb.toString());
|
||||
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table",
|
||||
"UPDATE", nodeTable.getNodeId());
|
||||
commonService.commit();
|
||||
if (flag) {
|
||||
// 用来实现即时向客户端发送脚本文件
|
||||
this.sendPluginFile(nt.getGroupId(), nt
|
||||
@@ -1138,18 +1149,18 @@ public class NodeManageAction extends BaseAction {
|
||||
.getNodeId(), commonService); // 通知NMSServer更新节点组的监控信息
|
||||
}
|
||||
}
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table",
|
||||
"UPDATE", nodeTable.getNodeId());
|
||||
|
||||
}
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_NodeManageAction.addNodeInfo.success_n81i');this.location='nodeManage.do?action=query&nodeGroupId="
|
||||
+ mkid + "&isValid=" + isValid + "&fromWhere=" + fromWhere + "&type=" + type + "&showStopNGroup=" + showStopNGroup +"&nodeIpVo="+nodeIpVo+"&nodeNameVo="+nodeNameVo+ "'</script>");
|
||||
|
||||
} else {
|
||||
this
|
||||
.outHtmlString("<script>alert('i18n_NodeManageAction.addNodeInfo.nodeHadIp_n81i');history.back();</script>");
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_NodeManageAction.addNodeInfo.faild_n81i');this.location='nodeManage.do?action=query&nodeGroupId="
|
||||
@@ -1161,6 +1172,7 @@ public class NodeManageAction extends BaseAction {
|
||||
// 停用节点
|
||||
public void stopNodeInfo() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
List noList = this.commonService.find(
|
||||
"from NodeTable where nodeId=?", nodeId);
|
||||
|
||||
@@ -1171,6 +1183,10 @@ public class NodeManageAction extends BaseAction {
|
||||
nd.setNodeStoptime(new Date());
|
||||
|
||||
this.commonService.update(nd);
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
|
||||
nd.getNodeId());
|
||||
commonService.commit();
|
||||
NodegroupTable group = (NodegroupTable) this.commonService.get(
|
||||
NodegroupTable.class, nd.getGroupId());
|
||||
if (new Long(1).equals(group.getIsValid())) { // 节点组有效
|
||||
@@ -1182,16 +1198,16 @@ public class NodeManageAction extends BaseAction {
|
||||
}
|
||||
mkid = group.getGroupId();
|
||||
isValid = group.getIsValid().toString();
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
|
||||
nd.getNodeId());
|
||||
|
||||
this
|
||||
.outHtmlString("<script type=\"text/javascript\">alert('i18n_NodeManageAction.addNodeInfo.success_n81i');this.location='nodeManage.do?action=query&nodeGroupId="
|
||||
+ mkid + "&isValid=" + isValid + "&showStopNGroup=" + showStopNGroup +"&nodeIpVo="+nodeIpVo+"&nodeNameVo="+nodeNameVo+ "'</script>");
|
||||
// this.outHtmlString("<script
|
||||
// type=\"text/javascript\">alert('操作成功');this.location='nodeManage.do?action=query&nodeGroupId="+group.getGroupId()+"&isValid="+group.getIsValid()+"'</script>");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
this
|
||||
@@ -1203,8 +1219,13 @@ public class NodeManageAction extends BaseAction {
|
||||
// 启用节点
|
||||
public void startNodeInfo() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
this.commonService.updateByHql(
|
||||
"update NodeTable set nodeState=0 where nodeId=?", nodeId);
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
|
||||
nodeId);
|
||||
commonService.commit();
|
||||
NodeTable nd = (NodeTable) this.commonService.get(NodeTable.class,
|
||||
nodeId);
|
||||
NodegroupTable group = (NodegroupTable) this.commonService.get(
|
||||
@@ -1219,13 +1240,13 @@ public class NodeManageAction extends BaseAction {
|
||||
|
||||
mkid = group.getGroupId();
|
||||
isValid = group.getIsValid().toString();
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
|
||||
nodeId);
|
||||
|
||||
this
|
||||
.outHtmlString("<script type=\"text/javascript\">alert('i18n_NodeManageAction.addNodeInfo.success_n81i');this.location='nodeManage.do?action=query&nodeGroupId="
|
||||
+ mkid + "&isValid=" + isValid + "&showStopNGroup=" + showStopNGroup + "&nodeIpVo="+nodeIpVo+"&nodeNameVo="+nodeNameVo+ "'</script>");
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
outHtmlString("<script>alert('i18n_NodeManageAction.addNodeInfo.faild_n81i');this.location='nodeManage.do?action=query&nodeGroupId="
|
||||
@@ -1760,6 +1781,7 @@ public class NodeManageAction extends BaseAction {
|
||||
// "节点U位","机柜编号","机柜起始U位","SNMP版本",
|
||||
// "节点状态(0 正常、1 已删除或停用)","节点IP信息","节点描述"
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if (group != null) {
|
||||
// IP在同一节点组下不重复
|
||||
if (!groupNodeIpIsRepeat(vo.getNodeIp(), group.getGroupId())) {
|
||||
@@ -1868,8 +1890,10 @@ public class NodeManageAction extends BaseAction {
|
||||
} else {
|
||||
desc = getI18nText("i18n_NodeManageAction.addNodeInfo.importFaild_n81i");
|
||||
}
|
||||
commonService.commit();
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
desc = getI18nText("i18n_NodeManageAction.addNodeInfo.nodeInfoImportFaild_n81i");
|
||||
}
|
||||
|
||||
@@ -192,6 +192,7 @@ public class BoxSetAction extends BaseAction {
|
||||
public String addBoxInfo(){
|
||||
List list = null;
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
//判断数据是否存在
|
||||
/*list = this.commonService.find("from NodeBoxTable where ispn=?",nodeBox.getIspn());
|
||||
if(list!=null && list.size()>0){
|
||||
@@ -230,7 +231,9 @@ public class BoxSetAction extends BaseAction {
|
||||
String str= "<script type=\"text/javascript\">alert('i18n_BoxSetAction.queryBoxInfo.success_n81i');this.location='boxSet.do?action=query&roomIspn="+roomIspn+"&roomid="+roomid+"'</script>";
|
||||
outHtmlString(str);
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
this.outHtmlString("<script>alert('i18n_BoxSetAction.queryBoxInfo.addBoxFaild_n81i');history.back();</script>");
|
||||
return null;
|
||||
@@ -281,6 +284,7 @@ public class BoxSetAction extends BaseAction {
|
||||
*/
|
||||
public String doUpdBox(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
List list =null;
|
||||
/*List list = this.commonService.find("from NodeBoxTable where ispn='"+nodeBox.getIspn()+"' and nodeBoxId <> "+nodeBox.getNodeBoxId());
|
||||
if (list != null && list.size() > 0) {
|
||||
@@ -352,7 +356,9 @@ public class BoxSetAction extends BaseAction {
|
||||
|
||||
this.commonService.update(nbt);
|
||||
this.getRequest().setAttribute("MSG", 1);
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
this.outHtmlString("<script>alert('i18n_BoxSetAction.queryBoxInfo.updateFaild_n81i');history.back();</script>");
|
||||
return null;
|
||||
@@ -365,6 +371,7 @@ public class BoxSetAction extends BaseAction {
|
||||
public String delBoxInfo(){
|
||||
try {
|
||||
if(ids!=null && ids.length>0){
|
||||
commonService.beginTransaction();
|
||||
for(Long id : ids){
|
||||
List list = this.commonService.find(
|
||||
"from NodeLatticeTable where nodeBoxId=? and nodeSeqId is not null", id);
|
||||
@@ -379,8 +386,10 @@ public class BoxSetAction extends BaseAction {
|
||||
//删除记录
|
||||
this.commonService.updateBatchBySql("delete from NODE_BOX_TABLE where BOX_ID=?", Arrays.asList(ids));
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_BoxSetAction.queryBoxInfo.success_n81i');this.location='boxSet.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"&roomid="+roomid+"&roomIspn="+roomIspn+"'</script>");
|
||||
commonService.commit();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
this.outHtmlString("<script>alert('i18n_BoxSetAction.queryBoxInfo.deleteFaild_n81i');history.back();</script>");
|
||||
return null;
|
||||
@@ -642,6 +651,7 @@ public class BoxSetAction extends BaseAction {
|
||||
private String saveNode(NodeBoxTableVo vo) {
|
||||
String desc = "";
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// 保存节点信息
|
||||
NodeBoxTable nodeT = new NodeBoxTable();
|
||||
nodeT.setIspn(vo.getIspn());
|
||||
@@ -698,7 +708,9 @@ public class BoxSetAction extends BaseAction {
|
||||
nodeT.getNodeBoxId(), nodeT.getRoomIspn(),
|
||||
nodeT.getRoomRowPosition(), nodeT
|
||||
.getRoomColPosition());
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
desc = getI18nText("i18n_BoxSetAction.queryBoxInfo.nodeInfoErr_n81i");
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ public class NodeGroupPositionAction extends BaseAction
|
||||
{
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
System.out.println("nodegroupBgImgPositions:"+nodegroupBgImgPositions);
|
||||
System.out.println("nodegroupArrowPositions:"+nodegroupArrowPositions);
|
||||
String[] nodegroupBgImgPositionInfos = nodegroupBgImgPositions.split(":");
|
||||
@@ -179,8 +180,10 @@ public class NodeGroupPositionAction extends BaseAction
|
||||
commonService.saveOrUpdate(nodegroupBgimgPositionList);
|
||||
commonService.saveOrUpdate(nodeGroupPositionList);
|
||||
commonService.saveOrUpdate(nodegroupArrowPositionList);
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
logger.error("Failed to save topology map configuration information", e);
|
||||
}
|
||||
return configTopo();
|
||||
|
||||
@@ -1240,6 +1240,7 @@ public class NodePositionAction extends BaseAction {
|
||||
|
||||
private String saveBoxInfo(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
//保存格子和节点表格子ID
|
||||
String nodeGroupId = this.getRequest().getParameter("nodeGroupId");
|
||||
String boxId = this.getRequest().getParameter("boxId");
|
||||
@@ -1425,7 +1426,9 @@ public class NodePositionAction extends BaseAction {
|
||||
}else{
|
||||
outHtmlString("2");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("The saveBoxInfo method, error saving cabinet information"+e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -1436,6 +1439,7 @@ public class NodePositionAction extends BaseAction {
|
||||
private String updateNodes(){
|
||||
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(nodeM!=null){
|
||||
if (nodeM.getId() != null
|
||||
&& !"0".equals(nodeM.getId().toString())
|
||||
@@ -1494,8 +1498,9 @@ public class NodePositionAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
commonService.commit();
|
||||
}catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("The updateNodes method, error saving location information"+e.getMessage());
|
||||
outHtmlString("2");
|
||||
}
|
||||
@@ -1505,6 +1510,7 @@ public class NodePositionAction extends BaseAction {
|
||||
List ngtList = null;
|
||||
String sql ="";
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
//nodeposition ids
|
||||
String ids = this.getRequest().getParameter("npids");
|
||||
//nodegroup ids
|
||||
@@ -1533,7 +1539,9 @@ public class NodePositionAction extends BaseAction {
|
||||
//this.commonService.delete("delete from NodePosition np where np.id in ("+ids+")");
|
||||
}
|
||||
outHtmlString("1");
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("The deleteNodes method, error deleting node"+e.getMessage());
|
||||
outHtmlString("2");
|
||||
}
|
||||
@@ -1543,6 +1551,7 @@ public class NodePositionAction extends BaseAction {
|
||||
|
||||
private String updateLines(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
String tableName1 = this.getRequest().getParameter("tableName1");
|
||||
String nodeId1 = this.getRequest().getParameter("nodeId1");
|
||||
String tableName2 = this.getRequest().getParameter("tableName2");
|
||||
@@ -1565,7 +1574,9 @@ public class NodePositionAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
outHtmlString("1");
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("The updateLines method, update connection error"+e.getMessage());
|
||||
outHtmlString("2");
|
||||
}
|
||||
@@ -1575,6 +1586,7 @@ public class NodePositionAction extends BaseAction {
|
||||
//删除机柜内节点
|
||||
private String deleteLatt(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
String seqId= this.getRequest().getParameter("seqId");
|
||||
System.out.println(seqId);
|
||||
if(seqId!=null && !"".equals(seqId)){
|
||||
@@ -1589,7 +1601,9 @@ public class NodePositionAction extends BaseAction {
|
||||
}
|
||||
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("The deleteLatt method, delete the node in the cabinet"+e.getMessage());
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -116,6 +116,7 @@ public class RoomManageAction extends BaseAction {
|
||||
resultpage = this.openUpdRoom();
|
||||
}else if("doUpdate".equals(this.action)){
|
||||
this.doUpdRoom();
|
||||
resultpage = this.queryRoomInfo();
|
||||
}else if("del".equals(this.action)){
|
||||
resultpage = this.delRoomInfo();
|
||||
}else if ("downloadExample".equals(this.action)) {
|
||||
@@ -298,6 +299,7 @@ public class RoomManageAction extends BaseAction {
|
||||
String desc = "";
|
||||
NodeRoomTable nodeRoomTable = new NodeRoomTable();
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// 保存节点信息
|
||||
nodeRoomTable.setCreateDatetime(new Date());
|
||||
nodeRoomTable.setCreateUserId(getUserID());
|
||||
@@ -326,7 +328,9 @@ public class RoomManageAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
this.commonService.saveOrUpdate(list2);
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
desc = getI18nText("i18n_RoomManageAction.downloadExample.nodeInfoImportErr_n81i");
|
||||
}
|
||||
@@ -431,6 +435,7 @@ public class RoomManageAction extends BaseAction {
|
||||
public String addRoomInfo(){
|
||||
// List list = null;
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
//判断数据是否存在
|
||||
/*list = this.commonService.find("from NodeRoomTable where roomIspn=?",nodeRoom.getRoomIspn());
|
||||
if(list!=null && list.size()>0){
|
||||
@@ -463,7 +468,9 @@ public class RoomManageAction extends BaseAction {
|
||||
}else{
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_RoomManageAction.downloadExample.success_n81i');this.location='roomManage.do?action=query'</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("Failed to add room information", e);
|
||||
}
|
||||
return null;
|
||||
@@ -511,6 +518,7 @@ public class RoomManageAction extends BaseAction {
|
||||
*/
|
||||
public void doUpdRoom(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
NodeRoomTable nrt = (NodeRoomTable) this.commonService.get(
|
||||
NodeRoomTable.class, nodeRoom.getRoomId());
|
||||
String ispn = nrt.getRoomIspn();
|
||||
@@ -586,7 +594,9 @@ public class RoomManageAction extends BaseAction {
|
||||
String sql = "update node_box_table set ROOM_ISPN = ? where ROOM_ISPN = ?";
|
||||
this.commonService.updateBySql(sql, nodeRoom.getRoomIspn(),ispn);
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("Failed to update room information", e);
|
||||
}
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_RoomManageAction.downloadExample.success_n81i');this.location='roomManage.do?action=query&rIspn="+rIspn+"&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
@@ -594,6 +604,7 @@ public class RoomManageAction extends BaseAction {
|
||||
|
||||
public String delRoomInfo(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(ids!=null && ids.length>0){
|
||||
for(Long id : ids){
|
||||
List list = this.commonService.find(
|
||||
@@ -611,7 +622,9 @@ public class RoomManageAction extends BaseAction {
|
||||
this.commonService.updateBatchBySql("delete from NODE_ROOM_TABLE where ROOM_ID=?", Arrays.asList(ids));
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_RoomManageAction.downloadExample.success_n81i');this.location='roomManage.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("Failed to delete room information", e);
|
||||
return "error";
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ public class TopoShowAction extends BaseAction
|
||||
Object[] countObjs = (Object[]) countList.get(0);
|
||||
BigDecimal bigDecimal = new BigDecimal(1);
|
||||
int alramNodeSize = Integer.valueOf(countObjs[0].toString());//((BigDecimal) countObjs[0]).intValue();
|
||||
int allNodeSize = Integer.valueOf(countObjs[0].toString());//((BigDecimal) countObjs[1]).intValue();
|
||||
int allNodeSize = Integer.valueOf(countObjs[1].toString());//((BigDecimal) countObjs[1]).intValue();
|
||||
if (alramNodeSize > 0)
|
||||
{
|
||||
nodegroupTable.setStatus(1);
|
||||
|
||||
@@ -355,6 +355,7 @@ public class PluginManageAction extends BaseAction {
|
||||
|
||||
public String doUpdatePlugin() throws Exception {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
PluginInfo info = (PluginInfo) commonService.get(PluginInfo.class, pluginInfo.getId());
|
||||
info.setUpdateTime(new Date());
|
||||
info.setUpdateUserId(getUserID());
|
||||
@@ -389,7 +390,9 @@ public class PluginManageAction extends BaseAction {
|
||||
} else {
|
||||
commonService.saveOrUpdate(info);
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error(e.getStackTrace());
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_PluginManageAction.downloadPlugin.faild_n81i');this.location='pluginManage.do?action=queryInfo&pageNo="
|
||||
|
||||
@@ -633,6 +633,7 @@ public class ServerManagerAction extends BaseAction {
|
||||
|
||||
public String stop(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(ids !=null && ids.length>0){
|
||||
for(int i= 0;i<ids.length;i++){
|
||||
List serverList = this.commonService.find(
|
||||
@@ -647,6 +648,7 @@ public class ServerManagerAction extends BaseAction {
|
||||
//将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "Server_Table", "UPDATE", st.getId());
|
||||
ServerTable serverTable = (ServerTable) commonService.get(ServerTable.class, ids[i]);
|
||||
commonService.commit();
|
||||
//将DC变更发送到DC
|
||||
this.sendDataControllerReset(ids[i], serverTable.getServerIp(), commonService);
|
||||
}
|
||||
@@ -654,6 +656,7 @@ public class ServerManagerAction extends BaseAction {
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
}
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_ServerManagerAction.downloadExample.success_n81i');" +
|
||||
@@ -664,6 +667,7 @@ public class ServerManagerAction extends BaseAction {
|
||||
|
||||
public String start(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(ids !=null && ids.length>0){
|
||||
for(int i= 0;i<ids.length;i++){
|
||||
List serverList = this.commonService.find(
|
||||
@@ -678,12 +682,15 @@ public class ServerManagerAction extends BaseAction {
|
||||
//将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "Server_Table", "UPDATE", st.getId());
|
||||
ServerTable serverTable = (ServerTable) commonService.get(ServerTable.class, ids[i]);
|
||||
commonService.commit();
|
||||
//将DC变更发送到DC
|
||||
this.sendDataControllerReset(ids[i], serverTable.getServerIp(), commonService);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
}
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_ServerManagerAction.downloadExample.success_n81i');" +
|
||||
@@ -763,6 +770,7 @@ public class ServerManagerAction extends BaseAction {
|
||||
|
||||
public String doAdd(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
/*List list = commonService.find("from ServerTable where serverIp = ? or serverName = ? ", serverTable.getServerIp(),serverTable.getServerName());
|
||||
|
||||
if(list!=null && list.size()>0){
|
||||
@@ -789,9 +797,11 @@ public class ServerManagerAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
}
|
||||
commonService.commit();
|
||||
//将DC变更发送到DC
|
||||
this.sendDataControllerReset(serverTable.getId(), serverTable.getServerIp(), commonService);
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.info("DC范围配置新增失败!", e);
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_ServerManagerAction.downloadExample.faild_n81i');" +
|
||||
@@ -866,6 +876,7 @@ public class ServerManagerAction extends BaseAction {
|
||||
public String doUpdate(){
|
||||
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
/*List list = commonService.find("from ServerTable where (serverIp = ? or serverName = ?) and id <> ?", serverTable.getServerIp(),serverTable.getServerName(),serverTable.getId());
|
||||
|
||||
if(list!=null && list.size()>0){
|
||||
@@ -929,7 +940,9 @@ public class ServerManagerAction extends BaseAction {
|
||||
//将DC变更发送到DC
|
||||
// this.sendDataControllerReset(table.getId(), oldIP, commonService);
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.info("DC范围配置修改失败",e);
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_ServerManagerAction.downloadExample.faild_n81i');" +
|
||||
|
||||
@@ -115,13 +115,16 @@ public class BrandManageAction extends BaseAction {
|
||||
//添加品牌信息操作
|
||||
public String addBrand() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(brand!=null){
|
||||
this.commonService.save(brand);
|
||||
// 将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "Brand", "INSERT",brand.getId());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_BrandManageAction.addBrand.success_n81i');this.location='brandManage.do?action=queryBrandInfo'</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_BrandManageAction.addBrand.faild_n81i');this.location='brandManage.do?action=queryBrandInfo'</script>");
|
||||
}
|
||||
@@ -147,6 +150,7 @@ public class BrandManageAction extends BaseAction {
|
||||
// 进行修改品牌信息操作
|
||||
public String updateBrand() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
Brand brandForUpdate = (Brand) commonService.get(Brand.class, brand.getId());
|
||||
brandForUpdate.setBrandDesc(brand.getBrandDesc());
|
||||
brandForUpdate.setBrandName(brand.getBrandName());
|
||||
@@ -155,8 +159,10 @@ public class BrandManageAction extends BaseAction {
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "Brand", "UPDATE",brandForUpdate.getId());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_BrandManageAction.addBrand.success_n81i');this.location='brandManage.do?action=queryBrandInfo&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
commonService.commit();
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_BrandManageAction.addBrand.faild_n81i');this.location='brandManage.do?action=queryBrandInfo&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
return null;
|
||||
|
||||
@@ -307,6 +307,7 @@ public class DataDictionaryAction extends BaseAction {
|
||||
|
||||
public void doUpdData(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
TypeTable nbt = (TypeTable) this.commonService.get(
|
||||
TypeTable.class, typeTable.getId());
|
||||
nbt.setShowNum(typeTable.getShowNum());
|
||||
@@ -327,7 +328,7 @@ public class DataDictionaryAction extends BaseAction {
|
||||
String sql="update xt_mk_jbxx set zxbz=? where id=?";
|
||||
this.commonService.updateBySql(sql, deptflag,Constants.DEPT_MK_ID);
|
||||
}
|
||||
|
||||
commonService.commit();
|
||||
//改变是否显示主动告警的启用状态时,需要和各个nc通信:SHOW_AUTO_ALARM_FLAG
|
||||
if(nbt.getTypeIdentity().toLowerCase().equals(Constants.SHOW_AUTO_ALARM_FLAG.toLowerCase())
|
||||
&& typeTable.getTypeState()!=oldState) {
|
||||
@@ -338,7 +339,9 @@ public class DataDictionaryAction extends BaseAction {
|
||||
}
|
||||
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DataDictionaryAction.queryDictionary.success_n81i');this.location='dataDictionary.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
logger.error("Update failed",e);
|
||||
this.outHtmlString("<script>alert('i18n_DataDictionaryAction.queryDictionary.updateErr_n81i!');history.back();</script>");
|
||||
return;
|
||||
@@ -347,7 +350,6 @@ public class DataDictionaryAction extends BaseAction {
|
||||
|
||||
public void updateDetectConditionSet(){
|
||||
try {
|
||||
|
||||
SetDetDataCon set = (SetDetDataCon) this.commonService.get(
|
||||
SetDetDataCon.class, detDataConSet.getId());
|
||||
//根据多选组合值???????
|
||||
|
||||
@@ -993,6 +993,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
String desc = "";
|
||||
DeviceTypeInfo devType1=null;
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
String operator="save";
|
||||
// 设备型号不能重复:不同品牌可以重复吗?
|
||||
List<DeviceTypeInfo> list = this.commonService
|
||||
@@ -1076,7 +1077,9 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
commonService.clear();
|
||||
this.commonService.update(devType);
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
desc = getI18nText("BrandManageAction.downloadExampleType.nodeInfoImportErr_n81i")+";";
|
||||
}
|
||||
@@ -1086,6 +1089,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
private String saveNodeBrandType(DeviceBrandType deviceBrandType) {
|
||||
String desc = "";
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
List<DeviceBrandInfo> DeviceBrandInfolist = commonService.find("from DeviceBrandInfo where deviceRandCode=?",deviceBrandType.getDeviceBrandCode());
|
||||
if(DeviceBrandInfolist==null||DeviceBrandInfolist.size()==0){
|
||||
return getI18nText("i18n_DeviceBrandManageAction.downloadExampleType.deviceBrandCodeNotExists_n81i");
|
||||
@@ -1119,7 +1123,9 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
}
|
||||
|
||||
commonService.save(deviceBrandType);
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
desc = getI18nText("i18n_DeviceBrandManageAction.downloadExampleType.nodeInfoImportErr_n81i");
|
||||
}
|
||||
@@ -1501,6 +1507,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
//添加品牌信息操作
|
||||
public void addDevBrand() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(devBrand!=null && StringUtils.isNotBlank(devBrand.getDeviceRandCode())){
|
||||
//品牌编号不能重复
|
||||
List list = this.commonService.find("from DeviceBrandInfo where deviceRandCode='"+devBrand.getDeviceRandCode().trim()+"'");
|
||||
@@ -1522,7 +1529,9 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
}else {
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.emportCurrentXls.brandIdIsNotNull_n81i');this.location='deviceBrandManage.do?action=toAddDevBrand';</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.faild_n81i');this.location='deviceBrandManage.do?action=queryDeviceBrandInfo'</script>");
|
||||
}
|
||||
@@ -1556,6 +1565,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
// 进行修改品牌信息操作
|
||||
public String updateDevBrand() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(devBrand!=null && StringUtils.isNotBlank(devBrand.getDeviceRandCode())) {
|
||||
//品牌编号不能重复
|
||||
List list = this.commonService.find("from DeviceBrandInfo where deviceRandCode='"+devBrand.getDeviceRandCode().trim()+"' and id<>"+devBrand.getId());
|
||||
@@ -1588,8 +1598,10 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
}else {
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.emportCurrentXls.brandCodeIsNotNull_n81i');window.history.go(-1);</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.faild_n81i');this.location='deviceBrandManage.do?action=queryDeviceBrandInfo&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
return null;
|
||||
@@ -1939,6 +1951,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
//配置设备的位置
|
||||
public void configDevicePos(){
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(devTypeForPosList!=null && devTypeForPosList.size()>0){
|
||||
List<DeviceTypeInfo> updateBatchDevList = new ArrayList<DeviceTypeInfo>(); //更新板槽位置信息
|
||||
List<DeviceBoardsoltBoard> updateDBBList = new ArrayList<DeviceBoardsoltBoard>();
|
||||
@@ -1983,7 +1996,9 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
this.addDBOperationRpt(commonService, "DeviceTypeInfo", "UPDATE",null);
|
||||
}
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.success_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo'</script>");
|
||||
}catch(Exception e){
|
||||
commonService.commit();
|
||||
}catch(Exception e){
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.faild_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo'</script>");
|
||||
}
|
||||
@@ -1993,6 +2008,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
System.out.println("right here!");
|
||||
//System.out.println("banka bancao关系:"+pzbkbc+"size:"+devTypeForPosList.size());
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(devTypeForPosList!=null && devTypeForPosList.size()>0){
|
||||
// String[] strGroup = new String[0];
|
||||
List<DeviceTypeInfo> updateBatchDevList = new ArrayList<DeviceTypeInfo>(); //更新板卡位置信息
|
||||
@@ -2056,7 +2072,9 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
this.addDBOperationRpt(commonService, "DeviceTypeInfo", "UPDATE",null);
|
||||
}
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.success_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo'</script>");
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.faild_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo'</script>");
|
||||
}
|
||||
@@ -2065,6 +2083,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
|
||||
public void addDevType() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(devType!=null && StringUtils.isNotBlank(devType.getDeviceTypeCode())){
|
||||
//设备型号不能重复:不同品牌可以重复吗?
|
||||
List list = this.commonService.find("from DeviceTypeInfo where deviceTypeCode='"+devType.getDeviceTypeCode().trim()+"' and deviceRandCode='"+devType.getDeviceRandCode()+"'");
|
||||
@@ -2186,7 +2205,9 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
}else {
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.toConfDevPos.deviceBrandIsNotNull_n81i');window.history.go(-1);</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.faild_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo'</script>");
|
||||
}
|
||||
@@ -4314,6 +4335,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
//新增槽位设备
|
||||
public void addPosDevType() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(devType!=null && StringUtils.isNotBlank(devType.getDeviceTypeCode())){
|
||||
Integer indexStart = devType.getShowIndexStart();
|
||||
Integer indexEnd = devType.getShowIndexEnd();
|
||||
@@ -4384,7 +4406,9 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
}else {
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.toConfDevPos.deviceBrandIsNotNull_n81i');window.history.go(-1);</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.faild_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo'</script>");
|
||||
}
|
||||
@@ -4393,6 +4417,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
//批量新增设备型号(一级设备没有批量新增,也不需要):编号是一个范围,无最大叠加数,需要上传多个图片(图片和设备如何对应呢???):批量插入多条
|
||||
public void addBatchDevType() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(devType!=null && StringUtils.isNotBlank(devType.getDeviceTypeCode())
|
||||
&& StringUtils.isNotBlank(devType.getPid())){
|
||||
//设备型号不能重复:不同品牌可以重复吗?
|
||||
@@ -4505,7 +4530,9 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
}else {
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.toConfDevPos.deviceBrandIsNotNull_n81i');window.history.go(-1);</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.faild_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo'</script>");
|
||||
}
|
||||
@@ -4597,6 +4624,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
|
||||
public String deleteDevType()throws Exception{
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(ids!=null&&!"".equals(ids)) {
|
||||
//不能删除有设备型号的品牌
|
||||
List list = this.commonService.find("from DeviceTypeInfo where pid in( "+ids+")");
|
||||
@@ -4631,7 +4659,9 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.success_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo&devTypeCodeForSearch="+devTypeCodeForSearch+"&devRandCodeForSearch="+devRandCodeForSearch+"&parDevId="+parDevId+"'</script>");
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.faild_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo'</script>");
|
||||
}
|
||||
@@ -4690,6 +4720,7 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
//jsp界面控制:只可以修改叶子设备
|
||||
public void updateDevType() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(devType!=null && StringUtils.isNotBlank(devType.getDeviceTypeCode())){
|
||||
//设备型号不能重复:不同品牌可以重复吗?
|
||||
/*List list = this.commonService.find("from DeviceTypeInfo where deviceTypeCode='"+devType.getDeviceTypeCode().trim()+"' and deviceRandCode='"+devType.getDeviceRandCode()+"' and id<>"+devType.getId());
|
||||
@@ -4842,7 +4873,9 @@ public class DeviceBrandManageAction extends BaseAction {
|
||||
this.addDBOperationRpt(commonService, "DeviceTypeInfo", "UPDATE",devType.getId());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.success_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo&devTypeCodeForSearch="+devTypeCodeForSearch+"&devRandCodeForSearch="+devRandCodeForSearch+"&parDevId="+parDevId+"'</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_DeviceBrandManageAction.importXls.faild_n81i');this.location='deviceBrandManage.do?action=queryDeviceTypeInfo'</script>");
|
||||
}
|
||||
|
||||
@@ -177,6 +177,7 @@ public class NodeGroupManageAction extends BaseAction{
|
||||
//添加节点组
|
||||
public String addNodeGroupInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
List list = this.commonService.find("from NodegroupTable where groupName=?", nodeGroup.getGroupName());
|
||||
if(list!=null && list.size()>0){
|
||||
this.outHtmlString("<script>alert('i18n_NodeGroupManageAction.addNodeGroupInfo.nodeGroupExists_n81i');history.back();</script>");
|
||||
@@ -232,9 +233,12 @@ public class NodeGroupManageAction extends BaseAction{
|
||||
|
||||
//将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "nodegroup_table", "INSERT", nodeGroup.getGroupId());
|
||||
commonService.commit();
|
||||
this.sendNodeAndGroupId(nodeGroup.getGroupId(), null,commonService); //通知NMSServer更新节点组的监控信息
|
||||
this.getRequest().setAttribute("MSG", 1);
|
||||
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_NodeGroupManageAction.openAddNodeGroupInfo.faild_n81i');" +
|
||||
"this.location='nodeGroupManage.do?action=query'</script>");
|
||||
@@ -300,6 +304,7 @@ public class NodeGroupManageAction extends BaseAction{
|
||||
//修改节点组
|
||||
public String updateNodeGroupInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
List list = this.commonService.find("from NodegroupTable where groupName=? and groupId<>?",
|
||||
nodeGroup.getGroupName(),nodeGroup.getGroupId());
|
||||
if(list!=null && list.size()>0){
|
||||
@@ -327,12 +332,15 @@ public class NodeGroupManageAction extends BaseAction{
|
||||
|
||||
//将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "nodegroup_table", "UPDATE", nodeGroup.getGroupId());
|
||||
commonService.commit();
|
||||
}
|
||||
if(flag){
|
||||
this.sendNodeAndGroupId(group.getGroupId(), null,commonService); //通知NMSServer更新节点组的监控信息
|
||||
}
|
||||
this.getRequest().setAttribute("MSG", 1);
|
||||
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_NodeGroupManageAction.openAddNodeGroupInfo.faild_n81i');" +
|
||||
"this.location='nodeGroupManage.do?action=query'</script>");
|
||||
@@ -343,18 +351,22 @@ public class NodeGroupManageAction extends BaseAction{
|
||||
//停用节点组
|
||||
public String stopNodeGroupInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
if(ids!=null && ids.length>0){
|
||||
for(int i=0; i<ids.length; i++){
|
||||
this.commonService.updateByHql(
|
||||
"update NodegroupTable set isValid=0 where groupId=?", ids[i]);
|
||||
this.sendNodeAndGroupId(ids[i], null,commonService); //通知NMSServer更新节点组的监控信息
|
||||
//将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "nodegroup_table", "UPDATE", ids[i]);
|
||||
commonService.commit();
|
||||
this.sendNodeAndGroupId(ids[i], null,commonService); //通知NMSServer更新节点组的监控信息
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//this.getRequest().setAttribute("MSG", 1);
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_NodeGroupManageAction.openAddNodeGroupInfo.faild_n81i');" +
|
||||
"this.location='nodeGroupManage.do?action=query'</script>");
|
||||
@@ -369,17 +381,22 @@ public class NodeGroupManageAction extends BaseAction{
|
||||
//启用节点组
|
||||
public String startNodeGroupInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
if(ids!=null && ids.length>0){
|
||||
for(int i=0; i<ids.length; i++){
|
||||
this.commonService.updateByHql(
|
||||
"update NodegroupTable set isValid=1 where groupId=?", ids[i]);
|
||||
this.sendNodeAndGroupId(ids[i], null,commonService); //通知NMSServer更新节点组的监控信息
|
||||
//将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "nodegroup_table", "UPDATE", ids[i]);
|
||||
commonService.commit();
|
||||
this.sendNodeAndGroupId(ids[i], null,commonService); //通知NMSServer更新节点组的监控信息
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_NodeGroupManageAction.openAddNodeGroupInfo.faild_n81i');" +
|
||||
"this.location='nodeGroupManage.do?action=query'</script>");
|
||||
}
|
||||
|
||||
@@ -205,6 +205,7 @@ public class NodeManageAction extends BaseAction {
|
||||
}
|
||||
//IP在同一节点组下不重复
|
||||
if(!groupNodeIpIsRepeat(nodeTable.getNodeIp(),mkid)){
|
||||
commonService.beginTransaction();
|
||||
NodegroupTable group = (NodegroupTable) this.commonService.get(NodegroupTable.class, mkid);
|
||||
if (group != null ) {
|
||||
//处理节点类型与节点U位,为了保证拓扑图的正常显示
|
||||
@@ -260,19 +261,22 @@ public class NodeManageAction extends BaseAction {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "INSERT",nodeTable.getNodeId());
|
||||
commonService.commit();
|
||||
if(new Long(1).equals(group.getIsValid())){ //节点组有效
|
||||
this.sendNodeAndGroupId(nodeTable.getGroupId(), nodeTable.getNodeId(),commonService); //通知NMSServer更新节点组的监控信息
|
||||
}
|
||||
// 将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "INSERT",nodeTable.getNodeId());
|
||||
|
||||
}
|
||||
this.getRequest().setAttribute("MSG", 1);
|
||||
|
||||
}else{
|
||||
this.outHtmlString("<script>alert('i18n_NodeManageAction.addNodeInfo.nodeGroupHadIp_n81i');history.back();</script>");
|
||||
return null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
return "error";
|
||||
}
|
||||
@@ -542,6 +546,7 @@ public class NodeManageAction extends BaseAction {
|
||||
}
|
||||
//IP在同一节点组下不重复
|
||||
if(!groupNodeIpIsRepeat(nodeTable.getNodeIp(),mkid,nodeTable.getNodeId())){
|
||||
commonService.beginTransaction();
|
||||
NodeTable nt = (NodeTable) this.commonService.get(NodeTable.class, nodeTable.getNodeId());
|
||||
if (nt != null ) {
|
||||
boolean flag =false;
|
||||
@@ -588,22 +593,26 @@ public class NodeManageAction extends BaseAction {
|
||||
}
|
||||
|
||||
this.commonService.update(nt);
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
|
||||
nodeTable.getNodeId());
|
||||
commonService.commit();
|
||||
if(flag){
|
||||
if(new Long(1).equals(group.getIsValid())){ //节点组有效
|
||||
this.sendNodeAndGroupId(nt.getGroupId(), nt.getNodeId(),commonService); //通知NMSServer更新节点组的监控信息
|
||||
}
|
||||
}
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
|
||||
nodeTable.getNodeId());
|
||||
|
||||
}
|
||||
|
||||
this.getRequest().setAttribute("MSG", 1);
|
||||
|
||||
}else{
|
||||
this.outHtmlString("<script>alert('i18n_NodeManageAction.addNodeInfo.nodeGroupHadIp_n81i');history.back();</script>");
|
||||
return null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
return "error";
|
||||
}
|
||||
@@ -613,6 +622,7 @@ public class NodeManageAction extends BaseAction {
|
||||
// 停用节点
|
||||
public String stopNodeInfo() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
List noList = this.commonService.find(
|
||||
"from NodeTable where nodeId=?", nodeId);
|
||||
|
||||
@@ -623,18 +633,23 @@ public class NodeManageAction extends BaseAction {
|
||||
nd.setNodeStoptime(new Date());
|
||||
|
||||
this.commonService.update(nd);
|
||||
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
|
||||
nd.getNodeId());
|
||||
commonService.commit();
|
||||
NodegroupTable group = (NodegroupTable) this.commonService.get(NodegroupTable.class, nd.getGroupId());
|
||||
if(new Long(1).equals(group.getIsValid())){ //节点组有效
|
||||
this.sendNodeAndGroupId(nd.getGroupId(), nd.getNodeId(),commonService); //通知NMSServer更新节点组的监控信息
|
||||
}
|
||||
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
|
||||
nd.getNodeId());
|
||||
|
||||
}
|
||||
|
||||
this.getRequest().setAttribute("MSG", 1);
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
return "error";
|
||||
}
|
||||
@@ -644,17 +659,21 @@ public class NodeManageAction extends BaseAction {
|
||||
// 启用节点
|
||||
public String startNodeInfo() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
this.commonService.updateByHql(
|
||||
"update NodeTable set nodeState=0 where nodeId=?", nodeId);
|
||||
NodeTable nd = (NodeTable) this.commonService.get(NodeTable.class, nodeId);
|
||||
NodegroupTable group = (NodegroupTable) this.commonService.get(NodegroupTable.class, nd.getGroupId());
|
||||
if(new Long(1).equals(group.getIsValid())){ //节点组有效
|
||||
this.sendNodeAndGroupId(nd.getGroupId(), nd.getNodeId(),commonService); //通知NMSServer更新节点组的监控信息
|
||||
}
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "node_table", "UPDATE",
|
||||
nodeId);
|
||||
commonService.commit();
|
||||
if(new Long(1).equals(group.getIsValid())){ //节点组有效
|
||||
this.sendNodeAndGroupId(nd.getGroupId(), nd.getNodeId(),commonService); //通知NMSServer更新节点组的监控信息
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
return "error";
|
||||
}
|
||||
@@ -871,6 +890,7 @@ public class NodeManageAction extends BaseAction {
|
||||
private String saveNode(NodeTableVo vo, NodegroupTable group) {
|
||||
String desc = "";
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if (group != null) {
|
||||
// IP在同一节点组下不重复
|
||||
if (!groupNodeIpIsRepeat(vo.getNodeIp(), group
|
||||
@@ -899,8 +919,9 @@ public class NodeManageAction extends BaseAction {
|
||||
}else {
|
||||
desc = getI18nText("i18n_NodeManageAction.downloadExample.nodeGroupIsNull_n81i");
|
||||
}
|
||||
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
desc =getI18nText("i18n_NodeManageAction.downloadExample.nodeInfoImportErr_n81i");
|
||||
}
|
||||
|
||||
@@ -115,13 +115,16 @@ public class SnmpDetectManageAction extends BaseAction {
|
||||
// 添加snmp监测项操作
|
||||
public String addSnmpDetectType() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(sortInfo!=null){
|
||||
this.commonService.save(sortInfo);
|
||||
// 将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "SortInfo", "INSERT",sortInfo.getId());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SnmpDetectManageAction.addSnmpDetectType.success_n81i');this.location='snmpDetectManage.do?action=querySnmpDetectTypeInfo'</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SnmpDetectManageAction.addSnmpDetectType.faild_n81i');this.location='snmpDetectManage.do?action=querySnmpDetectTypeInfo'</script>");
|
||||
}
|
||||
@@ -147,6 +150,7 @@ public class SnmpDetectManageAction extends BaseAction {
|
||||
// 进行修改snmp监测项操作
|
||||
public String updateSnmpDetectType() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
SortInfo sortForUpdate = (SortInfo) commonService.get(SortInfo.class, sortInfo.getId());
|
||||
sortForUpdate.setSortName(sortInfo.getSortName());
|
||||
sortForUpdate.setSortDesc(sortInfo.getSortDesc());
|
||||
@@ -154,8 +158,10 @@ public class SnmpDetectManageAction extends BaseAction {
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "SortInfo", "UPDATE",sortForUpdate.getId());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SnmpDetectManageAction.addSnmpDetectType.success_n81i');this.location='snmpDetectManage.do?action=querySnmpDetectTypeInfo&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
commonService.commit();
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SnmpDetectManageAction.addSnmpDetectType.faild_n81i');this.location='snmpDetectManage.do?action=querySnmpDetectTypeInfo&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
return null;
|
||||
@@ -179,13 +185,17 @@ public class SnmpDetectManageAction extends BaseAction {
|
||||
//删除snmp监测项
|
||||
public String deleteSnmpDetectType()throws Exception{
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
if(ids!=null&&!"".equals(ids)) {
|
||||
String hql = "DELETE FROM SortInfo WHERE ID IN ("+ ids + ")";
|
||||
this.commonService.delete(hql);
|
||||
}
|
||||
commonService.commit();
|
||||
|
||||
// this.getRequest().setAttribute("MSG", 1);
|
||||
// outHtmlString("<script type=\"text/javascript\">this.location='brandManage.do?action=queryBrandInfo'</script>");
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
//outHtmlString("<script type=\"text/javascript\">alert('操作失败');this.location='checkTypeSet.do?action=query'</script>");
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ public class SysErrorManageAction extends BaseAction {
|
||||
|
||||
public void addErrorInfo() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// if(checkCode(troubleState.getTroubleCode())){
|
||||
SystemTable sys = null;
|
||||
if(this.getAdminMark()){//是
|
||||
@@ -126,7 +127,9 @@ public class SysErrorManageAction extends BaseAction {
|
||||
this.outHtmlString("<script>alert('故障代码已存在,请重新输入!');history.back();</script>");
|
||||
return;
|
||||
}*/
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysErrorManageAction.addErrorInfo.faild_n81i');this.location='sysErrorManage!execute.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
}
|
||||
@@ -184,6 +187,7 @@ public class SysErrorManageAction extends BaseAction {
|
||||
|
||||
public void doUpdate() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
TroubleState md = (TroubleState) commonService.get(TroubleState.class, troubleState
|
||||
.getId());
|
||||
SystemTable sys = null;
|
||||
@@ -207,7 +211,9 @@ public class SysErrorManageAction extends BaseAction {
|
||||
this.addDBOperationRpt(commonService, "Trouble_State", "UPDATE",
|
||||
troubleState.getId());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysErrorManageAction.addErrorInfo.success_n81i');this.location='sysErrorManage!execute.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysErrorManageAction.addErrorInfo.faild_n81i');this.location='sysErrorManage!execute.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
}
|
||||
|
||||
@@ -317,13 +317,16 @@ public class SysPopedomManageAction extends BaseAction
|
||||
{
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
module.setCtime(new Date());
|
||||
this.commonService.save(module);
|
||||
// 将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "XT_MK_JBXX", "INSERT", module.getId());
|
||||
this.getRequest().setAttribute("MSG", "1");// 操作成功
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
this.getRequest().setAttribute("MSG", "2");// 操作失败
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -378,6 +381,7 @@ public class SysPopedomManageAction extends BaseAction
|
||||
{
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
XtMkJbxx md = (XtMkJbxx) commonService.get(XtMkJbxx.class, module.getId());
|
||||
// md.setMkbh(module.getMkbh());
|
||||
md.setMkmc(module.getMkmc());
|
||||
@@ -388,8 +392,10 @@ public class SysPopedomManageAction extends BaseAction
|
||||
// 将更新操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "XT_MK_JBXX", "UPDATE", module.getId());
|
||||
this.getRequest().setAttribute("MSG", "1");
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
this.getRequest().setAttribute("MSG", "2");
|
||||
updateMkInfo();
|
||||
e.printStackTrace();
|
||||
@@ -521,6 +527,7 @@ public class SysPopedomManageAction extends BaseAction
|
||||
{
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
role.setZxbz("0");
|
||||
this.commonService.save(role);
|
||||
// 将添加操作写到操作日志中
|
||||
@@ -536,8 +543,10 @@ public class SysPopedomManageAction extends BaseAction
|
||||
this.commonService.save(roleModule);
|
||||
}
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysPopedomManageAction.addJsInfo.success_n81i');this.location='sysPopedomManage.do?action=queryJsInfo'</script>");
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysPopedomManageAction.addJsInfo.faild_n81i');this.location='sysPopedomManage.do?action=queryJsInfo'</script>");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -678,6 +687,7 @@ public class SysPopedomManageAction extends BaseAction
|
||||
{
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
String[] sMk = mkid.split(",");
|
||||
// 删除旧的角色模块信息
|
||||
this.commonService.delete("delete XtJsMkIndex where jsbh=" + role.getJsbh());
|
||||
@@ -699,8 +709,10 @@ public class SysPopedomManageAction extends BaseAction
|
||||
this.commonService.save(roleModule);
|
||||
}
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysPopedomManageAction.addJsInfo.success_n81i');this.location='sysPopedomManage.do?action=queryJsInfo'</script>");
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
queryJsInfoByid();
|
||||
queryJsMkInfoByJsbh();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysPopedomManageAction.addJsInfo.faild_n81i');this.location='sysPopedomManage.do?action=queryJsInfo'</script>");
|
||||
@@ -728,6 +740,7 @@ public class SysPopedomManageAction extends BaseAction
|
||||
String pwdString = "";
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
/*List list = this.commonService.find("from XtYhJbxx where yhbh=?", user.getYhbh());
|
||||
if (list != null && list.size() > 0)
|
||||
{
|
||||
@@ -823,8 +836,10 @@ public class SysPopedomManageAction extends BaseAction
|
||||
}
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysPopedomManageAction.addJsInfo.success_n81i');this.location='sysPopedomManage.do?action=queryUserInfo'</script>");
|
||||
// }
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysPopedomManageAction.addJsInfo.faild_n81i');this.location='sysPopedomManage.do?action=queryUserInfo'</script>");
|
||||
}
|
||||
@@ -1022,6 +1037,7 @@ public class SysPopedomManageAction extends BaseAction
|
||||
{
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
XtYhJbxx userNew = (XtYhJbxx) this.commonService.get(XtYhJbxx.class, this.getUserID());
|
||||
if (isUpdatePwd == 0l)
|
||||
{// 修改密码
|
||||
@@ -1036,8 +1052,10 @@ public class SysPopedomManageAction extends BaseAction
|
||||
// 将删除操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "XT_YH_JBXX", "UPDATE", this.getUserID());
|
||||
this.getRequest().setAttribute("MSG", 1);
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
this.getRequest().setAttribute("MSG", 2);
|
||||
queryUserInfoById();
|
||||
e.printStackTrace();
|
||||
@@ -1049,6 +1067,7 @@ public class SysPopedomManageAction extends BaseAction
|
||||
{
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
// 删除旧的用户角色信息
|
||||
this.commonService.delete("delete XtYhJsIndex where type is null and yhbh='"
|
||||
+ new String(yhbh.getBytes("ISO-8859-1"), "UTF-8") + "'");
|
||||
@@ -1118,8 +1137,10 @@ public class SysPopedomManageAction extends BaseAction
|
||||
}
|
||||
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysPopedomManageAction.addJsInfo.success_n81i');this.location='sysPopedomManage.do?action=queryUserInfo'</script>");
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
queryUserInfoById();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysPopedomManageAction.addJsInfo.faild_n81i');this.location='sysPopedomManage.do?action=queryUserInfo'</script>");
|
||||
@@ -1131,6 +1152,7 @@ public class SysPopedomManageAction extends BaseAction
|
||||
{
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
XtYhJbxx userNew = (XtYhJbxx) this.commonService.get(XtYhJbxx.class, Long
|
||||
.parseLong(yhid.trim()));
|
||||
userNew.setYhmc(user.getYhmc());
|
||||
@@ -1150,8 +1172,10 @@ public class SysPopedomManageAction extends BaseAction
|
||||
// //将删除操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "XT_YH_JBXX", "UPDATE", userNew.getYhid());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysPopedomManageAction.addJsInfo.success_n81i');this.location='sysPopedomManage.do?action=queryUserInfo'</script>");
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
queryUserInfoById();
|
||||
e.printStackTrace();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SysPopedomManageAction.addJsInfo.faild_n81i');this.location='sysPopedomManage.do?action=queryUserInfo'</script>");
|
||||
@@ -1375,6 +1399,7 @@ public class SysPopedomManageAction extends BaseAction
|
||||
{
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
if (dept.getUpperlayer() == null)
|
||||
{
|
||||
dept.setUpperlayer(-1l);
|
||||
@@ -1385,8 +1410,10 @@ public class SysPopedomManageAction extends BaseAction
|
||||
this.addDBOperationRpt(commonService, "TABLEDEPARTMENT", "INSERT", dept.getDeptid());
|
||||
|
||||
this.getRequest().setAttribute("MSG", "1");// 操作成功
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
this.getRequest().setAttribute("MSG", "2");// 操作失败
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -1417,6 +1444,7 @@ public class SysPopedomManageAction extends BaseAction
|
||||
{
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
TableDepartment deptNew = (TableDepartment) commonService.get(TableDepartment.class,
|
||||
Long.parseLong(deptid.trim()));
|
||||
if (dept.getUpperlayer() == null)
|
||||
@@ -1432,8 +1460,10 @@ public class SysPopedomManageAction extends BaseAction
|
||||
this.addDBOperationRpt(commonService, "TABLEDEPARTMENT", "UPDATE", dept.getDeptid());
|
||||
|
||||
this.getRequest().setAttribute("MSG", "1");
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
this.getRequest().setAttribute("MSG", "2");
|
||||
updateMkInfo();
|
||||
e.printStackTrace();
|
||||
@@ -1875,6 +1905,7 @@ public class SysPopedomManageAction extends BaseAction
|
||||
String pwdString = "";
|
||||
try
|
||||
{
|
||||
commonService.beginTransaction();
|
||||
List list = this.commonService.find("from XtYhJbxx where yhbh=?", user.getYhbh());
|
||||
if (list != null && list.size() > 0)
|
||||
{
|
||||
@@ -1906,8 +1937,10 @@ public class SysPopedomManageAction extends BaseAction
|
||||
this.addDBOperationRpt(commonService, "XT_YH_JBXX", "INSERT", user.getYhid());
|
||||
this.getRequest().setAttribute("MSG", 1);
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
commonService.rollback();
|
||||
this.getRequest().setAttribute("MSG", 2);
|
||||
e.printStackTrace();
|
||||
resu = getI18nText("i18n_SysPopedomManageAction.addJsInfo.userInfoImportErr_n81i");
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package nis.nms.web.actions.sysManage;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import nis.nms.core.Constants;
|
||||
import nis.nms.core.Resource;
|
||||
import nis.nms.domains.GorupSystemTable;
|
||||
import nis.nms.domains.NodePosition;
|
||||
@@ -12,6 +15,7 @@ import nis.nms.domains.NodegroupTable;
|
||||
import nis.nms.domains.SystemTable;
|
||||
import nis.nms.domains.XtJsJbxx;
|
||||
import nis.nms.domains.XtYhJbxx;
|
||||
import nis.nms.domains.XtYhJsIndex;
|
||||
import nis.nms.service.CommonService;
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.IpCovert;
|
||||
@@ -269,6 +273,7 @@ public class SystemManageAction extends BaseAction{
|
||||
//添加业务系统
|
||||
public String addSystemInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
List list =null;
|
||||
/*List list = this.commonService.find("from SystemTable where systemName=?", system.getSystemName());
|
||||
if(list!=null && list.size()>0){
|
||||
@@ -297,6 +302,19 @@ public class SystemManageAction extends BaseAction{
|
||||
//将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "system_table", "INSERT", system.getSystemId());
|
||||
|
||||
//2018-09-28新增,创建业务系统时,创建同名用户组,并将该用户组权限赋给nationRole用户
|
||||
XtJsJbxx role=new XtJsJbxx();
|
||||
role.setCtime(system.getSystemCreatetime());
|
||||
role.setZxbz("0");
|
||||
role.setType(1l);
|
||||
role.setJsbh(commonService.getSequenceValue("SEQ_XT_JS_JBXX"));
|
||||
role.setJsmc(system.getSystemName());
|
||||
role.setJsms(system.getSystemDesc());
|
||||
commonService.save(role);
|
||||
|
||||
//将添加操作写到操作日志中
|
||||
this.addDBOperationRpt(commonService, "xt_js_jbxx", "INSERT", system.getSystemId());
|
||||
|
||||
//保存用户组到关联表
|
||||
if(mkid!=null && !mkid.equals("")){
|
||||
String[] sMk = mkid.split(",");
|
||||
@@ -307,7 +325,33 @@ public class SystemManageAction extends BaseAction{
|
||||
groupSys.setUserGroupId(Long.parseLong(sMk[i].trim()));
|
||||
this.commonService.save(groupSys);
|
||||
}
|
||||
GorupSystemTable groupSys= new GorupSystemTable();
|
||||
groupSys.setSystemId(system.getSystemId());
|
||||
groupSys.setUserGroupId(role.getJsbh());
|
||||
this.commonService.save(groupSys);
|
||||
}
|
||||
}else{
|
||||
GorupSystemTable groupSys= new GorupSystemTable();
|
||||
groupSys.setSystemId(system.getSystemId());
|
||||
groupSys.setUserGroupId(role.getJsbh());
|
||||
this.commonService.save(groupSys);
|
||||
}
|
||||
|
||||
//获取角色为nationoRole的用户
|
||||
String sql="select yhbh,yhid from xt_yh_jbxx where yhbh in(select yhbh from xt_yh_js_index where jsbh="+Constants.NATION_ROLE+") ";
|
||||
List<Object[]> users = commonService.executeSQL(sql);
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
for (Object[] user : users) {
|
||||
XtYhJsIndex xtYhJsIndex=new XtYhJsIndex();
|
||||
xtYhJsIndex.setCtime(role.getCtime());
|
||||
xtYhJsIndex.setId(commonService.getSequenceValue("SEQ_XT_YH_JS_INDEX"));
|
||||
xtYhJsIndex.setJsbh(role.getJsbh());
|
||||
xtYhJsIndex.setType(role.getType());
|
||||
xtYhJsIndex.setYhbh((String)user[0]);
|
||||
xtYhJsIndex.setYhId(((BigDecimal)user[1]).longValue());
|
||||
|
||||
commonService.save(xtYhJsIndex);
|
||||
}
|
||||
|
||||
//拓扑图的数据维护
|
||||
@@ -335,7 +379,9 @@ public class SystemManageAction extends BaseAction{
|
||||
}else{
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SystemManageAction.ajaxCheck.success_n81i');this.location='systemManage.do?action=query'</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SystemManageAction.ajaxCheck.faild_n81i');" +
|
||||
@@ -384,6 +430,7 @@ public class SystemManageAction extends BaseAction{
|
||||
//修改业务系统
|
||||
public String updateSystemInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
/*List list = this.commonService.find(
|
||||
"from SystemTable where systemName=? and systemId<>?",
|
||||
system.getSystemName(), system.getSystemId());
|
||||
@@ -429,7 +476,9 @@ public class SystemManageAction extends BaseAction{
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SystemManageAction.ajaxCheck.success_n81i');" +
|
||||
"this.location='systemManage.do?action=query&pageNo=" + pageNo +
|
||||
"&pageSize=" + pageSize + "'</script>");
|
||||
commonService.commit();
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SystemManageAction.ajaxCheck.faild_n81i');" +
|
||||
@@ -443,6 +492,7 @@ public class SystemManageAction extends BaseAction{
|
||||
//停用业务系统
|
||||
public String stopSystemInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
if(ids!=null && ids.length>0){
|
||||
for(int i=0; i<ids.length; i++){
|
||||
List sysList = this.commonService.find(
|
||||
@@ -465,7 +515,9 @@ public class SystemManageAction extends BaseAction{
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SystemManageAction.ajaxCheck.success_n81i');" +
|
||||
"this.location='systemManage.do?action=query&pageNo=" + pageNo +
|
||||
"&pageSize=" + pageSize + "'</script>");
|
||||
commonService.commit();
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SystemManageAction.ajaxCheck.faild_n81i');" +
|
||||
@@ -478,6 +530,7 @@ public class SystemManageAction extends BaseAction{
|
||||
//启用业务系统
|
||||
public String startSystemInfo(){
|
||||
try{
|
||||
commonService.beginTransaction();
|
||||
if(ids!=null && ids.length>0){
|
||||
for(int i=0; i<ids.length; i++){
|
||||
this.commonService.updateByHql(
|
||||
@@ -491,7 +544,9 @@ public class SystemManageAction extends BaseAction{
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SystemManageAction.ajaxCheck.success_n81i');" +
|
||||
"this.location='systemManage.do?action=query&pageNo=" + pageNo +
|
||||
"&pageSize=" + pageSize + "'</script>");
|
||||
commonService.commit();
|
||||
}catch (Exception e){
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
logger.error(e.getStackTrace());
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_SystemManageAction.ajaxCheck.faild_n81i');" +
|
||||
|
||||
@@ -159,6 +159,7 @@ public class TopoManageAction extends BaseAction{
|
||||
JSONArray fromObject = JSONArray.fromObject(parameter);
|
||||
List<TopoManageInfo> results = (List) JSONArray.toCollection(fromObject, TopoManageInfo.class);
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
TopoInfo topoInfo = (TopoInfo) this.commonService.get(TopoInfo.class, topoInfoId);
|
||||
if(!topoInfo.getSystemId().equals(systemId)){
|
||||
//将之前的topotu指向业务系统设为null
|
||||
@@ -179,7 +180,9 @@ public class TopoManageAction extends BaseAction{
|
||||
topoNodeInfo.setTypeId(data.getNodeTypeId());
|
||||
this.commonService.update(topoNodeInfo);
|
||||
}
|
||||
commonService.commit();
|
||||
}catch (Exception e) {
|
||||
commonService.rollback();
|
||||
try {
|
||||
this.getResponse().sendError(500);
|
||||
} catch (IOException e1) {
|
||||
|
||||
@@ -2,6 +2,8 @@ package nis.nms.web.actions.sysManage;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -16,10 +18,15 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.apache.struts2.config.Result;
|
||||
import org.apache.struts2.config.Results;
|
||||
|
||||
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils.Commons;
|
||||
|
||||
import nis.nms.core.Constants;
|
||||
import nis.nms.core.Resource;
|
||||
import nis.nms.domains.GorupSystemTable;
|
||||
import nis.nms.domains.SystemTable;
|
||||
import nis.nms.domains.XtJsJbxx;
|
||||
import nis.nms.domains.XtYhJbxx;
|
||||
import nis.nms.domains.XtYhJsIndex;
|
||||
import nis.nms.service.CommonService;
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.Constant;
|
||||
@@ -301,6 +308,7 @@ public class UserGroupPerssionAction extends BaseAction {
|
||||
XtJsJbxx xtJsJbxx = new XtJsJbxx();
|
||||
String operate="save";
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
// 保存节点信息
|
||||
xtJsJbxx.setCtime(new Date());
|
||||
xtJsJbxx.setJsmc(JSMC);
|
||||
@@ -337,7 +345,9 @@ public class UserGroupPerssionAction extends BaseAction {
|
||||
gorupSystemTable.setSystemId(Long.parseLong(SYSTEMID));
|
||||
gorupSystemTable.setUserGroupId(xtJsJbxx.getJsbh());
|
||||
this.commonService.save(gorupSystemTable);
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
e.printStackTrace();
|
||||
desc = getI18nText("i18n_UserGroupPerssionAction.downloadExample.nodeInfoImportErr_n81i");
|
||||
}
|
||||
@@ -436,6 +446,7 @@ public class UserGroupPerssionAction extends BaseAction {
|
||||
// 新增用户组信息
|
||||
public void addgroupInfo() {
|
||||
try {
|
||||
commonService.beginTransaction();
|
||||
/*List list = this.commonService.find("from XtJsJbxx where type=1 and jsmc=?", role.getJsmc());
|
||||
if(list!=null && list.size()>0){
|
||||
this.outHtmlString("<script>alert('用户组已存在,请重新输入!');history.back();</script>");
|
||||
@@ -458,7 +469,6 @@ public class UserGroupPerssionAction extends BaseAction {
|
||||
}
|
||||
this.getRequest().setAttribute("MSG", 1);
|
||||
}
|
||||
|
||||
//记录用户操作用于设置向导
|
||||
if(fromWhere!=null && !"".equals(fromWhere)){
|
||||
if(fromWhere.equals("formGuide")){
|
||||
@@ -467,7 +477,9 @@ public class UserGroupPerssionAction extends BaseAction {
|
||||
}else{
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_UserGroupPerssionAction.downloadExample.success_n81i');this.location='userGroupPerssion.do?action=query'</script>");
|
||||
}
|
||||
commonService.commit();
|
||||
} catch (Exception e) {
|
||||
commonService.rollback();
|
||||
outHtmlString("<script type=\"text/javascript\">alert('i18n_UserGroupPerssionAction.giveGroupPerssions.faild_n81i');this.location='userGroupPerssion.do?action=query'</script>");
|
||||
this.getRequest().setAttribute("MSG", 2);
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user