Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -18,6 +18,15 @@ <el-input v-model="WupinFindValue" placeholder="请è¾å ¥å ³é®åæå车æ¥è¯¢" size="small" style="width: 180px; margin-left: 5px; margin-top: 10px" @keyup.enter.native="tableFindInp" v-if="tableData.length != 0"></el-input> <span style="margin-left: 10px" v-if="tableData.length != 0"> <p style="font-size: 13px;display: inline-block;"> ç¶æï¼</p> <el-select v-model="statusSelect" slot="prepend" placeholder="è¯·éæ©" size="small" @change="cellSelectHandler"> <el-option label="å ¨é¨" value="all"></el-option> <el-option label="å·²åå¸" value="Released"></el-option> <el-option label="ç¼è¾ä¸" value="Editing"></el-option> <el-option label="å·²åç¨" value="Disabled"></el-option> <el-option label="å®¡æ ¸ä¸" value="Auditing"></el-option> </el-select></span> </div> <el-table ref="dataTable" v-loading="isLoading" :data="tableData" :height="tableHeight" @@ -156,6 +165,7 @@ }, data() { return { statusSelect:"", searchResults: [], //é¦é¡µå³ä¾§æç´¢ WupinFindValue: "", @@ -234,11 +244,14 @@ hasDownload: true, hasUpload: true, height: 100 } }, result:'' }; }, computed: {}, created() { const index = this.$route.query.id.indexOf('@'); this.result = this.$route.query.id.substring(0, index); }, mounted() { }, @@ -263,6 +276,7 @@ }, tableDataArray: { handler(newval, oldval) { this.statusSelect='' this.tableData = newval; this.searchResults = newval this.doLayout() @@ -311,6 +325,10 @@ } }, methods: { //ç¶ææç´¢ cellSelectHandler(row){ console.log(row) }, //å±å¼éä»¶ handleCollapse(activeNames) { if (activeNames.length > 0) { @@ -386,7 +404,7 @@ processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { if (res.data.data.records && res.data.data.records.length!=0) { this.userName = localStorage.getItem("username"); this.parameter.template = this.userName + "-åå¸" + "[ç©å]"; this.parameter.template = this.userName + '-åå¸['+this.result+'-' + this.selectRow[0].name + ']'; this.parameter.type = 'PUBLIC'; this.parameter.code=this.templateOid this.title = 'æµç¨å®¡æ¹' @@ -397,11 +415,8 @@ cancelButtonText: 'åæ¶', type: 'warning' }).then(() => { const index = this.$route.query.id.indexOf('@'); const result = this.$route.query.id.substring(0, index); console.log(this.$route.query) const oid = this.selectRow.map(obj => obj.oid).join(","); changeStatus({ oid: oid, btmname: result, lcStatus: 'Released' }).then(res => { changeStatus({ oid: oid, btmname: this.result, lcStatus: 'Released' }).then(res => { if(res.data.code == 200 ){ this.$message.success('å叿å') this.onLoad() @@ -439,7 +454,7 @@ processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => { if (res.data.records != [] && res.data.data.records.length!=0) { this.userName = localStorage.getItem("username"); this.parameter.template = this.userName + "åç¨" + "[ç©å]"; this.parameter.template = this.userName + '-åç¨['+this.result+'-' + this.selectRow[0].name + ']'; this.parameter.type = 'DISABLE'; this.parameter.code=this.templateOid this.title = 'åç¨ï¼å»ç»ï¼ç¼ç æ°æ®' @@ -452,10 +467,8 @@ cancelButtonText: 'åæ¶', type: 'warning' }).then(() => { const index = this.$route.query.id.indexOf('@'); 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 => { changeStatus({ oid: oid, btmname: this.result, lcStatus: 'Disabled' }).then(res => { if(res.data.code == 200 ){ this.$message.success('åç¨æå') this.onLoad() @@ -492,7 +505,7 @@ if (res.data.data.records && res.data.data.records.length!=0) { this.parameter=res.data.data.records[0] this.userName = localStorage.getItem("username"); this.parameter.template = this.userName + "å¯ç¨" + "[ç©å]"; this.parameter.template = this.userName + '-å¯ç¨['+this.result+'-' + this.selectRow[0].name + ']'; this.parameter.type = 'Released'; this.parameter.code=this.templateOid this.title = 'å¯ç¨ç¼ç æ°æ®' @@ -505,10 +518,8 @@ cancelButtonText: 'åæ¶', type: 'warning' }).then(() => { const index = this.$route.query.id.indexOf('@'); 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 => { changeStatus({ oid: oid, btmname: this.result, lcStatus: 'Released' }).then(res => { if(res.data.code == 200 ){ this.$message.success('å¯ç¨æå') this.onLoad() @@ -551,7 +562,7 @@ processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => { if (res.data.records != [] && res.data.data.records.length!=0) { this.userName = localStorage.getItem("username"); this.parameter.template = this.userName + "åæ¶" + "[ç©å]"; this.parameter.template = this.userName + '-åæ¶['+this.result+'-' + this.selectRow[0].name + ']'; this.parameter.type = 'TakeBack'; this.parameter.code=this.templateOid this.title = 'åæ¶ç¼ç æ°æ®' @@ -564,10 +575,8 @@ cancelButtonText: 'åæ¶', type: 'warning' }).then(() => { const index = this.$route.query.id.indexOf('@'); 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 => { changeStatus({ oid: oid, btmname: this.result, lcStatus: 'TakeBack' }).then(res => { if(res.data.code == 200 ){ this.$message.success('åæ¶æå') this.onLoad() Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -88,6 +88,12 @@ <el-dialog :visible.sync="enumVisible" append-to-body title="æä¸¾æ³¨å ¥" :before-close="this.enumBeforeClose"> <!-- 渲æè¡¨æ ¼åæé® --> <!-- 渲æè¡¨æ ¼åæé® --> <el-alert title="请æ°å¢åç¹å»åå æ ¼è¾å ¥æä¸¾æ°æ®" type="success" style="margin-bottom: 10px;display: inline-block" :closable="false"> </el-alert> <div> <el-button icon="el-icon-plus" type="primary" @click="addRow">æ°å¢</el-button> <el-table :data="tableData" style="width: 100%" @cell-click="handleCellClick" @@ -1799,29 +1805,33 @@ }, //æä¸¾æ³¨å ¥ä¿å enumAddHandle() { let hasError = false; // æ·»å ä¸ä¸ªåé this.tableData.forEach((item, index) => { if (item.key === '') { this.$message.warning(`第${index + 1}è¡çé项å¼ä¸è½ä¸ºç©º`); hasError = true; return; } else if (item.value === '') { this.$message.warning(`第${index + 1}è¡çé项䏿æ ç¾ä¸è½ä¸ºç©º`); hasError = true; return; } }); // ä¿åæ§è¡é»è¾ if (!hasError) { if (this.CurrentCell) { this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData)); this.enumVisible = false; } else { this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData)); this.tableData=[]; this.enumVisible = false; } } if(this.tableData.length>=1){ let hasError = false; // æ·»å ä¸ä¸ªåé this.tableData.forEach((item, index) => { if (item.key === '') { this.$message.warning(`第${index + 1}è¡çé项å¼ä¸è½ä¸ºç©º`); hasError = true; return; } else if (item.value === '') { this.$message.warning(`第${index + 1}è¡çé项䏿æ ç¾ä¸è½ä¸ºç©º`); hasError = true; return; } }); // ä¿åæ§è¡é»è¾ if (!hasError) { if (this.CurrentCell) { this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData)); this.enumVisible = false; } else { this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData)); this.tableData=[]; this.enumVisible = false; } } }else { this.$message.warning('è¯·æ·»å æä¸¾æ³¨å ¥æ°æ®ï¼') } }, // å°æ£å¨ç¼è¾çè¡çç¶æå为 nullï¼å³éåºç¼è¾ç¶æ saveRow() { Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
@@ -92,7 +92,11 @@ <el-input style="width: 260px;margin-left: 15px" placeholder="è¾å ¥å¼åè¿è¡æ¨¡ç³æ¥è¯¢" v-model="SelectFInd"></el-input> <el-button size="small" type="primary" plain @click="BtmSelectFindeHandler" style="margin-left: 20px">æ¥è¯¢</el-button> </template> <avue-crud :data="BtmData" :option="masterOption" @select="btmSelect"></avue-crud> <avue-crud :data="BtmData" :option="masterOption" @row-click="btmSelect"> <template slot="radio" slot-scope="{row}"> <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio> </template> </avue-crud> <div style="height: 30px"> <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置çå¼ä¸º:[{{this.loneTreeNewForm.btmTypeName}}]</div> <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" > @@ -113,6 +117,7 @@ props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'], data() { return { masterRow:0, SelectFInd:"", masterName:"", masterOid:"", @@ -166,10 +171,15 @@ addBtn:false, index:true, border:true, selection:true, menu:false, height:380, column:[ { label: '', prop: 'radio', width: 60, display: false }, { label:'è±æåç§°', prop:'id' @@ -567,9 +577,9 @@ //ä¸å¡ç±»åå¤é btmSelect(row){ this.btmSelectList=row; this.btmName=row[0].name; this.btmOid=row[0].oid; this.btmId=row[0].id; this.btmName=row.name; this.btmOid=row.oid; this.btmId=row.id; }, //ä¸å¡ç±»åæ¥å£ btmdefaultRend(masterParameter){ Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -303,7 +303,11 @@ <el-input style="width: 260px;margin-left: 15px" placeholder="è¾å ¥å¼åè¿è¡æ¨¡ç³æ¥è¯¢" v-model="SelectFInd"></el-input> <el-button size="small" type="primary" plain @click="BtmSelectFindeHandler" style="margin-left: 20px">æ¥è¯¢</el-button> </template> <avue-crud :data="BtmData" :option="masterOption" @select="btmSelect"></avue-crud> <avue-crud :data="BtmData" :option="masterOption" @row-click="btmSelect"> <template slot="radio" slot-scope="{row}"> <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio> </template> </avue-crud> <div style="height: 30px"> <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置çå¼ä¸º:[{{this.TreeAddform.btmTypeName}}]</div> <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" > @@ -350,6 +354,7 @@ inject: ["crudTreeData"], data() { return { masterRow:0, AddLoading:false, // å®ä¹ä¸ä¸ªå鿥ä¿åæ 请æ±çæ°é requestCount:0, @@ -389,10 +394,15 @@ addBtn:false, index:true, border:true, selection:true, menu:false, height:380, column:[ { label: '', prop: 'radio', width: 60, display: false }, { label:'è±æåç§°', prop:'id' @@ -956,8 +966,8 @@ //ä¸å¡ç±»åå¤é btmSelect(row){ this.btmSelectList=row; this.btmName=row[0].name; this.btmOid=row[0].id; this.btmName=row.name; this.btmOid=row.id; }, //ä¸å¡ç±»åæ¥å£ btmdefaultRend(masterParameter){ Source/UBCS-WEB/src/components/Theme/ThemeTemplatePro.vue
@@ -35,7 +35,7 @@ prop: 'tab3', }] }, checkStatus:true,//æ¯å¦éè¦éªè¯æ¨¡æ¿ç¶æ, checkStatus:false,//æ¯å¦éè¦éªè¯æ¨¡æ¿ç¶æ, } }, created() { Source/UBCS-WEB/src/components/template/SetPersonnel.vue
@@ -10,7 +10,7 @@ <el-input placeholder="æµç¨æ¨¡æ¿" v-model="saveParam.modelName" disabled></el-input> </el-form-item> <el-form-item label="æµç¨åç§°" prop="processName"> <el-input placeholder="æµç¨åç§°" v-model="saveParam.processName"> <el-input placeholder="æµç¨åç§°" v-model="saveParam.template"> </el-input> </el-form-item> <el-form-item label="æµç¨æè¿°"> @@ -92,9 +92,10 @@ }, parameter:{ handler(newval,oldval){ this.saveParam=newval },deep:true, immediate:true this.saveParam=newval; }, deep:true, immediate:true } }, data() { Source/UBCS-WEB/src/views/work/claim.vue
@@ -175,7 +175,7 @@ }); }, handleDetail(row) { this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`}); this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}?name=` +row.categoryName+'详æ '}); }, handleImage(row) { this.processInstanceId = row.processInstanceId; Source/UBCS-WEB/src/views/work/done.vue
@@ -152,7 +152,7 @@ this.$refs.crud.toggleSelection(); }, handleDetail(row) { this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`}); this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}?name=` +row.categoryName+'详æ '}); }, handleImage(row) { this.processInstanceId = row.processInstanceId; Source/UBCS-WEB/src/views/work/process/leave/detail.vue
@@ -25,7 +25,7 @@ </el-form-item> </el-col> </el-row> <el-form-item label="请åçç±"> <el-form-item label="æè¿°"> <el-input :disabled="true" type="textarea" v-model="form.reason" /> </el-form-item> </el-card> Source/UBCS-WEB/src/views/work/process/leave/form.vue
@@ -21,7 +21,7 @@ group: [ { icon: 'el-icon-info', label: '请ååºç¡ä¿¡æ¯', label: 'åºç¡ä¿¡æ¯', prop: 'group1', column: [ { @@ -69,14 +69,14 @@ ] }, { label: '请åçç±', label: 'æè¿°', prop: 'reason', type: 'textarea', span: 24, rules: [ { required: true, message: '请è¾å ¥è¯·åçç±', message: '请è¾å ¥å 容', trigger: 'blur' } ] Source/UBCS-WEB/src/views/work/process/leave/handle.vue
@@ -146,6 +146,7 @@ this.templateId=res.data.variables.templateId; this.modelKey=res.data.variables.modelKey; this.codeClassifyOid=res.data.variables.codeClassifyOid; this.title='11'; //this.taskId=res.data.variables.taskId; if (res.success) { console.log(res) Source/UBCS-WEB/src/views/work/send.vue
@@ -162,7 +162,7 @@ this.$refs.crud.toggleSelection(); }, handleDetail(row) { this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` }); this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}?name=` +row.categoryName+'详æ ' }); }, handleImage(row) { this.processInstanceId = row.processInstanceId; Source/UBCS-WEB/src/views/work/start.vue
@@ -187,7 +187,7 @@ this.$refs.crud.toggleSelection(); }, handleStart(row) { this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`}); this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}?name=` +row.categoryName}); }, handleImage(row) { this.processDefinitionId = row.id; Source/UBCS-WEB/src/views/work/todo.vue
@@ -158,10 +158,10 @@ this.$refs.crud.toggleSelection(); }, handleWork(row) { this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}` }); this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}?name=`+'å¤ç'+row.categoryName }); }, handleDetail(row) { this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` }); this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}?name=` +row.categoryName+'详æ '}); }, handleImage(row) { this.processInstanceId = row.processInstanceId; Source/UBCS/ubcs-ops-api/ubcs-flow-api/src/main/java/com/vci/ubcs/flow/core/dto/FlowStatusDTO.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,80 @@ package com.vci.ubcs.flow.core.dto; import com.vci.ubcs.flow.core.vo.FlowTaskHisVO; import java.util.List; import java.util.Map; /** * æµç¨çæ§è¡ä¿¡æ¯ * @author dangsn * @Date 2023/07/31 */ public class FlowStatusDTO implements java.io.Serializable{ /** * åºåå */ private static final long serialVersionUID = 7539176109676429282L; /** * ä¸å¡ç±»å */ private String btmType; /** * æ°æ®çä¸»é® */ private List<String> oids; /** * åéçå 容 */ private Map<String,Object> variableMap; /** * æ§è¡åå² */ private List<FlowTaskHisVO> taskHisVOList; public String getBtmType() { return btmType; } public void setBtmType(String btmType) { this.btmType = btmType; } public List<String> getOids() { return oids; } public void setOids(List<String> oids) { this.oids = oids; } public Map<String, Object> getVariableMap() { return variableMap; } public void setVariableMap(Map<String, Object> variableMap) { this.variableMap = variableMap; } public List<FlowTaskHisVO> getTaskHisVOList() { return taskHisVOList; } public void setTaskHisVOList(List<FlowTaskHisVO> taskHisVOList) { this.taskHisVOList = taskHisVOList; } @Override public String toString() { return "FlowStatusDTO{" + "btmType='" + btmType + '\'' + ", oids=" + oids + ", variableMap=" + variableMap + ", taskHisVOList=" + taskHisVOList + '}'; } } Source/UBCS/ubcs-ops-api/ubcs-flow-api/src/main/java/com/vci/ubcs/flow/core/feign/IFlowClient.java
@@ -16,7 +16,9 @@ */ package com.vci.ubcs.flow.core.feign; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.vci.ubcs.flow.core.entity.BladeFlow; import com.vci.ubcs.flow.core.entity.ProcessTemplate; import org.springblade.core.launch.constant.AppConstant; import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; @@ -25,6 +27,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import java.util.List; import java.util.Map; /** @@ -44,6 +47,8 @@ String COMPLETE_TASK = API_PREFIX + "/complete-task"; String TASK_VARIABLE = API_PREFIX + "/task-variable"; String TASK_VARIABLES = API_PREFIX + "/task-variables"; String SELECT_BY_WRAPPER = API_PREFIX + "/select-by-wrapper"; String PROCESS_BATCH_SAVE = API_PREFIX + "/PROCESS-BATCH-SAVE"; /** * å¼å¯æµç¨ @@ -97,4 +102,23 @@ */ @GetMapping(TASK_VARIABLES) R<Map<String, Object>> taskVariables(@RequestParam("taskId") String taskId); /** * æ¥è¯¢æ°æ®wrapperæ¹å¼ * * @param wrapperMap æ¡ä»¶ * @return R */ @PostMapping(SELECT_BY_WRAPPER) R<List<ProcessTemplate>> selectByWrapper(@RequestBody Map<String,Object> wrapperMap); /** * æ¹éä¿åæµç¨æ°æ® * * @param listProcessTemplate ä¿åæ°æ® * @return R */ @PostMapping(PROCESS_BATCH_SAVE) R processBatchSave(@RequestBody List<ProcessTemplate> listProcessTemplate); } Source/UBCS/ubcs-ops-api/ubcs-flow-api/src/main/java/com/vci/ubcs/flow/core/feign/IFlowClientFallback.java
@@ -16,10 +16,13 @@ */ package com.vci.ubcs.flow.core.feign; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.vci.ubcs.flow.core.entity.BladeFlow; import com.vci.ubcs.flow.core.entity.ProcessTemplate; import org.springblade.core.tool.api.R; import org.springframework.stereotype.Component; import java.util.List; import java.util.Map; /** @@ -55,4 +58,14 @@ return R.fail("è¿ç¨è°ç¨å¤±è´¥"); } @Override public R<List<ProcessTemplate>> selectByWrapper( Map<String,Object> wrapperMap) { return R.fail("è¿ç¨è°ç¨å¤±è´¥"); } @Override public R processBatchSave(List<ProcessTemplate> listProcessTemplate) { return R.fail("è¿ç¨è°ç¨å¤±è´¥"); } } Source/UBCS/ubcs-ops-api/ubcs-flow-api/src/main/java/com/vci/ubcs/flow/core/vo/FlowTaskHisVO.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,345 @@ package com.vci.ubcs.flow.core.vo; import java.util.Date; import java.util.List; import java.util.Map; /** * æµç¨ä»»å¡å岿¾ç¤ºå¯¹è±¡ * @author dangsn * @date 2023/07/31 */ public class FlowTaskHisVO implements java.io.Serializable{ /** * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ */ private static final long serialVersionUID = -5305339505741718337L; /** * åå²è®°å½ä¸»é® */ private String oid; /** * æ´»å¨ä¸»é® */ private String activityId; /** * ä»»å¡åç§° */ private String activityName; /** * ä»»å¡ç±»å */ private String activityType; /** * æµç¨å®ä¹ä¸»é® */ private String processDefinitionId; /** * æµç¨å®ä¾ä¸»é® */ private String processInstanceId; /** * æµç¨çåç§° */ private String processName; /** * æµç¨æ¨¡æ¿åç§° */ private String processDefinitionName; /** * æ§è¡ä¸»é® */ private String executionId; /** * ä»»å¡ä¸»é® */ private String taskId; /** * è°ç¨æµç¨ä¸»é® */ private String calledProcessInstanceId; /** * æ§è¡äººè´¦å· */ private String assignee; /** * æ§è¡äººå§å */ private String assigneeName; /** * å¼å§æ¶é´ */ private Date startTime; /** * 宿æ¶é´ */ private Date endTime; /** * èæ¶ */ private Long durationInMillis; /** * å é¤åå */ private String deleteReason; /** * ç§æ·ä¸»é® */ private String tenantId; /** * å®¡æ¹æè§ */ private String description; /** * åé */ private Map<String,Object> variablesMap; /** * 夿¡æ°æ®æ¶å ³èçä¸å¡æ°æ®ä¸»é® */ private List<String> linkBusinessOids; /** * æ¾ç¤ºè·¯å¾ */ private String displayUrl; /** * åèµ·æµç¨çä¸å¡ç±»å */ private String btmType; public String getProcessName() { return processName; } public void setProcessName(String processName) { this.processName = processName; } public String getProcessDefinitionName() { return processDefinitionName; } public void setProcessDefinitionName(String processDefinitionName) { this.processDefinitionName = processDefinitionName; } public String getBtmType() { return btmType; } public void setBtmType(String btmType) { this.btmType = btmType; } public String getOid() { return oid; } public void setOid(String oid) { this.oid = oid; } public List<String> getLinkBusinessOids() { return linkBusinessOids; } public void setLinkBusinessOids(List<String> linkBusinessOids) { this.linkBusinessOids = linkBusinessOids; } public String getDisplayUrl() { return displayUrl; } public void setDisplayUrl(String displayUrl) { this.displayUrl = displayUrl; } public String getActivityId() { return activityId; } public void setActivityId(String activityId) { this.activityId = activityId; } public String getActivityName() { return activityName; } public void setActivityName(String activityName) { this.activityName = activityName; } public String getActivityType() { return activityType; } public void setActivityType(String activityType) { this.activityType = activityType; } public String getProcessDefinitionId() { return processDefinitionId; } public void setProcessDefinitionId(String processDefinitionId) { this.processDefinitionId = processDefinitionId; } public String getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; } public String getExecutionId() { return executionId; } public void setExecutionId(String executionId) { this.executionId = executionId; } public String getTaskId() { return taskId; } public void setTaskId(String taskId) { this.taskId = taskId; } public String getCalledProcessInstanceId() { return calledProcessInstanceId; } public void setCalledProcessInstanceId(String calledProcessInstanceId) { this.calledProcessInstanceId = calledProcessInstanceId; } public String getAssignee() { return assignee; } public void setAssignee(String assignee) { this.assignee = assignee; } public String getAssigneeName() { return assigneeName; } public void setAssigneeName(String assigneeName) { this.assigneeName = assigneeName; } public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public Long getDurationInMillis() { return durationInMillis; } public void setDurationInMillis(Long durationInMillis) { this.durationInMillis = durationInMillis; } public String getDeleteReason() { return deleteReason; } public void setDeleteReason(String deleteReason) { this.deleteReason = deleteReason; } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Map<String, Object> getVariablesMap() { return variablesMap; } public void setVariablesMap(Map<String, Object> variablesMap) { this.variablesMap = variablesMap; } @Override public String toString() { return "FlowTaskHisVO{" + "oid='" + oid + '\'' + ", activityId='" + activityId + '\'' + ", activityName='" + activityName + '\'' + ", activityType='" + activityType + '\'' + ", processDefinitionId='" + processDefinitionId + '\'' + ", processInstanceId='" + processInstanceId + '\'' + ", processName='" + processName + '\'' + ", processDefinitionName='" + processDefinitionName + '\'' + ", executionId='" + executionId + '\'' + ", taskId='" + taskId + '\'' + ", calledProcessInstanceId='" + calledProcessInstanceId + '\'' + ", assignee='" + assignee + '\'' + ", assigneeName='" + assigneeName + '\'' + ", startTime=" + startTime + ", endTime=" + endTime + ", durationInMillis=" + durationInMillis + ", deleteReason='" + deleteReason + '\'' + ", tenantId='" + tenantId + '\'' + ", description='" + description + '\'' + ", variablesMap=" + variablesMap + ", linkBusinessOids=" + linkBusinessOids + ", displayUrl='" + displayUrl + '\'' + ", btmType='" + btmType + '\'' + '}'; } } Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/feign/FlowClient.java
@@ -16,9 +16,12 @@ */ package com.vci.ubcs.flow.business.feign; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.vci.ubcs.flow.core.entity.BladeFlow; import com.vci.ubcs.flow.core.entity.ProcessTemplate; import com.vci.ubcs.flow.core.feign.IFlowClient; import com.vci.ubcs.flow.core.utils.TaskUtil; import com.vci.ubcs.flow.engine.service.ProcessTemplateService; import lombok.AllArgsConstructor; import org.flowable.engine.IdentityService; import org.flowable.engine.RuntimeService; @@ -34,6 +37,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import java.util.List; import java.util.Map; /** @@ -49,6 +53,7 @@ private final RuntimeService runtimeService; private final IdentityService identityService; private final TaskService taskService; private final ProcessTemplateService processTemplateService; @Override @PostMapping(START_PROCESS_INSTANCE_BY_ID) @@ -104,4 +109,33 @@ return R.data(taskService.getVariables(taskId)); } /** * æ¥è¯¢æ°æ®wrapperæ¹å¼ * * @param wrapperMap æ¡ä»¶ * @return R */ @Override @PostMapping(SELECT_BY_WRAPPER) public R<List<ProcessTemplate>> selectByWrapper(@RequestBody Map<String,Object> wrapperMap){ return R.data(processTemplateService.listByMap(wrapperMap)); } /** * æ¹éä¿åæµç¨æ°æ® * * @param listProcessTemplate ä¿åæ°æ® * @return R */ @Override @PostMapping(PROCESS_BATCH_SAVE) public R processBatchSave(@RequestBody List<ProcessTemplate> listProcessTemplate) { if(listProcessTemplate.size() == 0){ return R.fail("ä¸ºä¼ å ¥æ°æ®ï¼è¯·æ£æ¥ï¼"); } boolean b = processTemplateService.saveBatch(listProcessTemplate); return R.data(b); } } Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/constant/FlowEngineConstant.java
@@ -51,4 +51,24 @@ String USR_TASK = "userTask"; /** * ç¶æå¼ */ String STATUS_VALUE = "statusValue"; /** * è¿ç¨è°ç¨çå°å */ String REMOTE_METHOD = "remoteMethod"; /** * ä¸»é® */ String OIDS = "oids"; /** * ä¸å¡ç±»å */ String BTMTYPE = "btmtype"; } Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/envent/FlowStatusListener.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,123 @@ package com.vci.ubcs.flow.engine.envent; import com.vci.ubcs.flow.core.constant.ProcessConstant; import com.vci.ubcs.flow.core.dto.FlowStatusDTO; import com.vci.ubcs.flow.engine.constant.FlowEngineConstant; import com.vci.ubcs.flow.engine.utils.FlowableUtils; import com.vci.ubcs.starter.exception.VciBaseException; import com.vci.ubcs.starter.web.util.LangBaseUtil; import com.vci.ubcs.starter.web.util.VciBaseUtil; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.flowable.engine.HistoryService; import org.flowable.engine.TaskService; import org.flowable.engine.delegate.TaskListener; import org.flowable.engine.impl.el.FixedValue; import org.flowable.task.service.delegate.DelegateTask; import org.springblade.core.jwt.JwtUtil; import org.springblade.core.launch.constant.TokenConstant; import org.springblade.core.tool.utils.WebUtil; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestTemplate; import java.util.Map; @Slf4j @Component public class FlowStatusListener implements TaskListener, ApplicationContextAware { /** * è¿ç¨è°ç¨å°åãåè®°ï¼åç§°è¦ä¸æµç¨ä¸å®ä¹ç䏿 · */ private FixedValue remoteMethod; /** * ç¶æå¼ãåè®°ï¼åç§°è¦ä¸æµç¨ä¸å®ä¹ç䏿 · */ private FixedValue statusValue; private static ApplicationContext applicationContext; @Override public void setApplicationContext(ApplicationContext arg0) throws BeansException { applicationContext = arg0; } @Override public void notify(DelegateTask delegateTask) { Map taskVariable = delegateTask.getVariables(); boolean pass = (boolean) taskVariable.get(ProcessConstant.PASS_KEY); //è·åç¶æä¿®æ¹ä¿¡æ¯ if(pass){ String restURL = remoteMethod.getExpressionText(); String status = statusValue.getExpressionText(); //è·åä¸å¡æ°æ®ä¿¡æ¯ String oids = (String) taskVariable.get(FlowEngineConstant.OIDS); String btmType = (String) taskVariable.get(FlowEngineConstant.BTMTYPE); taskVariable.put(FlowEngineConstant.REMOTE_METHOD,restURL); taskVariable.put(FlowEngineConstant.STATUS_VALUE,status); if(StringUtils.isEmpty(oids)){ throw new VciBaseException("æ§è¡ç¶æä¿®æ¹äºä»¶æ¶ï¼ä¸å¡æ°æ®oid为空ï¼"); } if(StringUtils.isEmpty(btmType)){ throw new VciBaseException("æ§è¡ç¶æä¿®æ¹äºä»¶æ¶ï¼ä¸å¡ç±»åbtmType为空ï¼"); } if(StringUtils.isEmpty(restURL)){ throw new VciBaseException("æ§è¡ç¶æä¿®æ¹äºä»¶æ¶ï¼è¿ç¨è°ç¨å°å为空ï¼"); } if(StringUtils.isEmpty(status)){ throw new VciBaseException("æ§è¡ç¶æä¿®æ¹äºä»¶æ¶ï¼ç¶æä¸ºç©ºï¼"); } HistoryService historyService = applicationContext.getBean(HistoryService.class); TaskService taskService = applicationContext.getBean(TaskService.class); FlowStatusDTO flowStatusDTO = new FlowStatusDTO(); flowStatusDTO.setBtmType(btmType); flowStatusDTO.setOids(VciBaseUtil.str2List(oids)); flowStatusDTO.setVariableMap(taskVariable); flowStatusDTO.setTaskHisVOList(FlowableUtils.listTaskHistory(delegateTask.getProcessInstanceId(),historyService,taskService)); String token = JwtUtil.getToken(WebUtil.getRequest().getHeader(TokenConstant.HEADER)); HttpComponentsClientHttpRequestFactory requestFactory=new HttpComponentsClientHttpRequestFactory(); requestFactory.setReadTimeout(300000); requestFactory.setConnectionRequestTimeout(300000); requestFactory.setConnectTimeout(300000); RestTemplate restTemplate = new RestTemplate(requestFactory); HttpHeaders headers = new HttpHeaders(); headers.add(TokenConstant.HEADER,token); headers.setContentType(MediaType.APPLICATION_JSON); HttpEntity httpEntity = new HttpEntity<>(flowStatusDTO,headers); Map<String, Object> result = null; try { result = restTemplate.postForObject(restURL, httpEntity, Map.class); } catch (HttpClientErrorException e) { throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e); }catch (Throwable e){ throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e); } if(result == null){ throw new VciBaseException("ä¸å¡äºä»¶æ¶å没æè¿åå¼ï¼ä¸ç¡®å®æ¯å¦æ§è¡æå"); } if(CollectionUtils.isEmpty(result) && !(Boolean) result.get("success")){ throw new VciBaseException((String) result.get("message")); } } } } Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/utils/FlowableUtils.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,727 @@ package com.vci.ubcs.flow.engine.utils; import com.vci.ubcs.flow.core.utils.TaskUtil; import com.vci.ubcs.flow.core.vo.FlowTaskHisVO; import com.vci.ubcs.flow.engine.constant.FlowEngineConstant; import com.vci.ubcs.starter.exception.VciBaseException; import com.vci.ubcs.starter.web.util.VciBaseUtil; import com.vci.ubcs.system.user.cache.UserCache; import com.vci.ubcs.system.user.entity.User; import com.vci.ubcs.system.user.vo.UserVO; import org.apache.commons.lang3.StringUtils; import org.flowable.bpmn.model.*; import org.flowable.engine.HistoryService; import org.flowable.engine.TaskService; import org.flowable.engine.history.HistoricActivityInstance; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior; import org.flowable.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior; import org.flowable.engine.task.Comment; import org.flowable.variable.api.history.HistoricVariableInstance; import org.springframework.util.CollectionUtils; import java.util.*; import java.util.stream.Collectors; /** * @author weidy * @date 2021/4/2 */ public class FlowableUtils { /** * æ ¹æ®èç¹ï¼è·åå ¥å£è¿çº¿ * @param source èç¹ * @return å å«ç线 */ public static List<SequenceFlow> getElementIncomingFlows(FlowElement source) { List<SequenceFlow> sequenceFlows = null; if (source instanceof Task) { sequenceFlows = ((Task) source).getIncomingFlows(); } else if (source instanceof Gateway) { sequenceFlows = ((Gateway) source).getIncomingFlows(); } else if (source instanceof SubProcess) { sequenceFlows = ((SubProcess) source).getIncomingFlows(); } else if (source instanceof StartEvent) { sequenceFlows = ((StartEvent) source).getIncomingFlows(); } else if (source instanceof EndEvent) { sequenceFlows = ((EndEvent) source).getIncomingFlows(); } return sequenceFlows; } /** * æ ¹æ®èç¹ï¼è·ååºå£è¿çº¿ * @param source èç¹ * @return åºå£ç线 */ public static List<SequenceFlow> getElementOutgoingFlows(FlowElement source) { List<SequenceFlow> sequenceFlows = null; if (source instanceof Task) { sequenceFlows = ((Task) source).getOutgoingFlows(); } else if (source instanceof Gateway) { sequenceFlows = ((Gateway) source).getOutgoingFlows(); } else if (source instanceof SubProcess) { sequenceFlows = ((SubProcess) source).getOutgoingFlows(); } else if (source instanceof StartEvent) { sequenceFlows = ((StartEvent) source).getOutgoingFlows(); } else if (source instanceof EndEvent) { sequenceFlows = ((EndEvent) source).getOutgoingFlows(); } return sequenceFlows; } /** * è·åå ¨é¨èç¹å表ï¼å å«åæµç¨èç¹ * @param flowElements èç¹ * @param allElements ææçèç¹ * @return èç¹çå 容 */ public static Collection<FlowElement> getAllElements(Collection<FlowElement> flowElements, Collection<FlowElement> allElements) { allElements = allElements == null ? new ArrayList<>() : allElements; for (FlowElement flowElement : flowElements) { allElements.add(flowElement); if (flowElement instanceof SubProcess) { // ç»§ç»æ·±å ¥åæµç¨ï¼è¿ä¸æ¥è·ååæµç¨ allElements = FlowableUtils.getAllElements(((SubProcess) flowElement).getFlowElements(), allElements); } } return allElements; } /** * è¿ä»£è·åç¶çº§ä»»å¡èç¹å表ï¼ååæ¾ * @param source èµ·å§èç¹ * @param hasSequenceFlow å·²ç»ç»è¿çè¿çº¿ç IDï¼ç¨äºå¤æçº¿è·¯æ¯å¦éå¤ * @param userTaskList å·²æ¾å°çç¨æ·ä»»å¡èç¹ * @return */ public static List<UserTask> iteratorFindParentUserTasks(FlowElement source, Set<String> hasSequenceFlow, List<UserTask> userTaskList) { userTaskList = userTaskList == null ? new ArrayList<>() : userTaskList; hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; // å¦æè¯¥èç¹ä¸ºå¼å§èç¹ï¼ä¸åå¨ä¸çº§åèç¹ï¼å顺çä¸çº§åèç¹ç»§ç»è¿ä»£ if (source instanceof StartEvent && source.getSubProcess() != null) { userTaskList = iteratorFindParentUserTasks(source.getSubProcess(), hasSequenceFlow, userTaskList); } // æ ¹æ®ç±»åï¼è·åå ¥å£è¿çº¿ List<SequenceFlow> sequenceFlows = getElementIncomingFlows(source); if (sequenceFlows != null) { // å¾ªç¯æ¾å°ç®æ å ç´ for (SequenceFlow sequenceFlow: sequenceFlows) { // 妿åç°è¿çº¿éå¤ï¼è¯´æå¾ªç¯äºï¼è·³è¿è¿ä¸ªå¾ªç¯ if (hasSequenceFlow.contains(sequenceFlow.getId())) { continue; } // æ·»å å·²ç»èµ°è¿çè¿çº¿ hasSequenceFlow.add(sequenceFlow.getId()); // ç±»åä¸ºç¨æ·èç¹ï¼åæ°å¢ç¶çº§èç¹ if (sequenceFlow.getSourceFlowElement() instanceof UserTask) { userTaskList.add((UserTask) sequenceFlow.getSourceFlowElement()); continue; } // ç±»åä¸ºåæµç¨ï¼åæ·»å åæµç¨å¼å§èç¹åºå£å¤ç¸è¿çèç¹ if (sequenceFlow.getSourceFlowElement() instanceof SubProcess) { // è·ååæµç¨ç¨æ·ä»»å¡èç¹ List<UserTask> childUserTaskList = findChildProcessUserTasks((StartEvent) ((SubProcess) sequenceFlow.getSourceFlowElement()).getFlowElements().toArray()[0], null, null); // 妿æ¾å°èç¹ï¼å说æè¯¥çº¿è·¯æ¾å°èç¹ï¼ä¸ç»§ç»å䏿¾ï¼åä¹ç»§ç» if (childUserTaskList != null && childUserTaskList.size() > 0) { userTaskList.addAll(childUserTaskList); continue; } } // ç»§ç»è¿ä»£ // 注æï¼å·²ç»ç»è¿çèç¹ä¸è¿çº¿é½åºè¯¥ç¨æµ æ·è´åºæ¥ç对象 // æ¯å¦åæ¯ï¼a->b->cä¸a->d->cï¼èµ°å®a->b->cåèµ°å¦ä¸ä¸ªè·¯çº¿æ¯ï¼å·²ç»ç»è¿çèç¹åºè¯¥ä¸å å«a->b->cè·¯çº¿çæ°æ® userTaskList = iteratorFindParentUserTasks(sequenceFlow.getSourceFlowElement(), new HashSet<>(hasSequenceFlow), userTaskList); } } return userTaskList; } /** * æ ¹æ®æ£å¨è¿è¡çä»»å¡èç¹ï¼è¿ä»£è·åå级任å¡èç¹å表ï¼ååæ¾ * @param source èµ·å§èç¹ * @param runActiveIdList æ£å¨è¿è¡çä»»å¡ Keyï¼ç¨äºæ ¡éªä»»å¡èç¹æ¯å¦æ¯æ£å¨è¿è¡çèç¹ * @param hasSequenceFlow å·²ç»ç»è¿çè¿çº¿ç IDï¼ç¨äºå¤æçº¿è·¯æ¯å¦éå¤ * @param flowElementList éè¦æ¤åçç¨æ·ä»»å¡å表 * @return èç¹çä¿¡æ¯ */ public static List<FlowElement> iteratorFindChildUserTasks(FlowElement source, List<String> runActiveIdList, Set<String> hasSequenceFlow, List<FlowElement> flowElementList) { hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; flowElementList = flowElementList == null ? new ArrayList<>() : flowElementList; // å¦æè¯¥èç¹ä¸ºå¼å§èç¹ï¼ä¸åå¨ä¸çº§åèç¹ï¼å顺çä¸çº§åèç¹ç»§ç»è¿ä»£ if (source instanceof EndEvent && source.getSubProcess() != null) { flowElementList = iteratorFindChildUserTasks(source.getSubProcess(), runActiveIdList, hasSequenceFlow, flowElementList); } // æ ¹æ®ç±»åï¼è·ååºå£è¿çº¿ List<SequenceFlow> sequenceFlows = getElementOutgoingFlows(source); if (sequenceFlows != null) { // å¾ªç¯æ¾å°ç®æ å ç´ for (SequenceFlow sequenceFlow: sequenceFlows) { // 妿åç°è¿çº¿éå¤ï¼è¯´æå¾ªç¯äºï¼è·³è¿è¿ä¸ªå¾ªç¯ if (hasSequenceFlow.contains(sequenceFlow.getId())) { continue; } // æ·»å å·²ç»èµ°è¿çè¿çº¿ hasSequenceFlow.add(sequenceFlow.getId()); // å¦æä¸ºç¨æ·ä»»å¡ç±»åï¼æè 为ç½å ³ // æ´»å¨èç¹ID å¨è¿è¡çä»»å¡ä¸åå¨ï¼æ·»å if ((sequenceFlow.getTargetFlowElement() instanceof UserTask || sequenceFlow.getTargetFlowElement() instanceof Gateway) && runActiveIdList.contains((sequenceFlow.getTargetFlowElement()).getId())) { flowElementList.add(sequenceFlow.getTargetFlowElement()); continue; } // 妿èç¹ä¸ºåæµç¨èç¹æ åµï¼åä»èç¹ä¸ç第ä¸ä¸ªèç¹å¼å§è·å if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) { List<FlowElement> childUserTaskList = iteratorFindChildUserTasks((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), runActiveIdList, hasSequenceFlow, null); // 妿æ¾å°èç¹ï¼å说æè¯¥çº¿è·¯æ¾å°èç¹ï¼ä¸ç»§ç»å䏿¾ï¼åä¹ç»§ç» if (childUserTaskList != null && childUserTaskList.size() > 0) { flowElementList.addAll(childUserTaskList); continue; } } // ç»§ç»è¿ä»£ // 注æï¼å·²ç»ç»è¿çèç¹ä¸è¿çº¿é½åºè¯¥ç¨æµ æ·è´åºæ¥ç对象 // æ¯å¦åæ¯ï¼a->b->cä¸a->d->cï¼èµ°å®a->b->cåèµ°å¦ä¸ä¸ªè·¯çº¿æ¯ï¼å·²ç»ç»è¿çèç¹åºè¯¥ä¸å å«a->b->cè·¯çº¿çæ°æ® flowElementList = iteratorFindChildUserTasks(sequenceFlow.getTargetFlowElement(), runActiveIdList, new HashSet<>(hasSequenceFlow), flowElementList); } } return flowElementList; } /** * è¿ä»£è·ååæµç¨ç¨æ·ä»»å¡èç¹ * @param source èµ·å§èç¹ * @param hasSequenceFlow å·²ç»ç»è¿çè¿çº¿ç IDï¼ç¨äºå¤æçº¿è·¯æ¯å¦éå¤ * @param userTaskList éè¦æ¤åçç¨æ·ä»»å¡å表 * @return ä»»å¡ */ public static List<UserTask> findChildProcessUserTasks(FlowElement source, Set<String> hasSequenceFlow, List<UserTask> userTaskList) { hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; userTaskList = userTaskList == null ? new ArrayList<>() : userTaskList; // æ ¹æ®ç±»åï¼è·ååºå£è¿çº¿ List<SequenceFlow> sequenceFlows = getElementOutgoingFlows(source); if (sequenceFlows != null) { // å¾ªç¯æ¾å°ç®æ å ç´ for (SequenceFlow sequenceFlow: sequenceFlows) { // 妿åç°è¿çº¿éå¤ï¼è¯´æå¾ªç¯äºï¼è·³è¿è¿ä¸ªå¾ªç¯ if (hasSequenceFlow.contains(sequenceFlow.getId())) { continue; } // æ·»å å·²ç»èµ°è¿çè¿çº¿ hasSequenceFlow.add(sequenceFlow.getId()); // å¦æä¸ºç¨æ·ä»»å¡ç±»åï¼ä¸ä»»å¡èç¹ç Key æ£å¨è¿è¡çä»»å¡ä¸åå¨ï¼æ·»å if (sequenceFlow.getTargetFlowElement() instanceof UserTask) { userTaskList.add((UserTask) sequenceFlow.getTargetFlowElement()); continue; } // 妿èç¹ä¸ºåæµç¨èç¹æ åµï¼åä»èç¹ä¸ç第ä¸ä¸ªèç¹å¼å§è·å if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) { List<UserTask> childUserTaskList = findChildProcessUserTasks((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), hasSequenceFlow, null); // 妿æ¾å°èç¹ï¼å说æè¯¥çº¿è·¯æ¾å°èç¹ï¼ä¸ç»§ç»å䏿¾ï¼åä¹ç»§ç» if (childUserTaskList != null && childUserTaskList.size() > 0) { userTaskList.addAll(childUserTaskList); continue; } } // ç»§ç»è¿ä»£ // 注æï¼å·²ç»ç»è¿çèç¹ä¸è¿çº¿é½åºè¯¥ç¨æµ æ·è´åºæ¥ç对象 // æ¯å¦åæ¯ï¼a->b->cä¸a->d->cï¼èµ°å®a->b->cåèµ°å¦ä¸ä¸ªè·¯çº¿æ¯ï¼å·²ç»ç»è¿çèç¹åºè¯¥ä¸å å«a->b->cè·¯çº¿çæ°æ® userTaskList = findChildProcessUserTasks(sequenceFlow.getTargetFlowElement(), new HashSet<>(hasSequenceFlow), userTaskList); } } return userTaskList; } /** * ä»ååå寻路ï¼è·åææè线路ä¸çç¹ * @param source èµ·å§èç¹ * @param passRoads å·²ç»ç»è¿çç¹éå * @param hasSequenceFlow å·²ç»ç»è¿çè¿çº¿ç IDï¼ç¨äºå¤æçº¿è·¯æ¯å¦éå¤ * @param targets ç®æ è线路ç»ç¹ * @param dirtyRoads ç¡®å®ä¸ºèæ°æ®çç¹ï¼å 为ä¸éè¦éå¤ï¼å æ¤ä½¿ç¨ set åå¨ * @return 路线 */ public static Set<String> iteratorFindDirtyRoads(FlowElement source, List<String> passRoads, Set<String> hasSequenceFlow, List<String> targets, Set<String> dirtyRoads) { passRoads = passRoads == null ? new ArrayList<>() : passRoads; dirtyRoads = dirtyRoads == null ? new HashSet<>() : dirtyRoads; hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; // å¦æè¯¥èç¹ä¸ºå¼å§èç¹ï¼ä¸åå¨ä¸çº§åèç¹ï¼å顺çä¸çº§åèç¹ç»§ç»è¿ä»£ if (source instanceof StartEvent && source.getSubProcess() != null) { dirtyRoads = iteratorFindDirtyRoads(source.getSubProcess(), passRoads, hasSequenceFlow, targets, dirtyRoads); } // æ ¹æ®ç±»åï¼è·åå ¥å£è¿çº¿ List<SequenceFlow> sequenceFlows = getElementIncomingFlows(source); if (sequenceFlows != null) { // å¾ªç¯æ¾å°ç®æ å ç´ for (SequenceFlow sequenceFlow: sequenceFlows) { // 妿åç°è¿çº¿éå¤ï¼è¯´æå¾ªç¯äºï¼è·³è¿è¿ä¸ªå¾ªç¯ if (hasSequenceFlow.contains(sequenceFlow.getId())) { continue; } // æ·»å å·²ç»èµ°è¿çè¿çº¿ hasSequenceFlow.add(sequenceFlow.getId()); // æ°å¢ç»è¿ç路线 passRoads.add(sequenceFlow.getSourceFlowElement().getId()); // 妿æ¤ç¹ä¸ºç®æ ç¹ï¼ç¡®å®ç»è¿ç路线为èçº¿è·¯ï¼æ·»å ç¹å°è线路ä¸ï¼ç¶åæ¾ä¸ä¸ªè¿çº¿ if (targets.contains(sequenceFlow.getSourceFlowElement().getId())) { dirtyRoads.addAll(passRoads); continue; } // å¦æè¯¥èç¹ä¸ºå¼å§èç¹ï¼ä¸åå¨ä¸çº§åèç¹ï¼å顺çä¸çº§åèç¹ç»§ç»è¿ä»£ if (sequenceFlow.getSourceFlowElement() instanceof SubProcess) { dirtyRoads = findChildProcessAllDirtyRoad((StartEvent) ((SubProcess) sequenceFlow.getSourceFlowElement()).getFlowElements().toArray()[0], null, dirtyRoads); // æ¯å¦åå¨åæµç¨ä¸ï¼true æ¯ï¼false å¦ Boolean isInChildProcess = dirtyTargetInChildProcess((StartEvent) ((SubProcess) sequenceFlow.getSourceFlowElement()).getFlowElements().toArray()[0], null, targets, null); if (isInChildProcess) { // å·²å¨åæµç¨ä¸æ¾å°ï¼è¯¥è·¯çº¿ç»æ continue; } } // ç»§ç»è¿ä»£ // 注æï¼å·²ç»ç»è¿çèç¹ä¸è¿çº¿é½åºè¯¥ç¨æµ æ·è´åºæ¥ç对象 // æ¯å¦åæ¯ï¼a->b->cä¸a->d->cï¼èµ°å®a->b->cåèµ°å¦ä¸ä¸ªè·¯çº¿æ¯ï¼å·²ç»ç»è¿çèç¹åºè¯¥ä¸å å«a->b->cè·¯çº¿çæ°æ® dirtyRoads = iteratorFindDirtyRoads(sequenceFlow.getSourceFlowElement(), new ArrayList<>(passRoads), new HashSet<>(hasSequenceFlow), targets, dirtyRoads); } } return dirtyRoads; } /** * è¿ä»£è·ååæµç¨è路线 * 说æï¼åå¦åéçç¹å°±æ¯åæµç¨ï¼é£ä¹ä¹è¯å®ä¼åéå°åæµç¨æåçç¨æ·ä»»å¡èç¹ï¼å æ¤åæµç¨ä¸çèç¹å ¨æ¯è路线 * @param source èµ·å§èç¹ * @param hasSequenceFlow å·²ç»ç»è¿çè¿çº¿ç IDï¼ç¨äºå¤æçº¿è·¯æ¯å¦éå¤ * @param dirtyRoads ç¡®å®ä¸ºèæ°æ®çç¹ï¼å 为ä¸éè¦éå¤ï¼å æ¤ä½¿ç¨ set åå¨ * @return 路线 */ public static Set<String> findChildProcessAllDirtyRoad(FlowElement source, Set<String> hasSequenceFlow, Set<String> dirtyRoads) { hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; dirtyRoads = dirtyRoads == null ? new HashSet<>() : dirtyRoads; // æ ¹æ®ç±»åï¼è·ååºå£è¿çº¿ List<SequenceFlow> sequenceFlows = getElementOutgoingFlows(source); if (sequenceFlows != null) { // å¾ªç¯æ¾å°ç®æ å ç´ for (SequenceFlow sequenceFlow: sequenceFlows) { // 妿åç°è¿çº¿éå¤ï¼è¯´æå¾ªç¯äºï¼è·³è¿è¿ä¸ªå¾ªç¯ if (hasSequenceFlow.contains(sequenceFlow.getId())) { continue; } // æ·»å å·²ç»èµ°è¿çè¿çº¿ hasSequenceFlow.add(sequenceFlow.getId()); // æ·»å è路线 dirtyRoads.add(sequenceFlow.getTargetFlowElement().getId()); // 妿èç¹ä¸ºåæµç¨èç¹æ åµï¼åä»èç¹ä¸ç第ä¸ä¸ªèç¹å¼å§è·å if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) { dirtyRoads = findChildProcessAllDirtyRoad((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), hasSequenceFlow, dirtyRoads); } // ç»§ç»è¿ä»£ // 注æï¼å·²ç»ç»è¿çèç¹ä¸è¿çº¿é½åºè¯¥ç¨æµ æ·è´åºæ¥ç对象 // æ¯å¦åæ¯ï¼a->b->cä¸a->d->cï¼èµ°å®a->b->cåèµ°å¦ä¸ä¸ªè·¯çº¿æ¯ï¼å·²ç»ç»è¿çèç¹åºè¯¥ä¸å å«a->b->cè·¯çº¿çæ°æ® dirtyRoads = findChildProcessAllDirtyRoad(sequenceFlow.getTargetFlowElement(), new HashSet<>(hasSequenceFlow), dirtyRoads); } } return dirtyRoads; } /** * 夿èè·¯çº¿ç»æèç¹æ¯å¦å¨åæµç¨ä¸ * @param source èµ·å§èç¹ * @param hasSequenceFlow å·²ç»ç»è¿çè¿çº¿ç IDï¼ç¨äºå¤æçº¿è·¯æ¯å¦éå¤ * @param targets 夿è路线èç¹æ¯å¦åå¨åæµç¨ä¸ï¼åªè¦åå¨ä¸ä¸ªï¼è¯´æè路线åªå°åæµç¨ä¸ºæ¢ * @param inChildProcess æ¯å¦åå¨åæµç¨ä¸ï¼true æ¯ï¼false å¦ * @return æ¯å¦ */ public static Boolean dirtyTargetInChildProcess(FlowElement source, Set<String> hasSequenceFlow, List<String> targets, Boolean inChildProcess) { hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; inChildProcess = inChildProcess == null ? false : inChildProcess; // æ ¹æ®ç±»åï¼è·ååºå£è¿çº¿ List<SequenceFlow> sequenceFlows = getElementOutgoingFlows(source); if (sequenceFlows != null && !inChildProcess) { // å¾ªç¯æ¾å°ç®æ å ç´ for (SequenceFlow sequenceFlow: sequenceFlows) { // 妿åç°è¿çº¿éå¤ï¼è¯´æå¾ªç¯äºï¼è·³è¿è¿ä¸ªå¾ªç¯ if (hasSequenceFlow.contains(sequenceFlow.getId())) { continue; } // æ·»å å·²ç»èµ°è¿çè¿çº¿ hasSequenceFlow.add(sequenceFlow.getId()); // 妿åç°ç®æ ç¹å¨åæµç¨ä¸åå¨ï¼è¯´æåªå°åæµç¨ä¸ºæ¢ if (targets.contains(sequenceFlow.getTargetFlowElement().getId())) { inChildProcess = true; break; } // 妿èç¹ä¸ºåæµç¨èç¹æ åµï¼åä»èç¹ä¸ç第ä¸ä¸ªèç¹å¼å§è·å if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) { inChildProcess = dirtyTargetInChildProcess((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), hasSequenceFlow, targets, inChildProcess); } // ç»§ç»è¿ä»£ // 注æï¼å·²ç»ç»è¿çèç¹ä¸è¿çº¿é½åºè¯¥ç¨æµ æ·è´åºæ¥ç对象 // æ¯å¦åæ¯ï¼a->b->cä¸a->d->cï¼èµ°å®a->b->cåèµ°å¦ä¸ä¸ªè·¯çº¿æ¯ï¼å·²ç»ç»è¿çèç¹åºè¯¥ä¸å å«a->b->cè·¯çº¿çæ°æ® inChildProcess = dirtyTargetInChildProcess(sequenceFlow.getTargetFlowElement(), new HashSet<>(hasSequenceFlow), targets, inChildProcess); } } return inChildProcess; } /** * è¿ä»£ä»åååæ«æï¼å¤æç®æ èç¹ç¸å¯¹äºå½åèç¹æ¯å¦æ¯ä¸²è¡ * ä¸åå¨ç´æ¥åéå°åæµç¨ä¸çæ åµï¼ä½åå¨ä»åæµç¨åºå»å°ç¶æµç¨æ åµ * @param source èµ·å§èç¹ * @param isSequential æ¯å¦ä¸²è¡ * @param hasSequenceFlow å·²ç»ç»è¿çè¿çº¿ç IDï¼ç¨äºå¤æçº¿è·¯æ¯å¦éå¤ * @param targetKsy ç®æ èç¹ * @return æ¯å¦ */ public static Boolean iteratorCheckSequentialReferTarget(FlowElement source, String targetKsy, Set<String> hasSequenceFlow, Boolean isSequential) { isSequential = isSequential == null ? true : isSequential; hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; // å¦æè¯¥èç¹ä¸ºå¼å§èç¹ï¼ä¸åå¨ä¸çº§åèç¹ï¼å顺çä¸çº§åèç¹ç»§ç»è¿ä»£ if (source instanceof StartEvent && source.getSubProcess() != null) { isSequential = iteratorCheckSequentialReferTarget(source.getSubProcess(), targetKsy, hasSequenceFlow, isSequential); } // æ ¹æ®ç±»åï¼è·åå ¥å£è¿çº¿ List<SequenceFlow> sequenceFlows = getElementIncomingFlows(source); if (sequenceFlows != null) { // å¾ªç¯æ¾å°ç®æ å ç´ for (SequenceFlow sequenceFlow: sequenceFlows) { // 妿åç°è¿çº¿éå¤ï¼è¯´æå¾ªç¯äºï¼è·³è¿è¿ä¸ªå¾ªç¯ if (hasSequenceFlow.contains(sequenceFlow.getId())) { continue; } // æ·»å å·²ç»èµ°è¿çè¿çº¿ hasSequenceFlow.add(sequenceFlow.getId()); // å¦æç®æ èç¹å·²è¢«å¤æä¸ºå¹¶è¡ï¼åé¢é½ä¸éè¦æ§è¡ï¼ç´æ¥è¿å if (isSequential == false) { break; } // è¿æ¡çº¿è·¯åå¨ç®æ èç¹ï¼è¿æ¡çº¿è·¯å®æï¼è¿å ¥ä¸ä¸ªçº¿è·¯ if (targetKsy.equals(sequenceFlow.getSourceFlowElement().getId())) { continue; } if (sequenceFlow.getSourceFlowElement() instanceof StartEvent) { isSequential = false; break; } // å¦å就继ç»è¿ä»£ // 注æï¼å·²ç»ç»è¿çèç¹ä¸è¿çº¿é½åºè¯¥ç¨æµ æ·è´åºæ¥ç对象 // æ¯å¦åæ¯ï¼a->b->cä¸a->d->cï¼èµ°å®a->b->cåèµ°å¦ä¸ä¸ªè·¯çº¿æ¯ï¼å·²ç»ç»è¿çèç¹åºè¯¥ä¸å å«a->b->cè·¯çº¿çæ°æ® isSequential = iteratorCheckSequentialReferTarget(sequenceFlow.getSourceFlowElement(), targetKsy, new HashSet<>(hasSequenceFlow), isSequential); } } return isSequential; } /** * ä»ååå寻路ï¼è·åå°è¾¾èç¹çææè·¯çº¿ * ä¸åå¨ç´æ¥åéå°åæµç¨ï¼ä½æ¯åå¨åéå°ç¶çº§æµç¨çæ åµ * @param source èµ·å§èç¹ * @param passRoads å·²ç»ç»è¿çç¹éå * @param roads 路线 * @return ä»»å¡ */ public static List<List<UserTask>> findRoad(FlowElement source, List<UserTask> passRoads, Set<String> hasSequenceFlow, List<List<UserTask>> roads) { passRoads = passRoads == null ? new ArrayList<>() : passRoads; roads = roads == null ? new ArrayList<>() : roads; hasSequenceFlow = hasSequenceFlow == null ? new HashSet<>() : hasSequenceFlow; // å¦æè¯¥èç¹ä¸ºå¼å§èç¹ï¼ä¸åå¨ä¸çº§åèç¹ï¼å顺çä¸çº§åèç¹ç»§ç»è¿ä»£ if (source instanceof StartEvent && source.getSubProcess() != null) { roads = findRoad(source.getSubProcess(), passRoads, hasSequenceFlow, roads); } // æ ¹æ®ç±»åï¼è·åå ¥å£è¿çº¿ List<SequenceFlow> sequenceFlows = getElementIncomingFlows(source); if (sequenceFlows != null && sequenceFlows.size() != 0) { for (SequenceFlow sequenceFlow: sequenceFlows) { // 妿åç°è¿çº¿éå¤ï¼è¯´æå¾ªç¯äºï¼è·³è¿è¿ä¸ªå¾ªç¯ if (hasSequenceFlow.contains(sequenceFlow.getId())) { continue; } // æ·»å å·²ç»èµ°è¿çè¿çº¿ hasSequenceFlow.add(sequenceFlow.getId()); // æ·»å ç»è¿è·¯çº¿ if (sequenceFlow.getSourceFlowElement() instanceof UserTask) { passRoads.add((UserTask) sequenceFlow.getSourceFlowElement()); } // ç»§ç»è¿ä»£ // 注æï¼å·²ç»ç»è¿çèç¹ä¸è¿çº¿é½åºè¯¥ç¨æµ æ·è´åºæ¥ç对象 // æ¯å¦åæ¯ï¼a->b->cä¸a->d->cï¼èµ°å®a->b->cåèµ°å¦ä¸ä¸ªè·¯çº¿æ¯ï¼å·²ç»ç»è¿çèç¹åºè¯¥ä¸å å«a->b->cè·¯çº¿çæ°æ® roads = findRoad(sequenceFlow.getSourceFlowElement(), new ArrayList<>(passRoads), new HashSet<>(hasSequenceFlow), roads); } } else { // æ·»å 路线 roads.add(passRoads); } return roads; } /** * åå²èç¹æ°æ®æ¸ æ´ï¼æ¸ æ´æå忻坼è´çèæ°æ® * @param allElements å ¨é¨èç¹ä¿¡æ¯ * @param historicActivityIdList åå²ä»»å¡å®ä¾ä¿¡æ¯ï¼æ°æ®éç¨å¼å§æ¶é´ååº * @return å岿°æ® */ public static List<String> historicTaskInstanceClean(Collection<FlowElement> allElements, List<HistoricActivityInstance> historicActivityIdList) { // ä¼ç¾èç¹æ¶é List<String> multiTask = new ArrayList<>(); allElements.forEach(flowElement -> { if (flowElement instanceof UserTask) { // å¦æè¯¥èç¹çè¡ä¸ºä¸ºä¼ç¾è¡ä¸ºï¼è¯´æè¯¥èç¹ä¸ºä¼ç¾èç¹ if (((UserTask) flowElement).getBehavior() instanceof ParallelMultiInstanceBehavior || ((UserTask) flowElement).getBehavior() instanceof SequentialMultiInstanceBehavior) { multiTask.add(flowElement.getId()); } } }); // å¾ªç¯æ¾å ¥æ ï¼æ LIFOï¼åè¿å åº Stack<HistoricActivityInstance> stack = new Stack<>(); historicActivityIdList.forEach(item -> stack.push(item)); // æ¸ æ´åçåå²ä»»å¡å®ä¾ List<String> lastHistoricTaskInstanceList = new ArrayList<>(); // ç½å ³åå¨å¯è½åªèµ°äºé¨å忝æ åµï¼ä¸è¿åå¨è·³è½¬åºå¼æ°æ®ä»¥åå ¶ä»åæ¯æ°æ®çå¹²æ°ï¼å æ¤éè¦å¯¹åå²èç¹æ°æ®è¿è¡æ¸ æ´ // 临æ¶ç¨æ·ä»»å¡ key StringBuilder userTaskKey = null; // 临æ¶è¢«å æçä»»å¡ keyï¼åå¨å¹¶è¡æ åµ List<String> deleteKeyList = new ArrayList<>(); // 临æ¶èæ°æ®çº¿è·¯ List<Set<String>> dirtyDataLineList = new ArrayList<>(); // ç±æä¸ªç¹è·³å°ä¼ç¾ç¹,æ¤æ¶åºç°å¤ä¸ªä¼ç¾å®ä¾å¯¹åº 1 个跳转æ åµï¼éè¦æè¿äºè¿ç»èæ°æ®é½æ¾å° // ä¼ç¾ç¹æ®å¤ç䏿 int multiIndex = -1; // ä¼ç¾ç¹æ®å¤ç key StringBuilder multiKey = null; // ä¼ç¾ç¹æ®å¤çæä½æ è¯ boolean multiOpera = false; while (!stack.empty()) { // ä»è¿éå¼å§ userTaskKey é½è¿æ¯ä¸ä¸ªæ ç key // æ¯å¦æ¯èæ°æ®çº¿è·¯ä¸çç¹ final boolean[] isDirtyData = {false}; for (Set<String> oldDirtyDataLine : dirtyDataLineList) { if (oldDirtyDataLine.contains(stack.peek().getActivityId())) { isDirtyData[0] = true; } } // å é¤åå ä¸ä¸ºç©ºï¼è¯´æä»è¿æ¡æ°æ®å¼å§åè·³æè åéç // MI_ENDï¼ä¼ç¾å®æåï¼å ¶ä»æªç¾å°èç¹çå é¤åå ï¼ä¸å¨å¤çèå´å if (stack.peek().getDeleteReason() != null && !stack.peek().getDeleteReason().equals("MI_END")) { // å¯ä»¥ç解为èçº¿è·¯èµ·ç¹ String dirtyPoint = ""; if (stack.peek().getDeleteReason().indexOf("Change activity to ") >= 0) { dirtyPoint = stack.peek().getDeleteReason().replace("Change activity to ", ""); } // ä¼ç¾åéå é¤åå æç¹ä¸å if (stack.peek().getDeleteReason().indexOf("Change parent activity to ") >= 0) { dirtyPoint = stack.peek().getDeleteReason().replace("Change parent activity to ", ""); } FlowElement dirtyTask = null; // è·ååæ´èç¹ç对åºçå ¥å£å¤è¿çº¿ // 妿æ¯ç½å ³å¹¶è¡åéæ åµï¼ä¼åæä¸¤æ¡èæ°æ®è·¯çº¿ï¼ææä¸æ · for (FlowElement flowElement : allElements) { if (flowElement.getId().equals(stack.peek().getActivityId())) { dirtyTask = flowElement; } } // è·åèæ°æ®çº¿è·¯ Set<String> dirtyDataLine = FlowableUtils.iteratorFindDirtyRoads(dirtyTask, null, null, Arrays.asList(dirtyPoint.split(",")), null); // èªå·±æ¬èº«ä¹æ¯è线路ä¸çç¹ï¼å è¿å» dirtyDataLine.add(stack.peek().getActivityId()); //logger.info(stack.peek().getActivityId() + "ç¹è路线éåï¼" + dirtyDataLine); // æ¯å ¨æ°çéè¦æ·»å çè线路 boolean isNewDirtyData = true; for (int i = 0; i < dirtyDataLineList.size(); i++) { // 妿åç°ä»çä¸ä¸ªèç¹å¨è线路å ï¼è¯´æè¿ä¸ªç¹å¯è½æ¯å¹¶è¡çèç¹ï¼æè è¿ç»é©³å // è¿æ¶ï¼é½ä»¥ä¹åçè线路èç¹ä¸ºæ åï¼åªéåå¹¶è线路å³å¯ï¼ä¹å°±æ¯è·¯çº¿è¡¥å ¨ if (dirtyDataLineList.get(i).contains(userTaskKey.toString())) { isNewDirtyData = false; dirtyDataLineList.get(i).addAll(dirtyDataLine); } } // å·²ç¡®å®æ¶å ¨æ°çè线路 if (isNewDirtyData) { // deleteKey åä¸è·¯çº¿é©³åå°å¹¶è¡ï¼è¿ç§åæ¶çæå¤ä¸ªæ°å®ä¾è®°å½æ åµï¼è¿æ¶ deleteKey å ¶å®æ¯ç±å¤ä¸ªå¼ç»æ // æç §é»è¾ï¼åéåç«å»çæçå®ä¾è®°å½å°±æ¯åéçè®°å½ // è³äºé©³åæçæç Keyï¼ç´æ¥ä»å é¤åå ä¸è·åï¼å 为åå¨é©³åå°å¹¶è¡çæ åµ deleteKeyList.add(dirtyPoint + ","); dirtyDataLineList.add(dirtyDataLine); } // æ·»å åï¼ç°å¨è¿ä¸ªç¹åæè线路ä¸çç¹äº isDirtyData[0] = true; } // 妿䏿¯è线路ä¸çç¹ï¼è¯´ææ¯æææ°æ®ï¼æ·»å åå²å®ä¾ Key if (!isDirtyData[0]) { lastHistoricTaskInstanceList.add(stack.peek().getActivityId()); } // æ ¡éªè线路æ¯å¦ç»æ for (int i = 0; i < deleteKeyList.size(); i ++) { // 妿åç°èæ°æ®å±äºä¼ç¾ï¼è®°å½ä¸ä¸æ ä¸å¯¹åº Keyï¼ä»¥å¤åç»æ¯å¯¹ï¼ä¼ç¾èæ°æ®èç´å¼å§ if (multiKey == null && multiTask.contains(stack.peek().getActivityId()) && deleteKeyList.get(i).contains(stack.peek().getActivityId())) { multiIndex = i; multiKey = new StringBuilder(stack.peek().getActivityId()); } // ä¼ç¾èæ°æ®å¤çï¼èç¹éåä¼ç¾æ¸ 空 // 妿å¨ä¼ç¾èæ°æ®èç´ä¸åç° Keyæ¹åï¼è¯´æä¼ç¾èæ°æ®å¨ä¸ä¸ªèç¹å°±ç»æäºï¼å¯ä»¥æä¼ç¾èæ°æ®å æ if (multiKey != null && !multiKey.toString().equals(stack.peek().getActivityId())) { deleteKeyList.set(multiIndex , deleteKeyList.get(multiIndex).replace(stack.peek().getActivityId() + ",", "")); multiKey = null; // ç»æè¿è¡ä¸æ ¡éªå é¤ multiOpera = true; } // å ¶ä»èæ°æ®å¤ç // åç°è¯¥è·¯çº¿æå䏿¡èæ°æ®ï¼è¯´æè¿æ¡èæ°æ®çº¿è·¯å¤çå®äºï¼å é¤èæ°æ®ä¿¡æ¯ // èæ°æ®äº§ççæ°å®ä¾ä¸æ¯å¦å å«è¿æ¡æ°æ® if (multiKey == null && deleteKeyList.get(i).contains(stack.peek().getActivityId())) { // å é¤å¹é å°çé¨å deleteKeyList.set(i , deleteKeyList.get(i).replace(stack.peek().getActivityId() + ",", "")); } // 妿æ¯ç»ä¸çå ç´ é½ä»¥å¹é è¿ï¼è¯´æèæ°æ®ç»æ if ("".equals(deleteKeyList.get(i))) { // åæ¶å é¤èæ°æ® deleteKeyList.remove(i); dirtyDataLineList.remove(i); break; } } // ä¼ç¾æ°æ®å¤çéè¦å¨å¾ªç¯å¤å¤çï¼å¦åå¯è½å¯¼è´æº¢åº // ä¼ç¾çæ°æ®è¯å®æ¯ä¹åæ¾è¿å»çæä»¥ç论ä¸ä¸ä¼æº¢åºï¼ä½è¿æ¯æ ¡éªä¸ if (multiOpera && deleteKeyList.size() > multiIndex && "".equals(deleteKeyList.get(multiIndex))) { // åæ¶å é¤èæ°æ® deleteKeyList.remove(multiIndex); dirtyDataLineList.remove(multiIndex); multiIndex = -1; multiOpera = false; } // pop() æ¹æ³ä¸ peek() æ¹æ³ä¸åï¼å¨è¿åå¼çåæ¶ï¼ä¼æå¼ä»æ ä¸ç§»é¤ // ä¿åæ°ç userTaskKey å¨ä¸ä¸ªå¾ªç¯ä¸ä½¿ç¨ userTaskKey = new StringBuilder(stack.pop().getActivityId()); } //logger.info("æ¸ æ´åçåå²èç¹æ°æ®ï¼" + lastHistoricTaskInstanceList); return lastHistoricTaskInstanceList; } /** * è·åç¸å ³çåå² * @param processInstanceId æµç¨å®ä¾çä¸»é® * @param historyService åå²æå¡ * @param taskService ä»»å¡æå¡ * @return åå²çä¿¡æ¯ */ public static List<FlowTaskHisVO> listTaskHistory(String processInstanceId, HistoryService historyService, TaskService taskService){ HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); if(processInstance == null || StringUtils.isBlank(processInstance.getId())){ throw new VciBaseException("æµç¨æªæ¾å°"); } List<HistoricActivityInstance> hisList = historyService.createHistoricActivityInstanceQuery().processInstanceId(processInstanceId).activityType("userTask").orderByHistoricActivityInstanceEndTime().desc().list(); Map<String,FlowTaskHisVO> hisVOList = new HashMap<>(); if(!CollectionUtils.isEmpty(hisList)){ List<HistoricActivityInstance> allowTaskInstances = new ArrayList<>(); Map<String,List<Comment>> taskOidCommentsMap = new HashMap<>(); for(int i = 0 ; i < hisList.size(); i ++){ HistoricActivityInstance his = hisList.get(i); //æä»¬æ¾å½æ¶ç审æ¹ä¿¡æ¯ï¼è¿æ ·å¯ä»¥å¤ææ¯å¦ä¸ºä¸åæ List<Comment> comments = taskService.getTaskComments(his.getTaskId()); if(!CollectionUtils.isEmpty(comments)){ taskOidCommentsMap.put(his.getId(),comments); //æ¥è¯¢ }//第ä¸ä¸ªå¯è½æ²¡æ allowTaskInstances.add(his); } if(!CollectionUtils.isEmpty(allowTaskInstances)){ List<HistoricVariableInstance> variableInstances = historyService.createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).list(); Map<String,Object> variableMap = switchVariable(variableInstances); Set<Long> userIds = new HashSet<>(); Set<String> processInstanceIds = new HashSet<>(); for(int i = 0 ; i < allowTaskInstances.size() ; i ++){ HistoricActivityInstance activityInstance = allowTaskInstances.get(i); if(!hisVOList.containsKey(activityInstance.getId())) { FlowTaskHisVO hisVO = new FlowTaskHisVO(); hisVO.setOid(activityInstance.getId()); hisVO.setActivityId(activityInstance.getActivityId()); hisVO.setActivityName(activityInstance.getActivityName()); hisVO.setActivityType(activityInstance.getActivityType()); hisVO.setProcessDefinitionId(activityInstance.getProcessDefinitionId()); hisVO.setProcessInstanceId(activityInstance.getProcessInstanceId()); hisVO.setExecutionId(activityInstance.getExecutionId()); hisVO.setTaskId(activityInstance.getTaskId()); hisVO.setCalledProcessInstanceId(activityInstance.getCalledProcessInstanceId()); hisVO.setAssignee(activityInstance.getAssignee()); if (StringUtils.isNotBlank(hisVO.getAssignee())) { userIds.add(TaskUtil.getUserId(hisVO.getAssignee())); } hisVO.setStartTime(activityInstance.getStartTime()); hisVO.setEndTime(activityInstance.getEndTime()); hisVO.setDurationInMillis(activityInstance.getDurationInMillis()); hisVO.setDeleteReason(activityInstance.getDeleteReason()); hisVO.setTenantId(activityInstance.getTenantId()); hisVO.setVariablesMap(variableMap); hisVO.setBtmType(variableMap.getOrDefault(FlowEngineConstant.BTMTYPE,"").toString()); hisVO.setLinkBusinessOids(VciBaseUtil.str2List(variableMap.getOrDefault(FlowEngineConstant.OIDS,"").toString())); List<Comment> comments = taskOidCommentsMap.getOrDefault(activityInstance.getId(),new ArrayList<>()); hisVO.setDescription(comments.stream().map(s->{ String fullMsg = s.getFullMessage(); if(StringUtils.isNotBlank(fullMsg) && fullMsg.contains(":")){ fullMsg = fullMsg.substring(fullMsg.indexOf(":")+1); } return fullMsg; }).collect(Collectors.joining(";"))); processInstanceIds.add(activityInstance.getProcessInstanceId()); hisVO.setProcessName(processInstance.getName()); hisVO.setProcessDefinitionName(processInstance.getProcessDefinitionName()); hisVOList.put(hisVO.getActivityId(), hisVO); } } if(!CollectionUtils.isEmpty(userIds) && !CollectionUtils.isEmpty(hisVOList)){ List<User> userList = new ArrayList<>(); for(Long userId : userIds){ userList.add(UserCache.getUser(userId)); } if(!CollectionUtils.isEmpty(userList)){ Map<Long, User> userVOMap = userList.stream().collect(Collectors.toMap(s -> s.getId(), t -> t, (o1, o2) -> o1)); hisVOList.values().forEach(history->{ List<String> thisUserIds = VciBaseUtil.str2List(TaskUtil.getTaskUser(history.getAssignee())); List<String> thisUserNames = new ArrayList<>(); if(!CollectionUtils.isEmpty(thisUserIds)) { thisUserIds.forEach(userId -> { thisUserNames.add(userVOMap.getOrDefault(userId, new User()).getName()); }); } history.setAssigneeName(thisUserNames.stream().collect(Collectors.joining(","))); }); } } } } return hisVOList.values().stream().collect(Collectors.toList()); } /** * 转æ¢åé * @param variableInstances åéçå®ä¾ * @return åé */ public static Map<String,Object> switchVariable(List<HistoricVariableInstance> variableInstances){ Map<String,Object> variableMap = new HashMap<>(); if(!CollectionUtils.isEmpty(variableInstances)){ variableMap = variableInstances.stream().collect(Collectors.toMap(s->s.getVariableName(),t->t.getValue() == null?"":t.getValue())); } return variableMap; } } Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/mapper/CodeClassifyMapper.java
@@ -148,4 +148,17 @@ * @return */ List<CodeClassify> selectAllParenClassifytByOid(@Param("oid")String oid,@Param("tenantId") String tenantId); /** * 䏻鮿¥è¯¢å½åèç¹åå ¶åèç¹ * @param oid å½åèç¹ä¸»é® * @return æ¥è¯¢ç»æ */ List<CodeClassify> selectStartWithCurrentOid(String oid); /** * æ¹éæ´æ°åç±»ç¶æ * @param classifyList */ void batchUpdateLcStatus(@Param("records") List<CodeClassify> classifyList); } Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
@@ -359,20 +359,32 @@ @Override public R updateLcStatus(String oid, String lcStatus){ //æ¥è¯¢ä¿®æ¹åts CodeClassify codeClassify = codeClassifyMapper.selectById(oid);//ä¸»è¦æ¯ä¸ºäºæ¥è¯¢ts codeClassify.setLcStatus(lcStatus); codeClassify.setTs(new Date()); codeClassify.setLastModifyTime(new Date()); codeClassify.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); List<CodeClassify> classifyList = codeClassifyMapper.selectStartWithCurrentOid(oid); Date now = new Date(); String userId = String.valueOf(AuthUtil.getUserId()); classifyList = classifyList.stream().map(s -> { s.setLcStatus(lcStatus); s.setTs(now); s.setLastModifier(userId); s.setLastModifyTime(now); return s; }).collect(Collectors.toList()); // //æ¥è¯¢ä¿®æ¹åts // CodeClassify codeClassify = codeClassifyMapper.selectById(oid);//ä¸»è¦æ¯ä¸ºäºæ¥è¯¢ts // codeClassify.setLcStatus(lcStatus); // codeClassify.setTs(new Date()); // codeClassify.setLastModifyTime(new Date()); // codeClassify.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); //å¯ç¨ãåç¨ // int u = codeClassifyMapper.updateLcStatus(oid,lcStatus); int count = codeClassifyMapper.updateById(codeClassify); // int count = codeClassifyMapper.updateById(codeClassify); codeClassifyMapper.batchUpdateLcStatus(classifyList); // //å¤çæ°æ®éæé»è¾,æååæ§è¡éæç¬¬ä¸æ¥,åç±»æ°æ®ç¹æ®å¤çã // if(u!=0) { // codeDuckingServiceI.insertCache1(lcStatus,lcStatus,DOCKING_DEFAULT_CLASSIFY, DOCKING_DEFAULT_CLASSIFYOID, oid, codeClassifyDO_old.getTs()); // } return R.data(SqlHelper.retBool(count)); // return R.data(SqlHelper.retBool(count)); return R.success(""); } /** Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java
@@ -31,6 +31,8 @@ import com.vci.ubcs.code.service.ICodeClstemplateService; import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO; import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateVO; import com.vci.ubcs.flow.core.entity.ProcessTemplate; import com.vci.ubcs.flow.core.feign.IFlowClient; import com.vci.ubcs.starter.exception.VciBaseException; import com.vci.ubcs.starter.revision.model.TreeQueryObject; import com.vci.ubcs.starter.revision.model.TreeWrapperOptions; @@ -106,6 +108,8 @@ private CodeClassifyTemplateMapper codeClassifyTemplateMapper; @Autowired(required = false) private CodePhaseAttrServiceImpl codePhaseattrServiceImpl; @Autowired(required = false) private IFlowClient iFlowClient; @Override public IPage<CodeClassifyTemplateVO> selectPlCodeClstemplatePage(IPage<CodeClassifyTemplateVO> page, CodeClassifyTemplateVO plCodeClstemplate) { @@ -545,7 +549,7 @@ } //å¤å¶æ¨¡æ¿æµç¨ List<CodeClassifyProcessTemp> codeClassifyProcessTempDOList = copyTemplateProcess(templateOldOid,templateNewOid); List<ProcessTemplate> codeClassifyProcessTempDOList = copyTemplateProcess(templateOldOid,templateNewOid); //å¤å¶æ¨¡æ¿é¶æ®µï¼é¶æ®µå±æ§ Map phase_attrMap = copyTemplatePhase_attr(templateOldOid,templateNewOid); @@ -557,7 +561,7 @@ //ä¿åæ¨¡æ¿æµç¨ if(!CollectionUtils.isEmpty(codeClassifyProcessTempDOList)) { codeClsflowtempServiceImpl.saveBatch(codeClassifyProcessTempDOList); iFlowClient.processBatchSave(codeClassifyProcessTempDOList); } //模æ¿é¶æ®µ if(!CollectionUtils.isEmpty(codeClassifyPhaseDOList)) { @@ -619,7 +623,7 @@ List<CodeClassifyTemplateAttr> codeClassifyTemplateAttrDOList = copyTemplateAttr(oldOid,newOid); //å¤å¶æ¨¡æ¿æµç¨ List<CodeClassifyProcessTemp> codeClassifyProcessTempDOList = copyTemplateProcess(oldOid,newOid); List<ProcessTemplate> codeClassifyProcessTempDOList = copyTemplateProcess(oldOid,newOid); //å¤å¶æ¨¡æ¿é¶æ®µï¼é¶æ®µå±æ§ Map phase_attrMap = copyTemplatePhase_attr(oldOid,newOid); @@ -633,7 +637,7 @@ // baseMapper.insert(codeClassifyTemplateDOList); this.saveBatch(codeClassifyTemplateDOList); codeTempbuttonServiceImpl.saveBatch(codeClassifyTemplateButtonDOList); codeClsflowtempServiceImpl.saveBatch(codeClassifyProcessTempDOList); iFlowClient.processBatchSave(codeClassifyProcessTempDOList); codeClstempattrService.saveBatch(codeClassifyTemplateAttrDOList); codeTempphaseServiceImpl.saveBatch(codeClassifyPhaseDOList); codePhaseattrServiceImpl.saveBatch(codePhaseAttrDOList); @@ -696,22 +700,17 @@ /** * å¤å¶æ¨¡æ¿æµç¨ */ public List<CodeClassifyProcessTemp> copyTemplateProcess(String templateOldOid,String templateNewOid){ // VciQueryWrapperForDO processWrapper = new VciQueryWrapperForDO(CodeClassifyProcessTempDO.class); // processWrapper.addQueryMap("classifyTemplateOid",templateOldOid); // Map<String,Object> condition = new HashMap<>(1); // condition.put("classifyTemplateOid",templateOldOid); QueryWrapper<CodeClassifyProcessTemp> wrapper = new QueryWrapper<>(); wrapper.eq("classifyTemplateOid",templateOldOid); List<CodeClassifyProcessTemp> codeClsflowtempEntities = codeClsflowtempServiceImpl.list(wrapper); // List<CodeClassifyProcessTempDO> codeClassifyProcessTempDOList = codeClassifyProcessTempDaoI.selectByWrapper(processWrapper);//è¦ä¿åçæ°çæ¨¡æ¿æµç¨ for (CodeClassifyProcessTemp codeClassifyProcessTempDO:codeClsflowtempEntities){ // String newOid = VciBaseUtil.getPk(); codeClassifyProcessTempDO.setOid(null); //codeClassifyProcessTempDO.setCodeClassifyOid(templateNewOid); codeClassifyProcessTempDO.setClassifyTemplateOid(templateNewOid); // codeClsflowtempMapper.insert(codeClassifyProcessTempDO); public List<ProcessTemplate> copyTemplateProcess(String templateOldOid,String templateNewOid){ Map<String,Object> wrapperMap = new HashMap(); wrapperMap.put("template_id",templateOldOid); R<List<ProcessTemplate>> listR = iFlowClient.selectByWrapper(wrapperMap); if(!listR.isSuccess()){ throw new VciBaseException("æ¥è¯¢æ¨¡æ¿æµç¨æ¶åºéï¼è¯·éè¯ï¼"); } List<ProcessTemplate> codeClsflowtempEntities = listR.getData(); for (ProcessTemplate codeClassifyProcessTempDO:codeClsflowtempEntities){ codeClassifyProcessTempDO.setId(null); codeClassifyProcessTempDO.setTemplateId(templateNewOid); //modify by lihang - @20220406 设置模æ¿ä¸»é®ä½ç½®åºéï¼å¯¼è´åççæ¨¡æ¿ä¸çæµç¨æ¯ç©ºçã } return codeClsflowtempEntities; Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -355,15 +355,10 @@ throw new VciBaseException("æªæ¥è¯¢å°ç¸å ³æ°æ®ã"); } //è¿éè¦ä¿®æ¹allCodeççå½å¨æ // Map<String, String> conditionMap = new HashMap<>(); QueryWrapper<CodeAllCode> allCodeWrapper = new QueryWrapper<>(); allCodeWrapper.eq("createcodebtm", baseModelDTO.getBtmname()); allCodeWrapper.in("createcodeoid", oids); // conditionMap.put("createcodeoid", QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(oids.toArray(new String[0])) + ")"); // conditionMap.put("createcodebtm", baseModelDTO.getBtmname()); List<CodeAllCode> codeCbos = codeAllCodeService.selectByWrapper(allCodeWrapper); // List<ClientBusinessObject> codeCbos = boService.queryCBO(MdmBtmTypeConstant.CODE_ALL_CODE, conditionMap); // åæ¶éè¦ä¸å¡æ°æ®å é¤ List<CodeAllCode> codeCbos = codeAllCodeService.selectByWrapper(allCodeWrapper);// åæ¶éè¦ä¸å¡æ°æ®å é¤ if (CodeDefaultLC.TASK_BACK.getValue().equals(baseModelDTO.getLcStatus())) { R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(baseModelDTO.getBtmname())); if (!listR.isSuccess() || listR.getData().size() == 0) { @@ -376,8 +371,11 @@ for (BaseModel baseModel : baseModels) { baseModel.setLcStatus(baseModelDTO.getLcStatus()); } updateBatchByBaseModel(baseModelDTO.getBtmname(), baseModels); } R r = updateBatchByBaseModel(baseModelDTO.getBtmname(), baseModels); if(!r.isSuccess()){ throw new VciBaseException("æ´æ°æ°æ®åºéï¼éè¯ï¼"+r.getMsg()); } } for (CodeAllCode codeCbo : codeCbos) { codeCbo.setLcStatus(baseModelDTO.getLcStatus()); } @@ -651,6 +649,7 @@ } wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap); }); conditionMap.put("CODETEMPLATEOID","'" + orderDTO.getTemplateOid() + "'"); //没æéå¶åç±»ï¼ä½æ¯ä¸ä¸ªæ¨¡æ¿åªå¯è½å¨ä¸ä¸ªä¸å¡ç±»åéé¢ï¼æä»¥ç´æ¥æ¥è¯¢è¿ä¸ªä¸å¡ç±»åå³å¯ @@ -3396,9 +3395,9 @@ && ("Integer").equals(setter.getParameterTypes()[0].getSimpleName())) { setter.invoke(obj, ((BigDecimal) map.get(property.getName().toUpperCase())).intValue()); map.remove(property.getName().toUpperCase()); } else if (map.get(property.getName().toUpperCase()) != null) { } else if (map.containsKey(property.getName().toUpperCase())) { if(setter.getParameterTypes()[0].getSimpleName().equals("String")){ setter.invoke(obj, String.valueOf(map.get(property.getName().toUpperCase()))); setter.invoke(obj, map.get(property.getName().toUpperCase()) == null ? null:String.valueOf(map.get(property.getName().toUpperCase()))); }else{ setter.invoke(obj, map.get(property.getName().toUpperCase())); } Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -39,7 +39,9 @@ <result column="CODERESEMBLERULEOID" property="codeResembleRuleOid"/> <result column="TENANT_ID" property="tenantId"/> </resultMap> <sql id="tableName"> pl_code_classify </sql> <select id="selectPlCodeClassifyPage" resultMap="plCodeClassifyResultMap"> select * from PL_CODE_CLASSIFY where is_deleted = 0 </select> @@ -487,4 +489,23 @@ </if> connect by prior PARENTCODECLASSIFYOID = codeclassify0.oid </select> <select id="selectStartWithCurrentOid" resultMap="plCodeClassifyResultMap"> select * from <include refid="tableName"/> start with oid = #{oid} connect by prior oid = parentcodeclassifyoid; </select> <update id="batchUpdateLcStatus" parameterType="java.util.List"> BEGIN <foreach collection="records" item="item" index="index" separator=";"> update <include refid="tableName"/> set lcstatus = #{item.lcStatus}, ts = #{item.ts}, lastModifyTime = #{item.lastModifyTime}, lastModifier = #{item.lastModifier} where oid = #{item.oid,jdbcType=VARCHAR} </foreach> ;END; </update> </mapper> Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
@@ -215,7 +215,7 @@ // çæ¬è§ååæ®µä¸è½ä¸ºç©º // vo.setNullableFlag(false); vo.setAttributeLength(150); if (Arrays.asList("lastr","firstr","lastv","firstv").contains(id)){ if (Arrays.asList("lastr","firstr","lastv","firstv","revisionseq","versionseq").contains(id)){ vo.setAttributeLength(5); vo.setAttrDataType(VciFieldTypeEnum.VTInteger.name()); }