| | |
| | | import com.vci.rmip.code.client.codeapply.Apply410.utils.ConfigUtils; |
| | | import com.vci.rmip.code.client.codeapply.Apply410.utils.HttpUtil; |
| | | 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; |
| | |
| | | private final String SPECIAL_SECTION_NAME = "Special.section.name"; |
| | | private final String SPECIAL_CONTROL_SECTION_NAME = "Special.control.other.section.name"; |
| | | private final String SPECIAL_SECTION_VALUE = "Special.section.val"; |
| | | |
| | | |
| | | Map<String, CodeBasicSecVO> secMap = new LinkedHashMap<String, CodeBasicSecVO>(); |
| | | Map<String, VCIJComboxBox> comMap = new LinkedHashMap<String, VCIJComboxBox>(); |
| | | Map<String, Integer> secPositionMap = new LinkedHashMap<String, Integer>(); |
| | | |
| | | private final String MAX_ATTR_IN_LINE_KEY = "RMData.MaxAttrInLine"; |
| | | private final String TEXTAREA_ENABLE_KEY = "RMData.TextArea.Enable"; |
| | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | } |
| | | }else{ |
| | | /* if(!r.getMsg().equals("å½å主é¢åºåç±»ï¼ä»¥åå®çææçä¸çº§åç±»é½æ²¡æè®¾ç½®ç¼ç è§å")){ |
| | | VCIOptionPane.showMessage(this,r.getMsg()); |
| | | }*/ |
| | | } |
| | | } |
| | | /**å è½½è§å对åºçç æ®µä¿¡æ¯**/ |
| | | if(codeRuleVO!=null){ |
| | | List<CodeBasicSecVO> codeBasicSecVOList=codeRuleVO.getSecVOList(); |
| | |
| | | * @param secObjs |
| | | */ |
| | | public void initCurrentRow(CodeBasicSecVO[] secObjs,VCIJComboxBox[] secCombos) { |
| | | SectionObject lastSecObj = null; |
| | | CodeBasicSecVO lastSecObj = null; |
| | | VCIJComboxBox hisCombo = null; |
| | | try { |
| | | final Map<String, String> secValMap = getSpecialValMap(specialSecVals); |
| | | final Map<String, String> sOecValMap = getSpecialValMap(specialSecVals); |
| | | Map<String,List<String>> secIdTOListValueOidMap=new HashMap<>(); |
| | | for(int k = 0;k < secObjs.length; k++) { |
| | | final CodeBasicSecVO secObj = secObjs[k]; |
| | |
| | | if (secObj.getSecType().equals("codeclassifysec")) {// æ¯åç±»ç |
| | | String secOid=secObj.getOid(); |
| | | String parentClassifySecOid= secObj.getParentClassifySecOid(); |
| | | |
| | | if(lastSecObj != null) { |
| | | lastSecObj = secMap.get(secObj.getParentClassifySecOid()); |
| | | hisCombo = comMap.get(secObj.getParentClassifySecOid()); |
| | | } |
| | | |
| | | if(lastSecObj != null && lastSecObj.getSecType().equals("codeclassifysec") |
| | | && secObj.getParentClassifySecOid().equals(lastSecObj.getOid())) { |
| | | |
| | | hisCombo.addActionListener(new NextComboAction(secPositionMap.get(secObj.getParentClassifySecOid()), comMap.get(secObj.getParentClassifySecOid()),secCombos)); |
| | | initNextCombo(k,secCombo,(CodeClassifyValue)comMap.get(secObj.getParentClassifySecOid()).getSelectedItem(),secPositionMap.get(secObj.getParentClassifySecOid()),secCombos); |
| | | |
| | | //å¤çº§åç±»ç æ®µç å¼å è½½é误çBugä¿®å¤ |
| | | lastSecObj = secObj; |
| | | hisCombo = secCombo; |
| | | |
| | | secMap.put(secObj.getOid(), secObj); |
| | | comMap.put(secObj.getOid(), secCombo); |
| | | secPositionMap.put(secObj.getOid(),k); |
| | | continue; |
| | | |
| | | } |
| | | |
| | | String parentClassifyValueOid=""; |
| | | if(secIdTOListValueOidMap.containsKey(parentClassifySecOid)){ |
| | | List<String> parentClassifyValueList= secIdTOListValueOidMap.get(parentClassifySecOid); |
| | |
| | | } |
| | | } |
| | | secIdTOListValueOidMap.put(secObj.getOid(),valueOidList); |
| | | lastSecObj = secObj; |
| | | hisCombo = secCombo; |
| | | |
| | | secMap.put(secObj.getOid(), secObj); |
| | | comMap.put(secObj.getOid(), secCombo); |
| | | secPositionMap.put(secObj.getOid(),k); |
| | | /**代ç 项䏿äºä»¶**/ |
| | | secCombo.addActionListener(new ActionListener() { |
| | | public void actionPerformed(ActionEvent e) { |
| | |
| | | // æ¯åºå®ç |
| | | if (secObj.getSecType() .equals("codefixedsec")) { |
| | | List<CodeFixedValueVO> fixedValueVOList=secObj.getFixedValueVOList(); |
| | | //å¦æåªæä¸ä¸ªå¼ï¼åç³»ç»é»è®¤éæ©ï¼ä¸å ç©ºå¼ |
| | | if(fixedValueVOList.size() >1) { |
| | | secCombo.addItem(new CodeFixedValue()); |
| | | } |
| | | for (CodeFixedValueVO codeFixedValueVO : fixedValueVOList) { |
| | | CodeFixedValue codeFixedValue=new CodeFixedValue(); |
| | | |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeFixedValueVO,codeFixedValue); |
| | | secCombo.addItem(codeFixedValue); |
| | | } |
| | | /**å½ç³»ç»éæ©çæ¯æå®ç æ®µå¼æ¶ï¼ç»å«ä»£å·çç æ®µç³»ç»ä¸æ¾ç¤º Begin**/ |
| | | //å¦æåªæä¸ä¸ªå¼ï¼åç³»ç»é»è®¤éæ©ï¼ä¸å ç©ºå¼ |
| | | if(fixedValueVOList.size() >1) { |
| | | secCombo.addItem(new CodeFixedValue()); |
| | | } |
| | | for (CodeFixedValueVO codeFixedValueVO : fixedValueVOList) { |
| | | 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); |
| | |
| | | secCombo.setFlag(false); |
| | | secCombo.getSearchBtn().setVisible(false); |
| | | }*/ |
| | | } else |
| | | } else |
| | | // æ¯æ¥æç 段 |
| | | if (secObj.getSecType().equals("codedatesec")) { |
| | | String df =secObj.getCodeDateFormatStr(); |
| | | SimpleDateFormat dateFormate = new SimpleDateFormat(df); |
| | | String curDate = dateFormate.format(Calendar.getInstance().getTime()); |
| | | secCombo.addItem(curDate); |
| | | if (secObj.getSecType().equals("codedatesec")) { |
| | | 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")) { |
| | | |
| | | if (!secCombo.isFlag()){ |
| | | secCombo.setFlag(true); |
| | | secCombo.getSearchBtn().setVisible(true); |
| | | secCombo.getSearchBtn().addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | doSearch(secCombo,secObj); |
| | | if (!secCombo.isFlag()){ |
| | | secCombo.setFlag(true); |
| | | secCombo.getSearchBtn().setVisible(true); |
| | | secCombo.getSearchBtn().addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | doSearch(secCombo,secObj); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | /*RefSecObject refObj = getRefSecObj(secObj.getId()); |
| | | DefaultComboBoxModel aModel = getRefSecComboBox(refObj); |
| | | secCombo.setModel(aModel); |
| | |
| | | } |
| | | |
| | | */} else |
| | | //å±çº§ç 段ç 弿¾ç¤ºçæ¯éæ©ç代ç 项çåç§° |
| | | if(secObj.getSecType().equals("codelevelsec")) { |
| | | CodeClassify rmObj = (CodeClassify) this.transTreeObject.getCurrentTreeNode().getObj(); |
| | | secCombo.addItem(rmObj); |
| | | } else { |
| | | secCombo.setEditable(true); |
| | | } |
| | | //å±çº§ç 段ç 弿¾ç¤ºçæ¯éæ©ç代ç 项çåç§° |
| | | if(secObj.getSecType().equals("codelevelsec")) { |
| | | CodeClassify rmObj = (CodeClassify) this.transTreeObject.getCurrentTreeNode().getObj(); |
| | | secCombo.addItem(rmObj); |
| | | } else { |
| | | secCombo.setEditable(true); |
| | | } |
| | | } |
| | | }catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | lbl.setToolTipText("ç¹å»æ¤å¤è·å模æ¿å¯¹åºè§åçå¼"); |
| | | lbl.addMouseListener(new MouseAdapter() { |
| | | public void mouseClicked(MouseEvent e){ |
| | | getComptAttrValue(attrObj,attrIdToCtrlMaps); |
| | | getComptAttrValue(attrObj,attrIdToCtrlMaps); |
| | | |
| | | } |
| | | }); |
| | |
| | | cbx.setModel(model); |
| | | compt = cbx; |
| | | } else { // ä¸åå¨åå¼èå´åæç±»åçæä¸åçæ§ä»¶ |
| | | if (attrObj.getAttributeDataType().equals(VciFieldTypeEnum.VTBoolean.toString())) { // Booleanç±»å |
| | | if (attrObj.getAttributeDataType().equals(VciFieldTypeEnum.VTBoolean.toString())) { // Booleanç±»å |
| | | VCIJComboBox cbx = new VCIJComboBox(); |
| | | DefaultComboBoxModel model = new DefaultComboBoxModel(); |
| | | model.addElement("0"); |
| | |
| | | } |
| | | compt = cbx; |
| | | } else if (attrObj.getAttributeDataType().equals(VciFieldTypeEnum.VTDate.toString())) { // æ¥æç±»å |
| | | VCIJCalendarPanel aTrue = new VCIJCalendarPanel("yyyy-MM-dd", |
| | | attrObj.getRequireFlag().equals("true"), true, false); |
| | | if(displayValues.containsKey(attrObj.getId())){ |
| | | aTrue.setDateString(displayValues.get(attrObj.getId())); |
| | | aTrue.setEnabled(false); |
| | | return aTrue; |
| | | } |
| | | compt = aTrue; |
| | | VCIJCalendarPanel aTrue = new VCIJCalendarPanel("yyyy-MM-dd", |
| | | attrObj.getRequireFlag().equals("true"), true, false); |
| | | if(displayValues.containsKey(attrObj.getId())){ |
| | | aTrue.setDateString(displayValues.get(attrObj.getId())); |
| | | aTrue.setEnabled(false); |
| | | return aTrue; |
| | | } |
| | | compt = aTrue; |
| | | } else if (attrObj.getAttributeDataType().equals(VciFieldTypeEnum.VTDateTime.toString())) { // æ¥æç±»å |
| | | VCIJCalendarPanel aTrue = new VCIJCalendarPanel("yyyy-MM-dd HH:mm:ss", |
| | | attrObj.getRequireFlag().equals("true"), true, false); |
| | | if(displayValues.containsKey(attrObj.getId())){ |
| | | aTrue.setDateString(displayValues.get(attrObj.getId())); |
| | | aTrue.setEnabled(false); |
| | | return aTrue; |
| | | } |
| | | compt = aTrue; |
| | | }else if (attrObj.getAttributeDataType().equals(VciFieldTypeEnum.VTTime.toString())) { // æ¥æç±»å |
| | | VCIJCalendarPanel aTrue = new VCIJCalendarPanel("HH:mm:ss", |
| | | attrObj.getRequireFlag().equals("true"), true, false); |
| | | if(displayValues.containsKey(attrObj.getId())){ |
| | | aTrue.setDateString(displayValues.get(attrObj.getId())); |
| | | aTrue.setEnabled(false); |
| | | return aTrue; |
| | | } |
| | | compt = aTrue; |
| | | } |
| | | else if (attrObj.getAttributeDataType().equals(VciFieldTypeEnum.VTDouble.toString())||attrObj.getAttributeDataType().equals(VciFieldTypeEnum.VTLong.toString())) { // Realç±»å |
| | | VCIJCalendarPanel aTrue = new VCIJCalendarPanel("yyyy-MM-dd HH:mm:ss", |
| | | attrObj.getRequireFlag().equals("true"), true, false); |
| | | if(displayValues.containsKey(attrObj.getId())){ |
| | | aTrue.setDateString(displayValues.get(attrObj.getId())); |
| | | aTrue.setEnabled(false); |
| | | return aTrue; |
| | | } |
| | | compt = aTrue; |
| | | }else if (attrObj.getAttributeDataType().equals(VciFieldTypeEnum.VTTime.toString())) { // æ¥æç±»å |
| | | VCIJCalendarPanel aTrue = new VCIJCalendarPanel("HH:mm:ss", |
| | | attrObj.getRequireFlag().equals("true"), true, false); |
| | | if(displayValues.containsKey(attrObj.getId())){ |
| | | aTrue.setDateString(displayValues.get(attrObj.getId())); |
| | | aTrue.setEnabled(false); |
| | | return aTrue; |
| | | } |
| | | compt = aTrue; |
| | | } |
| | | else if (attrObj.getAttributeDataType().equals(VciFieldTypeEnum.VTDouble.toString())||attrObj.getAttributeDataType().equals(VciFieldTypeEnum.VTLong.toString())) { // Realç±»å |
| | | RealTextField txt = new RealTextField(""); |
| | | txt.setRequired(attrObj.getRequireFlag().equals("true")); |
| | | if(displayValues.containsKey(attrObj.getId())){ |
| | |
| | | IntegerTextField txt = new IntegerTextField(""); |
| | | txt.setRequired(attrObj.getRequireFlag().equals("true")); |
| | | if(displayValues.containsKey(attrObj.getId())){ |
| | | txt.setText(displayValues.get(attrObj.getId())); |
| | | txt.setEditable(false); |
| | | txt.setText(displayValues.get(attrObj.getId())); |
| | | txt.setEditable(false); |
| | | } |
| | | compt = txt; |
| | | } |
| | | else{ |
| | | VCIJTextField txt = new VCIJTextField(this,attrObj.getRequireFlag().equals("true")); |
| | | if(displayValues.containsKey(attrObj.getId())){ |
| | | txt.setText(displayValues.get(attrObj.getId())); |
| | | txt.setEditable(false); |
| | | } |
| | | compt = txt; |
| | | textCompts.add(txt); |
| | | } |
| | | else{ |
| | | VCIJTextField txt = new VCIJTextField(this,attrObj.getRequireFlag().equals("true")); |
| | | if(displayValues.containsKey(attrObj.getId())){ |
| | | txt.setText(displayValues.get(attrObj.getId())); |
| | | txt.setEditable(false); |
| | | } |
| | | compt = txt; |
| | | textCompts.add(txt); |
| | | } |
| | | boolean enabled = true; |
| | | |
| | | // éå¢ä»£ç ãéå¢éå ç ä¸å¯ä»¥æå·¥å½å
¥æ°æ® |
| | |
| | | |
| | | return compt; |
| | | } |
| | | /** |
| | | * å¤ç䏿æ¡çäºä»¶ |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | class NextComboAction implements ActionListener { |
| | | private int column = 0; |
| | | private VCIJComboxBox curCombo = null; |
| | | private VCIJComboxBox[] secCombos = null; |
| | | |
| | | public NextComboAction(int column,VCIJComboxBox curCombo,VCIJComboxBox[] secCombos) { |
| | | this.column = column; |
| | | this.curCombo = curCombo; |
| | | this.secCombos = secCombos; |
| | | } |
| | | |
| | | public void actionPerformed(ActionEvent e) { |
| | | VCIJComboxBox nextCombo = secCombos[column+1]; |
| | | if(curCombo.getSelectedIndex() != -1){ |
| | | CodeClassifyValue obj = (CodeClassifyValue)curCombo.getSelectedItem(); |
| | | initNextCombo(column+1, nextCombo, obj, column,secCombos); |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * åå§åä¸ä¸ä¸ªä¸æå表 |
| | | * @param column |
| | | * @param curCombo |
| | | * @param lastObj ä¸ä¸ä¸ªéä¸çåç±»ç æ®µç å¼ç对象ï¼åªé对åç±»ç ï¼ |
| | | */ |
| | | public void initNextCombo(int column,VCIJComboxBox curCombo,CodeClassifyValue lastObj,int lastColumn,VCIJComboxBox[] secCombos) { |
| | | |
| | | final VCIJComboxBox nextCombo = curCombo; |
| | | CodeBasicSecVO lastSecObj = columnSecMap.get(lastColumn); |
| | | final CodeBasicSecVO nextSecObj = columnSecMap.get(column); |
| | | |
| | | if(nextSecObj == null) {//妿å颿²¡æå¯¹è±¡ï¼åè¿å |
| | | return; |
| | | } |
| | | |
| | | boolean isContinue = false; |
| | | if(nextSecObj.getSecType().equals("codeclassifysec")){//妿å½åæ¯åç±»ç |
| | | CodeBasicSecVO curObj =nextSecObj; |
| | | if(lastSecObj.getSecType().equals("codeclassifysec") |
| | | && curObj.getParentClassifySecOid().equals(lastSecObj.getOid())){ |
| | | isContinue = true; |
| | | } |
| | | } |
| | | if(lastObj == null || !isContinue){//妿å½ååç䏿æ¡å·²ç»åå§è¿,å¹¶ä¸ä¸ä¸åç±»ç 䏿¯å½ååç±»ç çç¶ |
| | | return; |
| | | } |
| | | VCIJComboxBox lastColumnComboxBox= secCombos[lastColumn]; |
| | | |
| | | if(nextSecObj.getSecType().equals("codeclassifysec")){//åç±»ç |
| | | CodeClassifyValue[] clsfCodeVals = new CodeClassifyValue[]{}; |
| | | //妿ä¸ä¸ä¸ªæ¯åç±»ç ,并䏿¯å½ååç±»ç çç¶ |
| | | /*if (isContinue) { |
| | | clsfCodeVals = clsfCodeValDel.getChildClsfCodeVal(lastObj.getOid()); |
| | | } else { |
| | | clsfCodeVals = clsfCodeValDel.getSecRootClsfCodeVal(nextSecObj.getOid());//è·åè¯¥ç æ®µä¸çææç 段ç å¼å¯¹è±¡ |
| | | }*/ |
| | | String parentClassifyValueOid=""; |
| | | if(lastColumnComboxBox!=null){ |
| | | CodeClassifyValue selectedItem = (CodeClassifyValue)lastColumnComboxBox.getSelectedItem(); |
| | | if(selectedItem!=null) |
| | | parentClassifyValueOid= selectedItem.getOid(); |
| | | |
| | | } |
| | | Map<String,String> condtionMap=new HashMap<>(); |
| | | condtionMap.put("secOid", nextSecObj.getOid()); |
| | | condtionMap.put("parentClassifyValueOid",parentClassifyValueOid); |
| | | Map<String,String> headerMap=new HashMap<>(); |
| | | headerMap.put("Blade-Auth",this.tokenUserObject.getAccess_token()); |
| | | R r=HttpUtil.sendGet(url+"/listCodeClassifyValueBySecOid",condtionMap,headerMap); |
| | | 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 TypeReference<List<CodeClassifyValue>>() {}); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | }else{ |
| | | VCIOptionPane.showMessage(this,r.getMsg()); |
| | | } |
| | | |
| | | DefaultComboBoxModel model = new DefaultComboBoxModel(); |
| | | for(int i = 0;i< codeClassifyValueList.size();i++) { |
| | | /*if(!codeClassifyValueList.get(i).getOid().equals(nextSecObj.getOid())) { |
| | | continue; |
| | | }*/ |
| | | model.addElement(codeClassifyValueList.get(i)); |
| | | } |
| | | |
| | | /*Map<String, String> secValMap = getSpecialValMap(specialSecVals); |
| | | if(isSpecialRuleFlag && (lastSecObj.getName().equals(specialControlSecName) && secValMap.containsKey(lastObj.getValue())) || secValMap.containsKey(getControlSecSelectValue())) { |
| | | setComponentStatus(false); |
| | | }else { |
| | | setComponentStatus(true); |
| | | }*/ |
| | | /******************END************************/ |
| | | |
| | | nextCombo.setModel(model); |
| | | nextCombo.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent arg0) { |
| | | ((VCIJTextField)secIdToClsfIdMap.get(nextSecObj.getId())).setText(((CodeClassifyValue)nextCombo.getSelectedItem()).getName()); |
| | | } |
| | | }); |
| | | |
| | | if(nextCombo.getSelectedItem() != null) { |
| | | ((VCIJTextField)secIdToClsfIdMap.get(lastSecObj.getId())).setText(lastObj.getName()); |
| | | ((VCIJTextField)secIdToClsfIdMap.get(nextSecObj.getId())).setText(((CodeClassifyValue)nextCombo.getSelectedItem()).getName()); |
| | | } |
| | | |
| | | //ä¿®å¤éæ©åç±»ç æ®µç å¼åï¼ææçååç±»çç æ®µç å¼ä¸è½æ´æ°çé®é¢ |
| | | int k = column + 1; |
| | | if(k < columnSecMap.size() && columnSecMap.get(k).getSecType().equals("codeclassifysec")) { |
| | | CodeBasicSecVO currentSecObj = columnSecMap.get(k); |
| | | // SortSecObject curObj = new SectionClientDelegate(userObj).fetchSortSecById(currentSecObj.getId()); |
| | | if (secPositionMap.get(currentSecObj.getParentClassifySecOid()) != null) { |
| | | // secCombos[column].addActionListener(new NextComboAction(secPositionMap.get(curObj.getId()), comMap.get(curObj.getId()),secCombos)); |
| | | CodeClassifyValue nextClsfCodeValObj = (CodeClassifyValue)comMap.get(currentSecObj.getParentClassifySecOid()).getSelectedItem() == null ? new CodeClassifyValue():(CodeClassifyValue)comMap.get(currentSecObj.getParentClassifySecOid()).getSelectedItem(); |
| | | initNextCombo(k,secCombos[k],nextClsfCodeValObj,secPositionMap.get(currentSecObj.getParentClassifySecOid()),secCombos); |
| | | } |
| | | // k++; |
| | | } |
| | | /*if (nextCombo.getItemCount() > 10){ |
| | | if (!nextCombo.isFlag()){ |
| | | nextCombo.setFlag(true); |
| | | nextCombo.getSearchBtn().setVisible(true); |
| | | nextCombo.getSearchBtn().addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | doSearch(nextCombo); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }else { |
| | | nextCombo.setFlag(false); |
| | | nextCombo.getSearchBtn().setVisible(false); |
| | | }*/ |
| | | }else if(nextSecObj.getSecType().equals("codefixedsec")){//åºå®ç |
| | | Map<String, String> secValMap = getSpecialValMap(specialSecVals); |
| | | /*if(isSpecialRuleFlag && (lastSecObj.getName().equals(specialControlSecName) && secValMap.containsKey(lastObj.getValue())) || secValMap.containsKey(getControlSecSelectValue())) { |
| | | setComponentStatus(false); |
| | | }else { |
| | | setComponentStatus(true); |
| | | }*/ |
| | | /******************END************************/ |
| | | |
| | | // SectionValueClientDelegate codeValDel = new SectionValueClientDelegate(userObj); |
| | | //FixCodeValObject[] codeValObjs = codeValDel.fetchFixCodeValBySecId(nextSecObj.getId());//è·åè¯¥ç æ®µä¸çææç 段ç å¼å¯¹è±¡ |
| | | List<CodeFixedValueVO> fixedValueVOList=nextSecObj.getFixedValueVOList(); |
| | | for(int i = 0;i< fixedValueVOList.size();i++) { |
| | | nextCombo.addItem(fixedValueVOList.get(i)); |
| | | } |
| | | /*if (nextCombo.getItemCount() > 10){ |
| | | if (!nextCombo.isFlag()){ |
| | | nextCombo.setFlag(true); |
| | | nextCombo.getSearchBtn().setVisible(true); |
| | | nextCombo.getSearchBtn().addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | doSearch(nextCombo); |
| | | } |
| | | }); |
| | | } |
| | | }else { |
| | | nextCombo.setFlag(false); |
| | | nextCombo.getSearchBtn().setVisible(false); |
| | | }*/ |
| | | }else if(nextSecObj.getSecType().equals("codedatesec")){//æ¥æç æ®µ |
| | | // DateSecObject dateObj = secDel.fetchDateSecById(nextSecObj.getId()); |
| | | |
| | | String df =nextSecObj.getCodeDateFormatStr(); |
| | | String CodeDateValue= nextSecObj.getCodeDateValue(); |
| | | SimpleDateFormat dateFormate = new SimpleDateFormat(df); |
| | | if(StringUtils.isBlank(CodeDateValue)){ |
| | | CodeDateValue= dateFormate.format(Calendar.getInstance().getTime()); |
| | | } |
| | | nextCombo.addItem(CodeDateValue); |
| | | /*if(dateObj.getIsModify().equals("Y")){ |
| | | nextCombo.setEditable(true); |
| | | }*/ |
| | | }/*else if(nextSecObj.getSecType() equals("")){//åé符 |
| | | nextCombo.addItem(nextSecObj.getId());}*/ |
| | | else if (nextSecObj.getSecType().equals("coderefersec")) { |
| | | if (!nextCombo.isFlag()){ |
| | | nextCombo.setFlag(true); |
| | | nextCombo.getSearchBtn().setVisible(true); |
| | | nextCombo.getSearchBtn().addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | doSearch(nextCombo,nextSecObj); |
| | | } |
| | | }); |
| | | } |
| | | }else { |
| | | nextCombo.setEditable(true); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /**** |
| | | * æ ¹æ®å±æ§idè·å屿§åå¼èå´çå¼ |
| | | * <p>Description: </p> |
| | |
| | | VCIOptionPane.showMessage(this,r.getMsg()); |
| | | } |
| | | } |
| | | /** |
| | | * æ ¹æ®å¼ç¨æ¨¡æ¿çidè·åå¼ç¨æ¨¡æ¿å¯¹è±¡å
å«çæ°æ® |
| | | * <p>Description: </p> |
| | | * |
| | | * @author liujw |
| | | * @time 2012-11-29 |
| | | * @param //referTempId å¼ç¨æ¨¡æ¿id |
| | | */ |
| | | /** |
| | | * æ ¹æ®å¼ç¨æ¨¡æ¿çidè·åå¼ç¨æ¨¡æ¿å¯¹è±¡å
å«çæ°æ® |
| | | * <p>Description: </p> |
| | | * |
| | | * @author liujw |
| | | * @time 2012-11-29 |
| | | * @param //referTempId å¼ç¨æ¨¡æ¿id |
| | | */ |
| | | private void getReferTempRMData(final CodeClassifyTemplateAttrVO tempPropObj,final LinkedHashMap<String, JComponent> attrIdToCtrlMaps, |
| | | final List<CodeClassifyTemplateAttrVO> tempPropList) { |
| | | // æ¬ç©ºçªå£è°ç¨ æå¯è½æ¥èªä¸¤å¤ |
| | |
| | | }*/ |
| | | keyValue= dialog.getKeyValue(); |
| | | //for(CodeClassifyTemplateAttrVO obj : tempPropList) { |
| | | if(attrIdToCtrlMaps.containsKey(tempPropObj.getId())) { |
| | | JComponent comp = attrIdToCtrlMaps.get(tempPropObj.getId()); |
| | | if(attrIdToCtrlMaps.containsKey(tempPropObj.getId())) { |
| | | JComponent comp = attrIdToCtrlMaps.get(tempPropObj.getId()); |
| | | /*if(comp instanceof VCIJTextField) { |
| | | int index = innnerNamesMaps.get(tempPropObj.getInternalname()); |
| | | ((VCIJTextField) comp).setText(datas[index]); |
| | |
| | | int index = innnerNamesMaps.get(tempPropObj.getInternalname()); |
| | | ((VCIJCalendarPanel) comp).setDateString(datas[index]); |
| | | } else */ |
| | | if (comp instanceof VCIJComboBox) { |
| | | //DefaultComboBoxModel model = new DefaultComboBoxModel(); |
| | | if(keyValue!=null) { |
| | | AttrRangObjectWarper wrapper = new AttrRangObjectWarper(keyValue); |
| | | ((VCIJComboBox) comp).getModel().setSelectedItem(wrapper); |
| | | } |
| | | //model.addElement(wrapper); |
| | | //((VCIJComboBox) comp).setModel(model); |
| | | if (comp instanceof VCIJComboBox) { |
| | | //DefaultComboBoxModel model = new DefaultComboBoxModel(); |
| | | if(keyValue!=null) { |
| | | AttrRangObjectWarper wrapper = new AttrRangObjectWarper(keyValue); |
| | | ((VCIJComboBox) comp).getModel().setSelectedItem(wrapper); |
| | | } |
| | | //model.addElement(wrapper); |
| | | //((VCIJComboBox) comp).setModel(model); |
| | | } |
| | | } |
| | | //} |
| | | |
| | | } |
| | |
| | | } |
| | | /**æ ¡éªä¸ï¼å¯åç æ®µçæ ¡éª**/ |
| | | } else if (cType .equals( "codevariablesec")) { |
| | | tempStr = new StringBuffer(); |
| | | tempStr = new StringBuffer(); |
| | | String codeSecLength =secObj.getCodeSecLength(); |
| | | int secLen= Integer.parseInt(codeSecLength); |
| | | //ååºç¨æ·è¾å
¥çå¼ |
| | |
| | | } else if (secType.equals("codelevelsec")) {//å±çº§ç 段 |
| | | cVal = levelRes; |
| | | } else if (secType.equals("codeserialsec")) { |
| | | continue; |
| | | continue; |
| | | } else { |
| | | cVal = (String) ((VCIJComboBox) secAndComMap.get(secObj.getId())).getSelectedItem(); |
| | | } |
| | |
| | | // æ ¡éªé¿åº¦ |
| | | else if ((value != null && !value.equals("")) |
| | | && value.length() > Integer.valueOf(propObj.getControlLength()) |
| | | && !(propObj.getAttributeDataType().toUpperCase().equals(VciFieldTypeEnum.VTDate)|| |
| | | propObj.getAttributeDataType().toUpperCase().equals(VciFieldTypeEnum.VTDateTime)) |
| | | && !(propObj.getAttributeDataType().equals(VciFieldTypeEnum.VTDate.name())|| |
| | | propObj.getAttributeDataType().equals(VciFieldTypeEnum.VTDateTime.name())) |
| | | ) { |
| | | isExistError = true; |
| | | compt.requestFocus(); |