pref#ncu_代表推选优化
This commit is contained in:
@@ -149,7 +149,7 @@ public class SysUnitController {
|
|||||||
public Result listUserSelect(@Valid String unitId, @Valid String keyWord) {
|
public Result listUserSelect(@Valid String unitId, @Valid String keyWord) {
|
||||||
Sql sql = Sqls.create("select id,loginname,username,unitname from vw_user $condition");
|
Sql sql = Sqls.create("select id,loginname,username,unitname from vw_user $condition");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and(View_user::getUnitId, "=", unitId);
|
// cnd.and(View_user::getUnitId, "=", unitId);
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.orLike(View_user::getLoginname, keyWord, true);
|
seg.orLike(View_user::getLoginname, keyWord, true);
|
||||||
seg.orLike(View_user::getUsername, keyWord, true);
|
seg.orLike(View_user::getUsername, keyWord, true);
|
||||||
|
|||||||
+26
-32
@@ -17,6 +17,7 @@ import com.budwk.app.flow.constant.FlowConst;
|
|||||||
import com.budwk.app.flow.engine.FlowEngine;
|
import com.budwk.app.flow.engine.FlowEngine;
|
||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
import com.budwk.app.flow.entity.ProcessTask;
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
|
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
import com.budwk.app.sys.views.View_user;
|
import com.budwk.app.sys.views.View_user;
|
||||||
@@ -395,6 +396,30 @@ public class TeacherCongressDelegatePushController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*
|
||||||
|
FROM
|
||||||
|
teacher_congress_delegate_push info
|
||||||
|
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||||
|
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
||||||
|
AND t.taskState = 10
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
|
group.or("t.taskName", "=", "0cacd1e7-7bb2-47dd-818b-6a73062e0c62");
|
||||||
|
group.or("t.taskName", "=", "c9227a2f-7b73-4549-b1f7-aa4779b31378");
|
||||||
|
group.or("t.taskName", "=", "900217e4-4332-4a21-90dd-363b8be17801");
|
||||||
|
group.or("t.taskName", "is", null);
|
||||||
|
cnd.and(group);
|
||||||
|
cnd.and("ins.state", "!=", ProcessInstanceStateEnum.REJECT.getCode());
|
||||||
|
cnd.andEX("info.sessionId", "=", sessionId);
|
||||||
|
cnd.andEX("info.schoolLeader", "!=", 1);
|
||||||
|
cnd.andEX("info.representativeType", "=", "正式代表");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> writeList = baseService.listMap(sql);
|
||||||
|
/* Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
info.*,
|
info.*,
|
||||||
ins.id AS instanceId,
|
ins.id AS instanceId,
|
||||||
@@ -429,39 +454,8 @@ public class TeacherCongressDelegatePushController {
|
|||||||
cnd.andEX("info.unionId", "=", unionId);
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
cnd.andEX("info.representativeType", "=", "正式代表");
|
cnd.andEX("info.representativeType", "=", "正式代表");
|
||||||
cnd.groupBy("t.id");
|
cnd.groupBy("t.id");
|
||||||
/* Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
info.*,
|
|
||||||
ins.id AS instanceId,
|
|
||||||
ins.businessNo,
|
|
||||||
ins.state instanceState,
|
|
||||||
ins.variable instanceVariale,
|
|
||||||
ins.processDefineId instanceProcessDefineId,
|
|
||||||
t.id taskId,
|
|
||||||
t.taskName AS taskKey,
|
|
||||||
t.displayName taskName,
|
|
||||||
t.taskType,
|
|
||||||
t.performType taskPerformType,
|
|
||||||
t.taskState,
|
|
||||||
t.finishTime,
|
|
||||||
t.taskParentId,
|
|
||||||
t.variable taskVariale,
|
|
||||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
|
||||||
(SELECT MAX(id) FROM wf_process_task WHERE processInstanceId = ins.id AND taskName = 'startTask' AND taskState IN (10, 20)) AS startTaskId
|
|
||||||
FROM
|
|
||||||
teacher_congress_delegate_push info
|
|
||||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
|
||||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
|
||||||
AND t.taskState = 10
|
|
||||||
$condition
|
|
||||||
""");
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
cnd.andEX("info.sessionId", "=", sessionId);
|
|
||||||
cnd.andEX("info.unionId", "=", unionId);
|
|
||||||
cnd.andEX("info.representativeType", "=", "正式代表");
|
|
||||||
cnd.and("ins.state", "=", ProcessTaskStateEnum.FINISHED.getCode());*/
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> writeList = baseService.listMap(sql);
|
List<NutMap> writeList = baseService.listMap(sql);*/
|
||||||
|
|
||||||
|
|
||||||
// 上报总人数
|
// 上报总人数
|
||||||
|
|||||||
+1
@@ -116,6 +116,7 @@ public class TeacherCongressDelegatePushServiceImpl extends BaseServiceImpl<Teac
|
|||||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, push.getString("taskId"));
|
dict.set(FlowConst.PROCESS_TASK_ID_KEY, push.getString("taskId"));
|
||||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.AGREE.getCode());
|
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.AGREE.getCode());
|
||||||
dict.set(FlowConst.EXT_ENABLE_OPERATOR, true);
|
dict.set(FlowConst.EXT_ENABLE_OPERATOR, true);
|
||||||
|
dict.set("sessionId", sessionId);
|
||||||
flowCommonService.executeTask(dict);
|
flowCommonService.executeTask(dict);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -273,10 +273,10 @@ layout("/layouts/platform.html"){
|
|||||||
this.maxPush = data
|
this.maxPush = data
|
||||||
},
|
},
|
||||||
async doSearch() {
|
async doSearch() {
|
||||||
|
await this.pageData()
|
||||||
const fullName = this.sessionOptions.find(v => v.id === this.pageForm.sessionId)?.fullName;
|
const fullName = this.sessionOptions.find(v => v.id === this.pageForm.sessionId)?.fullName;
|
||||||
await this.$refs.pushProgressRef.refreshData(this.pageForm.sessionId, fullName, this.pageForm.unionId)
|
await this.$refs.pushProgressRef.refreshData(this.pageForm.sessionId, fullName, this.pageForm.unionId)
|
||||||
await this.pageData()
|
this.formalPush = this.maxPush - this.tableData.length
|
||||||
|
|
||||||
},
|
},
|
||||||
onView(row) {
|
onView(row) {
|
||||||
this.$refs.guava.view(() => {
|
this.$refs.guava.view(() => {
|
||||||
@@ -326,7 +326,7 @@ layout("/layouts/platform.html"){
|
|||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.tableData = resp.data.list
|
this.tableData = resp.data.list
|
||||||
this.pageForm.totalCount = resp.data.totalCount
|
this.pageForm.totalCount = resp.data.totalCount
|
||||||
this.formalPush = this.maxPush - this.tableData.length
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
|
|||||||
+2
-2
@@ -421,7 +421,7 @@ const pushProgress = {
|
|||||||
<div class="update-time"></div>
|
<div class="update-time"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card">
|
<!-- <div class="card">
|
||||||
<h2 class="legend-title">上报说明</h2>
|
<h2 class="legend-title">上报说明</h2>
|
||||||
<div class="legend-container">
|
<div class="legend-container">
|
||||||
<div class="legend-item">
|
<div class="legend-item">
|
||||||
@@ -434,7 +434,7 @@ const pushProgress = {
|
|||||||
<span class="legend-text" style="color: red">当前代表为预推选,不计入代表总额,需等待党委书记审核后方才记录</span>
|
<span class="legend-text" style="color: red">当前代表为预推选,不计入代表总额,需等待党委书记审核后方才记录</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user