ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
Source/Service/FrameService/src/com/vci/server/framework/delegate/MachSecurityDelegate.java
@@ -7,13 +7,13 @@
import com.vci.server.base.utility.LogHelper;
import com.vci.server.framework.systemConfig.log.LogRecordUtil;
import com.vci.server.base.utility.LogRecordUtil;
import com.vci.server.framework.systemConfig.security.MachSecurity;
import com.vci.server.framework.systemConfig.security.MachSecurityService;
import com.vci.common.log.LogType;
import com.vci.common.utility.ObjectUtility;
import com.vci.corba.common.VCIError;
import com.vci.corba.framework.data.MachSecurityInfo;
import com.vci.corba.log.data.LogType;
import com.vci.corba.common.data.UserEntityInfo;
import com.vci.server.base.delegate.BaseDelegate;
@@ -131,7 +131,7 @@
         service.saveMachSecurity(security);
         String log = String.format("添加机器密级:%s [%s]", security.getName(), LogHelper.toNewLogString(security));
         LogRecordUtil.writeLog(userEntity, "添加", "成功", log, LogType.GeneralOperation, security.getId());
         LogRecordUtil.writeLog(userInfo, "添加", "成功", log, LogType.General, security.getId());
      } catch (Exception e) {
         throw new VCIError("120315", new String[0]);
      }
@@ -161,7 +161,7 @@
         machService.saveMachSecurities(securities);
         String log = String.format("添加机器密级对象:%s", String.join(";", ids));
         LogRecordUtil.writeLog(userEntity, "添加", "成功", log, LogType.GeneralOperation, id);
         LogRecordUtil.writeLog(userInfo, "添加", "成功", log, LogType.General, id);
      } catch (Exception e) {
         throw new VCIError("120316", new String[0]);
      }
@@ -170,8 +170,8 @@
   }
   public boolean updateMachSecurity(MachSecurityInfo info, UserEntityInfo userEnt) throws VCIError {
      this.setUserEntityInfo(userEnt);
   public boolean updateMachSecurity(MachSecurityInfo info, UserEntityInfo userInfo) throws VCIError {
      this.setUserEntityInfo(userInfo);
      
      boolean rs = true;
      MachSecurity ent = changeInfoToEntity(info);
@@ -187,9 +187,9 @@
               LogHelper.toUpdataLogString(old, ent));
         if (rs)
            LogRecordUtil.writeLog(userEntity, "更新", "成功", log, LogType.GeneralOperation, ent.getId());
            LogRecordUtil.writeLog(userInfo, "更新", "成功", log, LogType.General, ent.getId());
         else
            LogRecordUtil.writeLog(userEntity, "更新", "失败", log, LogType.GeneralOperation, ent.getId());
            LogRecordUtil.writeLog(userInfo, "更新", "失败", log, LogType.General, ent.getId());
         
         return rs;
@@ -199,8 +199,8 @@
   }
   public boolean batchUpdateMachSecurity(MachSecurityInfo[] infos, UserEntityInfo userEnt) throws VCIError {
      this.setUserEntityInfo(userEnt);
   public boolean batchUpdateMachSecurity(MachSecurityInfo[] infos, UserEntityInfo userInfo) throws VCIError {
      this.setUserEntityInfo(userInfo);
      MachSecurity[] securities = new MachSecurity[infos.length];
      String[] ids = new String[infos.length];
@@ -216,11 +216,11 @@
         MachSecurityService machService = new MachSecurityService(userEntity);
         machService.updateMachSecurities(securities);
         LogRecordUtil.writeLog(userEntity, "更新", "成功", log, LogType.GeneralOperation, ids[0]);
         LogRecordUtil.writeLog(userInfo, "更新", "成功", log, LogType.General, ids[0]);
         
         return true;
      } catch (Exception e) {
         LogRecordUtil.writeLog(userEntity, "更新", "失败", log, LogType.GeneralOperation, ids[0]);
         LogRecordUtil.writeLog(userInfo, "更新", "失败", log, LogType.General, ids[0]);
         throw new VCIError("120318", new String[0]);
      }
   }