From 49f6fd9f5f8ae4f30799c9fc27278796a927744d Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期一, 19 六月 2023 18:12:01 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
---
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUserC.java | 7
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/enumpck/ProcessTemplateTypeEnum.java | 4
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/mapper/UserMapper.java | 4
Source/UBCS/ubcs-service/ubcs-user/src/main/resources/mapper/UserMapper.xml | 6
Source/UBCS-WEB/src/api/resource/file.js | 14
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowEngineService.java | 2
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeClassifyTemplateMapper.xml | 6
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUser.java | 1
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java | 18 +
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowTaskUserController.java | 7
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowTaskUserServiceImpl.java | 87 +++++-
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java | 145 ++++++++++++
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/VCIFlowController.java | 44 +++
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/VICFlowService.java | 37 +++
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java | 18 +
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowProcessTSController.java | 4
Source/UBCS-WEB/src/components/file/main.vue | 224 ++++++++++++++---
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java | 14
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowEngineServiceImpl.java | 11
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/controller/UserController.java | 6
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowTaskUserService.java | 11
Source/UBCS-WEB/src/components/file/inDialog.vue | 2
22 files changed, 577 insertions(+), 95 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/resource/file.js b/Source/UBCS-WEB/src/api/resource/file.js
index bd737e9..520b333 100644
--- a/Source/UBCS-WEB/src/api/resource/file.js
+++ b/Source/UBCS-WEB/src/api/resource/file.js
@@ -15,35 +15,35 @@
export const remove = (oids) => {
return request({
url: '/api/ubcs-resource/fileController/deleteFile',
- method: 'post',
+ method: 'delete',
params: {
oids
}
})
}
-export const upload = (row) => {
+export const upload = (file) => {
return request({
url: '/api/ubcs-resource/fileController/uploadFile',
method: 'post',
- data: row
+ data: file
})
}
-export const update = (row) => {
+export const update = (file) => {
return request({
url: '/api/ubcs-resource/fileController/uploadFile',
method: 'post',
- data: row
+ data: file
})
}
-export const download = (oids) => {
+export const download = (fileOids) => {
return request({
url: '/api/ubcs-resource/fileController/downloadFilesByOids',
method: 'get',
params: {
- oids
+ fileOids
}
})
}
diff --git a/Source/UBCS-WEB/src/components/file/inDialog.vue b/Source/UBCS-WEB/src/components/file/inDialog.vue
index ffa15f5..574f0f2 100644
--- a/Source/UBCS-WEB/src/components/file/inDialog.vue
+++ b/Source/UBCS-WEB/src/components/file/inDialog.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <el-dialog :title="options.title|| '闄勪欢绠$悊'"
+ <el-dialog :title="options.title|| '闄勪欢鍒楄〃'"
:visible.sync="visible"
append-to-body
class="avue-dialog avue-dialog--top"
diff --git a/Source/UBCS-WEB/src/components/file/main.vue b/Source/UBCS-WEB/src/components/file/main.vue
index 04d3498..d3a2da1 100644
--- a/Source/UBCS-WEB/src/components/file/main.vue
+++ b/Source/UBCS-WEB/src/components/file/main.vue
@@ -44,11 +44,11 @@
</el-button>
</template>
</avue-crud>
- <el-dialog title="涓婁紶闄勪欢鍒楄〃"
+ <el-dialog title="闄勪欢绠$悊"
append-to-body
:visible.sync="attachBox"
width="555px">
- <avue-form ref="form" :option="attachOption" v-model="attachForm" :upload-before="uploadBefore" :upload-after="uploadAfter" :upload-error="uploadError">
+ <avue-form ref="form" :option="attachOption" v-model="attachForm" :upload-before="uploadBefore" :upload-after="uploadAfter" :upload-error="uploadError">
</avue-form>
</el-dialog>
</basic-container>
@@ -140,6 +140,16 @@
},
]
},
+ columnType: {
+ text: "input",
+ combox: "select",
+ truefalse: "switch",
+ number: "number",
+ textarea: "textarea",
+ datetime: "datetime",
+ date: "date",
+ refer: "refer",
+ },
data: [{
btmname: "fileobject",
createTime: "2023-06-14 16:08:50.002",
@@ -161,21 +171,44 @@
}],
attachForm: {},
attachOption: {
- submitBtn: true,
- emptyBtn: true,
- column: [
- {
- label: '闄勪欢涓婁紶',
- prop: 'attachFile',
- type: 'upload',
- dragFile: true,
- loadText: '鏂囦欢涓婁紶涓紝璇风◢绛�',
- span: 24,
- propsHttp: {
- res: 'data'
- },
- action: "/api/ubcs-resource/fileController/uploadFile"
- }
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ prop: 'fileDocClassify',
+ label: '鏂囦欢绫诲瀷',
+ props: {
+ label: 'value',
+ value: 'key'
+ },
+ change: () => {
+ (!!this.options.fileDocClassifyCombox) && this.changeFun('fileDocClassify');
+ },
+ blur: () => {
+ (!this.options.fileDocClassifyCombox) && this.changeFun('fileDocClassify');
+ },
+ value: this.options.fileDocClassify || "ADMIN_SHARE",
+ type: (!this.options.fileDocClassifyCombox) ? 'input' : 'select',
+ dicData: (this.options.fileDocClassifyCombox || []),//[{key: 'text', value: '鏂囨湰妗�'}]
+ display: (!!this.options.fileDocClassifyCombox)
+ }, {
+ label: '闄勪欢涓婁紶',
+ prop: 'attachFile',
+ type: 'upload',
+ dragFile: true,
+ accept: this.options.uploadAccept || 'file',
+ loadText: '鏂囦欢涓婁紶涓紝璇风◢绛�',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ data: {
+ ownbizOid:this.options.ownbizOid || "share",
+ ownBtmname:this.options.ownbizBtm || "share",
+ fileDocClassify:this.options.fileDocClassify || "ADMIN_SHARE",
+ fileDocClassifyName:this.options.fileDocClassifyName || "绠$悊鍛樺叡浜枃浠�"
+ },
+ action: "/api/ubcs-resource/fileController/uploadFile"
+ }
]
}
};
@@ -190,48 +223,144 @@
delBtn: this.vaildData(this.permission.attach_delete, false)
};
},
- ids() {
- let ids = [];
+ oids() {
+ let oids = [];
this.selectionList.forEach(ele => {
- ids.push(ele.id);
+ oids.push(ele.oid);
});
- return ids.join(",");
+ return oids.join(",");
}
},
+ mounted() {
+ this.setFormItem();
+ this.setParams()
+ },
methods: {
- setParams(){
- var params={
- ownbizOid:options.ownbizOid || '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9',
- ownbizBtm:options.ownbizBtm || 'wupin',
- fileDocClassify:options.fileDocClassify || '!=processAuditSuggest'
+ setFormItem(){
+ /*this.options.formItems=[{
+ field: 'fileDocClassify11',
+ title: '鏂囦欢绫诲瀷',
+ type: 'combox',
+ data: [{key: 'text', value: '鏂囨湰妗�'},{key: 'number', value: '鏁板瓧妗�'}]
+ }]*/
+ if(this.options && this.options.formItems){
+ this.options.formItems.forEach(item => {
+ // 璁剧疆琛ㄥ崟鏍¢獙鐨勮鍒欙紝鏂囨湰
+ let message = "璇烽�夋嫨";
+ let trigger = "change";
+ if (item.type === "text") {
+ message = "璇疯緭鍏�";
+ trigger = "blur";
+ }
+ this.attachOption.column.push( {
+ ...item,
+ label: item.title,
+ prop: item.field,
+ display: !item.hidden,
+ value: item.defaultValue,
+ disabled: item.readOnly,
+ type: this.columnType[item.type],
+ dicData: this.getDataList(item.type, item.data),
+ change: () => {
+ if(item.type !== "text" && item.type !== "number" && item.type !== "textarea"){
+ this.changeFun(item.field);
+ }
+ },
+ blur: () => {
+ if(item.type == "text" || item.type == "number" || item.type == "textarea"){
+ this.changeFun(item.field);
+ }
+ },
+ rules: [
+ {
+ required: item.required,
+ message: `璇�${message}${item.title}`,
+ trigger,
+ },
+ {
+ // 濡傛灉娌℃湁姝e垯鍒欏尮閰嶄换浣曞瓧绗�
+ pattern: item.verify ? item.verify : /[\s\S.]*/g,
+ message: item.tooltips,
+ trigger,
+ },
+ ],
+ props: {
+ label: 'value',
+ value: 'key'
+ }
+ })
+ })
}
- this.params=params;
+ },
+ changeFun( prop) {
+ this.attachOption.column[1].data[prop]=this.attachForm[prop]
+ },
+ getDataList(type, dicData) {
+ if (type === "truefalse") {
+ return [
+ {
+ key: false,
+ value: "鍚�",
+ },
+ {
+ key: true,
+ value: "鏄�",
+ },
+ ];
+ } else if (type === "combox") {
+ return dicData;
+ }
+ return [];
+ },
+ setParams(){
+ var queryMap = {
+ currentButtonKey:'VIEW',
+ ownbizOid:this.options.ownbizOid,
+ ownbizBtm:this.options.ownbizBtm
+ };
+ if(this.options.where){
+ Object.assign(queryMap,this.options.where);
+ }
+ this.params=queryMap;
},
handleUpload() {
+ this.attachOption.column[1].data.fileOid='';
+ delete this.attachOption.column[1].data.oid;
+ delete this.attachOption.column[1].data.updateFileFlag;
this.attachBox = true;
},
handleEdit() {
+ if(this.selectionList.length==0){
+ this.$message.error('璇烽�夋嫨闇�瑕佷慨鏀圭殑鏂囦欢')
+ return false;
+ }else if(this.selectionList.length>1){
+ this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�')
+ return false;
+ }
+ this.attachOption.column[1].data.fileOid=this.oids;
+ this.attachOption.column[1].data.oid=this.oids;
+ this.attachOption.column[1].data.updateFileFlag=true
this.attachBox = true;
},
uploadBefore(file, done, loading,column) {
- console.log(file,column)
- //濡傛灉浣犳兂淇敼file鏂囦欢,鐢变簬涓婁紶鐨刦ile鏄彧璇绘枃浠讹紝蹇呴』澶嶅埗鏂扮殑file鎵嶅彲浠ヤ慨鏀瑰悕瀛楋紝瀹屽悗璧嬪�煎埌done鍑芥暟閲�,濡傛灉涓嶄慨鏀圭殑璇濈洿鎺ュ啓done()鍗冲彲
- var newFile = new File([file], '1234', { type: file.type });
- done(newFile)
- this.$message.success('涓婁紶鍓嶇殑鏂规硶')
+ done();
},
uploadAfter(res, done, loading, column) {
- window.console.log(column);
- this.attachBox = false;
+ if(res.success){
+ this.attachBox = false;
+ this.$message.success('鏂囦欢涓婁紶鎴愬姛')
+ }else{
+ this.$message.error(res.msg);
+ }
this.refreshChange();
done();
},
uploadError(error, column) {
- this.$message.success('涓婁紶澶辫触鍥炶皟')
- console.log(error, column)
+ this.$message.error('涓婁紶鏂囦欢鍑虹幇浜嗗紓甯�')
},
handleDownload(row) {
- window.open(`${row.link}`);
+ //window.open(`${row.link}`);
+ download(row.oid)
},
rowDel(row) {
this.$confirm("纭畾灏嗛�夋嫨鏂囦欢鍒犻櫎?", {
@@ -240,7 +369,7 @@
type: "warning"
})
.then(() => {
- return remove(row.id);
+ return remove(row.oid);
})
.then(() => {
this.onLoad(this.page);
@@ -261,7 +390,7 @@
type: "warning"
})
.then(() => {
- return remove(this.ids);
+ return remove(this.oids);
})
.then(() => {
this.onLoad(this.page);
@@ -287,7 +416,7 @@
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
- this.onLoad(this.page, params);
+ this.onLoad(this.page);
done();
},
selectionChange(list) {
@@ -306,16 +435,21 @@
refreshChange() {
this.onLoad(this.page, this.query);
},
- onLoad(page, params) {
- //this.loading = true;
- params=this.params || {}
- /*getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ onLoad(page, params={}) {
+ this.loading = true;
+ var query={}
+ if (this.query) {
+ for (var key in this.query) {
+ query['conditionMap["' + key + '"]'] = this.query[key];
+ }
+ }
+ getList(page.currentPage, page.pageSize, Object.assign(params,this.params, query,this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
- });*/
+ });
}
}
};
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java
index a84b86b..c2ce243 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java
@@ -25,6 +25,7 @@
import com.vci.ubcs.flow.engine.entity.FlowProcess;
import com.vci.ubcs.flow.engine.utils.FlowCache;
import lombok.AllArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
import org.flowable.engine.HistoryService;
import org.flowable.engine.TaskService;
import org.flowable.engine.history.HistoricProcessInstance;
@@ -117,7 +118,7 @@
HistoricProcessInstanceQuery historyQuery = historyService.createHistoricProcessInstanceQuery().startedBy(taskUser).orderByProcessInstanceStartTime().desc();
- if (bladeFlow.getCategory() != null) {
+ if (StringUtils.isNotEmpty(bladeFlow.getCategory())) {
historyQuery.processDefinitionCategory(bladeFlow.getCategory());
}
if (bladeFlow.getProcessDefinitionName() != null) {
@@ -142,7 +143,7 @@
String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
if (businessKey.length > 1) {
flow.setBusinessTable(businessKey[0]);
- flow.setBusinessId(businessKey[1]);
+ flow.setBusinessId(businessKey.length>1?businessKey[1]:"1");
}
flow.setHistoryActivityName(historicProcessInstance.getName());
flow.setProcessInstanceId(historicProcessInstance.getId());
@@ -190,7 +191,7 @@
HistoricTaskInstanceQuery doneQuery = historyService.createHistoricTaskInstanceQuery().taskAssignee(taskUser).finished()
.includeProcessVariables().orderByHistoricTaskInstanceEndTime().desc();
- if (bladeFlow.getCategory() != null) {
+ if (StringUtils.isNotEmpty(bladeFlow.getCategory())) {
doneQuery.processCategoryIn(Func.toStrList(bladeFlow.getCategory()));
}
if (bladeFlow.getProcessDefinitionName() != null) {
@@ -230,7 +231,7 @@
if (Func.isNotEmpty(historicProcessInstance)) {
String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
flow.setBusinessTable(businessKey[0]);
- flow.setBusinessId(businessKey[1]);
+ flow.setBusinessId(businessKey.length>1?businessKey[1]:"1");
if (historicProcessInstance.getEndActivityId() != null) {
flow.setProcessIsFinished(FlowEngineConstant.STATUS_FINISHED);
} else {
@@ -278,7 +279,8 @@
* @param status 鐘舵��
*/
private void buildFlowTaskList(BladeFlow bladeFlow, List<BladeFlow> flowList, TaskQuery taskQuery, String status) {
- if (bladeFlow.getCategory() != null) {
+// if (bladeFlow.getCategory() != null) {
+ if (StringUtils.isNotEmpty(bladeFlow.getCategory())) {
taskQuery.processCategoryIn(Func.toStrList(bladeFlow.getCategory()));
}
if (bladeFlow.getProcessDefinitionName() != null) {
@@ -305,7 +307,7 @@
if (Func.isNotEmpty(historicProcessInstance)) {
String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
flow.setBusinessTable(businessKey[0]);
- flow.setBusinessId(businessKey[1]);
+ flow.setBusinessId(businessKey.length>1?businessKey[1]:"1");
}
FlowProcess processDefinition = FlowCache.getProcessDefinition(task.getProcessDefinitionId());
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/ProcessTSController.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowProcessTSController.java
similarity index 97%
rename from Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/ProcessTSController.java
rename to Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowProcessTSController.java
index 4bf34b9..37ecad5 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/ProcessTSController.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowProcessTSController.java
@@ -29,7 +29,7 @@
@RestController
@RequestMapping("processTS")
@AllArgsConstructor
-public class ProcessTSController {
+public class FlowProcessTSController {
private final FlowEngineService flowEngineService;
private final ProcessTemplateService processTemplateService;
@@ -41,7 +41,7 @@
@GetMapping("/tlist")
public R<IPage<ProcessTemplate>> tlist(@RequestParam Map<String, Object> flow, Query query) {
IPage<ProcessTemplate> pages = processTemplateService.page(Condition.getPage(query), Condition.getQueryWrapper(flow, ProcessTemplate.class)
- .select("id,model_key modelKey,model_name modelName,button_Type_Key buttonTypeKey,button_Type_value buttonTypeValue")
+ .select("id,model_key modelKey,model_name modelName,button_Type_Key buttonTypeKey,button_Type_value buttonTypeValue,description")
.orderByDesc("last_updated"));
return R.data(pages);
}
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowTaskUserController.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowTaskUserController.java
index 8aaba6c..bc67b15 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowTaskUserController.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowTaskUserController.java
@@ -8,6 +8,8 @@
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
+import java.util.List;
+
/**
* 娴佺▼task瀹℃壒鎺у埗
@@ -24,11 +26,12 @@
/**
* 娴佺▼task瀹℃壒浜哄憳鍒楄〃
+ * ProcessTemplateTypeEnum
* @return
*/
@GetMapping("list")
- public R<FlowTaskUserC> list() {
- return R.data(taskUserService.getUser());
+ public R<Object> list(String type,String templateId) {
+ return R.data(taskUserService.getUser(type,templateId));
}
/**
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/VCIFlowController.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/VCIFlowController.java
new file mode 100644
index 0000000..fba4637
--- /dev/null
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/VCIFlowController.java
@@ -0,0 +1,44 @@
+package com.vci.ubcs.flow.engine.controller;
+
+import com.vci.ubcs.flow.core.entity.BladeFlow;
+import com.vci.ubcs.flow.engine.entity.FlowTaskUserC;
+import com.vci.ubcs.flow.engine.service.FlowTaskUserService;
+import com.vci.ubcs.flow.engine.service.VICFlowService;
+import lombok.AllArgsConstructor;
+import org.springblade.core.tenant.annotation.NonDS;
+import org.springblade.core.tool.api.R;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 瀹氬埗娴佺▼銆佸惎鍔ㄣ�佽浆鍙戙�佸畬鎴愭帶鍒跺櫒
+ *
+ * @author wang1
+ */
+@NonDS
+@RestController
+@RequestMapping("vciflow")
+@AllArgsConstructor
+public class VCIFlowController {
+
+ private final VICFlowService vicFlowService;
+
+ /**
+ * 鍚姩
+ * @return
+ */
+ @PostMapping("start")
+ public R<BladeFlow> list(@RequestBody FlowTaskUserC flowTaskUserC) {
+ return vicFlowService.startProcess(flowTaskUserC);
+ }
+
+ /**
+ * 娴佺▼棰勬祴
+ */
+ @PostMapping("a")
+ public R<BladeFlow> a(@RequestBody FlowTaskUserC flowTaskUserC) {
+ return vicFlowService.startProcess(flowTaskUserC);
+ }
+}
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUser.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUser.java
index dde1fb2..fbab2e8 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUser.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUser.java
@@ -37,6 +37,7 @@
private String id;
private String name;//淇濆瓨鐨勮繖涓敹钘忓悕绉�
private String modelKey;
+ private String modelName;
private String classifyId;
private String templateId;
private String taskId;//娴佺▼taskid
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUserC.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUserC.java
index 9e862db..8e77956 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUserC.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUserC.java
@@ -34,10 +34,17 @@
private String createdBy;
private String name;//淇濆瓨鐨勮繖涓敹钘忓悕绉�
private String modelKey;
+ private String modelName;
+ private String processName;
+ private String processDesc;
+ private String topName;
private String classifyId;
private String templateId;
private String taskId;//闃舵id锛屽氨鏄祦绋媡askid
private String taskName;//闃舵鍚嶇О
private List<FlowTaskUser> flowTaskUsers;//姣忎釜鑺傜偣鏀惰棌浜�
private List<ProcessStageAttr> processStageAttr;//娴佺▼闃舵淇濆瓨鐨勫睘鎬�
+ private List<String> ids;//娴佺▼鍙戣捣涓紶閫掕繃鏉ョ殑鏁版嵁id
+
+
}
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowEngineService.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowEngineService.java
index 9ea5718..de9f38b 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowEngineService.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowEngineService.java
@@ -173,4 +173,6 @@
*/
List<Map<String,String>> getNodeByFlowableKey(String key);
+ String getTaskIdString();
+
}
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowTaskUserService.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowTaskUserService.java
index a7ba9b4..d5950d0 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowTaskUserService.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowTaskUserService.java
@@ -35,9 +35,10 @@
/**
* 鏌ヨ褰撳墠鐧婚檰浜哄杩欎釜娴佺▼鐨則askUser
+ * @param type ProcessTemplateTypeEnum
* @return
*/
- FlowTaskUserC getUser();
+ Object getUser(String type,String templateId);
/**
* 鏂板/淇敼娴佺▼鑺傜偣瀹℃牳浜洪厤缃�佸苟涓斾慨鏀规祦绋媥ml閮ㄧ讲鏂囦欢
@@ -51,4 +52,12 @@
* @param name
*/
void deleteUser(String name);
+
+ /**
+ * 閫氳繃妯℃澘id鍜屾ā鍨媖ey鏌ヨ瀹℃壒浜�
+ * @param templateId
+ * @param modelKey
+ * @return
+ */
+ List<FlowTaskUser> getTaskUserByTemplateAndModelKey(String templateId,String modelKey);
}
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/VICFlowService.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/VICFlowService.java
new file mode 100644
index 0000000..6f14049
--- /dev/null
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/VICFlowService.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 搴勯獮 (smallchill@163.com)
+ */
+package com.vci.ubcs.flow.engine.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.vci.ubcs.flow.core.entity.BladeFlow;
+import com.vci.ubcs.flow.engine.entity.FlowTaskUser;
+import com.vci.ubcs.flow.engine.entity.FlowTaskUserC;
+import org.springblade.core.tool.api.R;
+
+/**
+ * FlowService
+ *
+ * @author wang1
+ */
+public interface VICFlowService{
+
+ /**
+ * 鍚姩娴佺▼
+ * @return
+ */
+ R<BladeFlow> startProcess(FlowTaskUserC flowTaskUserC);
+}
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowEngineServiceImpl.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowEngineServiceImpl.java
index a11071e..297d6ca 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowEngineServiceImpl.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowEngineServiceImpl.java
@@ -93,6 +93,8 @@
private static final String USR_TASK = "userTask";
private static final String IMAGE_NAME = "image";
private static final String XML_NAME = "xml";
+ private static final String TASKID = "taskId";
+ private static final String TASKNAME = "taskName";
private static final Integer INT_1024 = 1024;
private static final BpmnJsonConverter BPMN_JSON_CONVERTER = new BpmnJsonConverter();
private static final BpmnXMLConverter BPMN_XML_CONVERTER = new BpmnXMLConverter();
@@ -508,16 +510,19 @@
for (FlowElement flowElement : process.getFlowElements()) {
if (flowElement instanceof UserTask) {
Map<String,String> mi = new HashMap<>();
- mi.put("taskId",flowElement.getId());
- mi.put("taskName",flowElement.getName());
+ mi.put(TASKID,flowElement.getId());
+ mi.put(TASKNAME,flowElement.getName());
ll.add(mi);
}
}
}
-
return ll;
}
+ @Override
+ public String getTaskIdString(){
+ return TASKID;
+ }
/**
* 鏄惁宸插畬缁�
*
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowTaskUserServiceImpl.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowTaskUserServiceImpl.java
index ecdc82a..993a297 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowTaskUserServiceImpl.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowTaskUserServiceImpl.java
@@ -28,6 +28,7 @@
import com.vci.ubcs.flow.engine.entity.*;
import com.vci.ubcs.flow.engine.mapper.FlowMapper;
import com.vci.ubcs.flow.engine.mapper.FlowTaskUserMapper;
+import com.vci.ubcs.flow.engine.mapper.ProcessTemplateMapper;
import com.vci.ubcs.flow.engine.service.FlowEngineService;
import com.vci.ubcs.flow.engine.service.FlowTaskUserService;
import com.vci.ubcs.flow.engine.utils.FlowCache;
@@ -92,23 +93,62 @@
private FlowEngineService flowEngineService;
private FlowTaskUserMapper flowTaskUserMapper;
+ private ProcessTemplateMapper processTemplateMapper;
/**
* 鏌ヨ褰撳墠鐧婚檰浜哄杩欎釜娴佺▼鐨則askUser
+ * @param type ProcessTemplateTypeEnum
* @return
*/
@Override
- public FlowTaskUserC getUser(){
- QueryWrapper<FlowTaskUser> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("CREATED_BY", AuthUtil.getUserId());
- List<FlowTaskUser> flowTaskUsers = baseMapper.selectList(queryWrapper);
- FlowTaskUserC flowTaskUserCR = new FlowTaskUserC();
- if(flowTaskUsers.size()==0){
- return flowTaskUserCR;
+ public Object getUser(String type,String templateId){
+ Map kv = new HashMap();
+
+ //鏍规嵁type鏌ヨtop娴佺▼鏁版嵁
+ Map<String, Object> m = new HashMap<>();
+ m.put("button_type_key", type);
+ m.put("template_id", templateId);
+ List<ProcessTemplate> processTemplates = processTemplateMapper.selectByMap(m);
+ if(processTemplates.size()==0){
+ throw new ServiceException("涓婚搴撳畾涔�-妯℃澘绠$悊-娴佺▼妯℃澘锛屾病鏈夌粦瀹氭祦绋�!");
}
- flowTaskUserCR.setName(flowTaskUsers.get(0).getName());//鏀惰棌鍚嶇О
- flowTaskUserCR.setFlowTaskUsers(flowTaskUsers);
- return flowTaskUserCR;
+ ProcessTemplate processTemplate = processTemplates.get(0);
+ kv.put("flow",processTemplate);
+
+
+ //top鏀惰棌閮ㄥ垎鏁版嵁
+ QueryWrapper<FlowTaskUser> queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("CREATED_BY", TaskUtil.getTaskUser());
+ List<FlowTaskUser> flowTaskUsers = baseMapper.selectList(queryWrapper);
+ List<FlowTaskUserC> cl = new ArrayList<>();
+
+ Map<String,List<FlowTaskUser>> nameMap = new HashMap<>();
+ for(FlowTaskUser flowTaskUser:flowTaskUsers){
+ String name = flowTaskUser.getName();//鏀惰棌鍚嶇О
+ List<FlowTaskUser> flowTaskUserListo = null;
+ if(nameMap.get(name)==null){
+ flowTaskUserListo = new ArrayList<>();
+ }else {
+ flowTaskUserListo = nameMap.get(name);
+ }
+ flowTaskUserListo.add(flowTaskUser);
+ nameMap.put(name,flowTaskUserListo);
+ }
+
+ for (String name:nameMap.keySet()){
+ FlowTaskUserC flowTaskUserCR = new FlowTaskUserC();
+ flowTaskUserCR.setName(name);//鏀惰棌鍚嶇О
+ flowTaskUserCR.setModelKey(nameMap.get(name).get(0).getModelKey());
+ flowTaskUserCR.setModelName(nameMap.get(name).get(0).getModelName());
+ flowTaskUserCR.setFlowTaskUsers(nameMap.get(name));
+ cl.add(flowTaskUserCR);
+ }
+ kv.put("collect",cl);
+
+ //鏁版嵁鑺傜偣鏁版嵁
+ List<Map<String,String>> tl = flowEngineService.getNodeByFlowableKey(processTemplate.getModelKey());
+ kv.put("user",tl);
+ return kv;
}
@Override
@@ -117,17 +157,20 @@
String name = flowTaskUserC.getName();//鏀惰棌鍚嶇О
//鏂板鎯呭喌涓嬮獙璇佹敹钘忓悕绉颁笉閲嶅
- if(flowTaskUsers.get(0).getId()!=null) {
- Map<String, Object> m = new HashMap<>();
- m.put("name", name);
- QueryWrapper q = Condition.getQueryWrapper(m, FlowTaskUser.class)
- .select("id,model_key modelKey,name,description,version,created,last_updated lastUpdated");
- if(flowTaskUserMapper.selectCount(q)>0){
- throw new ServiceException("鏀惰棌鍚嶇О宸茬粡瀛樺湪!");
- }
+ Map<String, Object> m = new HashMap<>();
+ m.put("name", name);
+ m.put("created_by", TaskUtil.getTaskUser());
+ QueryWrapper q = Condition.getQueryWrapper(m, FlowTaskUser.class)
+ .select("1");
+ if(flowTaskUserMapper.selectCount(q)>0){
+ throw new ServiceException("鏀惰棌鍚嶇О宸茬粡瀛樺湪!");
}
+
for (FlowTaskUser flowTaskUseri:flowTaskUsers){
flowTaskUseri.setName(name);
+ flowTaskUseri.setCreatedBy(TaskUtil.getTaskUser());
+ flowTaskUseri.setTemplateId(flowTaskUserC.getTemplateId());
+ flowTaskUseri.setModelKey(flowTaskUserC.getModelKey());
}
//鏂板銆佷慨鏀�
this.saveOrUpdateBatch(flowTaskUsers);
@@ -139,8 +182,14 @@
public void deleteUser(String name){
Map<String, Object> m = new HashMap<>();
m.put("name", name);
- m.put("created_by", AuthUtil.getUserId());
+ m.put("created_by", TaskUtil.getTaskUser());
baseMapper.deleteByMap(m);
}
+ public List<FlowTaskUser> getTaskUserByTemplateAndModelKey(String templateId,String modelKey){
+ Map<String, Object> m = new HashMap<>();
+ m.put("template_id", templateId);
+ m.put("model_key", modelKey);
+ return baseMapper.selectByMap(m);
+ }
}
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java
new file mode 100644
index 0000000..9012c4b
--- /dev/null
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 搴勯獮 (smallchill@163.com)
+ */
+package com.vci.ubcs.flow.engine.service.impl;
+
+import com.vci.ubcs.flow.core.constant.ProcessConstant;
+import com.vci.ubcs.flow.core.entity.BladeFlow;
+import com.vci.ubcs.flow.core.utils.TaskUtil;
+import com.vci.ubcs.flow.engine.entity.*;
+import com.vci.ubcs.flow.engine.service.FlowEngineService;
+import com.vci.ubcs.flow.engine.service.FlowTaskUserService;
+import com.vci.ubcs.flow.engine.service.VICFlowService;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.flowable.bpmn.model.*;
+import org.flowable.engine.*;
+import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
+import org.flowable.engine.repository.ProcessDefinition;
+import org.flowable.engine.runtime.ProcessInstance;
+import org.flowable.task.api.Task;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.support.Kv;
+import org.springframework.stereotype.Service;
+import java.util.*;
+
+/**
+ * 宸ヤ綔娴佹湇鍔″疄鐜扮被
+ *
+ * @author Chill
+ */
+@Slf4j
+@Service
+@AllArgsConstructor
+public class VCIFlowserviceImpl implements VICFlowService {
+
+ private final RuntimeService runtimeService;
+ private final IdentityService identityService;
+ private final RepositoryService repositoryService;
+ private final TaskService taskService;
+ private final FlowTaskUserService flowTaskUserService;
+ private final FlowEngineService flowEngineService;
+ private final HistoryService historyService;
+
+ @Override
+ public R<BladeFlow> startProcess(FlowTaskUserC flowTaskUserC){
+ String modelKey = flowTaskUserC.getModelKey();
+ String templateId = flowTaskUserC.getTemplateId();
+
+ Kv kv = Kv.create()
+ .set(ProcessConstant.TASK_VARIABLE_CREATE_USER, AuthUtil.getUserName());
+
+ // 璁剧疆娴佺▼鍚姩鐢ㄦ埛
+ identityService.setAuthenticatedUserId(TaskUtil.getTaskUser());
+
+ // 寮�鍚祦绋�
+ //鏌ヨ鏈�鏂扮殑娴佺▼閮ㄧ讲id
+ ProcessDefinition latesDefinition = repositoryService.createProcessDefinitionQuery().latestVersion().processDefinitionKey(modelKey).singleResult();
+ String processDefinitionId = latesDefinition.getId();
+
+ //鏌ヨ姣忎竴姝ュ鏍镐汉
+ List<FlowTaskUser> taskUsers = flowTaskUserService.getTaskUserByTemplateAndModelKey(templateId,modelKey);
+ Set<String> taskIdSet = new HashSet<>();
+ for (FlowTaskUser taskUser:taskUsers){
+ kv.put(taskUser.getTaskId(),TaskUtil.getTaskUser(taskUser.getUserId()));
+ taskIdSet.add(taskUser.getTaskId());
+ }
+
+ //瀵规瘮閰嶇疆鐨勫鏍镐汉鍛樺拰娴佺▼涓妭鐐规槸鍚︿竴鑷达紝鍙兘瀛樺湪娴佺▼鑺傜偣鍙樻洿浜嗭紝澶氫簡鎴栬�呭皯浜嗚妭鐐癸紝浣嗘槸閰嶇疆瀹℃牳浜哄憳鐨勮妭鐐规病鏈夊彉
+ List<Map<String,String>> processTasks = flowEngineService.getNodeByFlowableKey(modelKey);
+ for (Map<String,String> mi:processTasks){
+ String taskId = mi.get(flowEngineService.getTaskIdString());
+ if(!taskIdSet.contains(taskId)){
+ throw new ServiceException("娴佺▼宸查噸鏂伴儴缃诧紝鑺傜偣宸叉敼鍙橈紝璇疯缃鏍镐汉鍛橈紒");
+ }
+ }
+ if(taskIdSet.size()!=processTasks.size()){
+ throw new ServiceException("娴佺▼宸查噸鏂伴儴缃诧紝鑺傜偣宸叉敼鍙橈紝璇疯缃鏍镐汉鍛橈紒");
+ }
+
+ //娴佺▼涓枃浠躲�佸彉閲忕瓑
+ //do..
+
+ ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefinitionId, modelKey, kv);
+ // 缁勮娴佺▼閫氱敤绫�
+ BladeFlow flow = new BladeFlow();
+ flow.setProcessInstanceId(processInstance.getId());
+
+ nextFlowNode("next","039ac1d8-0c1e-11ee-bebb-5c3a4570456d");
+ return R.data(flow);
+ }
+
+ /**
+ * 鑾峰彇浠诲姟鑺傜偣
+ *
+ * @param node 鏌ヨ鑺傜偣閫夋嫨
+ * @param processInstanceId 娴佺▼瀹炰緥id
+ */
+ public void nextFlowNode(String node, String processInstanceId) {
+
+ Task task = taskService.createTaskQuery().processInstanceId(processInstanceId).active().singleResult();
+
+ ExecutionEntity ee = (ExecutionEntity) runtimeService.createExecutionQuery()
+ .executionId(task.getExecutionId()).singleResult();
+ // 褰撳墠瀹℃壒鑺傜偣
+ String crruentActivityId = ee.getActivityId();
+ BpmnModel bpmnModel = repositoryService.getBpmnModel(task.getProcessDefinitionId());
+ FlowNode flowNode = (FlowNode) bpmnModel.getFlowElement(crruentActivityId);
+ // 杈撳嚭杩炵嚎
+ List<SequenceFlow> outFlows = flowNode.getOutgoingFlows();
+ for (SequenceFlow sequenceFlow : outFlows) {
+ //褰撳墠瀹℃壒鑺傜偣
+ if ("now".equals(node)) {
+ FlowElement sourceFlowElement = sequenceFlow.getSourceFlowElement();
+ System.out.println("褰撳墠鑺傜偣: id=" + sourceFlowElement.getId() + ",name=" + sourceFlowElement.getName());
+ } else if ("next".equals(node)) {
+ // 涓嬩竴涓鎵硅妭鐐�
+ FlowElement targetFlow = sequenceFlow.getTargetFlowElement();
+ if (targetFlow instanceof UserTask) {
+ System.out.println("涓嬩竴鑺傜偣: id=" + targetFlow.getId() + ",name=" + targetFlow.getName());
+ }
+ // 濡傛灉涓嬩釜瀹℃壒鑺傜偣涓虹粨鏉熻妭鐐�
+ if (targetFlow instanceof EndEvent) {
+ System.out.println("涓嬩竴鑺傜偣涓虹粨鏉熻妭鐐癸細id=" + targetFlow.getId() + ",name=" + targetFlow.getName());
+ }
+ }
+
+
+ }
+ }
+}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/enumpck/ProcessTemplateTypeEnum.java b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/enumpck/ProcessTemplateTypeEnum.java
index 3284d8e..6f47626 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/enumpck/ProcessTemplateTypeEnum.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/enumpck/ProcessTemplateTypeEnum.java
@@ -20,12 +20,12 @@
/**
* 鍋滅敤
*/
- ENABLE("ENABLE","鍋滅敤"),
+ ENABLE("ENABLE","鍚敤"),
/**
* 鍚敤
*/
- DISABLE("DISABLE","鍚敤");
+ DISABLE("DISABLE","鍋滅敤");
/**
* 鏋氫妇鐨勫��
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeClassifyTemplateMapper.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeClassifyTemplateMapper.xml
index ff8c8b0..2518fb3 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeClassifyTemplateMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeClassifyTemplateMapper.xml
@@ -100,11 +100,11 @@
- <select id="selectChildHasReleaseTemplate" resultType="list">
+ <select id="selectChildHasReleaseTemplate" resultType="map">
select t.oid as oid, cls.oid as clsoid
- from platformbtm_codeclstemplate t
+ from pl_code_clstemplate t
left join (select oid
- from platformbtm_codeclassify
+ from pl_code_classify
where lcstatus = #{lcstatus}
start with oid = #{classifyoid}
connect by prior oid = parentcodeclassifyoid) cls
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/controller/UserController.java b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/controller/UserController.java
index 4fe20fa..5322e78 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/controller/UserController.java
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/controller/UserController.java
@@ -142,6 +142,12 @@
return R.data(UserWrapper.build().pageVO(pages));
}
+ @GetMapping("/allPage")
+ public R<List<UserVO>> allPage(User user,Long deptId) {
+ List<User> userss = userService.selectAllUser(user,deptId);
+ return R.data(UserWrapper.build().listVO(userss));
+ }
+
/**
* 鏂板鎴栦慨鏀�
*/
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/mapper/UserMapper.java b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/mapper/UserMapper.java
index 0d21766..847bac9 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/mapper/UserMapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/mapper/UserMapper.java
@@ -43,6 +43,8 @@
*/
List<User> selectUserPage(IPage<User> page, @Param("user") User user, @Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId);
+ List<User> selectUserPage(@Param("user") User user, @Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId);
+
/**
* 鑾峰彇鐢ㄦ埛
*
@@ -50,7 +52,7 @@
* @param account
* @return
*/
- User getUser(String tenantId, String account);
+ User getUser(String tenantId, String account,String name);
/**
* 鑾峰彇瀵煎嚭鐢ㄦ埛鏁版嵁
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java
index 51ace0f..1d38c73 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java
@@ -84,6 +84,15 @@
* 鑷畾涔夊垎椤�
*
* @param user
+ * @param deptId
+ * @return
+ */
+ List<User> selectAllUser(User user, Long deptId);
+
+ /**
+ * 鑷畾涔夊垎椤�
+ *
+ * @param user
* @param query
* @return
*/
@@ -107,6 +116,15 @@
UserInfo userInfo(String tenantId, String account);
/**
+ * 鐢ㄦ埛淇℃伅,涓哄暐涓嶅垹浜嗕笂杈归偅涓柟娉曞憿锛屽洜涓烘垜涓嶆暍,鐗垫壇鏈夌偣澶�
+ *
+ * @param tenantId
+ * @param account
+ * @return
+ */
+ UserInfo userInfo(String tenantId, String account,String name);
+
+ /**
* 鐢ㄦ埛淇℃伅
*
* @param tenantId
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
index 4502b3c..c66d5f2 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
@@ -162,6 +162,13 @@
}
@Override
+ public List<User> selectAllUser(User user, Long deptId){
+ List<Long> deptIdList = SysCache.getDeptChildIds(deptId);
+ List<User> users = baseMapper.selectUserPage(user, deptIdList, (AuthUtil.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : AuthUtil.getTenantId()));
+ return users;
+ }
+
+ @Override
public IPage<UserVO> selectUserSearch(UserVO user, Query query) {
LambdaQueryWrapper<User> queryWrapper = Wrappers.<User>query().lambda();
String tenantId = AuthUtil.getTenantId();
@@ -206,13 +213,20 @@
@Override
public UserInfo userInfo(String tenantId, String account) {
- User user = baseMapper.getUser(tenantId, account);
+ User user = baseMapper.getUser(tenantId, account,null);
return buildUserInfo(user);
}
@Override
+ public UserInfo userInfo(String tenantId, String account,String name) {
+ User user = baseMapper.getUser(tenantId, account,name);
+ UserInfo userInfo = buildUserInfo(user);
+ return null;
+ }
+
+ @Override
public UserInfo userInfo(String tenantId, String account, UserEnum userEnum) {
- User user = baseMapper.getUser(tenantId, account);
+ User user = baseMapper.getUser(tenantId, account,null);
return buildUserInfo(user, userEnum);
}
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/resources/mapper/UserMapper.xml b/Source/UBCS/ubcs-service/ubcs-user/src/main/resources/mapper/UserMapper.xml
index 89d7627..2229dba 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/resources/mapper/UserMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/resources/mapper/UserMapper.xml
@@ -77,7 +77,11 @@
LEFT JOIN PL_SYS_USER_PWDSTRATEGY plup on plup.USER_ID=pou.ID
LEFT JOIN PL_SYS_PWDSTRATEGY pss on pss.ID=plup.PWDSTRATEGY_ID
WHERE
- tenant_id = #{param1} and account = #{param2} and is_deleted = 0
+ tenant_id = #{param1} and account = #{param2}
+ <if test="param3!=null and param3 != ''">
+ and name = #{param3}
+ </if>
+ and is_deleted = 0
</select>
<select id="exportUser" resultType="com.vci.ubcs.system.user.excel.UserExcel">
--
Gitblit v1.9.3