| | |
| | | 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; |
| | |
| | | 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; //集成时不显示批量申请按钮 |
| | |
| | | |
| | | /*** |
| | | * |
| | | * @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; |
| | |
| | | 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(); |
| | |
| | | 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) { |
| | |
| | | /**系统只加载代码项 如果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<>(); |
| | |
| | | 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(); |
| | |
| | | /**系统只加载代码项 如果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(); |
| | |
| | | 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(); |
| | |
| | | this.applyTxt.setText(codeVal); |
| | | } |
| | | |
| | | public VCIJTextField getApplyTxt() { |
| | | return applyTxt; |
| | | } |
| | | |
| | | public void setApplyTxt(VCIJTextField applyTxt) { |
| | | this.applyTxt = applyTxt; |
| | | } |
| | | |
| | | public CodeClassifyTemplateVO getCurrentCodeClassifyTemplateVO() { |
| | | return currentCodeClassifyTemplateVO; |
| | | } |
| | |
| | | public void setTransmitTreeObject(TransmitTreeObject transmitTreeObject) { |
| | | this.transmitTreeObject = transmitTreeObject; |
| | | } |
| | | |
| | | public TokenUserObject getTokenUserObject() { |
| | | return tokenUserObject; |
| | | } |
| | | |
| | | public void setTokenUserObject(TokenUserObject tokenUserObject) { |
| | | this.tokenUserObject = tokenUserObject; |
| | | } |
| | | } |