xiejun
2023-09-18 978f74777e10a0531c4413ab36320d2be36f42ea
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/rmip/code/client/codeapply/Apply410/CodeApplyFor410MainPanel.java
@@ -1,23 +1,28 @@
package com.vci.rmip.code.client.codeapply.Apply410;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.vci.base.ui.swing.VCIOptionPane;
import com.vci.base.ui.swing.components.*;
import com.vci.base.ui.tree.VCIBaseTreeNode;
import com.vci.rmip.code.client.codeapply.Apply410.enums.VciFieldTypeEnum;
import com.vci.rmip.code.client.codeapply.Apply410.object.*;
import com.vci.ubcs.code.vo.pagemodel.*;
import com.vci.rmip.code.client.codeapply.Apply410.object.ubcscode.vo.CodeBasicSecVO;
import com.vci.rmip.code.client.codeapply.Apply410.object.ubcscode.vo.CodeClassifyTemplateAttrVO;
import com.vci.rmip.code.client.codeapply.Apply410.object.ubcscode.vo.CodeFixedValueVO;
import com.vci.rmip.code.client.codeapply.Apply410.object.ubcscode.vo.CodeRuleVO;
import com.vci.rmip.code.client.codeapply.Apply410.object.ubcscode.vo.KeyValue;
import com.vci.rmip.code.client.codeapply.Apply410.swing.IntegerTextField;
import com.vci.rmip.code.client.codeapply.Apply410.swing.RealTextField;
import com.vci.rmip.code.client.codeapply.Apply410.swing.VCIJComboxBox;
import com.vci.rmip.code.client.codeapply.Apply410.utils.BeanUtilForVCI;
import com.vci.rmip.code.client.codeapply.Apply410.utils.ConfigUtils;
import com.vci.rmip.code.client.codeapply.Apply410.utils.HttpUtil;
import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum;
import com.vci.ubcs.starter.web.pagemodel.KeyValue;
import com.vci.ubcs.starter.web.util.BeanUtilForVCI;
import com.vci.ubcs.starter.web.util.VciBaseUtil;
import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils;
import com.vci.rmip.code.client.codeapply.Apply410.utils.VciBaseUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.type.TypeReference;
import javax.swing.*;
import javax.swing.text.JTextComponent;
@@ -27,6 +32,7 @@
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -162,14 +168,15 @@
            ObjectMapper objectMapper = new ObjectMapper();
            try {
               codeRuleVO = objectMapper.readValue(object.toString(),CodeRuleVO.class);
            } catch (JsonProcessingException e) {
            } catch (IOException e) {
               e.printStackTrace();
            }
         }
      }else{
         if(!r.getMsg().equals("当前主题库分类,以及它的所有的上级分类都没有设置编码规则")){
      /*   if(!r.getMsg().equals("当前主题库分类,以及它的所有的上级分类都没有设置编码规则")){
            VCIOptionPane.showMessage(this,r.getMsg());
            }
            }*/
         }
      /**加载规则对应的码段信息**/
      if(codeRuleVO!=null){
@@ -482,7 +489,7 @@
            String classifyLevel = tempPropObj.getClassifyInvokeLevel();
            String classifyInvokeAttr= tempPropObj.getClassifyInvokeAttr();
            JComponent compt = attrInnerNameToCtrlMaps.get(innerName);
            if(StringUtils.isNotBlank(classifyLevel)&&!classifyLevel.equals("none")&&!classifyLevel.equals("min")) {
            if(StringUtils.isNotBlank(classifyLevel)&&!classifyLevel.equals("none")) {
               compt.setEnabled(false);
               //ClassifyLevel classifyLevelObj=new ClassifyLevel();
               //ObjectMapper objectMapper = new ObjectMapper();
@@ -583,7 +590,7 @@
                  if(object!=null) {
                     ObjectMapper objectMapper = new ObjectMapper();
                     try {
                        codeClassifyValueList = objectMapper.readValue(object.toString(), new com.fasterxml.jackson.core.type.TypeReference<List<CodeClassifyValue>>() {});
                        codeClassifyValueList = objectMapper.readValue(object.toString(), new TypeReference<List<CodeClassifyValue>>() {});
                     } catch (JsonProcessingException e) {
                        e.printStackTrace();
                     }
@@ -640,6 +647,7 @@
               }
               for (CodeFixedValueVO codeFixedValueVO : fixedValueVOList) {
                  CodeFixedValue codeFixedValue=new CodeFixedValue();
                  BeanUtilForVCI.copyPropertiesIgnoreCase(codeFixedValueVO,codeFixedValue);
                  secCombo.addItem(codeFixedValue);
               }
@@ -1057,10 +1065,10 @@
          }
         boolean enabled = true;
         /*// 集团代码、集团附加码不可以手工录入数据
         if (attrObj.getId().equals(Constants.GROUP_CODE_INNERNAME)|| attrObj.getInternalname().equals(Constants.GROUP_ADD_CODE_INNERNAME)) {
         // 集团代码、集团附加码不可以手工录入数据
         if (attrObj.getId().toLowerCase().equals("groupcode")) {
            enabled = false;
         }*/
         }
         compt.setEnabled(enabled);
      }
@@ -1092,9 +1100,9 @@
         if(object!=null) {
            ObjectMapper objectMapper = new ObjectMapper();
            try {
               keyValueList = objectMapper.readValue(object.toString(), new com.fasterxml.jackson.core.type.TypeReference<List<KeyValue>>() {
               keyValueList = objectMapper.readValue(object.toString(), new TypeReference<List<KeyValue>>() {
               });
            } catch (JsonProcessingException e) {
            } catch (IOException e) {
               e.printStackTrace();
            }
         }