xiejun
2023-08-14 885baab441cf03e1d3ea02400f9eee9aa530c7fa
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyPanelFor410.java
@@ -12,6 +12,7 @@
import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO;
import com.vci.ubcs.codeapply.object.CodeClassify;
import com.vci.ubcs.codeapply.object.R;
import com.vci.ubcs.codeapply.object.TokenUserObject;
import com.vci.ubcs.codeapply.utils.ConfigUtils;
import com.vci.ubcs.codeapply.utils.HttpUtil;
import com.vci.ubcs.system.user.entity.User;
@@ -45,7 +46,7 @@
   private VCIJLabel applylbl = new VCIJLabel("申请码值:");
   public VCIJTextField applyTxt = new VCIJTextField(40);
   private JComboBox codeItemCombo = new JComboBox();
   private User userObj = null;;
   private TokenUserObject tokenUserObject = null;;
   private CodeClassifyTemplateVO currentCodeClassifyTemplateVO;
   private boolean isIntegrate = false; //集成时不显示批量申请按钮
@@ -72,16 +73,16 @@
   /***
    *
    * @param userObj
    * @param tokenUserObject
    * @param isIntegrate
    * @param clsfName
    * @param deptName
    * @param libName
    */
   public CodeApplyPanelFor410(CodeApplyFor410Dialog owner , User userObj, boolean isIntegrate, String clsfName, String deptName, String[] libName){
      this.userObj = userObj;
   public CodeApplyPanelFor410(CodeApplyFor410Dialog owner , TokenUserObject tokenUserObject, boolean isIntegrate, String clsfName, String deptName, String[] libName){
      this.tokenUserObject = tokenUserObject;
      this.owner =owner;
      rightMainPanel = new CodeApplyFor410MainPanel(transmitTreeObject,userObj,getCurrentCodeClassifyTemplateVO());
      rightMainPanel = new CodeApplyFor410MainPanel(transmitTreeObject,tokenUserObject,getCurrentCodeClassifyTemplateVO());
      this.isIntegrate = isIntegrate;
      this.clsfName = clsfName;
      this.deptName = deptName;
@@ -169,7 +170,9 @@
      if(libName.length>0) {
         condtionMap.put("libName", StringUtils.join(libName,",") );
      }
      R r= HttpUtil.sendGet(url+"/getRMLibByName",condtionMap,new HashMap<>());
      Map<String,String> headerMap=new HashMap<>();
      headerMap.put("Blade-Auth",this.tokenUserObject.getAccess_token());
      R r= HttpUtil.sendGet(url+"/getRMLibByName",condtionMap,headerMap);
      List<CodeClassify> codeClassifyList = new ArrayList<>();
      if(r.isSuccess()){
         Object object= r.getData();
@@ -233,7 +236,7 @@
      String  libName=currentCodeClassify.getName();
      String classOid=currentCodeClassify.getOid();
      final CodeApplyPanelFor410 self = this;
      typeTreePanel = new CodeApplyFor410TreePanel(currentCodeClassify,userObj,clsfName, libName) {
      typeTreePanel = new CodeApplyFor410TreePanel(currentCodeClassify,tokenUserObject,clsfName, libName) {
         private static final long serialVersionUID = 8121108576137012228L;
         @Override
         public void tree_valueChanged(TreeSelectionEvent e) {
@@ -264,7 +267,10 @@
            /**系统只加载代码项  如果libName不为空,直接获取对应的代码项**/
            Map<String, String> condtionMap = new HashMap<>();
            condtionMap.put("codeClassifyOid", classOid);
            R r = HttpUtil.sendGet(url+"/getUsedTemplateByClassifyOid", condtionMap, new HashMap<>());
            Map<String,String> headerMap=new HashMap<>();
            headerMap.put("Blade-Auth",this.tokenUserObject.getAccess_token());
            R r = HttpUtil.sendGet(url+"/getUsedTemplateByClassifyOid", condtionMap, headerMap);
            boolean res = false;
            if (r.isSuccess()) {
               //List<CodeClassifyTemplateVO> codeClassifyTemplateVOList=new ArrayList<>();
@@ -288,7 +294,7 @@
            initBtnStatus(res);
         }
      }
      rightMainPanel = new CodeApplyFor410MainPanel(transmitTreeObject,userObj,deptName,getCurrentCodeClassifyTemplateVO());
      rightMainPanel = new CodeApplyFor410MainPanel(transmitTreeObject,tokenUserObject,deptName,getCurrentCodeClassifyTemplateVO());
      scrollPane.setViewportView(rightMainPanel);
      rightMainPanel.buildMainPanel(1);
      int location = jspLeftToRight.getDividerLocation();
@@ -309,7 +315,10 @@
         /**系统只加载代码项  如果libName不为空,直接获取对应的代码项**/
         Map<String,String> condtionMap=new HashMap<>();
         condtionMap.put("codeClassifyOid",curentCodeClassify.getOid());
         R r=HttpUtil.sendGet(url+"/getUsedTemplateByClassifyOid",condtionMap,new HashMap<>() );
         Map<String,String> headerMap=new HashMap<>();
         headerMap.put("Blade-Auth",this.tokenUserObject.getAccess_token());
         R r=HttpUtil.sendGet(url+"/getUsedTemplateByClassifyOid",condtionMap,headerMap);
         if(r.isSuccess()) {
            CodeClassifyTemplateVO codeClassifyTemplateVO=new CodeClassifyTemplateVO();
            Object object= r.getData();
@@ -350,7 +359,7 @@
      transmitTreeObject.setCurrentTreeNode(selectedTreeNode);
      if(selectedTreeNode.isRoot() && selectedTreeNode.getObj() instanceof String) return;
      scrollPane = new JScrollPane();
      rightMainPanel = new CodeApplyFor410MainPanel(transmitTreeObject,userObj,deptName,getCurrentCodeClassifyTemplateVO());
      rightMainPanel = new CodeApplyFor410MainPanel(transmitTreeObject,tokenUserObject,deptName,getCurrentCodeClassifyTemplateVO());
      scrollPane.setViewportView(rightMainPanel);
      rightMainPanel.buildMainPanel(1);
      VCIJPanel rightPanel = new VCIJPanel();
@@ -381,6 +390,14 @@
      this.applyTxt.setText(codeVal);
   }
   public VCIJTextField getApplyTxt() {
      return applyTxt;
   }
   public void setApplyTxt(VCIJTextField applyTxt) {
      this.applyTxt = applyTxt;
   }
   public CodeClassifyTemplateVO getCurrentCodeClassifyTemplateVO() {
      return currentCodeClassifyTemplateVO;
   }
@@ -404,4 +421,12 @@
   public void setTransmitTreeObject(TransmitTreeObject transmitTreeObject) {
      this.transmitTreeObject = transmitTreeObject;
   }
   public TokenUserObject getTokenUserObject() {
      return tokenUserObject;
   }
   public void setTokenUserObject(TokenUserObject tokenUserObject) {
      this.tokenUserObject = tokenUserObject;
   }
}