From 4470052c3b6bdeb18e45987f8aa293d1e93d0552 Mon Sep 17 00:00:00 2001
From: Ludc <2870569285@qq.com>
Date: 星期二, 18 十一月 2025 11:59:12 +0800
Subject: [PATCH] 所有文件上传接口增加文件安全校验逻辑。
---
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/rmip/code/client/codeapply/Apply410/CodeApplyFor410MainPanel.java | 451 +++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 348 insertions(+), 103 deletions(-)
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/rmip/code/client/codeapply/Apply410/CodeApplyFor410MainPanel.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/rmip/code/client/codeapply/Apply410/CodeApplyFor410MainPanel.java
index b6e9a52..0fa8035 100644
--- a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/rmip/code/client/codeapply/Apply410/CodeApplyFor410MainPanel.java
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/rmip/code/client/codeapply/Apply410/CodeApplyFor410MainPanel.java
@@ -17,7 +17,6 @@
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;
@@ -47,6 +46,11 @@
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";
@@ -171,13 +175,13 @@
} catch (IOException e) {
e.printStackTrace();
}
-
+
}
}else{
/* if(!r.getMsg().equals("褰撳墠涓婚搴撳垎绫伙紝浠ュ強瀹冪殑鎵�鏈夌殑涓婄骇鍒嗙被閮芥病鏈夎缃紪鐮佽鍒�")){
VCIOptionPane.showMessage(this,r.getMsg());
}*/
- }
+ }
/**鍔犺浇瑙勫垯瀵瑰簲鐨勭爜娈典俊鎭�**/
if(codeRuleVO!=null){
List<CodeBasicSecVO> codeBasicSecVOList=codeRuleVO.getSecVOList();
@@ -559,10 +563,10 @@
* @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];
@@ -573,6 +577,29 @@
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);
@@ -609,6 +636,12 @@
}
}
secIdTOListValueOidMap.put(secObj.getOid(),valueOidList);
+ lastSecObj = secObj;
+ hisCombo = secCombo;
+
+ secMap.put(secObj.getOid(), secObj);
+ comMap.put(secObj.getOid(), secCombo);
+ secPositionMap.put(secObj.getOid(),k);
/**浠g爜椤逛笅鎷変簨浠�**/
secCombo.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -641,17 +674,17 @@
// 鏄浐瀹氱爜
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);
@@ -673,30 +706,30 @@
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);
@@ -724,13 +757,13 @@
}
*/} 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();
@@ -828,7 +861,7 @@
lbl.setToolTipText("鐐瑰嚮姝ゅ鑾峰彇妯℃澘瀵瑰簲瑙勫垯鐨勫��");
lbl.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e){
- getComptAttrValue(attrObj,attrIdToCtrlMaps);
+ getComptAttrValue(attrObj,attrIdToCtrlMaps);
}
});
@@ -997,7 +1030,7 @@
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");
@@ -1010,34 +1043,34 @@
}
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())){
@@ -1049,20 +1082,20 @@
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;
// 闆嗗洟浠g爜銆侀泦鍥㈤檮鍔犵爜涓嶅彲浠ユ墜宸ュ綍鍏ユ暟鎹�
@@ -1075,6 +1108,218 @@
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);
+ }
+ }
+
+
+
/****
* 鏍规嵁灞炴�d鑾峰彇灞炴�у彇鍊艰寖鍥寸殑鍊�
* <p>Description: </p>
@@ -1259,14 +1504,14 @@
VCIOptionPane.showMessage(this,r.getMsg());
}
}
- /**
- * 鏍规嵁寮曠敤妯℃澘鐨刬d鑾峰彇寮曠敤妯℃澘瀵硅薄鍖呭惈鐨勬暟鎹�
- * <p>Description: </p>
- *
- * @author liujw
- * @time 2012-11-29
- * @param //referTempId 寮曠敤妯℃澘id
- */
+ /**
+ * 鏍规嵁寮曠敤妯℃澘鐨刬d鑾峰彇寮曠敤妯℃澘瀵硅薄鍖呭惈鐨勬暟鎹�
+ * <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) {
// 鏈┖绐楀彛璋冪敤 鏈夊彲鑳芥潵鑷袱澶�
@@ -1295,8 +1540,8 @@
}*/
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]);
@@ -1304,16 +1549,16 @@
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);
}
+ }
//}
}
@@ -1402,7 +1647,7 @@
}
/**鏍¢獙涓夛細鍙彉鐮佹鐨勬牎楠�**/
} else if (cType .equals( "codevariablesec")) {
- tempStr = new StringBuffer();
+ tempStr = new StringBuffer();
String codeSecLength =secObj.getCodeSecLength();
int secLen= Integer.parseInt(codeSecLength);
//鍙栧嚭鐢ㄦ埛杈撳叆鐨勫��
@@ -1585,7 +1830,7 @@
} else if (secType.equals("codelevelsec")) {//灞傜骇鐮佹
cVal = levelRes;
} else if (secType.equals("codeserialsec")) {
- continue;
+ continue;
} else {
cVal = (String) ((VCIJComboBox) secAndComMap.get(secObj.getId())).getSelectedItem();
}
@@ -1660,8 +1905,8 @@
// 鏍¢獙闀垮害
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();
--
Gitblit v1.9.3