wangting
2025-01-16 18c43123b51a1688ab4ae01fe3d171c7d92e619b
Source/Service/FrameService/src/com/vci/server/framework/delegate/SystemCfgDelegate.java
@@ -7,7 +7,6 @@
import org.apache.commons.lang3.StringUtils;
import com.vci.common.log.LogType;
import com.vci.common.objects.UserEntity;
import com.vci.common.resource.CommonProperties;
import com.vci.common.utility.ObjectUtility;
@@ -17,12 +16,13 @@
import com.vci.corba.framework.data.SpecialCharClsfInfo;
import com.vci.corba.framework.data.SpecialCharInfo;
import com.vci.corba.framework.data.SystemCfgInfo;
import com.vci.corba.log.data.LogType;
import com.vci.corba.common.data.UserEntityInfo;
import com.vci.server.base.delegate.BaseDelegate;
import com.vci.server.base.delegate.UserEntityDelegate;
import com.vci.server.base.utility.LogRecordUtil;
import com.vci.server.framework.systemConfig.SystemCfg;
import com.vci.server.framework.systemConfig.SystemCfgService;
import com.vci.server.framework.systemConfig.log.LogRecordUtil;
import com.vci.server.framework.systemConfig.specialchar.SpecialChar;
import com.vci.server.framework.systemConfig.specialchar.SpecialCharService;
import com.vci.server.framework.systemConfig.specialcharclsf.SpecialCharClsf;
@@ -101,13 +101,13 @@
      }
      String id = ObjectUtility.getNewObjectID36();
      specialCharClsfInfo.id = id;
      UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      //UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      try {
         SpecialCharClsf special = changeSpecialCharClsfInfoToSpecialCharClsf(specialCharClsfInfo);
         specialCharClsfService.saveSpecialCharClsf(special);
         LogRecordUtil.writeLog(userEntity, "添加", "成功", special.getLogInfo(),LogType.GeneralOperation,special.getId());
         LogRecordUtil.writeLog(userEntityInfo, "添加", "成功", special.getLogInfo(),LogType.General,special.getId());
      } catch (Exception e) {
         //LogRecordUtil.writeLog(userEntity, "特殊字符分类", "添加失败!",LogType.GeneralOperation);
         //LogRecordUtil.writeLog(userEntity, "特殊字符分类", "添加失败!",LogType.General);
         e.printStackTrace();
         throw new VCIError("150008", new String[]{});
      }
@@ -124,7 +124,7 @@
      SpecialCharClsfService specialCharClsfService = new SpecialCharClsfService();
      SpecialCharClsf checkSpecialCharClsf = specialCharClsfService.selectSpecialCharClsfByName(specialCharClsfInfo.name);
      UserEntityDelegate.setUserEntityToService(specialCharClsfService, userEntityInfo);
      UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      //UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      if (checkSpecialCharClsf != null && !checkSpecialCharClsf.getId().equals(specialCharClsfInfo.id)) {
         throw new VCIError("10063", new String[]{});
      }
@@ -135,7 +135,7 @@
         StringBuilder logres = new StringBuilder();
         logres.append("更新前:"+speciaBefore.getLogInfo());
         logres.append(" 更新后:"+specia.getLogInfo());
         LogRecordUtil.writeLog(userEntity, "更新", "成功", logres.toString(), LogType.GeneralOperation,specia.getId());
         LogRecordUtil.writeLog(userEntityInfo, "更新", "成功", logres.toString(), LogType.General,specia.getId());
         } catch (Exception e) {
         e.printStackTrace();
         throw new VCIError("150012", new String[]{});
@@ -230,7 +230,7 @@
    */
   public boolean deletSpecialCharClsf(String[] ids, UserEntityInfo userEntityInfo) throws VCIError {
      boolean rs = true;
      UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      //UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      SpecialCharClsfService specialCharClsfService = new SpecialCharClsfService();
      try {
         UserEntityDelegate.setUserEntityToService(specialCharClsfService, userEntityInfo);
@@ -243,10 +243,10 @@
         Iterator<String> it = map.keySet().iterator();
         while(it.hasNext()){
            String speciaId = it.next();
            LogRecordUtil.writeLog(userEntity, "删除", "成功", speciaId, LogType.GeneralOperation,map.get(speciaId));
            LogRecordUtil.writeLog(userEntityInfo, "删除", "成功", speciaId, LogType.General,map.get(speciaId));
            }
      } catch (Exception e) {
         //LogRecordUtil.writeLog(userEntity, "特殊字符分类", "删除失败!",LogType.GeneralOperation);
         //LogRecordUtil.writeLog(userEntity, "特殊字符分类", "删除失败!",LogType.General);
         e.printStackTrace();
         throw new VCIError("150002", new String[]{});
      }
@@ -262,7 +262,7 @@
      SpecialCharService specialCharService = new SpecialCharService();
      int length = specialCharInfos.length;
      UserEntityDelegate.setUserEntityToService(specialCharService, userEntityInfo);
      UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      //UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      for (int i = 0; i < length; i++) {
         SpecialChar checksPecialChar = specialCharService.getSepcialCharByClsfIdAndVal(specialCharInfos[i].parentId, specialCharInfos[i].value);
          if (checksPecialChar != null) {
@@ -275,9 +275,9 @@
         try {
            SpecialChar specia = changeSpecialCharInfoToSpecialChar(specialCharInfos[i]);
            specialCharService.saveSpecialChar(specia);
            LogRecordUtil.writeLog(userEntity, "添加", "成功", specia.getLogInfo(),LogType.GeneralOperation,specia.getId());
            LogRecordUtil.writeLog(userEntityInfo, "添加", "成功", specia.getLogInfo(),LogType.General,specia.getId());
         } catch (Exception e) {
            //LogRecordUtil.writeLog(userEntity, "特殊字符", "添加失败!",LogType.GeneralOperation);
            //LogRecordUtil.writeLog(userEntity, "特殊字符", "添加失败!",LogType.General);
            e.printStackTrace();
            throw new VCIError("150006", new String[]{});
         }
@@ -294,7 +294,7 @@
      SpecialCharService specialCharService = new SpecialCharService();
      UserEntityDelegate.setUserEntityToService(specialCharService, userEntityInfo);
      SpecialChar checksPecialChar = specialCharService.getSepcialCharByClsfIdAndVal(specialCharInfo.parentId, specialCharInfo.value);
      UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      //UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      if (checksPecialChar != null && !checksPecialChar.getId().equals(specialCharInfo.id)) {
         throw new VCIError("10062", new String[]{});
      }
@@ -305,9 +305,9 @@
         StringBuilder logres = new StringBuilder();
         logres.append("更新前:"+speciaBefore.getLogInfo());
         logres.append(" 更新后:"+specia.getLogInfo());
         LogRecordUtil.writeLog(userEntity, "更新", "成功", logres.toString(), LogType.GeneralOperation,specia.getId());
         LogRecordUtil.writeLog(userEntityInfo, "更新", "成功", logres.toString(), LogType.General,specia.getId());
         } catch (Exception e) {
         //LogRecordUtil.writeLog(userEntity, "特殊字符", "修改失败!",LogType.GeneralOperation);
         //LogRecordUtil.writeLog(userEntity, "特殊字符", "修改失败!",LogType.General);
         e.printStackTrace();
         throw new VCIError("150010", new String[]{});
      }
@@ -322,7 +322,7 @@
   public boolean deletSpecialChar(String[] ids, UserEntityInfo userEntityInfo) throws VCIError {
      boolean rs = true;
      SpecialCharService specialCharService = new SpecialCharService();
      UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      //UserEntity userEntity = changeUserEntityInfoToUserEntity(userEntityInfo);
      try {
         UserEntityDelegate.setUserEntityToService(specialCharService, userEntityInfo);
         LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
@@ -334,9 +334,9 @@
         Iterator<String> it = map.keySet().iterator();
         while(it.hasNext()){
            String logKey =  it.next();
            LogRecordUtil.writeLog(userEntity, "删除", "成功", logKey, LogType.GeneralOperation,map.get(logKey));         }
            LogRecordUtil.writeLog(userEntityInfo, "删除", "成功", logKey, LogType.General,map.get(logKey));         }
         } catch (Exception e) {
         //LogRecordUtil.writeLog(userEntity, "特殊字符", "删除失败!",LogType.GeneralOperation);
         //LogRecordUtil.writeLog(userEntity, "特殊字符", "删除失败!",LogType.General);
         e.printStackTrace();
         throw new VCIError("150001", new String[]{});
      }