This commit is contained in:
2025-09-04 09:40:50 +08:00
parent 5441b1d785
commit 53e6c4bc52
35 changed files with 1924 additions and 1266 deletions
@@ -15,13 +15,13 @@ import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.enrollmentRegistration.model.EnrollmentRegistration;
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationActivity;
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationLine;
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationQuotaAllocation;
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationSignUpUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -149,7 +149,7 @@ public class ExcellentRecuperationActivitySignUpController {
@At
@ApiOperation("删除报名信息")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("enrollmentRegistration.summary")
@SaCheckPermission("excellentRecuperation.activitySignUp")
@SLog(tag = "优秀教职工疗休养-活动报名", type = "excellentRecuperationActivitySignUp", msg = "删除id: ${args[0]}")
public Result doDelete(String id) {
dao.delete(ExcellentRecuperationSignUpUser.class, id);
@@ -205,6 +205,9 @@ public class ExcellentRecuperationActivitySignUpController {
public Result listActivityByYear(String year) {
List<ExcellentRecuperationActivity> activityList = dao.query(ExcellentRecuperationActivity.class,
Cnd.where("YEAR(signUpStartTime)", "=", year).desc("signUpStartTime"));
activityList.forEach(activity -> {
activity.setUnionQuotaAllocationList(dao.query(ExcellentRecuperationQuotaAllocation.class, Cnd.where("activityId", "=", activity.getId())));
});
return Result.success(activityList);
}
@@ -258,5 +261,47 @@ public class ExcellentRecuperationActivitySignUpController {
return Result.success(dao.fetch(ExcellentRecuperationSignUpUser.class, id));
}
@At
@ApiOperation("查询报名人员")
@SaCheckLogin
public Result getSIgnUpUserList(String unionId, String activityId){
Sql sql = Sqls.create("""
SELECT
info.*,
line.lineName,
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
excellent_recuperation_sign_user info
LEFT JOIN excellent_recuperation_line line ON line.id = info.lineId
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
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("info.activityId", "=", activityId);
cnd.and("info.unionId", "=", unionId);
cnd.and("ins.state", "!=", ProcessInstanceStateEnum.REJECT.getCode());
sql.setCondition(cnd);
List<NutMap> map = baseService.listMap(sql);
return Result.success(map);
}
}
@@ -19,7 +19,6 @@ import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationTravelAgency;
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service.ExcellentRecuperationTravelAgencyService;
import com.budwk.app.zhgh.staffbenefit.recuperation.mode.TravelAgencyExcelMode;
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationTravelAgency;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -221,8 +220,8 @@ public class ExcellentRecuperationTravelAgencyController {
ExcelImportRes<TravelAgencyExcelMode> excelImportRes = new ExcelImportRes<>();
excelImportRes.setTotalRecords(travelAgency.size());
List<RecuperationTravelAgency> travelAgencyList = dao.query(RecuperationTravelAgency.class, Cnd.NEW().desc("id"));
Map<String, String> map = travelAgencyList.stream().collect(Collectors.toMap(RecuperationTravelAgency::getTravelAgencyName, RecuperationTravelAgency::getId));
List<ExcellentRecuperationTravelAgency> travelAgencyList = dao.query(ExcellentRecuperationTravelAgency.class, Cnd.NEW().desc("id"));
Map<String, String> map = travelAgencyList.stream().collect(Collectors.toMap(ExcellentRecuperationTravelAgency::getTravelAgencyName, ExcellentRecuperationTravelAgency::getId));
for (int i = 0; i < travelAgency.size(); i++) {
TravelAgencyExcelMode travel = travelAgency.get(i);
@@ -234,7 +233,7 @@ public class ExcellentRecuperationTravelAgencyController {
travel.setErrInfo("旅行社名称为空", i + 1);
continue;
}
RecuperationTravelAgency agency = new RecuperationTravelAgency();
ExcellentRecuperationTravelAgency agency = new ExcellentRecuperationTravelAgency();
if (Strings.isNotBlank(map.get(travel.getTravelAgencyName()))){
agency.setId(map.get(travel.getTravelAgencyName()));
}
@@ -1,7 +1,6 @@
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model;
import com.budwk.app.base.model.BaseModel;
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationTravelAgency;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
@@ -55,7 +54,7 @@ public class ExcellentRecuperationLine extends BaseModel {
private boolean isDisabled;
@Column
@ColDefine(type = ColType.VARCHAR, width = 50)
@ColDefine(type = ColType.VARCHAR, width = 500)
@Comment("缩略图")
private String file;