From 6bccfd2132c8523b5ebeffa772a8fa0e784d8165 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 01 八月 2023 10:17:50 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
---
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/ReferTreObject.java | 179 +++++
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CodeFixedValue.java | 8
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyFor410MainPanel.java | 160 +++-
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 45
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeReferTreePanel.java | 202 +++++
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 12
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanelDataProvider.java | 32
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/RMDataReferTempDialog.java | 115 ++-
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CodeClassifyValue.java | 10
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/attarSearchPanel.java | 163 ++++
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplySwingController.java | 43 +
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/UIFormRefers.java | 315 +++++++++
Source/UBCS/ubcs-codeApply/src/main/resources/properties/conf.properties | 14
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CoderefersecSearchVO.java | 68 +
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/UIFormRefer.java | 270 +++++++
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/enums/CodeReferConfigTypeEnum.java | 176 +++++
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 52
Source/UBCS-WEB/src/components/BatchImport/index.vue | 2
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyFor410TreePanel.java | 9
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/TestIntegrateFrame.java | 2
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanel.java | 127 +++
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyPanelFor410.java | 25
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanelActionListener.java | 24
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java | 10
24 files changed, 1,867 insertions(+), 196 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/BatchImport/index.vue b/Source/UBCS-WEB/src/components/BatchImport/index.vue
index c904bf3..d691ea9 100644
--- a/Source/UBCS-WEB/src/components/BatchImport/index.vue
+++ b/Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -253,7 +253,6 @@
});
},
onSuccess(res) {
- console.log('res',res)
if (Object.keys(res.data).length === 0) {
this.$message.success(this.title + "瀵煎叆鎴愬姛锛�");
this.dialogVisible = false;
@@ -263,7 +262,6 @@
const fileName = res.data.filePath.split("/").pop();
this.$message.error("璇蜂笅杞介敊璇俊鎭枃浠惰繘琛屾煡鐪嬶紒");
downloadErrorFile({ uuid: res.data.fileOid }).then((res2) => {
- console.log('res2',res2)
this.$utilFunc.downloadFileByBlob(res2.data, fileName);
});
}
diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
index 2fbc819..33e8bfe 100644
--- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -449,7 +449,6 @@
const result = this.$route.query.id.substring(0, index);
const oid = this.selectRow.map(obj => obj.oid).join(",");
changeStatus({ oid: oid, btmname: result, lcStatus: 'Disabled' }).then(res => {
- console.log(res);
if(res.data.code == 200 ){
this.$message.success('鍋滅敤鎴愬姛')
this.onLoad()
@@ -476,7 +475,6 @@
this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�");
} else {
let hasEditing = this.selectRow.every(item => item.lcstatus == 'Disabled');
- console.log('hasEditing',hasEditing)
let showMessage = true;
this.selectRow.forEach(item => {
if (this.selectRow.length === 1 && item.lcstatus !== "Disabled" && showMessage) {
@@ -502,7 +500,6 @@
const result = this.$route.query.id.substring(0, index);
const oid = this.selectRow.map(obj => obj.oid).join(",");
changeStatus({ oid: oid, btmname: result, lcStatus: 'Released' }).then(res => {
- console.log(res);
if(res.data.code == 200 ){
this.$message.success('鍚敤鎴愬姛')
this.onLoad()
@@ -535,7 +532,6 @@
// 鍋滅敤-鍙兘鍚敤銆佸洖鏀�
const disabledCount = this.selectRow.filter(item => item.lcstatus === 'Disabled').length;
const releasedCount = this.selectRow.filter(item => item.lcstatus === 'Released').length;
- console.log('hasEditing',disabledCount,releasedCount)
let showMessage = true;
this.selectRow.forEach(item => {
if (this.selectRow.length === 1 && item.lcstatus == "TakeBack" && showMessage) {
@@ -562,7 +558,6 @@
const result = this.$route.query.id.substring(0, index);
const oid = this.selectRow.map(obj => obj.oid).join(",");
changeStatus({ oid: oid, btmname: result, lcStatus: 'TakeBack' }).then(res => {
- console.log(res);
if(res.data.code == 200 ){
this.$message.success('鍥炴敹鎴愬姛')
this.onLoad()
@@ -621,7 +616,6 @@
},
doLayout() {
this.$nextTick(() => {
- console.log(this.$refs)
this.$refs.crud.doLayout();
});
},
@@ -703,7 +697,6 @@
list.forEach((item) => {
this.parameter.ids.push(item.oid);
});
- console.log(this.selectRow)
},
//閫夋嫨
handleSelection(list, row) {
@@ -740,7 +733,6 @@
codeClassifyOid: this.codeClassifyOid,
...val,
}).then((res) => {
- console.log(res);
this.tableData = res.data.data;
this.page.total = res.data.total
});
@@ -770,9 +762,7 @@
//澧炲姞淇濆瓨
AddSumbit(val) {
this.addvisible = false;
- console.log(val)
addSaveCode(val).then(res => {
- console.log(res)
this.$nextTick(() => {
this.onLoad()
})
@@ -780,9 +770,7 @@
},
EditSumbit(val) {
this.editvisible = false;
- console.log(val)
editSaveCode(val).then(res => {
- console.log(res)
this.$nextTick(() => {
this.onLoad()
})
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 3f35190..34a0cec 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -414,7 +414,6 @@
}
},
'injectOption.classifyInvokeAttr': function(newVal) {
- console.log('newVal',newVal)
if (newVal === "name") {
this.injectOption.classifyInvokeAttrName='鍒嗙被鍚嶇О'
} else if (newVal === "id") {
@@ -1485,9 +1484,6 @@
})
},
methods: {
- formAttr(row, column) {
- console.log(row,column)
- },
//鏂板鎼滅储
AddFindHandler(){
if(this.SelectValue == 'id'){
@@ -1508,7 +1504,6 @@
},
//鍙傜収閰嶇疆瀛愮粍浠�
echoReferConfig(val){
- console.log('val--',val)
this.referObject=val
this.$set(this.CurrentCell,'referConfig',JSON.stringify(val))
@@ -1529,12 +1524,10 @@
this.$message.warning('璇烽�夋嫨妯℃澘灞炴��')
} else {
this.attrVisible = true;
- console.log(this.attrSelectList)
}
},
//灞炴�у垎缁勬彁浜�
attrHandle() {
- console.log(this.attrSelectList)
this.attrSelectList.forEach(item=>{
item.attributeGroup=this.attrModel
})
@@ -1611,7 +1604,6 @@
//涓氬姟绫诲瀷閫夋嫨
businessSelect(selection, row) {
this.busineSelectList = selection;
- console.log(selection)
},
// 浠庝笟鍔$被鍨嬩腑閫夋嫨鏁版嵁寮圭獥
busineHandle() {
@@ -1670,7 +1662,6 @@
selectHandle(selection, row) {
this.attrOid = row.oid;
this.attrRow = row;
- console.log(row)
},
//琛ㄦ牸閫夋嫨
selectionChange(list) {
@@ -1712,10 +1703,19 @@
referConfig:'',
}
}
- console.log('--',this.referConfigOption)
// this.$refs.referConfigFormDialog.onloadAttrData();
}else if(column.property == 'classifyInvokeText'){
- this.injectVisible=true;
+ if (this.CurrentCell.classifyInvokeAttr != '') {
+ this.injectOption = {
+ classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr,
+ classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName,
+ classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag,
+ classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max',
+ classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel
+ };
+ } else {
+ this.injectHandleReset();
+ }
}else if(column.property == 'componentRule'){
if(this.CurrentCell){
this.CurrentCell.componentRule=this.componentRuleText;
@@ -1733,7 +1733,6 @@
'conditionMap[oid_notequal]': this.CurrentCell.oid,
limit:-1
}).then(res => {
- console.log(res)
this.CascadeData = res.data.data;
})
this.CascadeVisible=true;
@@ -1854,7 +1853,6 @@
},
//楠岃瘉瑙勫垯妫�鏌�
rulesExamine() {
- console.log(this.RulesForm.expressionText)
const regex = new RegExp(this.rulesData.ruleRowBds);
if(regex.test(this.RulesForm.TestContent)){
this.$message.success('鏍¢獙鎴愬姛')
@@ -1879,23 +1877,6 @@
"灞傜骇璁剧疆": this.injectOption.classifyInvokeLevel=='max'?this.injectOption.classifyNumber :'min',
"鏄惁鍙慨鏀�": this.injectOption.classifyInvokeEditFlag
}
- //鍗曞厓鏍肩紪杈戣祴鍊间竴閬�
- // noinspection JSCheckFunctionSignatures
- if(this.CurrentCell){
- //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧
- if(this.injectOption.classifyInvokeLevel!== 'min'){
- this.CurrentCell.classifyInvokeLevel=this.injectOption.classifyNumber
- }else {
- this.CurrentCell.classifyInvokeLevel='min'
- }
- //鍏朵綑姝e父璧嬪��
- this.CurrentCell.classifyInvokeAttr=this.injectOption.classifyInvokeAttr,
- this.CurrentCell.classifyInvokeAttrName=this.injectOption.classifyInvokeAttrName,
- this.CurrentCell.classifyInvokeEditFlag=this.injectOption.classifyInvokeEditFlag,
- // this.$set(this.CurrentCell, 'classifyInvokeText', data)
- this.CurrentCell.classifyInvokeText = data;
- this.injectHandleReset()
- }else {
//鍕鹃�夋搷浣�
for (const key in this.injectOption) {
this.attrSelectList[0][key] = this.injectOption[key];
@@ -1908,7 +1889,6 @@
this.$set(this.attrSelectList[0],'classifyInvokeText',data)
}
this.injectHandleReset()
- }
if(this.injectOption.classifyInvokeLevel !== 'min'){
this.injectOption.classifyInvokeLevel=this.injectOption.classifyNumber;
}else {
@@ -1927,7 +1907,8 @@
},
// 鍒嗙被娉ㄥ叆鍙栨秷
injectRemove() {
- this.injectVisible = false
+ this.injectVisible = false;
+ this.injectHandleReset()
},
//灞炴�фā鏉胯〃鏍煎崟鍏冩牸鐐瑰嚮浜嬩欢
//琛ㄦ牸鎿嶄綔鏍忓垹闄�
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index 8b4cadb..8e63b85 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -731,11 +731,7 @@
},
watch:{
- FormList:{
- handler(newval,oldval){
- console.log('FormList',newval)
- }
- }
+
},
methods: {
/** 瀵煎叆 */
@@ -746,17 +742,12 @@
ExportExcel(){
if(this.nodeClickList){
exportClassify({oid:this.nodeClickList.oid}).then(res=>{
- console.log(res)
func.downloadFileByBlob(res);
})
}else {
this.$message.warning('璇峰厛閫夋嫨瑕佸鍑虹殑涓婚搴撳垎绫�')
}
},
- //妯℃澘绠$悊宸插彂甯冪紪杈�
- // checkShowEditBtn() {
- // this.showEditBtn = this.Formlist.some(item => item.lcStatus === 'Released');
- // },
//缂栫爜瑙勫垯澶辩劍
CodeFoucus(){
this.MasterdialogVisible=true;
@@ -1203,7 +1194,6 @@
return item.codeclassifyoid == this.nodeClickList.oid
}
})
- console.log('form',this.Formlist)
if(this.Formlist.length >= 1){
this.crudLCStatus=this.Formlist[this.selectRow].lcStatus;
this.crudArray.push(this.Formlist[this.selectRow]);
@@ -1314,7 +1304,6 @@
});
} else {
this.$set(row, "codeclassifyoid", this.nodeClickList.oid)
- console.log(this.nodeClickList)
addSave(row).then(() => {
this.$message({
type: "success",
@@ -1354,20 +1343,6 @@
});
})
},
- //妯℃澘绠$悊琛ㄦ牸鏌ヨ,鍙湁涓�鏉℃暟鎹病蹇呰鍋氭悳绱�
- /*nterFind() {
- if (this.findText == "") {
- gridCodeClassifyTemplate().then(res => {
- this.Formlist = res.data.data
- })
- } else {
- gridCodeClassifyTemplate().then(res => {
- this.Formlist = res.data.data.filter(item => {
- return item.name.includes(this.findText)
- })
- })
- }
- },*/
//鍏嬮殕妯℃澘鏌ヨ
CloneEnterFind(){
gridCodeClassifyTemplate().then(res => {
@@ -1448,8 +1423,29 @@
this.Formlist = res.data.data.filter(item => {
return item.codeclassifyoid == this.nodeClickList.oid
})
- this.crudLCStatus=this.Formlist[this.selectRow].lcStatus;
- this.crudArray.push(this.Formlist[this.selectRow]);
+ gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': res.data.data[this.selectRow].oid,limit:-1}).then(res => {
+ this.ProData = res.data.data;
+ //鍒嗙被娉ㄥ叆鏁版嵁鏍煎紡
+ this.ProData = res.data.data.map((item) => {
+ //濡傛灉鍒嗙被娉ㄥ叆classifyInvokeAttr涓虹┖璇存槑鏄垵濮嬬姸鎬�
+ if(item.classifyInvokeAttr !== ''){
+ if (!item.hasOwnProperty('classifyInvokeText')) { // 妫�鏌lassifyInvokeText灞炴�ф槸鍚﹀瓨鍦�
+ item = {
+ ...item,
+ classifyInvokeText: {
+ "娉ㄥ叆绫诲瀷": item.classifyInvokeAttr,
+ "娉ㄥ叆绫诲瀷鍚嶇О": item.classifyInvokeAttrName,
+ "灞傜骇璁剧疆": item.classifyInvokeLevel,
+ "鏄惁鍙慨鏀�": item.classifyInvokeEditFlag
+ }
+ };
+ }
+ }
+ return item;
+ });
+ }).catch(res => {
+ this.$message.error(res)
+ })
})
} else {
this.FormLoing = true
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyFor410MainPanel.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyFor410MainPanel.java
index 8854c9f..a28ca65 100644
--- a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyFor410MainPanel.java
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyFor410MainPanel.java
@@ -5,10 +5,7 @@
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;
@@ -16,6 +13,8 @@
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;
@@ -25,8 +24,11 @@
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;
@@ -34,7 +36,7 @@
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";
@@ -141,11 +143,11 @@
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();
@@ -545,6 +547,7 @@
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];
@@ -552,27 +555,56 @@
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);
+ /**浠g爜椤逛笅鎷変簨浠�**/
+ 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);
@@ -587,19 +619,51 @@
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")) {
@@ -630,13 +694,13 @@
}
*/} 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();
@@ -1003,11 +1067,11 @@
*/
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();
@@ -1143,13 +1207,13 @@
// 娴佺▼浠诲姟寮曠敤
// 涓�鑸殑鏁版嵁褰曞叆銆佷慨鏀�
// 涓嶅悓鐨勬潵婧愶紝闇�瑕佺淮鎶ゅソ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() {
@@ -1185,9 +1249,9 @@
//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);
}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyFor410TreePanel.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyFor410TreePanel.java
index a0d374a..9aa335b 100644
--- a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyFor410TreePanel.java
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyFor410TreePanel.java
@@ -35,6 +35,7 @@
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");
/**
* 瀛樺偍鍒嗙被鐨凪ap,key:鍒嗙被鍚嶇О锛寁alue锛氬垎绫诲��
*/
@@ -172,13 +173,13 @@
*/
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();
@@ -207,11 +208,11 @@
* @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();
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyPanelFor410.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyPanelFor410.java
index 1ec0baa..2cdfa93 100644
--- a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyPanelFor410.java
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeApplyPanelFor410.java
@@ -66,6 +66,10 @@
//宸︿晶鏍�
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
@@ -160,13 +164,12 @@
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();
@@ -257,11 +260,11 @@
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<>();
@@ -279,9 +282,9 @@
e.printStackTrace();
}
}
- }else{
+ }/*else{
VCIOptionPane.showMessage(this,r.getMsg());
- }
+ }*/
initBtnStatus(res);
}
}
@@ -302,11 +305,11 @@
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();
@@ -322,9 +325,9 @@
e1.printStackTrace();
}
}
- }else{
+ }/*else{
VCIOptionPane.showMessage(this.owner,r.getMsg());
- }
+ }*/
}
initBtnStatus(res);
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanel.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanel.java
new file mode 100644
index 0000000..7edc4bf
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanel.java
@@ -0,0 +1,127 @@
+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;
+ }
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanelActionListener.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanelActionListener.java
new file mode 100644
index 0000000..7729eae
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanelActionListener.java
@@ -0,0 +1,24 @@
+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() {
+ }
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanelDataProvider.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanelDataProvider.java
index 1e15362..2f8e824 100644
--- a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanelDataProvider.java
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanelDataProvider.java
@@ -2,17 +2,42 @@
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
@@ -21,7 +46,8 @@
}
@Override
- public T[] getDatas(int i, int i1) {
+ public T[] getDatas(int pageIndex, int pageSize) {
+
return new T[0];
}
}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeReferTreePanel.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeReferTreePanel.java
new file mode 100644
index 0000000..08ca49b
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeReferTreePanel.java
@@ -0,0 +1,202 @@
+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;
+ }
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/RMDataReferTempDialog.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/RMDataReferTempDialog.java
index 3297df7..21e4575 100644
--- a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/RMDataReferTempDialog.java
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/RMDataReferTempDialog.java
@@ -3,31 +3,40 @@
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());
@@ -38,10 +47,8 @@
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;
@@ -56,37 +63,37 @@
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) {
@@ -95,9 +102,37 @@
}
}
});
- 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() {
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/TestIntegrateFrame.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/TestIntegrateFrame.java
index 707c812..9fe2faa 100644
--- a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/TestIntegrateFrame.java
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/TestIntegrateFrame.java
@@ -31,7 +31,7 @@
// 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();
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/attarSearchPanel.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/attarSearchPanel.java
new file mode 100644
index 0000000..d132291
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/attarSearchPanel.java
@@ -0,0 +1,163 @@
+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>杩斿洖鍚勪釜灞炴�х粡杩囨嫾鎺ュ悗鐨勬煡璇QL璇彞</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銆佸皢杈撳叆鐨勬潯浠朵腑鐨�*鏇挎崲涓�%锛孹XX*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("");
+ }
+
+ }
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/enums/CodeReferConfigTypeEnum.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/enums/CodeReferConfigTypeEnum.java
new file mode 100644
index 0000000..c5fa41f
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/enums/CodeReferConfigTypeEnum.java
@@ -0,0 +1,176 @@
+package com.vci.ubcs.codeapply.enums;
+
+import com.vci.ubcs.starter.web.enumpck.BaseEnum;
+
+/**
+ * 鍙傜収閰嶇疆涓敤鍒扮殑鈥斺�旂獥鍙g被鍨�
+ * @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 鏋氫妇瀵硅薄锛屼笉瀛樺湪鏃跺�欒繑鍥瀗ull
+ */
+ public static CodeReferConfigTypeEnum forValue(String value) {
+ for (CodeReferConfigTypeEnum wenum : CodeReferConfigTypeEnum.values()) {
+ if (wenum.getValue().equalsIgnoreCase(value)) {
+ return wenum;
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CodeClassifyValue.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CodeClassifyValue.java
new file mode 100644
index 0000000..363a753
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CodeClassifyValue.java
@@ -0,0 +1,10 @@
+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();
+ }
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CodeFixedValue.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CodeFixedValue.java
new file mode 100644
index 0000000..968e6cc
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CodeFixedValue.java
@@ -0,0 +1,8 @@
+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();
+ }
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CoderefersecSearchVO.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CoderefersecSearchVO.java
new file mode 100644
index 0000000..af7196c
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/CoderefersecSearchVO.java
@@ -0,0 +1,68 @@
+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 +
+ '}';
+ }
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/ReferTreObject.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/ReferTreObject.java
new file mode 100644
index 0000000..a932dba
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/ReferTreObject.java
@@ -0,0 +1,179 @@
+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 +
+ '}';
+ }
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/UIFormRefer.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/UIFormRefer.java
new file mode 100644
index 0000000..756f223
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/UIFormRefer.java
@@ -0,0 +1,270 @@
+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 +
+ '}';
+ }
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/UIFormRefers.java b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/UIFormRefers.java
new file mode 100644
index 0000000..9806efc
--- /dev/null
+++ b/Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/object/UIFormRefers.java
@@ -0,0 +1,315 @@
+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;
+ /**
+ * 鍙傜収鐨勭獥鍙g被鍨�
+ */
+ 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;
+
+ /**
+ * 鍙傜収鐨刄I涓婁笅鏂�
+ */
+ 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;
+ }
+}
diff --git a/Source/UBCS/ubcs-codeApply/src/main/resources/properties/conf.properties b/Source/UBCS/ubcs-codeApply/src/main/resources/properties/conf.properties
index ab137d0..669a14f 100644
--- a/Source/UBCS/ubcs-codeApply/src/main/resources/properties/conf.properties
+++ b/Source/UBCS/ubcs-codeApply/src/main/resources/properties/conf.properties
@@ -19,17 +19,7 @@
#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
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplySwingController.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplySwingController.java
index 864a2a9..1ab780e 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplySwingController.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplySwingController.java
@@ -3,11 +3,16 @@
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;
@@ -40,6 +45,11 @@
* 妯℃澘灞炴�ф湇鍔�
*/
private final ICodeClassifyTemplateAttrService codeClstempattrService;
+
+ /***
+ * 鍒嗙被鐮佹鏈嶅姟
+ */
+ private final ICodeClassifyValueService codeClassifyValueService;
/**
* 鑾峰彇搴撹妭鐐逛俊鎭�
* @param libName 搴撹妭鐐瑰悕绉�
@@ -110,4 +120,37 @@
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);
+ }
}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java
index 0de9edd..e849ba0 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java
@@ -16,7 +16,6 @@
*/
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;
@@ -41,6 +40,7 @@
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;
@@ -1100,9 +1100,13 @@
// 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;
}
--
Gitblit v1.9.3