| | |
| | | import com.vci.base.ui.swing.VCIOptionPane; |
| | | import com.vci.base.ui.swing.components.*; |
| | | import com.vci.base.ui.tree.VCIBaseTreeNode; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeBasicSecVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.codeapply.object.*; |
| | | import com.vci.ubcs.codeapply.swing.IntegerTextField; |
| | | import com.vci.ubcs.codeapply.swing.RealTextField; |
| | |
| | | import com.vci.ubcs.codeapply.utils.ConfigUtils; |
| | | 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 com.vci.ubcs.system.user.entity.User; |
| | | import net.bytebuddy.implementation.bytecode.Throw; |
| | | import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; |
| | |
| | | import javax.swing.text.JTextComponent; |
| | | import javax.swing.tree.TreeNode; |
| | | import java.awt.*; |
| | | import java.awt.event.ActionEvent; |
| | | import java.awt.event.ActionListener; |
| | | import java.awt.event.MouseAdapter; |
| | | import java.awt.event.MouseEvent; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | import java.util.regex.Pattern; |
| | |
| | | |
| | | public class CodeApplyFor410MainPanel extends VCIJPanel { |
| | | |
| | | |
| | | private String url=ConfigUtils.getConfigValue("410.code.url","http://127.0.0.1:36014/codeApplySwingController"); |
| | | //410æ°éæ± |
| | | private final String SPECIAL_RULE_NAME="Special.rule.name"; |
| | | private final String SPECIAL_SECTION_NAME = "Special.section.name"; |
| | |
| | | this.loadTextAreaEnableEnv(); //add by liujw |
| | | //this.loadSpecialRuleConfig(); |
| | | CodeClassify rmType = (CodeClassify) this.transTreeObject.getCurrentTreeNode().getObj(); |
| | | String url= ConfigUtils.getConfigValue("410.PDM.rule.url","http://127.0.0.1:36014/codeApplySwingController/getCodeRuleByClassifyFullInfo"); |
| | | //String url= ConfigUtils.getConfigValue("410.PDM.rule.url","http://127.0.0.1:36014/codeApplySwingController/getCodeRuleByClassifyFullInfo"); |
| | | /**ç³»ç»åªå 载代ç 项 妿libNameä¸ä¸ºç©ºï¼ç´æ¥è·å对åºç代ç 项**/ |
| | | Map<String,String> condtionMap=new HashMap<>(); |
| | | condtionMap.put("codeClassId", rmType.getOid()); |
| | | R r=HttpUtil.sendGet(url,condtionMap,new HashMap<>()); |
| | | R r=HttpUtil.sendGet(url+"/getCodeRuleByClassifyFullInfo",condtionMap,new HashMap<>()); |
| | | CodeRuleVO codeRuleVO=new CodeRuleVO(); |
| | | if(r.isSuccess()){ |
| | | Object object= r.getData(); |
| | |
| | | VCIJComboxBox hisCombo = null; |
| | | try { |
| | | final Map<String, String> secValMap = getSpecialValMap(specialSecVals); |
| | | Map<String,List<String>> secIdTOListValueOidMap=new HashMap<>(); |
| | | for(int k = 0;k < secObjs.length; k++) { |
| | | final CodeBasicSecVO secObj = secObjs[k]; |
| | | final VCIJComboxBox secCombo = secCombos[k]; |
| | |
| | | return; |
| | | } |
| | | if (secObj.getSecType().equals("codeclassifysec")) {// æ¯åç±»ç |
| | | continue; |
| | | } else |
| | | // æ¯åºå®ç |
| | | if (secObj.getSecType() .equals("codefixedsec")) { |
| | | /* SectionValueClientDelegate codeValDel = new SectionValueClientDelegate(userObj); |
| | | FixCodeValObject[] codeValObjs = codeValDel.fetchFixCodeValBySecId(secObj.getId());// è·åè¯¥ç æ®µä¸çææç 段ç å¼å¯¹è±¡ |
| | | //å¦æåªæä¸ä¸ªå¼ï¼åç³»ç»é»è®¤éæ©ï¼ä¸å ç©ºå¼ |
| | | if(codeValObjs.length > 1 ) { |
| | | secCombo.addItem(new FixCodeValObject()); |
| | | String secOid=secObj.getOid(); |
| | | String parentClassifySecOid= secObj.getParentClassifySecOid(); |
| | | String parentClassifyValueOid=""; |
| | | if(secIdTOListValueOidMap.containsKey(parentClassifySecOid)){ |
| | | List<String> parentClassifyValueList= secIdTOListValueOidMap.get(parentClassifySecOid); |
| | | parentClassifyValueOid= VciBaseUtil.array2String(parentClassifyValueList.toArray(new String[]{})); |
| | | } |
| | | for (int i = 0; i < codeValObjs.length; i++) { |
| | | secCombo.addItem(codeValObjs[i]); |
| | | Map<String,String> condtionMap=new HashMap<>(); |
| | | condtionMap.put("secOid", secOid); |
| | | condtionMap.put("parentClassifyValueOid", parentClassifyValueOid); |
| | | R r=HttpUtil.sendGet(url+"/listCodeClassifyValueBySecOid",condtionMap,new HashMap<>()); |
| | | List<CodeClassifyValue> codeClassifyValueList=new ArrayList<>(); |
| | | if(r.isSuccess()){ |
| | | Object object= r.getData(); |
| | | if(object!=null) { |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | try { |
| | | codeClassifyValueList = objectMapper.readValue(object.toString(), new com.fasterxml.jackson.core.type.TypeReference<List<CodeClassifyValue>>() {}); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | }else{ |
| | | VCIOptionPane.showMessage(this,r.getMsg()); |
| | | } |
| | | *//**å½ç³»ç»éæ©çæ¯æå®ç æ®µå¼æ¶ï¼ç»å«ä»£å·çç æ®µç³»ç»ä¸æ¾ç¤º Begin**//* |
| | | FixCodeValObject selObj = (FixCodeValObject) secCombo.getSelectedItem(); |
| | | if(isSpecialRuleFlag && (secObj.getName().equals(specialControlSecName) && secValMap.containsKey(selObj.getValue())) || secValMap.containsKey(getControlSecSelectValue())) { |
| | | setComponentStatus(false); |
| | | }else { |
| | | setComponentStatus(true); |
| | | List<String>valueOidList=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(codeClassifyValueList)) { |
| | | if(codeClassifyValueList.size()>1) { |
| | | secCombo.addItem(new CodeClassifyValue()); |
| | | } |
| | | codeClassifyValueList.stream().forEach(codeClassifyValue -> { |
| | | secCombo.addItem(codeClassifyValue); |
| | | valueOidList.add(codeClassifyValue.getOid()); |
| | | }); |
| | | } |
| | | if (secCombo.getItemCount() > 10){ |
| | | secIdTOListValueOidMap.put(secObj.getOid(),valueOidList); |
| | | /**代ç 项䏿äºä»¶**/ |
| | | secCombo.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent e) { |
| | | if(secCombo.getSelectedIndex() == -1) { |
| | | return; |
| | | } |
| | | if(secIdToClsfIdMap.containsKey(secObj.getId())){ |
| | | VCIJTextField secDescVcijTextField=(VCIJTextField)secIdToClsfIdMap.get(secObj.getId()); |
| | | CodeClassifyValue codeClassifyValue= (CodeClassifyValue) secCombo.getSelectedItem(); |
| | | secDescVcijTextField.setText(codeClassifyValue.getName()); |
| | | } |
| | | } |
| | | }); |
| | | /*if (secCombo.getItemCount() > 10){ |
| | | if (!secCombo.isFlag()){ |
| | | secCombo.setFlag(true); |
| | | secCombo.getSearchBtn().setVisible(true); |
| | |
| | | secCombo.setFlag(false); |
| | | secCombo.getSearchBtn().setVisible(false); |
| | | }*/ |
| | | |
| | | } else |
| | | // æ¯åºå®ç |
| | | if (secObj.getSecType() .equals("codefixedsec")) { |
| | | List<CodeFixedValueVO> fixedValueVOList=secObj.getFixedValueVOList(); |
| | | //å¦æåªæä¸ä¸ªå¼ï¼åç³»ç»é»è®¤éæ©ï¼ä¸å ç©ºå¼ |
| | | if(fixedValueVOList.size() >1) { |
| | | secCombo.addItem(new CodeFixedValue()); |
| | | } |
| | | fixedValueVOList.stream().forEach(codeFixedValueVO -> { |
| | | CodeFixedValue codeFixedValue=new CodeFixedValue(); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeFixedValueVO,codeFixedValue); |
| | | secCombo.addItem(codeFixedValue); |
| | | }); |
| | | /**å½ç³»ç»éæ©çæ¯æå®ç æ®µå¼æ¶ï¼ç»å«ä»£å·çç æ®µç³»ç»ä¸æ¾ç¤º Begin**/ |
| | | /*FixCodeValObject selObj = (FixCodeValObject) secCombo.getSelectedItem(); |
| | | if(isSpecialRuleFlag && (secObj.getName().equals(specialControlSecName) && secValMap.containsKey(selObj.getValue())) || secValMap.containsKey(getControlSecSelectValue())) { |
| | | setComponentStatus(false); |
| | | }else { |
| | | setComponentStatus(true); |
| | | }*/ |
| | | /*if (secCombo.getItemCount() > 10){ |
| | | if (!secCombo.isFlag()){ |
| | | secCombo.setFlag(true); |
| | | secCombo.getSearchBtn().setVisible(true); |
| | | secCombo.getSearchBtn().addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | doSearch(secCombo); |
| | | } |
| | | }); |
| | | } |
| | | }else { |
| | | secCombo.setFlag(false); |
| | | secCombo.getSearchBtn().setVisible(false); |
| | | }*/ |
| | | } else |
| | | // æ¯æ¥æç 段 |
| | | if (secObj.getSecType().equals("codedatesec")) { |
| | | /*SectionClientDelegate secDel = new SectionClientDelegate(userObj); |
| | | DateSecObject dateObj = secDel.fetchDateSecById(secObj.getId()); |
| | | String df = dateObj.getFormat(); |
| | | SimpleDateFormat dateFormate = new SimpleDateFormat(df); |
| | | String curDate = dateFormate.format(Calendar.getInstance().getTime()); |
| | | secCombo.addItem(curDate); |
| | | if(dateObj.getIsModify().equals("Y")){//å¯ä»¥ä¿®æ¹ |
| | | secCombo.setEditable(true); |
| | | }*/ |
| | | String df =secObj.getCodeDateFormatStr(); |
| | | SimpleDateFormat dateFormate = new SimpleDateFormat(df); |
| | | String curDate = dateFormate.format(Calendar.getInstance().getTime()); |
| | | secCombo.addItem(curDate); |
| | | /*if(dateObj.getIsModify().equals("Y")){//å¯ä»¥ä¿®æ¹ |
| | | secCombo.setEditable(true); |
| | | }*/ |
| | | } else |
| | | //æ¯å¼ç¨ç 段 |
| | | if (secObj.getSecType().equals("coderefersec")) { |
| | |
| | | } |
| | | |
| | | */} else |
| | | //å±çº§ç 段ç 弿¾ç¤ºçæ¯éæ©ç代ç 项çåç§° |
| | | //å±çº§ç 段ç 弿¾ç¤ºçæ¯éæ©ç代ç 项çåç§° |
| | | if(secObj.getSecType().equals("coderefersec")) { |
| | | /*RMTypeObject rmObj = (RMTypeObject) this.transTreeObject.getCurrentTreeNode().getObj(); |
| | | secCombo.addItem(rmObj);*/ |
| | | } else { |
| | | secCombo.setEditable(true); |
| | | } |
| | | CodeClassify rmObj = (CodeClassify) this.transTreeObject.getCurrentTreeNode().getObj(); |
| | | secCombo.addItem(rmObj); |
| | | } else { |
| | | secCombo.setEditable(true); |
| | | } |
| | | } |
| | | }catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | */ |
| | | private KeyValue[] getAttrRangeObjects(String attrId){ |
| | | KeyValue[] res = new KeyValue[0]; |
| | | String url= ConfigUtils.getConfigValue("410.PDM.attrKeyValue.url","http://127.0.0.1:36014/codeApplySwingController/listComboboxItems"); |
| | | //String url= ConfigUtils.getConfigValue("410.PDM.attrKeyValue.url","http://127.0.0.1:36014/codeApplySwingController/listComboboxItems"); |
| | | /**ç³»ç»åªå 载代ç 项 妿libNameä¸ä¸ºç©ºï¼ç´æ¥è·å对åºç代ç 项**/ |
| | | Map<String,String> condtionMap=new HashMap<>(); |
| | | condtionMap.put("oid", attrId); |
| | | R r=HttpUtil.sendGet(url,condtionMap,new HashMap<>()); |
| | | R r=HttpUtil.sendGet(url+"/listComboboxItems",condtionMap,new HashMap<>()); |
| | | List<KeyValue> keyValueList=new ArrayList<>(); |
| | | if(r.isSuccess()){ |
| | | Object object= r.getData(); |
| | |
| | | // æµç¨ä»»å¡å¼ç¨ |
| | | // ä¸è¬çæ°æ®å½å
¥ãä¿®æ¹ |
| | | // ä¸åçæ¥æºï¼éè¦ç»´æ¤å¥½Ownerç¶ |
| | | VCIJDialog ownerDialog = realDialogInstance; |
| | | /*VCIJDialog ownerDialog = realDialogInstance; |
| | | if(ownerDialog == null){ |
| | | ownerDialog = new VCIJDialog(); |
| | | ownerDialog.setSize(880, 500); |
| | | } |
| | | }*/ |
| | | final String referTempId = tempPropObj.getReferBtmId(); |
| | | final RMDataReferTempDialog dialog = new RMDataReferTempDialog(ownerDialog, referTempId); |
| | | final RMDataReferTempDialog dialog = new RMDataReferTempDialog(this,tempPropObj); |
| | | dialog.setDialogCallback(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | |
| | | //dialog.initDialogSize(ownerDialog.getWidth(), ownerDialog.getHeight()); |
| | | Dimension dime = Toolkit.getDefaultToolkit().getScreenSize(); |
| | | int x = dime.width/2 - 400; |
| | | int y = dime.height/2 -400; |
| | | int y = dime.height/2 -300; |
| | | dialog.setLocation(x, y); |
| | | dialog.setSize(new Dimension(900, 800)); |
| | | dialog.setSize(new Dimension(900, 600)); |
| | | dialog.setModal(true); |
| | | dialog.setVisible(true); |
| | | } |
| | |
| | | private TransmitTreeObject transmitTreeObject = new TransmitTreeObject(); |
| | | private User userObj = null; |
| | | private VCIBaseTreeNode selNode = null; |
| | | private String url=ConfigUtils.getConfigValue("410.code.url","http://127.0.0.1:36014/codeApplySwingController"); |
| | | /** |
| | | * åå¨åç±»çMap,key:åç±»åç§°ï¼valueï¼åç±»å¼ |
| | | */ |
| | |
| | | */ |
| | | private CodeClassify[] getRMTypeByDescAndLib() { |
| | | CodeClassify[] objs = new CodeClassify[]{}; |
| | | String url= ConfigUtils.getConfigValue("410.PDM.leftdescLibNode.url","http://127.0.0.1:36014/codeApplySwingController/getRMTypeByDescAndLib"); |
| | | // String url= ConfigUtils.getConfigValue("410.PDM.leftdescLibNode.url","http://127.0.0.1:36014/codeApplySwingController/getRMTypeByDescAndLib"); |
| | | /**ç³»ç»åªå 载代ç 项 妿libNameä¸ä¸ºç©ºï¼ç´æ¥è·å对åºç代ç 项**/ |
| | | Map<String,String> condtionMap=new HashMap<>(); |
| | | condtionMap.put("desc", this.clsfName); |
| | | condtionMap.put("codeLibName",rootNode.toString()); |
| | | |
| | | R r=HttpUtil.sendGet(url,condtionMap,new HashMap<>()); |
| | | R r=HttpUtil.sendGet(url+"/getRMTypeByDescAndLib",condtionMap,new HashMap<>()); |
| | | List<CodeClassify> codeClassifyList = new ArrayList<>(); |
| | | if(r.isSuccess()){ |
| | | Object object= r.getData(); |
| | |
| | | * @return |
| | | */ |
| | | private CodeClassify[] getChildRMTypeObjects(String parentId){ |
| | | String url= ConfigUtils.getConfigValue("410.PDM.leftClsfNode.url","http://127.0.0.1:36014/codeApplySwingController/selectCodeClassifyVOByParentId"); |
| | | // String url= ConfigUtils.getConfigValue("410.PDM.leftClsfNode.url","http://127.0.0.1:36014/codeApplySwingController/selectCodeClassifyVOByParentId"); |
| | | /**ç³»ç»åªå 载代ç 项 妿libNameä¸ä¸ºç©ºï¼ç´æ¥è·å对åºç代ç 项**/ |
| | | Map<String,String> condtionMap=new HashMap<>(); |
| | | condtionMap.put("parentId", parentId ); |
| | | R r=HttpUtil.sendGet(url,condtionMap,new HashMap<>()); |
| | | R r=HttpUtil.sendGet(url+"/selectCodeClassifyVOByParentId",condtionMap,new HashMap<>()); |
| | | List<CodeClassify> codeClassifyList = new ArrayList<>(); |
| | | if(r.isSuccess()){ |
| | | Object object= r.getData(); |
| | |
| | | //左侧æ |
| | | private CodeApplyFor410TreePanel typeTreePanel = null; |
| | | private TransmitTreeObject transmitTreeObject = new TransmitTreeObject(); |
| | | |
| | | |
| | | private String url=ConfigUtils.getConfigValue("410.code.url","http://127.0.0.1:36014/codeApplySwingController"); |
| | | |
| | | /*** |
| | | * |
| | | * @param userObj |
| | |
| | | CodeClassifyVO [] codeClassifyVOS = new CodeClassifyVO[0]; |
| | | Map<String,String> condtionMap=new HashMap<>(); |
| | | //condtionMap.put("parentOid",); |
| | | |
| | | String url=ConfigUtils.getConfigValue("410.PDM.item.url","http://127.0.0.1:36014/codeApplySwingController/getRMLibByName"); |
| | | //String url=ConfigUtils.getConfigValue("410.code.url","http://127.0.0.1:36014/codeApplySwingController"); |
| | | /**ç³»ç»åªå 载代ç 项 妿libNameä¸ä¸ºç©ºï¼ç´æ¥è·å对åºç代ç 项**/ |
| | | if(libName.length>0) { |
| | | condtionMap.put("libName", StringUtils.join(libName,",") ); |
| | | } |
| | | R r=HttpUtil.sendGet(url,condtionMap,new HashMap<>()); |
| | | R r=HttpUtil.sendGet(url+"/getRMLibByName",condtionMap,new HashMap<>()); |
| | | List<CodeClassify> codeClassifyList = new ArrayList<>(); |
| | | if(r.isSuccess()){ |
| | | Object object= r.getData(); |
| | |
| | | CodeClassify codeClassify=(CodeClassify)node; |
| | | classOid = codeClassify.getOid(); |
| | | |
| | | String url = ConfigUtils.getConfigValue("410.PDM.clsfTemplate.url", "http://127.0.0.1:36014/codeApplySwingController/getUsedTemplateByClassifyOid"); |
| | | //String url = ConfigUtils.getConfigValue("410.PDM.clsfTemplate.url", "http://127.0.0.1:36014/codeApplySwingController/getUsedTemplateByClassifyOid"); |
| | | /**ç³»ç»åªå 载代ç 项 妿libNameä¸ä¸ºç©ºï¼ç´æ¥è·å对åºç代ç 项**/ |
| | | Map<String, String> condtionMap = new HashMap<>(); |
| | | condtionMap.put("codeClassifyOid", classOid); |
| | | R r = HttpUtil.sendGet(url, condtionMap, new HashMap<>()); |
| | | R r = HttpUtil.sendGet(url+"/getUsedTemplateByClassifyOid", condtionMap, new HashMap<>()); |
| | | boolean res = false; |
| | | if (r.isSuccess()) { |
| | | //List<CodeClassifyTemplateVO> codeClassifyTemplateVOList=new ArrayList<>(); |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | }else{ |
| | | }/*else{ |
| | | VCIOptionPane.showMessage(this,r.getMsg()); |
| | | } |
| | | }*/ |
| | | initBtnStatus(res); |
| | | } |
| | | } |
| | |
| | | boolean res=false; |
| | | if(obj instanceof CodeClassify) { |
| | | CodeClassify curentCodeClassify=(CodeClassify)obj; |
| | | String url=ConfigUtils.getConfigValue("410.PDM.clsfTemplate.url","http://127.0.0.1:36014/codeApplySwingController/getUsedTemplateByClassifyOid"); |
| | | //String url=ConfigUtils.getConfigValue("410.PDM.clsfTemplate.url","http://127.0.0.1:36014/codeApplySwingController/getUsedTemplateByClassifyOid"); |
| | | /**ç³»ç»åªå 载代ç 项 妿libNameä¸ä¸ºç©ºï¼ç´æ¥è·å对åºç代ç 项**/ |
| | | Map<String,String> condtionMap=new HashMap<>(); |
| | | condtionMap.put("codeClassifyOid",curentCodeClassify.getOid()); |
| | | R r=HttpUtil.sendGet(url,condtionMap,new HashMap<>() ); |
| | | R r=HttpUtil.sendGet(url+"/getUsedTemplateByClassifyOid",condtionMap,new HashMap<>() ); |
| | | if(r.isSuccess()) { |
| | | CodeClassifyTemplateVO codeClassifyTemplateVO=new CodeClassifyTemplateVO(); |
| | | Object object= r.getData(); |
| | |
| | | e1.printStackTrace(); |
| | | } |
| | | } |
| | | }else{ |
| | | }/*else{ |
| | | VCIOptionPane.showMessage(this.owner,r.getMsg()); |
| | | } |
| | | }*/ |
| | | |
| | | } |
| | | initBtnStatus(res); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply; |
| | | |
| | | import com.vci.base.ui.swing.VCISwingUtil; |
| | | import com.vci.base.ui.swing.components.VCIJButton; |
| | | import com.vci.base.ui.swing.components.VCIJPanel; |
| | | import com.vci.base.ui.swing.components.table.AbstractVCIJTableDataProvider; |
| | | import com.vci.base.ui.swing.components.table.VCIJTablePanel; |
| | | import com.vci.ubcs.codeapply.object.UIFormRefer; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | |
| | | import java.awt.*; |
| | | |
| | | public class CodeDataMainPanel extends VCIJPanel { |
| | | |
| | | /** |
| | | * èªå®ä¹é¡¶é¨æ§ä»¶åºå |
| | | */ |
| | | private VCIJPanel customTopPanel = null; |
| | | private UIFormRefer uiFormRefer; |
| | | private CodeDataMainPanelActionListener actionListener = new CodeDataMainPanelActionListener(this); |
| | | private VCIJButton btnSearch = VCISwingUtil.createVCIJButton("search", "æ¥è¯¢", "æ¥è¯¢", "search.png", actionListener); |
| | | private VCIJButton btnClear = VCISwingUtil.createVCIJButton("clear_search", "æ¸
空æ¥è¯¢æ¡ä»¶", "æ¸
空æ¥è¯¢æ¡ä»¶", "clear.gif", actionListener); |
| | | public CodeDataMainPanel(UIFormRefer uiFormRefer) { |
| | | this.uiFormRefer=uiFormRefer; |
| | | } |
| | | |
| | | public void buildPanel(){ |
| | | this.init(); |
| | | } |
| | | private void init(){ |
| | | initComponents(); |
| | | } |
| | | |
| | | private void initComponents(){ |
| | | setLayout(new BorderLayout()); |
| | | add(createNorthBaseAttrsPanel(), BorderLayout.NORTH); |
| | | add(createCenterDataTablePanel(), BorderLayout.CENTER); |
| | | } |
| | | /** |
| | | * æ ¹æ®ç±»åæ¾ç¤ºtable |
| | | */ |
| | | private VCIJTablePanel<T> tablePanel = null; |
| | | private AbstractVCIJTableDataProvider<T> dataProvider = null; |
| | | private VCIJPanel createCenterDataTablePanel() { |
| | | tablePanel = new VCIJTablePanel<T>(dataProvider); |
| | | //tablePanel.setCustomButtons(getCombinedButtons()); |
| | | tablePanel.setShowExport(true); |
| | | tablePanel.setShowPaging(true); |
| | | tablePanel.setPageButtonFlowAlign(FlowLayout.CENTER); |
| | | tablePanel.setCustomButtonFlowAlign(FlowLayout.CENTER); |
| | | tablePanel.buildTablePanel(); |
| | | int columnCount = tablePanel.getTable().getColumnCount(); |
| | | //tablePanel.getTable().getColumnModel().getColumn(columnCount - 2).setPreferredWidth(150); |
| | | //tablePanel.getTable().getColumnModel().getColumn(columnCount - 4).setPreferredWidth(150); |
| | | /** |
| | | * ç¦æ¢table表头æå¨ï¼é²æ¢ç¬¬ä¸åçå¤éæ¡å第äºåçåºå·æå¨åºé®é¢: |
| | | * ç¹å»æè¡ï¼è¡¨æ ¼ä¸çå¤éæ¡çä¸å°ï¼ä¸éä¸è¡¨å¤´ä¸çå¤éæ¡ç³»ç»ä¼æ¥éï¼æ°æ®ä¿¡æ¯æ¾ç¤ºä¸æ£ç¡®ã |
| | | * 2012-12-4 wangxl |
| | | */ |
| | | tablePanel.getTable().getTableHeader().setReorderingAllowed(false); |
| | | tablePanel.refreshTableData(); |
| | | return tablePanel; |
| | | } |
| | | |
| | | private VCIJPanel createNorthBaseAttrsPanel(){ |
| | | VCIJPanel palRes = new VCIJPanel(new BorderLayout()); |
| | | if(getCustomTopPanel() != null){ |
| | | |
| | | VCIJPanel pal = new VCIJPanel(); |
| | | pal.setLayout(new GridBagLayout()); |
| | | GridBagConstraints c = new GridBagConstraints(); |
| | | int x = 0; |
| | | int y = 0; |
| | | |
| | | c.gridx = x++; |
| | | c.gridy = y++; |
| | | c.gridheight = 1; |
| | | c.gridwidth = 1; |
| | | c.weightx = 0; |
| | | c.weighty = 0; |
| | | c.fill = GridBagConstraints.NONE; |
| | | c.anchor = GridBagConstraints.EAST; |
| | | c.insets = new Insets(1, 1, 1, 1); |
| | | c.ipadx = 1; |
| | | c.ipady = 1; |
| | | pal.add(btnSearch, c); |
| | | c.gridx = x++; |
| | | pal.add(btnClear, c); |
| | | palRes.add(pal, BorderLayout.SOUTH); |
| | | palRes.add(getCustomTopPanel(), BorderLayout.CENTER); |
| | | } |
| | | return palRes; |
| | | } |
| | | |
| | | public VCIJPanel getCustomTopPanel() { |
| | | return customTopPanel; |
| | | } |
| | | |
| | | public void setCustomTopPanel(VCIJPanel customTopPanel) { |
| | | this.customTopPanel = customTopPanel; |
| | | } |
| | | |
| | | public VCIJTablePanel<T> getTablePanel() { |
| | | return tablePanel; |
| | | } |
| | | |
| | | public void setTablePanel(VCIJTablePanel<T> tablePanel) { |
| | | this.tablePanel = tablePanel; |
| | | } |
| | | |
| | | |
| | | public UIFormRefer getUiFormRefer() { |
| | | return uiFormRefer; |
| | | } |
| | | |
| | | public void setUiFormRefer(UIFormRefer uiFormRefer) { |
| | | this.uiFormRefer = uiFormRefer; |
| | | } |
| | | |
| | | public AbstractVCIJTableDataProvider<T> getDataProvider() { |
| | | return dataProvider; |
| | | } |
| | | |
| | | public void setDataProvider(AbstractVCIJTableDataProvider<T> dataProvider) { |
| | | this.dataProvider = dataProvider; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply; |
| | | |
| | | import java.awt.event.ActionEvent; |
| | | import java.awt.event.ActionListener; |
| | | import java.util.LinkedHashMap; |
| | | public class CodeDataMainPanelActionListener implements ActionListener { |
| | | private CodeDataMainPanel owner = null; |
| | | private LinkedHashMap<String, Runnable> actionMaps = new LinkedHashMap<String, Runnable>(); |
| | | public CodeDataMainPanelActionListener(CodeDataMainPanel owner) { |
| | | this.owner = owner; |
| | | this.initActionMap(); |
| | | } |
| | | private void initActionMap(){ |
| | | actionMaps.put("search", new Runnable() { public void run() { |
| | | search(); |
| | | }}); |
| | | } |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | |
| | | } |
| | | private void search() { |
| | | } |
| | | } |
| | |
| | | |
| | | import com.vci.base.ui.swing.components.table.AbstractVCIJTableDataProvider; |
| | | import com.vci.base.ui.swing.components.table.VCIJTableNode; |
| | | import com.vci.ubcs.code.vo.webserviceModel.coderule.CodeShowFieldConfigVO; |
| | | import com.vci.ubcs.codeapply.object.UIFormRefer; |
| | | import com.vci.ubcs.codeapply.object.UIFormRefers; |
| | | import com.vci.ubcs.starter.web.pagemodel.UITableFieldVO; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | public class CodeDataMainPanelDataProvider extends AbstractVCIJTableDataProvider<T> { |
| | | private CodeDataMainPanel ownerPanel; |
| | | private String[] specialColumns = {}; |
| | | |
| | | |
| | | public CodeDataMainPanelDataProvider(CodeDataMainPanel ownerPanel) { |
| | | this.ownerPanel=ownerPanel; |
| | | } |
| | | |
| | | @Override |
| | | public String[] getSpecialColumns() { |
| | | return new String[0]; |
| | | LinkedList<String> nameList = new LinkedList<>(); |
| | | LinkedList<String> fieldList = new LinkedList<>(); |
| | | List<CodeShowFieldConfigVO> colsList=ownerPanel.getUiFormRefer().getCodeShowFieldConfigVOS(); |
| | | colsList.stream().forEach(columns->{ |
| | | String title= columns.getTitle(); |
| | | String field=columns.getField(); |
| | | nameList.add(title); |
| | | fieldList.add(field); |
| | | }); |
| | | specialColumns = nameList.toArray(new String[]{}); |
| | | return specialColumns; |
| | | } |
| | | |
| | | @Override |
| | | public int getTotal() { |
| | | return 0; |
| | | return total; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public T[] getDatas(int i, int i1) { |
| | | public T[] getDatas(int pageIndex, int pageSize) { |
| | | |
| | | return new T[0]; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply; |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | 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.VCIJPanel; |
| | | import com.vci.base.ui.tree.VCIBaseTree; |
| | | import com.vci.base.ui.tree.VCIBaseTreeModel; |
| | | import com.vci.base.ui.tree.VCIBaseTreeNode; |
| | | import com.vci.ubcs.codeapply.object.*; |
| | | import com.vci.ubcs.codeapply.utils.ConfigUtils; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | |
| | | import javax.swing.event.TreeExpansionEvent; |
| | | import javax.swing.event.TreeExpansionListener; |
| | | import javax.swing.event.TreeSelectionEvent; |
| | | import javax.swing.event.TreeSelectionListener; |
| | | import javax.swing.tree.TreePath; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public abstract class CodeReferTreePanel extends VCIJPanel { |
| | | private VCIBaseTree tree = null; |
| | | private VCIBaseTreeModel treeModel = null; |
| | | private VCIBaseTreeNode rootNode = null; |
| | | private ReferTreObject referTreObject; |
| | | private UIFormRefer uiFormRefer; |
| | | public CodeReferTreePanel(UIFormRefer uiFormRefer) { |
| | | this.uiFormRefer=uiFormRefer; |
| | | } |
| | | |
| | | public void buildTreePanel(){ |
| | | initComponents(); |
| | | } |
| | | private String url= ConfigUtils.getConfigValue("410.code.url","http://127.0.0.1:36014/codeApplySwingController"); |
| | | |
| | | private void initComponents(){ |
| | | List<Tree> treeList=new ArrayList<>(); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | if(uiFormRefer!=null){ |
| | | try { |
| | | /**ç³»ç»åªå 载代ç 项 妿libNameä¸ä¸ºç©ºï¼ç´æ¥è·å对åºç代ç 项**/ |
| | | Map<String,String> condtionMap=new HashMap<>(); |
| | | condtionMap.put("referType",StringUtils.isBlank(uiFormRefer.getReferType())?"":uiFormRefer.getReferType()); |
| | | condtionMap.put("parentUsedField",StringUtils.isBlank(uiFormRefer.getParentUsedField())?"":uiFormRefer.getParentUsedField()); |
| | | condtionMap.put("valueField",StringUtils.isBlank(uiFormRefer.getValueField())?"":uiFormRefer.getValueField()); |
| | | condtionMap.put("parentValue",StringUtils.isBlank(uiFormRefer.getParentValue())?"":uiFormRefer.getParentValue()); |
| | | condtionMap.put("parentFieldName",StringUtils.isBlank(uiFormRefer.getParentFieldName())?"":uiFormRefer.getParentFieldName()); |
| | | condtionMap.put("textField",StringUtils.isBlank(uiFormRefer.getTextField())?"":uiFormRefer.getTextField()); |
| | | condtionMap.put("muti",uiFormRefer.isMuti()?"true":"false"); |
| | | condtionMap.put("queryAllLevel", "true");//queryAllLevel |
| | | //condtionMap.put("parentOid",null); |
| | | R r=HttpUtil.sendGet(url+"/defaultReferTree",condtionMap,new HashMap<>()); |
| | | if(r.isSuccess()){ |
| | | Object object= r.getData(); |
| | | if(object!=null) { |
| | | // ObjectMapper objectMapper = new ObjectMapper(); |
| | | treeList = objectMapper.readValue(object.toString(), new com.fasterxml.jackson.core.type.TypeReference<List<Tree>>() {}); |
| | | treeList=treeList; |
| | | } |
| | | }else{ |
| | | VCIOptionPane.showMessage(this,r.getMsg()); |
| | | } |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | rootNode = new VCIBaseTreeNode("åç
§", "åç
§"); |
| | | treeModel = new VCIBaseTreeModel(rootNode); |
| | | tree = new VCIBaseTree(treeModel, new CodeLibTreeCellRenderer()); |
| | | addChildrenToParentTreeNode(rootNode,treeList); |
| | | inittreeActions(); |
| | | } |
| | | |
| | | private void initTreeData() { |
| | | |
| | | } |
| | | |
| | | /*private void loadTreeData(VCIBaseTreeNode rootNode){ |
| | | CodeClassify currentObj = (CodeClassify) rootNode.getObj(); |
| | | String parentId = currentObj.getOid(); |
| | | CodeClassify[] libs = {}; |
| | | libs = getChildRMTypeObjects(parentId); |
| | | for(CodeClassify obj : libs) { |
| | | VCIBaseTreeNode node = new VCIBaseTreeNode(obj.getName(), obj); |
| | | rootNode.add(node); |
| | | node.setLeaf(false); |
| | | node.setExpand(false); |
| | | } |
| | | rootNode.setLeaf(libs.length == 0); |
| | | rootNode.setExpand(true); |
| | | tree.setSelectionPath(new TreePath(selNode)); |
| | | tree.updateUI(); |
| | | }*/ |
| | | /** |
| | | * å±å¼æ |
| | | * <p>Description: </p> |
| | | * |
| | | * @author ligang |
| | | * @time 2013-5-8 |
| | | * @param parentNode |
| | | */ |
| | | private void addChildrenToParentTreeNode(VCIBaseTreeNode parentNode, List<Tree>children){ |
| | | parentNode.setLeaf(children.size() == 0); |
| | | parentNode.setExpand(true); |
| | | for(Tree obj : children) { |
| | | VCIBaseTreeNode node = new VCIBaseTreeNode(obj.getName(), obj); |
| | | List<Tree>newChildren = obj.getChildren(); |
| | | treeModel.insertNodeInto(node, parentNode, parentNode.getChildCount()); |
| | | if(!CollectionUtils.isEmpty(newChildren)) { |
| | | node.setExpand(true); |
| | | node.setLeaf(false); |
| | | addChildrenToParentTreeNode(node, newChildren); |
| | | }else{ |
| | | node.setExpand(true); |
| | | node.setLeaf(true); |
| | | } |
| | | } |
| | | if(tree != null){ |
| | | //tree.expandPath(new TreePath(selNode.getPath())); |
| | | //tree.setSelectionPath(new TreePath(selNode.getPath())); |
| | | tree.updateUI(); |
| | | } |
| | | } |
| | | private void inittreeActions(){ |
| | | tree.addTreeSelectionListener(new TreeSelectionListener() { |
| | | @Override |
| | | public void valueChanged(TreeSelectionEvent e) { |
| | | if(!e.isAddedPath()) return; |
| | | leftTree_valueChanged(e); |
| | | } |
| | | }); |
| | | tree.addTreeExpansionListener(new TreeExpansionListener() { |
| | | @Override |
| | | public void treeExpanded(TreeExpansionEvent e) { |
| | | tree_treeExpanded_local(e); |
| | | } |
| | | |
| | | @Override |
| | | public void treeCollapsed(TreeExpansionEvent e) { |
| | | } |
| | | }); |
| | | } |
| | | private void leftTree_valueChanged(TreeSelectionEvent e) { |
| | | tree_valueChanged(e); |
| | | } |
| | | |
| | | /** |
| | | * éæ©äºæ èç¹çäºä»¶å¤ç |
| | | * <p>Description: </p> |
| | | * |
| | | * @author xchao |
| | | * @time 2012-5-26 |
| | | * @param e |
| | | */ |
| | | public abstract void tree_valueChanged(TreeSelectionEvent e); |
| | | |
| | | /** |
| | | * å±å¼äºä»¶ |
| | | * @param e |
| | | */ |
| | | private void tree_treeExpanded_local(TreeExpansionEvent e) { |
| | | TreePath treePath = e.getPath(); |
| | | VCIBaseTreeNode treeNode = (VCIBaseTreeNode)treePath.getLastPathComponent(); |
| | | if(treeNode.isExpand()) return; |
| | | if(!(treeNode.getObj() instanceof Tree)) return; |
| | | Tree tree = (Tree)treeNode.getObj(); |
| | | List<Tree> childs = new ArrayList<>(); |
| | | //childs = getChildRMTypeObjects(rmTypeObject.getOid()); |
| | | addRMTypeObjectsToParentTreeNode(childs, treeNode); |
| | | treeNode.setExpand(true); |
| | | treeNode.setLeaf(treeModel.getChildCount(treeNode) == 0); |
| | | } |
| | | |
| | | private void addRMTypeObjectsToParentTreeNode(List<Tree> objs, VCIBaseTreeNode parentNode){ |
| | | for(Tree obj : objs){ |
| | | VCIBaseTreeNode node = new VCIBaseTreeNode(obj.getName(), obj); |
| | | treeModel.insertNodeInto(node, parentNode, treeModel.getChildCount(parentNode)); |
| | | } |
| | | } |
| | | |
| | | public VCIBaseTree getTree() { |
| | | return tree; |
| | | } |
| | | |
| | | public void setTree(VCIBaseTree tree) { |
| | | this.tree = tree; |
| | | } |
| | | |
| | | public VCIBaseTreeModel getTreeModel() { |
| | | return treeModel; |
| | | } |
| | | |
| | | public void setTreeModel(VCIBaseTreeModel treeModel) { |
| | | this.treeModel = treeModel; |
| | | } |
| | | } |
| | |
| | | import java.awt.BorderLayout; |
| | | import java.awt.Dimension; |
| | | import java.awt.FlowLayout; |
| | | import java.awt.Frame; |
| | | import java.awt.Toolkit; |
| | | import java.awt.event.MouseAdapter; |
| | | import java.awt.event.MouseEvent; |
| | | import javax.swing.JPanel; |
| | | import com.vci.base.ui.exception.VCIException; |
| | | import javax.swing.event.TreeSelectionEvent; |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.vci.base.ui.swing.VCISwingUtil; |
| | | import com.vci.base.ui.swing.components.VCIJButton; |
| | | import com.vci.base.ui.swing.components.VCIJDialog; |
| | | import com.vci.base.ui.swing.components.VCIJPanel; |
| | | import com.vci.base.ui.swing.components.VCIJTable; |
| | | import com.vci.base.ui.swing.components.*; |
| | | import com.vci.base.ui.swing.components.table.VCIJTablePanel; |
| | | import com.vci.base.ui.tree.VCIBaseTree; |
| | | import com.vci.base.ui.tree.VCIBaseTreeModel; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO; |
| | | import com.vci.ubcs.codeapply.enums.CodeReferConfigTypeEnum; |
| | | import com.vci.ubcs.codeapply.object.UIFormRefer; |
| | | import com.vci.ubcs.codeapply.object.UIFormRefers; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | |
| | | public class RMDataReferTempDialog extends VCIJDialog { |
| | | private VCIJDialog rmDataAddDialog; |
| | | private String templateId = ""; |
| | | private CodeApplyFor410MainPanel owner; |
| | | private CodeClassifyTemplateAttrVO codeClassifyTemplateAttr; |
| | | private RMDataReferTempDialogActionListener actionListener = new RMDataReferTempDialogActionListener(this); |
| | | private VCIJButton btnOk = VCISwingUtil.createVCIJButton("ok", "ç¡®å®", "ç¡®å®", "accept.png", actionListener); |
| | | private VCIJButton btnCancel = VCISwingUtil.createVCIJButton("cancel", "åæ¶", "åæ¶", "cancel.png", actionListener); |
| | | private static final long serialVersionUID = 1L; |
| | | public RMDataReferTempDialog(VCIJDialog rmDataAddDialog,String templateId) { |
| | | private VCIJScrollPane scrollLeftTreePane = new VCIJScrollPane(); |
| | | CodeReferTreePanel typeTreePanel; |
| | | private VCIBaseTree leftTree = null; |
| | | private VCIBaseTreeModel leftTreeModel = null; |
| | | public RMDataReferTempDialog(CodeApplyFor410MainPanel owner, CodeClassifyTemplateAttrVO codeClassifyTemplateAttr) { |
| | | //super(true); |
| | | this.rmDataAddDialog = rmDataAddDialog; |
| | | this.templateId = templateId; |
| | | this.owner = owner; |
| | | this.codeClassifyTemplateAttr = codeClassifyTemplateAttr; |
| | | init(); |
| | | setTitle("å¼ç¨æ¨¡æ¿-屿§éæ©"); |
| | | //initDialogSize(rmDataAddDialog.getWidth(), rmDataAddDialog.getHeight()); |
| | |
| | | JPanel panel = new JPanel(new FlowLayout()); |
| | | panel.add(btnOk); |
| | | panel.add(btnCancel); |
| | | |
| | | this.add(createRMDataMainPanel(), BorderLayout.CENTER); |
| | | this.add(panel,BorderLayout.SOUTH); |
| | | |
| | | Dimension dime = Toolkit.getDefaultToolkit().getScreenSize().getSize(); |
| | | int x = dime.width/6; |
| | | int y = dime.height/6 + 50; |
| | |
| | | public void setFromTableDoubleClick(boolean fromTableDoubleClick) { |
| | | this.fromTableDoubleClick = fromTableDoubleClick; |
| | | } |
| | | |
| | | private UIFormRefer uiFormRefer; |
| | | private VCIJPanel createRMDataMainPanel(){ |
| | | VCIJPanel rmDataTablePanel = new VCIJPanel(); |
| | | if(!templateId.equals("")){ |
| | | //rmDataTablePanel = getRMDataMainPanel("", "", templateId); |
| | | VCIJPanel rmDataTablePanel = new VCIJPanel(new BorderLayout()); |
| | | uiFormRefer=new UIFormRefer(); |
| | | if(StringUtils.isNotBlank(codeClassifyTemplateAttr.getReferConfig())){ |
| | | uiFormRefer = JSONObject.toJavaObject(JSONObject.parseObject(codeClassifyTemplateAttr.getReferConfig().toString()), UIFormRefer.class); |
| | | } |
| | | rmDataTablePanel.setPreferredSize(new Dimension(880,300)); |
| | | if(uiFormRefer !=null&&(uiFormRefer.getType().equals(CodeReferConfigTypeEnum.TREE.getValue()) |
| | | ||uiFormRefer.getType().equals(CodeReferConfigTypeEnum.ORGDEPARTMENTREFER.getValue()))){ |
| | | rmDataTablePanel.add(createTreePanel(),BorderLayout.CENTER); |
| | | }else if(uiFormRefer !=null&&(uiFormRefer.getType().equals(CodeReferConfigTypeEnum.GRID.getValue()))){ |
| | | //æ 表 |
| | | }else{ |
| | | rmDataTablePanel.add(getRMDataMainPanel(),BorderLayout.CENTER); |
| | | } |
| | | //rmDataTablePanel.setPreferredSize(new Dimension(880,300)); |
| | | return rmDataTablePanel; |
| | | } |
| | | private VCIJTablePanel<T> tablePanel = null; |
| | | |
| | | /** |
| | | * æ ¹æ®ç±»åæ¾ç¤ºtable |
| | | */ |
| | | private CodeDataMainPanel codeDataMainPanel = null; |
| | | private CodeDataMainPanelDataProvider dataProvider; |
| | | public VCIJTablePanel getRMDataMainPanel(String libId, String classifyId, String templateId) { |
| | | dataProvider = new CodeDataMainPanelDataProvider(); |
| | | tablePanel = new VCIJTablePanel<T>(dataProvider); |
| | | //tablePanel.setCustomButtons(getCombinedButtons()); |
| | | tablePanel.setShowExport(true); |
| | | tablePanel.setShowPaging(true); |
| | | tablePanel.setPageButtonFlowAlign(FlowLayout.CENTER); |
| | | tablePanel.setCustomButtonFlowAlign(FlowLayout.CENTER); |
| | | tablePanel.buildTablePanel(); |
| | | int columnCount = tablePanel.getTable().getColumnCount(); |
| | | tablePanel.getTable().getColumnModel().getColumn(columnCount - 2).setPreferredWidth(150); |
| | | tablePanel.getTable().getColumnModel().getColumn(columnCount - 4).setPreferredWidth(150); |
| | | /** |
| | | * ç¦æ¢table表头æå¨ï¼é²æ¢ç¬¬ä¸åçå¤éæ¡å第äºåçåºå·æå¨åºé®é¢: |
| | | * ç¹å»æè¡ï¼è¡¨æ ¼ä¸çå¤éæ¡çä¸å°ï¼ä¸éä¸è¡¨å¤´ä¸çå¤éæ¡ç³»ç»ä¼æ¥éï¼æ°æ®ä¿¡æ¯æ¾ç¤ºä¸æ£ç¡®ã |
| | | * 2012-12-4 wangxl |
| | | */ |
| | | tablePanel.getTable().getTableHeader().setReorderingAllowed(false); |
| | | tablePanel.refreshTableData(); |
| | | VCIJTable table = tablePanel.getTable(); |
| | | public CodeDataMainPanel getRMDataMainPanel() { |
| | | codeDataMainPanel=new CodeDataMainPanel(uiFormRefer); |
| | | CodeDataMainPanelDataProvider dataProvider=new CodeDataMainPanelDataProvider(codeDataMainPanel); |
| | | codeDataMainPanel.setDataProvider(dataProvider); |
| | | codeDataMainPanel.setCustomTopPanel(new attarSearchPanel(uiFormRefer)); |
| | | codeDataMainPanel.buildPanel(); |
| | | VCIJTable table = codeDataMainPanel.getTablePanel().getTable(); |
| | | table.addMouseListener(new MouseAdapter() { |
| | | public void mouseClicked(MouseEvent e) { |
| | | if (e.getButton() == 1 && e.getClickCount() == 2) { |
| | |
| | | } |
| | | } |
| | | }); |
| | | return tablePanel; |
| | | return codeDataMainPanel; |
| | | } |
| | | /*** |
| | | * æ ¹æ®ç±»åå±ç¤ºæ |
| | | * @return |
| | | */ |
| | | private VCIJScrollPane createTreePanel(){ |
| | | final RMDataReferTempDialog self = this; |
| | | |
| | | typeTreePanel = new CodeReferTreePanel(uiFormRefer) { |
| | | private static final long serialVersionUID = 8121108576137012228L; |
| | | @Override |
| | | public void tree_valueChanged(TreeSelectionEvent e) { |
| | | self.leftTree_valueChanged(e); |
| | | } |
| | | }; |
| | | typeTreePanel.buildTreePanel(); |
| | | leftTree = typeTreePanel.getTree(); |
| | | leftTreeModel = typeTreePanel.getTreeModel(); |
| | | scrollLeftTreePane.setViewportView(leftTree); |
| | | |
| | | return scrollLeftTreePane; |
| | | } |
| | | |
| | | /*** |
| | | * æ 忢äºä»¶ |
| | | * @param e |
| | | */ |
| | | private void leftTree_valueChanged(TreeSelectionEvent e) { |
| | | |
| | | } |
| | | /***è·åèµæºæ°æ®ç䏻颿¿**/ |
| | | /* |
| | | public RMDataMainPanel getRMDataMainPanel() { |
| | |
| | | // map.put("åææé¨ä»¶", "1"); |
| | | // map.put("ç®æç¤ºæ³¢å¨", ""); |
| | | map.put("", "YCL"); |
| | | String clsfName = "é"; |
| | | String clsfName = ""; |
| | | String deptName = ""; |
| | | CodeApplyFor410Dialog dialog = new CodeApplyFor410Dialog(j, clsfName,deptName); |
| | | String code = dialog.getCodeValue(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply; |
| | | |
| | | import com.vci.base.ui.swing.VCISwingUtil; |
| | | import com.vci.base.ui.swing.components.VCIJButton; |
| | | import com.vci.base.ui.swing.components.VCIJLabel; |
| | | import com.vci.base.ui.swing.components.VCIJPanel; |
| | | import com.vci.base.ui.swing.components.VCIJTextField; |
| | | import com.vci.ubcs.code.vo.webserviceModel.coderule.CodeShowFieldConfigVO; |
| | | import com.vci.ubcs.codeapply.object.UIFormRefer; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | |
| | | import java.awt.*; |
| | | import java.util.Iterator; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | public class attarSearchPanel extends VCIJPanel { |
| | | |
| | | private LinkedHashMap<String , VCIJTextField> attrInerNameValMap = new LinkedHashMap<String,VCIJTextField>(); |
| | | private UIFormRefer uiFormRefer; |
| | | public attarSearchPanel(UIFormRefer uiFormRefer){ |
| | | this.uiFormRefer = uiFormRefer; |
| | | init(); |
| | | } |
| | | private void init(){ |
| | | initcomponam(); |
| | | } |
| | | private void initcomponam(){ |
| | | this.setLayout(new GridBagLayout()); |
| | | setAttrSearch(); |
| | | this.setVisible(true); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * <p>æåºæ¬å±æ§ä¿¡æ¯åå§åå°ç»ä»¶ä¸é¢ãå¹¶ä¿å屿§å°Mapï¼å±æ§å
é¨åç§°--textFieldï¼ä¸</p> |
| | | * |
| | | * @time 2013-3-17 |
| | | */ |
| | | private void setAttrSearch(){ |
| | | List<CodeShowFieldConfigVO> codeShowFieldConfigVOS=this.uiFormRefer.getCodeShowFieldConfigVOS(); |
| | | if(!CollectionUtils.isEmpty(codeShowFieldConfigVOS)){ |
| | | CodeShowFieldConfigVO[] objs=codeShowFieldConfigVOS.toArray(new CodeShowFieldConfigVO []{}); |
| | | GridBagConstraints cons = new GridBagConstraints(0, 0, 1, 1, 0.0, 1.0, GridBagConstraints.EAST , GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0); |
| | | for(int i = 0 ;i<objs.length;i++){ |
| | | if(cons.gridx == 1 ){ |
| | | cons.gridwidth = GridBagConstraints.REMAINDER; |
| | | cons.anchor = GridBagConstraints.WEST; |
| | | }else if(cons.gridx >1){ |
| | | cons.gridx = 0; |
| | | cons.anchor = GridBagConstraints.EAST; |
| | | cons.gridy++; |
| | | cons.gridwidth = 1; |
| | | } |
| | | VCIJPanel oneSearch = new VCIJPanel(); |
| | | oneSearch.setLayout(new FlowLayout(FlowLayout.RIGHT)); |
| | | String attrName = objs[i].getTitle(); |
| | | |
| | | VCIJLabel attarLabel = new VCIJLabel(attrName+":"); |
| | | VCIJTextField attrText = new VCIJTextField(""); |
| | | attrInerNameValMap.put(objs[i].getField(), attrText); |
| | | attrText.setPreferredSize(new Dimension(300, 30)); |
| | | oneSearch.add(attarLabel); |
| | | oneSearch.add(attrText); |
| | | cons.gridx++; |
| | | this.add(oneSearch,cons); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * <p>è¿ååä¸ªå±æ§ç»è¿æ¼æ¥åçæ¥è¯¢SQLè¯å¥</p> |
| | | * |
| | | * @time 2013-3-17 |
| | | * @return |
| | | */ |
| | | public String getAttrSearchFilterString(){ |
| | | String result = ""; |
| | | StringBuilder sql = new StringBuilder(); |
| | | Set<String> keys = attrInerNameValMap.keySet(); |
| | | for (Iterator it = keys.iterator(); it.hasNext();) { |
| | | String key = (String)it.next(); |
| | | VCIJTextField textField = attrInerNameValMap.get(key); |
| | | String message = textField.getText().replaceAll(" ", "").trim(); |
| | | if(message.equals("")) continue; |
| | | String text = getTextQueryVal(message); |
| | | sql.append(" "+key+" "); |
| | | sql.append(" like "); |
| | | sql.append("'"+text+"'"); |
| | | sql.append(" and"); |
| | | } |
| | | if(sql.length() != 0){ |
| | | result = sql.substring(0, sql.lastIndexOf("and")); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * <p>æ ¹æ®ææ¬æ¡è¾å
¥å
å®¹ï¼æé æ¥è¯¢æ¡ä»¶ã |
| | | * è¿èç»æï¼ 1ãå½å
å®¹æ¯ ä»¥*å¼å¤´ï¼å¦'*abc',åè¿åå
容"%abc"ï¼ |
| | | * 2ãå½å
容以*ç»æï¼å¦"abc*"ï¼åè¿åå
容"abc%"ï¼ |
| | | * 3ãå½å
容ä¸é´å
å«*ï¼å¦"abc*def"ï¼åè¿åå
容"abc%def"ï¼ |
| | | * 4ãè¾å
¥çå
容妿æ¯ç©ºï¼åè¿å"%" |
| | | * 5ãå
¶ä»æ
åµåè¿åå
容æ¬èº« |
| | | * </p> |
| | | * @time 2013-3-17 |
| | | * @param text |
| | | * @return |
| | | */ |
| | | private String getTextQueryVal(String text){ |
| | | if(text.equals("")){ |
| | | return "%"; |
| | | } |
| | | StringBuilder result = new StringBuilder(); |
| | | // update by xchao 2013.05.21 begin |
| | | // æ¯ææ´çµæ´»çæç´¢ |
| | | // ä¸»ææ³æ§å¶é»è¾ |
| | | // 1ãå°è¾å
¥çæ¡ä»¶ä¸ç*æ¿æ¢ä¸º%ï¼XXX*XXX-> XXX%XXX |
| | | // 2ã妿è¾å
¥çæ¡ä»¶ä¸å
å«*ï¼å卿¡ä»¶çååé½å ä¸%ï¼ä»¥å®æå
¨æ¨¡ç³ï¼'%XXX%' |
| | | // 3ãåé¢ä¸è¾å
¥*ãåé¢ä¸è¾å
¥*ä¸ä¹åä¸è´ |
| | | // å³ï¼åé¢ä¸å
å«*ï¼åè¡¨ææ¥è¯¢çæ¯â以XXXå¼å¤´âçæ°æ®ï¼'XXX%' |
| | | // åé¢ä¸å
å«*ï¼åè¡¨é¢æ¥è¯¢çæ¯â以XXXç»æâçæ°æ®ï¼'%XXX' |
| | | // 4ã |
| | | if(text.indexOf("*") >= 0){ |
| | | // result.append(text.replace("*", "%")); |
| | | // ä¸å¥å¯ä»¥æ¯æä¸é´* |
| | | result.append("%").append(text.replace("*", "%")).append("%"); |
| | | } else { |
| | | result.append("%").append(text).append("%"); |
| | | } |
| | | // update by xchao 2013.05.21 end |
| | | |
| | | // int midel = text.lastIndexOf("*"); |
| | | // if(text.startsWith("*")){ |
| | | // result.append("%"); |
| | | // result.append(text.substring(1)); |
| | | // }else if(text.endsWith("*")){ |
| | | // result.append(text.substring(0, text.length()-1)); |
| | | // result.append("%"); |
| | | // }else if(midel > 0){ |
| | | // String before = text.substring(0, midel); |
| | | // result.append(before); |
| | | // result.append("%"); |
| | | // String after = text.substring(midel+1); |
| | | // result.append(after); |
| | | // }else{ |
| | | // result.append(text); |
| | | // } |
| | | return result.toString(); |
| | | } |
| | | public void clear(){ |
| | | Set<String> keys = attrInerNameValMap.keySet(); |
| | | for (Iterator it = keys.iterator(); it.hasNext();) { |
| | | String key = (String)it.next(); |
| | | VCIJTextField textField = attrInerNameValMap.get(key); |
| | | textField.setText(""); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply.enums; |
| | | |
| | | import com.vci.ubcs.starter.web.enumpck.BaseEnum; |
| | | |
| | | /** |
| | | * åç
§é
ç½®ä¸ç¨å°çââçªå£ç±»å |
| | | * @author ludc |
| | | * @date 2023/5/24 14:09 |
| | | */ |
| | | public enum CodeReferConfigTypeEnum implements BaseEnum { |
| | | |
| | | /** |
| | | * é»è®¤æ ·å¼ |
| | | */ |
| | | DEFAULT("default","é»è®¤æ ·å¼"), |
| | | |
| | | /** |
| | | * å¹³å°é
ç½® |
| | | */ |
| | | STAND("stand","å¹³å°é
ç½®"), |
| | | |
| | | /** |
| | | * æ å½¢ |
| | | */ |
| | | TREE("tree","æ å½¢"), |
| | | |
| | | /** |
| | | * æ å½¢ |
| | | */ |
| | | GRID("grid","å表"), |
| | | |
| | | /** |
| | | * é¨é¨æ |
| | | */ |
| | | ORGDEPARTMENTREFER("refer/OrgDepartmentRefer","é¨é¨æ "), |
| | | |
| | | /** |
| | | * é¨é¨å表 |
| | | */ |
| | | ORGDEPARTMENTGRIDREFERS("refer/OrgDepartmentGridRefers","é¨é¨å表"), |
| | | |
| | | /** |
| | | * ç¨æ· |
| | | */ |
| | | SMUSERREFER("refer/SmUserRefer","ç¨æ·"), |
| | | |
| | | /** |
| | | * ç¨æ·å表 |
| | | */ |
| | | SMUSERGRIDREFER("refer/SmUserGridRefer","ç¨æ·å表"), |
| | | |
| | | /** |
| | | * è§è²å表 |
| | | */ |
| | | SMROLEREFER("refer/SmRoleRefer","è§è²å表"), |
| | | |
| | | /** |
| | | * èå¡ |
| | | */ |
| | | ORGDUTYREFER("refer/OrgDutyRefer","èå¡"), |
| | | |
| | | /** |
| | | * å·¥ç§ |
| | | */ |
| | | SMWORKTYPEREFER("refer/SmWorkTypeRefer","å·¥ç§"), |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿ |
| | | */ |
| | | WFPROCESSTEMPLATEREFER("refer/WfProcessTemplateRefer","æµç¨æ¨¡æ¿"); |
| | | |
| | | /** |
| | | * æä¸¾çå¼ |
| | | */ |
| | | private String value; |
| | | |
| | | /** |
| | | * æä¸¾æ¾ç¤ºææ¬ |
| | | */ |
| | | private String text; |
| | | |
| | | /** |
| | | * è·åæä¸¾å¼ |
| | | * |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | @Override |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | /** |
| | | * 设置æä¸¾å¼ |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | */ |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾æ¾ç¤ºææ¬ |
| | | * |
| | | * @return æ¾ç¤ºææ¬ |
| | | */ |
| | | @Override |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¾ç¤ºææ¬ |
| | | * |
| | | * @param text æ¾ç¤ºææ¬ |
| | | */ |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | |
| | | /** |
| | | * æé 彿° |
| | | * |
| | | * @param value å¼ |
| | | * @param text æ¾ç¤ºææ¬ |
| | | */ |
| | | private CodeReferConfigTypeEnum(String value, String text) { |
| | | this.value = value; |
| | | this.text = text; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®åç§°è·å对åºçæä¸¾å¼ |
| | | * |
| | | * @param text åç§° |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | public static String getValueByText(String text) { |
| | | for (CodeReferConfigTypeEnum wenum : CodeReferConfigTypeEnum.values()) { |
| | | if (wenum.getText().equalsIgnoreCase(text)) { |
| | | return wenum.getValue(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·ååç§° |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | * @return åç§° |
| | | */ |
| | | public static String getTextByValue(String value) { |
| | | for (CodeReferConfigTypeEnum wenum : CodeReferConfigTypeEnum.values()) { |
| | | if (wenum.getValue().equalsIgnoreCase(value)) { |
| | | return wenum.getText(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·åæä¸¾å¯¹è±¡ |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | * @return æä¸¾å¯¹è±¡ï¼ä¸å卿¶åè¿ånull |
| | | */ |
| | | public static CodeReferConfigTypeEnum forValue(String value) { |
| | | for (CodeReferConfigTypeEnum wenum : CodeReferConfigTypeEnum.values()) { |
| | | if (wenum.getValue().equalsIgnoreCase(value)) { |
| | | return wenum; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply.object; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyValueVO; |
| | | |
| | | public class CodeClassifyValue extends CodeClassifyValueVO { |
| | | @Override |
| | | public String toString() { |
| | | return super.getName(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply.object; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeFixedValueVO; |
| | | public class CodeFixedValue extends CodeFixedValueVO { |
| | | @Override |
| | | public String toString() { |
| | | return super.getId(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply.object; |
| | | |
| | | import com.vci.ubcs.code.vo.webserviceModel.coderule.CodeShowFieldConfigVO; |
| | | import com.vci.ubcs.code.vo.webserviceModel.coderule.CodeSrchCondConfigVO; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class CoderefersecSearchVO { |
| | | private List<CodeSrchCondConfigVO> codeSrchCondConfigVOS; |
| | | private List<CodeShowFieldConfigVO> codeShowFieldConfigVOS; |
| | | private String referTypeName;// wupin, |
| | | private String referType;//wupin, |
| | | private String textField;// name, |
| | | private String valueField;//oid, |
| | | private String type;// default, |
| | | private String url;// http://localhost:38000/api/ubcs-code/codeSyncUniversalController/queryClassifyRule, |
| | | private String backPath;// http://localhost:38000/api, |
| | | private String method;// POST, |
| | | private String height;// , |
| | | private String useFormKey; |
| | | private String paramForFormKey; |
| | | private boolean isMuti;// false, |
| | | private String mapFields;// , |
| | | private boolean isOpenGlobal;// true, |
| | | private boolean isPersistence;// false, |
| | | private int limit;// 15, |
| | | private String sortField;// , |
| | | private String sortType;//private String " |
| | | |
| | | private String parentFieldName;// private String PARENTCODECLASSIFYOIDprivate String , |
| | | private String parentUsedField;// private String oidprivate String , |
| | | private String parentValue;// private String \\IN(SELECT oid from PLATFORMBTM_CODECLASSIFY where id ='hesuanfenlei')private String , |
| | | private String loadType;// private String allprivate String , |
| | | private boolean onlyLeaf;// false, |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "CoderefersecSearchVO{" + |
| | | "codeSrchCondConfigVOS=" + codeSrchCondConfigVOS + |
| | | ", codeShowFieldConfigVOS=" + codeShowFieldConfigVOS + |
| | | ", referTypeName='" + referTypeName + '\'' + |
| | | ", referType='" + referType + '\'' + |
| | | ", textField='" + textField + '\'' + |
| | | ", valueField='" + valueField + '\'' + |
| | | ", type='" + type + '\'' + |
| | | ", url='" + url + '\'' + |
| | | ", backPath='" + backPath + '\'' + |
| | | ", method='" + method + '\'' + |
| | | ", height='" + height + '\'' + |
| | | ", useFormKey='" + useFormKey + '\'' + |
| | | ", paramForFormKey='" + paramForFormKey + '\'' + |
| | | ", isMuti=" + isMuti + |
| | | ", mapFields='" + mapFields + '\'' + |
| | | ", isOpenGlobal=" + isOpenGlobal + |
| | | ", isPersistence=" + isPersistence + |
| | | ", limit=" + limit + |
| | | ", sortField='" + sortField + '\'' + |
| | | ", sortType='" + sortType + '\'' + |
| | | ", parentFieldName='" + parentFieldName + '\'' + |
| | | ", parentUsedField='" + parentUsedField + '\'' + |
| | | ", parentValue='" + parentValue + '\'' + |
| | | ", loadType='" + loadType + '\'' + |
| | | ", onlyLeaf=" + onlyLeaf + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply.object; |
| | | |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class ReferTreObject implements Serializable { |
| | | private static final long serialVersionUID = 6886695271635257882L; |
| | | private String oid; |
| | | private String text; |
| | | private String name; |
| | | private boolean leaf = false; |
| | | private boolean showCheckbox = false; |
| | | private boolean checked = false; |
| | | private List<Tree> children = new ArrayList(); |
| | | private String icon; |
| | | private String iconCls; |
| | | private String parentId; |
| | | private String parentName; |
| | | private String parentBtmName; |
| | | private boolean expanded = false; |
| | | private String href; |
| | | private String index; |
| | | private Map<String, String> attributes = new HashMap(); |
| | | |
| | | public String getOid() { |
| | | return oid; |
| | | } |
| | | |
| | | public void setOid(String oid) { |
| | | this.oid = oid; |
| | | } |
| | | |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public boolean isLeaf() { |
| | | return leaf; |
| | | } |
| | | |
| | | public void setLeaf(boolean leaf) { |
| | | this.leaf = leaf; |
| | | } |
| | | |
| | | public boolean isShowCheckbox() { |
| | | return showCheckbox; |
| | | } |
| | | |
| | | public void setShowCheckbox(boolean showCheckbox) { |
| | | this.showCheckbox = showCheckbox; |
| | | } |
| | | |
| | | public boolean isChecked() { |
| | | return checked; |
| | | } |
| | | |
| | | public void setChecked(boolean checked) { |
| | | this.checked = checked; |
| | | } |
| | | |
| | | public List<Tree> getChildren() { |
| | | return children; |
| | | } |
| | | |
| | | public void setChildren(List<Tree> children) { |
| | | this.children = children; |
| | | } |
| | | |
| | | public String getIcon() { |
| | | return icon; |
| | | } |
| | | |
| | | public void setIcon(String icon) { |
| | | this.icon = icon; |
| | | } |
| | | |
| | | public String getIconCls() { |
| | | return iconCls; |
| | | } |
| | | |
| | | public void setIconCls(String iconCls) { |
| | | this.iconCls = iconCls; |
| | | } |
| | | |
| | | public String getParentId() { |
| | | return parentId; |
| | | } |
| | | |
| | | public void setParentId(String parentId) { |
| | | this.parentId = parentId; |
| | | } |
| | | |
| | | public String getParentName() { |
| | | return parentName; |
| | | } |
| | | |
| | | public void setParentName(String parentName) { |
| | | this.parentName = parentName; |
| | | } |
| | | |
| | | public String getParentBtmName() { |
| | | return parentBtmName; |
| | | } |
| | | |
| | | public void setParentBtmName(String parentBtmName) { |
| | | this.parentBtmName = parentBtmName; |
| | | } |
| | | |
| | | public boolean isExpanded() { |
| | | return expanded; |
| | | } |
| | | |
| | | public void setExpanded(boolean expanded) { |
| | | this.expanded = expanded; |
| | | } |
| | | |
| | | public String getHref() { |
| | | return href; |
| | | } |
| | | |
| | | public void setHref(String href) { |
| | | this.href = href; |
| | | } |
| | | |
| | | public String getIndex() { |
| | | return index; |
| | | } |
| | | |
| | | public void setIndex(String index) { |
| | | this.index = index; |
| | | } |
| | | |
| | | public Map<String, String> getAttributes() { |
| | | return attributes; |
| | | } |
| | | |
| | | public void setAttributes(Map<String, String> attributes) { |
| | | this.attributes = attributes; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ReferDataObject{" + |
| | | "oid='" + oid + '\'' + |
| | | ", text='" + text + '\'' + |
| | | ", name='" + name + '\'' + |
| | | ", leaf=" + leaf + |
| | | ", showCheckbox=" + showCheckbox + |
| | | ", checked=" + checked + |
| | | ", children=" + children + |
| | | ", icon='" + icon + '\'' + |
| | | ", iconCls='" + iconCls + '\'' + |
| | | ", parentId='" + parentId + '\'' + |
| | | ", parentName='" + parentName + '\'' + |
| | | ", parentBtmName='" + parentBtmName + '\'' + |
| | | ", expanded=" + expanded + |
| | | ", href='" + href + '\'' + |
| | | ", index='" + index + '\'' + |
| | | ", attributes=" + attributes + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply.object; |
| | | |
| | | import com.vci.ubcs.code.vo.webserviceModel.coderule.CodeShowFieldConfigVO; |
| | | import com.vci.ubcs.code.vo.webserviceModel.coderule.CodeSrchCondConfigVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.UIFieldSortVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.UITableCustomDefineVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class UIFormRefer { |
| | | |
| | | private List<CodeSrchCondConfigVO> codeSrchCondConfigVOS; |
| | | private List<CodeShowFieldConfigVO> codeShowFieldConfigVOS; |
| | | private String referTypeName;// wupin, |
| | | private String referType;//wupin, |
| | | private String textField;// name, |
| | | private String valueField;//oid, |
| | | private String type;// default, |
| | | private String url;// http://localhost:38000/api/ubcs-code/codeSyncUniversalController/queryClassifyRule, |
| | | private String backPath;// http://localhost:38000/api, |
| | | private String method;// POST, |
| | | private String height;// , |
| | | private String useFormKey; |
| | | private String paramForFormKey; |
| | | private boolean isMuti;// false, |
| | | private String mapFields;// , |
| | | private boolean isOpenGlobal;// true, |
| | | private boolean isPersistence;// false, |
| | | private int limit;// 15, |
| | | private String sortField;// , |
| | | private String sortType;//private String " |
| | | |
| | | private String parentFieldName;// private String PARENTCODECLASSIFYOIDprivate String , |
| | | private String parentUsedField;// private String oidprivate String , |
| | | private String parentValue;// private String \\IN(SELECT oid from PLATFORMBTM_CODECLASSIFY where id ='hesuanfenlei')private String , |
| | | private String loadType;// private String allprivate String , |
| | | private boolean onlyLeaf;// false, |
| | | |
| | | public List<CodeSrchCondConfigVO> getCodeSrchCondConfigVOS() { |
| | | return codeSrchCondConfigVOS; |
| | | } |
| | | |
| | | public void setCodeSrchCondConfigVOS(List<CodeSrchCondConfigVO> codeSrchCondConfigVOS) { |
| | | this.codeSrchCondConfigVOS = codeSrchCondConfigVOS; |
| | | } |
| | | |
| | | public List<CodeShowFieldConfigVO> getCodeShowFieldConfigVOS() { |
| | | return codeShowFieldConfigVOS; |
| | | } |
| | | |
| | | public void setCodeShowFieldConfigVOS(List<CodeShowFieldConfigVO> codeShowFieldConfigVOS) { |
| | | this.codeShowFieldConfigVOS = codeShowFieldConfigVOS; |
| | | } |
| | | |
| | | public String getReferTypeName() { |
| | | return referTypeName; |
| | | } |
| | | |
| | | public void setReferTypeName(String referTypeName) { |
| | | this.referTypeName = referTypeName; |
| | | } |
| | | |
| | | public String getReferType() { |
| | | return referType; |
| | | } |
| | | |
| | | public void setReferType(String referType) { |
| | | this.referType = referType; |
| | | } |
| | | |
| | | public String getTextField() { |
| | | return textField; |
| | | } |
| | | |
| | | public void setTextField(String textField) { |
| | | this.textField = textField; |
| | | } |
| | | |
| | | public String getValueField() { |
| | | return valueField; |
| | | } |
| | | |
| | | public void setValueField(String valueField) { |
| | | this.valueField = valueField; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | |
| | | public String getBackPath() { |
| | | return backPath; |
| | | } |
| | | |
| | | public void setBackPath(String backPath) { |
| | | this.backPath = backPath; |
| | | } |
| | | |
| | | public String getMethod() { |
| | | return method; |
| | | } |
| | | |
| | | public void setMethod(String method) { |
| | | this.method = method; |
| | | } |
| | | |
| | | public String getHeight() { |
| | | return height; |
| | | } |
| | | |
| | | public void setHeight(String height) { |
| | | this.height = height; |
| | | } |
| | | |
| | | public String getUseFormKey() { |
| | | return useFormKey; |
| | | } |
| | | |
| | | public void setUseFormKey(String useFormKey) { |
| | | this.useFormKey = useFormKey; |
| | | } |
| | | |
| | | public String getParamForFormKey() { |
| | | return paramForFormKey; |
| | | } |
| | | |
| | | public void setParamForFormKey(String paramForFormKey) { |
| | | this.paramForFormKey = paramForFormKey; |
| | | } |
| | | |
| | | public boolean isMuti() { |
| | | return isMuti; |
| | | } |
| | | |
| | | public void setMuti(boolean muti) { |
| | | isMuti = muti; |
| | | } |
| | | |
| | | public String getMapFields() { |
| | | return mapFields; |
| | | } |
| | | |
| | | public void setMapFields(String mapFields) { |
| | | this.mapFields = mapFields; |
| | | } |
| | | |
| | | public boolean isOpenGlobal() { |
| | | return isOpenGlobal; |
| | | } |
| | | |
| | | public void setOpenGlobal(boolean openGlobal) { |
| | | isOpenGlobal = openGlobal; |
| | | } |
| | | |
| | | public boolean isPersistence() { |
| | | return isPersistence; |
| | | } |
| | | |
| | | public void setPersistence(boolean persistence) { |
| | | isPersistence = persistence; |
| | | } |
| | | |
| | | public int getLimit() { |
| | | return limit; |
| | | } |
| | | |
| | | public void setLimit(int limit) { |
| | | this.limit = limit; |
| | | } |
| | | |
| | | public String getSortField() { |
| | | return sortField; |
| | | } |
| | | |
| | | public void setSortField(String sortField) { |
| | | this.sortField = sortField; |
| | | } |
| | | |
| | | public String getSortType() { |
| | | return sortType; |
| | | } |
| | | |
| | | public void setSortType(String sortType) { |
| | | this.sortType = sortType; |
| | | } |
| | | |
| | | public String getParentFieldName() { |
| | | return parentFieldName; |
| | | } |
| | | |
| | | public void setParentFieldName(String parentFieldName) { |
| | | this.parentFieldName = parentFieldName; |
| | | } |
| | | |
| | | public String getParentUsedField() { |
| | | return parentUsedField; |
| | | } |
| | | |
| | | public void setParentUsedField(String parentUsedField) { |
| | | this.parentUsedField = parentUsedField; |
| | | } |
| | | |
| | | public String getParentValue() { |
| | | return parentValue; |
| | | } |
| | | |
| | | public void setParentValue(String parentValue) { |
| | | this.parentValue = parentValue; |
| | | } |
| | | |
| | | public String getLoadType() { |
| | | return loadType; |
| | | } |
| | | |
| | | public void setLoadType(String loadType) { |
| | | this.loadType = loadType; |
| | | } |
| | | |
| | | public boolean isOnlyLeaf() { |
| | | return onlyLeaf; |
| | | } |
| | | |
| | | public void setOnlyLeaf(boolean onlyLeaf) { |
| | | this.onlyLeaf = onlyLeaf; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "CoderefersecSearchVO{" + |
| | | "codeSrchCondConfigVOS=" + codeSrchCondConfigVOS + |
| | | ", codeShowFieldConfigVOS=" + codeShowFieldConfigVOS + |
| | | ", referTypeName='" + referTypeName + '\'' + |
| | | ", referType='" + referType + '\'' + |
| | | ", textField='" + textField + '\'' + |
| | | ", valueField='" + valueField + '\'' + |
| | | ", type='" + type + '\'' + |
| | | ", url='" + url + '\'' + |
| | | ", backPath='" + backPath + '\'' + |
| | | ", method='" + method + '\'' + |
| | | ", height='" + height + '\'' + |
| | | ", useFormKey='" + useFormKey + '\'' + |
| | | ", paramForFormKey='" + paramForFormKey + '\'' + |
| | | ", isMuti=" + isMuti + |
| | | ", mapFields='" + mapFields + '\'' + |
| | | ", isOpenGlobal=" + isOpenGlobal + |
| | | ", isPersistence=" + isPersistence + |
| | | ", limit=" + limit + |
| | | ", sortField='" + sortField + '\'' + |
| | | ", sortType='" + sortType + '\'' + |
| | | ", parentFieldName='" + parentFieldName + '\'' + |
| | | ", parentUsedField='" + parentUsedField + '\'' + |
| | | ", parentValue='" + parentValue + '\'' + |
| | | ", loadType='" + loadType + '\'' + |
| | | ", onlyLeaf=" + onlyLeaf + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.codeapply.object; |
| | | |
| | | import com.vci.ubcs.starter.web.pagemodel.UIFieldSortVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.UITableCustomDefineVO; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public class UIFormRefers { |
| | | |
| | | /** |
| | | * åºåå |
| | | */ |
| | | private static final long serialVersionUID = 1459005348514757537L; |
| | | /** |
| | | * åç
§ççªå£ç±»å |
| | | */ |
| | | private String type; |
| | | |
| | | /** |
| | | * æ¾ç¤ºçåæ®µå±æ§ |
| | | */ |
| | | private String textField = "name"; |
| | | |
| | | /** |
| | | * å¼ç屿§ |
| | | */ |
| | | private String valueField = "oid"; |
| | | |
| | | /** |
| | | * æ¯å¦å¤é |
| | | */ |
| | | private boolean muti = false; |
| | | |
| | | /** |
| | | * åå°å°å |
| | | */ |
| | | private String url; |
| | | |
| | | /** |
| | | * æå¡çå°å |
| | | */ |
| | | private String backPath; |
| | | |
| | | /** |
| | | * 请æ±åå°çå½¢å¼ |
| | | */ |
| | | private String method = "GET"; |
| | | |
| | | /** |
| | | * é«åº¦ |
| | | */ |
| | | private Integer height; |
| | | |
| | | //éç¨çåç
§ |
| | | /** |
| | | * åç
§çä¸å¡ç±»å |
| | | */ |
| | | private String referType; |
| | | |
| | | /** |
| | | * åç
§çUIä¸ä¸æ |
| | | */ |
| | | private String referContent; |
| | | |
| | | //æ å½¢çåç
§ |
| | | /** |
| | | * ä¸çº§å段 |
| | | */ |
| | | private String parentFieldName; |
| | | |
| | | /** |
| | | * ä¸çº§å段çå
容对åºç屿§çå¼ |
| | | */ |
| | | private String parentUsedField; |
| | | |
| | | /** |
| | | * ä¸çº§å段çå¼ |
| | | */ |
| | | private String parentValue; |
| | | |
| | | /** |
| | | * å è½½æ¹å¼ |
| | | */ |
| | | private String loadType = "all"; |
| | | |
| | | /** |
| | | * æ¯å¦åªè½éæ©å¶åèç¹ |
| | | */ |
| | | private boolean onlyLeaf = false; |
| | | |
| | | /** |
| | | * è¿æ»¤(级è)屿§ |
| | | */ |
| | | private String useFormKey; |
| | | |
| | | /** |
| | | * è¿æ»¤å±æ§è¯·æ±åæ° |
| | | */ |
| | | private String paramForFormKey; |
| | | |
| | | /** |
| | | * æ å°å
¶ä»å±æ§ |
| | | */ |
| | | private String mapFields; |
| | | |
| | | //å表çåç
§ |
| | | /** |
| | | * æ¾ç¤ºçå表 |
| | | */ |
| | | private String displayTable; |
| | | |
| | | /** |
| | | * è¡¨æ ¼çèªå®ä¹å®ä¹ |
| | | */ |
| | | private UITableCustomDefineVO tableConfig; |
| | | |
| | | /** |
| | | * ç鿡件 |
| | | */ |
| | | private Map<String,String> where; |
| | | |
| | | /** |
| | | * åå°æåº |
| | | */ |
| | | private boolean remoteSort; |
| | | |
| | | /** |
| | | * åå§åæåº |
| | | */ |
| | | private UIFieldSortVO initSort; |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getTextField() { |
| | | return textField; |
| | | } |
| | | |
| | | public void setTextField(String textField) { |
| | | this.textField = textField; |
| | | } |
| | | |
| | | public String getValueField() { |
| | | return valueField; |
| | | } |
| | | |
| | | public void setValueField(String valueField) { |
| | | this.valueField = valueField; |
| | | } |
| | | |
| | | public boolean isMuti() { |
| | | return muti; |
| | | } |
| | | |
| | | public void setMuti(boolean muti) { |
| | | this.muti = muti; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | |
| | | public String getBackPath() { |
| | | return backPath; |
| | | } |
| | | |
| | | public void setBackPath(String backPath) { |
| | | this.backPath = backPath; |
| | | } |
| | | |
| | | public String getMethod() { |
| | | return method; |
| | | } |
| | | |
| | | public void setMethod(String method) { |
| | | this.method = method; |
| | | } |
| | | |
| | | public Integer getHeight() { |
| | | return height; |
| | | } |
| | | |
| | | public void setHeight(Integer height) { |
| | | this.height = height; |
| | | } |
| | | |
| | | public String getReferType() { |
| | | return referType; |
| | | } |
| | | |
| | | public void setReferType(String referType) { |
| | | this.referType = referType; |
| | | } |
| | | |
| | | public String getReferContent() { |
| | | return referContent; |
| | | } |
| | | |
| | | public void setReferContent(String referContent) { |
| | | this.referContent = referContent; |
| | | } |
| | | |
| | | public String getParentFieldName() { |
| | | return parentFieldName; |
| | | } |
| | | |
| | | public void setParentFieldName(String parentFieldName) { |
| | | this.parentFieldName = parentFieldName; |
| | | } |
| | | |
| | | public String getParentUsedField() { |
| | | return parentUsedField; |
| | | } |
| | | |
| | | public void setParentUsedField(String parentUsedField) { |
| | | this.parentUsedField = parentUsedField; |
| | | } |
| | | |
| | | public String getParentValue() { |
| | | return parentValue; |
| | | } |
| | | |
| | | public void setParentValue(String parentValue) { |
| | | this.parentValue = parentValue; |
| | | } |
| | | |
| | | public String getLoadType() { |
| | | return loadType; |
| | | } |
| | | |
| | | public void setLoadType(String loadType) { |
| | | this.loadType = loadType; |
| | | } |
| | | |
| | | public boolean isOnlyLeaf() { |
| | | return onlyLeaf; |
| | | } |
| | | |
| | | public void setOnlyLeaf(boolean onlyLeaf) { |
| | | this.onlyLeaf = onlyLeaf; |
| | | } |
| | | |
| | | public String getUseFormKey() { |
| | | return useFormKey; |
| | | } |
| | | |
| | | public void setUseFormKey(String useFormKey) { |
| | | this.useFormKey = useFormKey; |
| | | } |
| | | |
| | | public String getParamForFormKey() { |
| | | return paramForFormKey; |
| | | } |
| | | |
| | | public void setParamForFormKey(String paramForFormKey) { |
| | | this.paramForFormKey = paramForFormKey; |
| | | } |
| | | |
| | | public String getMapFields() { |
| | | return mapFields; |
| | | } |
| | | |
| | | public void setMapFields(String mapFields) { |
| | | this.mapFields = mapFields; |
| | | } |
| | | |
| | | public String getDisplayTable() { |
| | | return displayTable; |
| | | } |
| | | |
| | | public void setDisplayTable(String displayTable) { |
| | | this.displayTable = displayTable; |
| | | } |
| | | |
| | | public UITableCustomDefineVO getTableConfig() { |
| | | return tableConfig; |
| | | } |
| | | |
| | | public void setTableConfig(UITableCustomDefineVO tableConfig) { |
| | | this.tableConfig = tableConfig; |
| | | } |
| | | |
| | | public Map<String, String> getWhere() { |
| | | return where; |
| | | } |
| | | |
| | | public void setWhere(Map<String, String> where) { |
| | | this.where = where; |
| | | } |
| | | |
| | | public boolean isRemoteSort() { |
| | | return remoteSort; |
| | | } |
| | | |
| | | public void setRemoteSort(boolean remoteSort) { |
| | | this.remoteSort = remoteSort; |
| | | } |
| | | |
| | | public UIFieldSortVO getInitSort() { |
| | | return initSort; |
| | | } |
| | | |
| | | public void setInitSort(UIFieldSortVO initSort) { |
| | | this.initSort = initSort; |
| | | } |
| | | } |
| | |
| | | |
| | | #PDM????????????????????????????????????????#?? |
| | | 410.PDM.LibCodeName=\u7269\u54c1\#\u9644\u5f55 |
| | | #??????????? |
| | | 410.PDM.item.url=http://127.0.0.1:36014/codeApplySwingController/getRMLibByName |
| | | #??????????? |
| | | 410.PDM.clsfTemplate.url=http://127.0.0.1:36014/codeApplySwingController/getUsedTemplateByClassifyOid |
| | | #code ???? |
| | | 410.code.url=http://127.0.0.1:36014/codeApplySwingController |
| | | |
| | | #??????????? |
| | | 410.PDM.leftClsfNode.url=http://127.0.0.1:36014/codeApplySwingController/selectCodeClassifyVOByParentId |
| | | # |
| | | 410.PDM.leftdescLibNode.url=http://127.0.0.1:36014/codeApplySwingController/getRMTypeByDescAndLib |
| | | |
| | | 410.PDM.rule.url=http://127.0.0.1:36014/codeApplySwingController/getCodeRuleByClassifyFullInfo |
| | | |
| | | 410.PDM.attrKeyValue.url=http://127.0.0.1:36014/codeApplySwingController/listComboboxItems |
| | | |
| | |
| | | import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO; |
| | | import com.vci.ubcs.code.service.ICodeClassifyService; |
| | | import com.vci.ubcs.code.service.ICodeClassifyTemplateAttrService; |
| | | import com.vci.ubcs.code.service.ICodeClassifyValueService; |
| | | import com.vci.ubcs.code.service.MdmEngineService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyValueVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.KeyValue; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import com.vci.ubcs.starter.web.pagemodel.UIFormReferVO; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | * 模æ¿å±æ§æå¡ |
| | | */ |
| | | private final ICodeClassifyTemplateAttrService codeClstempattrService; |
| | | |
| | | /*** |
| | | * åç±»ç æ®µæå¡ |
| | | */ |
| | | private final ICodeClassifyValueService codeClassifyValueService; |
| | | /** |
| | | * è·ååºèç¹ä¿¡æ¯ |
| | | * @param libName åºèç¹åç§° |
| | |
| | | List<KeyValue> keyValueList=mdmEngineService.listComboboxItems(codeClstempattrService.getObjectByOid(oid)); |
| | | return R.data(keyValueList); |
| | | } |
| | | |
| | | /** |
| | | * åç±»ç æ®µç å¼è·å |
| | | * @param secOid |
| | | * @param parentClassifyValueOid |
| | | * @return |
| | | */ |
| | | @GetMapping("/listCodeClassifyValueBySecOid") |
| | | public R<List<CodeClassifyValueVO>> listCodeClassifyValueBySecOid(String secOid,String parentClassifyValueOid){ |
| | | List<CodeClassifyValueVO> codeClassifyValueVOS= codeClassifyValueService.listCodeClassifyValueBySecOid(secOid,parentClassifyValueOid); |
| | | return R.data(codeClassifyValueVOS); |
| | | } |
| | | /** |
| | | * 主é¢åºåç±»æ |
| | | * @param treeQueryObject æ å½¢æ¥è¯¢å¯¹è±¡ |
| | | * @return 主é¢åºåç±»æ¾ç¤ºæ |
| | | */ |
| | | @GetMapping("/treeCodeClassify") |
| | | public R<List<Tree>> treeCodeClassify(TreeQueryObject treeQueryObject) { |
| | | List<Tree> treeList= codeClassifyService. treeCodeClassify(treeQueryObject); |
| | | return R.data(treeList); |
| | | } |
| | | |
| | | /** |
| | | * é»è®¤çæ å½¢åç
§å表 |
| | | * @param referConfigVO åç
§çé
ç½®ä¿¡æ¯ |
| | | * @return æ§è¡çç»æ |
| | | */ |
| | | @GetMapping("/defaultReferTree") |
| | | public R<List<Tree>> defaultReferTree(UIFormReferVO referConfigVO, TreeQueryObject queryObject){ |
| | | List<Tree> defaultReferTree= mdmEngineService.referTree(referConfigVO,queryObject); |
| | | return R.data(defaultReferTree); |
| | | } |
| | | } |
| | |
| | | */ |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.alibaba.nacos.api.utils.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | 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 org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | |
| | | // codeClassifyDaoI.selectByPrimaryKey(codeClassifyOid); |
| | | if(Func.isEmpty(classifyDO)&&StringUtils.isBlank(classifyDO.getParentCodeClassifyOid())){ |
| | | //说æå·²ç»æ¯é¡¶äºï¼ä¹æ²¡æ¾å°çè¯ï¼é£å°±è¿åäº |
| | | return null; |
| | | return new ArrayList<>(); |
| | | } |
| | | return selectOnlyTemplateByClassifyOid(classifyDO.getParentCodeClassifyOid()); |
| | | if(StringUtils.isNotBlank(classifyDO.getParentCodeClassifyOid())) { |
| | | return selectOnlyTemplateByClassifyOid(classifyDO.getParentCodeClassifyOid()); |
| | | }else{ |
| | | return new ArrayList<>(); |
| | | } |
| | | }else{ |
| | | return templateDOS; |
| | | } |