commit
This commit is contained in:
+83
@@ -0,0 +1,83 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeConfig;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.service.ExecutiveCommitteeConfigService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ExecutiveCommitteeConfigController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/6/20 15:30
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/executiveCommittee/executiveCommitteeConfig")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "执委会成员推选配置")
|
||||||
|
public class ExecutiveCommitteeConfigController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private ExecutiveCommitteeConfigService committeeConfigService;
|
||||||
|
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@SaCheckPermission("executiveCommittee.executiveCommitteeConfig")
|
||||||
|
@Ok("beetl:/platform/zhgh/democratic/executiveCommittee/executiveCommitteeConfig/index.html")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("executiveCommittee.executiveCommitteeConfig")
|
||||||
|
public Result fetchConfig(String sessionId) {
|
||||||
|
ExecutiveCommitteeConfig config = committeeConfigService.fetch(Cnd.where("teacherMeetId", "=", sessionId));
|
||||||
|
if(config == null) {
|
||||||
|
config = new ExecutiveCommitteeConfig();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
dbt.id as delegationId,
|
||||||
|
dbt.name as delegationName,
|
||||||
|
dbt.code as delegationCode,
|
||||||
|
(SELECT count( 1 ) FROM vw_user where unitId IN ( SELECT unitId FROM teacher_congress_delegation_unit unit WHERE unit.delegationId = dbt.id ) and member = 1) as memberCount,
|
||||||
|
0 as quotaCount
|
||||||
|
FROM
|
||||||
|
teacher_congress_delegation dbt
|
||||||
|
WHERE dbt.sessionId = @sessionId
|
||||||
|
ORDER BY CODE ASC
|
||||||
|
""").setParam("sessionId", sessionId);
|
||||||
|
List<NutMap> listMap = committeeConfigService.listMap(sql);
|
||||||
|
config.setDelegationQuotaList(listMap);
|
||||||
|
}
|
||||||
|
return Result.success(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增、修改预选名额分配")
|
||||||
|
@SaCheckPermission("executiveCommittee.executiveCommitteeConfig")
|
||||||
|
@SLog(type = "executiveCommitteeConfig", tag = "执委会推选-预选名额分配", msg ="新增、修改预选名额分配" )
|
||||||
|
public Result onHandle(ExecutiveCommitteeConfig config) {
|
||||||
|
committeeConfigService.insertOrUpdate(config);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
}
|
||||||
+258
@@ -0,0 +1,258 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.lang.Validator;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.extra.pinyin.PinyinUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeConfig;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeOnePush;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/25 15:18
|
||||||
|
* @description 团长一次推选
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/executiveCommittee/delegationOnePush")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "执委会推选-团长一次推选")
|
||||||
|
public class ExecutiveCommitteeDelegationOnePushController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@SaCheckPermission("executiveCommittee.delegationOnePush")
|
||||||
|
@Ok("beetl:/platform/zhgh/democratic/executiveCommittee/delegationOnePush/index.html")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询某个代表团的团长一次推选的委员")
|
||||||
|
@SaCheckPermission("executiveCommittee.delegationOnePush")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
String teacherMeetId,
|
||||||
|
String unionId) {
|
||||||
|
Teacher_congress_delegate db = dao.fetch(Teacher_congress_delegate.class,
|
||||||
|
Cnd.where(Teacher_congress_delegate::getSessionId, "=", teacherMeetId)
|
||||||
|
.and(Teacher_congress_delegate::getUserId, "=", SecurityUtil.getUserId()));
|
||||||
|
if (ObjectUtil.isEmpty(db)) {
|
||||||
|
return Result.error("没有权限,只有代表团团长才能推选");
|
||||||
|
}
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t1.*,
|
||||||
|
t2.name AS unitName,
|
||||||
|
t3.name unionName,
|
||||||
|
t4.sex,
|
||||||
|
TIMESTAMPDIFF(
|
||||||
|
YEAR,
|
||||||
|
t4.birthday,
|
||||||
|
CURDATE()) AS age
|
||||||
|
FROM
|
||||||
|
`executive_committee_one_push` t1
|
||||||
|
LEFT JOIN sys_unit t2 ON t1.unitId = t2.id
|
||||||
|
LEFT JOIN `sys_union` t3 ON t3.id = t2.unionid
|
||||||
|
LEFT JOIN `vw_user` t4 ON t4.id = t1.userId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
|
||||||
|
cnd.andEX("t1.delegationId", "=", db.getDelegationId());
|
||||||
|
cnd.andEX("t3.id", "=", unionId);
|
||||||
|
cnd.andEX("t1.addType", "=", 1);
|
||||||
|
if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
cnd.and(pageForm.getSearchName(), "LIKE", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
}
|
||||||
|
cnd.asc("t1.firstLetter");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return Result.success(baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询可以推选委员和已经推选的人员")
|
||||||
|
@SaCheckPermission("executiveCommittee.delegationOnePush")
|
||||||
|
public Result getDelegationUser(String teacherMeetId) {
|
||||||
|
Teacher_congress_delegate db = dao.fetch(Teacher_congress_delegate.class,
|
||||||
|
Cnd.where(Teacher_congress_delegate::getSessionId, "=", teacherMeetId)
|
||||||
|
.and(Teacher_congress_delegate::getUserId, "=", SecurityUtil.getUserId()));
|
||||||
|
if (ObjectUtil.isEmpty(db)) {
|
||||||
|
return Result.error("没有权限,只有代表团团长才能推选");
|
||||||
|
}
|
||||||
|
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||||
|
Cnd.where(ExecutiveCommitteeConfig::getTeacherMeetId, "=", teacherMeetId));
|
||||||
|
if (ObjectUtil.isEmpty(config)) {
|
||||||
|
return Result.error("请先配置基础信息");
|
||||||
|
}
|
||||||
|
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
|
||||||
|
return Result.error("请等待一次预选开始时间");
|
||||||
|
}
|
||||||
|
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
|
||||||
|
return Result.error("一次预选已结束");
|
||||||
|
}
|
||||||
|
List<ExecutiveCommitteeOnePush> userValue = dao.query(ExecutiveCommitteeOnePush.class,
|
||||||
|
Cnd.where("teacherMeetId", "=", teacherMeetId)
|
||||||
|
.and("addType", "=", 1));
|
||||||
|
List<ExecutiveCommitteeOnePush> onePushList = dao.query(ExecutiveCommitteeOnePush.class, Cnd.NEW());
|
||||||
|
List<String> userIds = onePushList.stream().map(v -> v.getUserId()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("db.sessionId", "=", teacherMeetId);
|
||||||
|
cnd.andEX("db.userId", "not in", userIds);
|
||||||
|
cnd.andEX("db.userId", "!=", SecurityUtil.getUserId());
|
||||||
|
cnd.and("db.delegationId", "=", db.getDelegationId());
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
db.*,
|
||||||
|
TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) AS age
|
||||||
|
FROM
|
||||||
|
teacher_congress_delegate db
|
||||||
|
LEFT JOIN `vw_user` u ON db.userId = u.id
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> userData = baseService.listMap(sql);
|
||||||
|
return Result.success(Map.of("userData", userData, "userValue", userValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("executiveCommittee.delegationOnePush")
|
||||||
|
@SLog(tag = "执委会推选-团长推选委员", msg = "推选委员")
|
||||||
|
public Result addOnePush(@Param("userValue") String[] userValue,
|
||||||
|
String teacherMeetId) {
|
||||||
|
try {
|
||||||
|
Teacher_congress_delegate db = dao.fetch(Teacher_congress_delegate.class,
|
||||||
|
Cnd.where(Teacher_congress_delegate::getSessionId, "=", teacherMeetId)
|
||||||
|
.and(Teacher_congress_delegate::getUserId, "=", SecurityUtil.getUserId()));
|
||||||
|
if (ObjectUtil.isEmpty(db)) {
|
||||||
|
return Result.error("没有权限,只有代表团团长才能推选");
|
||||||
|
}
|
||||||
|
|
||||||
|
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||||
|
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||||
|
if (ObjectUtil.isEmpty(config)) {
|
||||||
|
return Result.error("请先配置基础信息");
|
||||||
|
}
|
||||||
|
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
|
||||||
|
return Result.error("请等待一次预选开始时间");
|
||||||
|
}
|
||||||
|
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
|
||||||
|
return Result.error("一次预选已结束");
|
||||||
|
}
|
||||||
|
List<NutMap> delegationQuotaList = config.getDelegationQuotaList();
|
||||||
|
|
||||||
|
NutMap delegationQuota = delegationQuotaList.stream().filter(v -> v.getString("delegationId").equals(db.getDelegationId())).findFirst().orElse(null);
|
||||||
|
if (ObjectUtil.isEmpty(delegationQuota)) {
|
||||||
|
return Result.error("请先配置代表团人数");
|
||||||
|
}
|
||||||
|
|
||||||
|
int dbCount = dao.count(ExecutiveCommitteeOnePush.class,
|
||||||
|
Cnd.where("delegationId", "=", db.getDelegationId())
|
||||||
|
.and("teacherMeetId", "=", teacherMeetId)
|
||||||
|
.and("addType", "=", 1));
|
||||||
|
if (dbCount + userValue.length > delegationQuota.getInt("quotaCount")) {
|
||||||
|
return Result.error("代表团人数限报" + delegationQuota.getInt("quotaCount") + "人");
|
||||||
|
}
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t1.*
|
||||||
|
FROM
|
||||||
|
teacher_congress_delegate t1
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("t1.sessionId", "=", teacherMeetId);
|
||||||
|
cnd.andEX("t1.userId", "in", userValue);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> dbList = baseService.listMap(sql);
|
||||||
|
|
||||||
|
|
||||||
|
List<ExecutiveCommitteeOnePush> list = new ArrayList<>();
|
||||||
|
for (String id : userValue) {
|
||||||
|
NutMap jdhDb = dbList.stream().filter(v -> v.getString("userId").equals(id)).findFirst().orElse(null);
|
||||||
|
if (ObjectUtil.isEmpty(jdhDb)) {
|
||||||
|
return Result.error("请选择正确的代表!");
|
||||||
|
}
|
||||||
|
ExecutiveCommitteeOnePush onePush = new ExecutiveCommitteeOnePush();
|
||||||
|
onePush.setPushDate(DateUtil.date());
|
||||||
|
onePush.setUserId(jdhDb.getString("userId"));
|
||||||
|
onePush.setUserName(jdhDb.getString("userName"));
|
||||||
|
onePush.setLoginName(jdhDb.getString("loginName"));
|
||||||
|
onePush.setDelegationId(jdhDb.getString("delegationId"));
|
||||||
|
onePush.setUnitId(jdhDb.getString("unitId"));
|
||||||
|
onePush.setTeacherMeetId(teacherMeetId);
|
||||||
|
String firstLetter = String.valueOf(getFirstLetter(jdhDb.getString("userName")));
|
||||||
|
onePush.setFirstLetter(firstLetter);
|
||||||
|
onePush.setAddType(1);
|
||||||
|
list.add(onePush);
|
||||||
|
}
|
||||||
|
dao.insert(list);
|
||||||
|
return Result.success("添加成功!");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return Result.error("添加失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("executiveCommittee.delegationOnePush")
|
||||||
|
@SLog( tag = "执委会推选-团长推选委员", msg = "删除推选的人")
|
||||||
|
public Result doDelete(String id) {
|
||||||
|
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class, Cnd.NEW());
|
||||||
|
if (ObjectUtil.isEmpty(config)) {
|
||||||
|
return Result.error("请先配置基础信息");
|
||||||
|
}
|
||||||
|
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
|
||||||
|
return Result.error("一次预选已结束不能删除!");
|
||||||
|
}
|
||||||
|
int num = dao.clear(ExecutiveCommitteeOnePush.class, Cnd.where("id", "=", id));
|
||||||
|
return num >= 0 ? Result.success() : Result.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static char getFirstLetter(String str) {
|
||||||
|
if (str == null || str.isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("字符串不能为空");
|
||||||
|
}
|
||||||
|
char firstChar = str.charAt(0);
|
||||||
|
if (Validator.isChinese(String.valueOf(firstChar))) {
|
||||||
|
return Character.toUpperCase(PinyinUtil.getPinyin(firstChar).charAt(0));
|
||||||
|
} else if (Character.isLetter(firstChar)) {
|
||||||
|
return Character.toUpperCase(firstChar);
|
||||||
|
} else {
|
||||||
|
return firstChar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+222
@@ -0,0 +1,222 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeConfig;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeTwoPush;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/6/23 15:25
|
||||||
|
* @description 团长二次推选
|
||||||
|
*/
|
||||||
|
@At("/platform/executiveCommittee/delegationTwoPush")
|
||||||
|
@Ok("json:full")
|
||||||
|
@IocBean
|
||||||
|
public class ExecutiveCommitteeDelegationTwoPushController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@SaCheckPermission("executiveCommittee.delegationOnePush")
|
||||||
|
@Ok("beetl:/platform/zhgh/democratic/executiveCommittee/delegationTwoPush/index.html")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("executiveCommittee.delegationTwoPush")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
String teacherMeetId,
|
||||||
|
String delegationId,
|
||||||
|
String unionId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t1.*,
|
||||||
|
t2.loginName,
|
||||||
|
t2.userName,
|
||||||
|
t3.name AS unitName,
|
||||||
|
t4.name unionName,
|
||||||
|
t5.sex,
|
||||||
|
TIMESTAMPDIFF(
|
||||||
|
YEAR,
|
||||||
|
t5.birthday,
|
||||||
|
CURDATE()) AS age,
|
||||||
|
t6.name AS delegationName
|
||||||
|
FROM
|
||||||
|
`executive_committee_two_push` t1
|
||||||
|
LEFT JOIN executive_committee_one_push t2 on t2.userId=t1.userId and t2.teacherMeetId=t1.teacherMeetId
|
||||||
|
LEFT JOIN sys_unit t3 ON t2.unitId = t3.id
|
||||||
|
LEFT JOIN `sys_union` t4 ON t4.id = t3.unionid
|
||||||
|
LEFT JOIN `vw_user` t5 ON t5.id = t1.userId
|
||||||
|
LEFT JOIN teacher_congress_delegation t6 ON t6.id = t2.delegationId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("t1.pushUserId", "=", SecurityUtil.getUserId());
|
||||||
|
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
|
||||||
|
cnd.andEX("t2.delegationId", "=", delegationId);
|
||||||
|
cnd.andEX("t4.id", "=", unionId);
|
||||||
|
if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
cnd.and(pageForm.getSearchName(), "LIKE", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
}
|
||||||
|
cnd.asc("t6.code").asc("t2.firstLetter");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return Result.success(baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("executiveCommittee.delegationTwoPush")
|
||||||
|
@SLog(type = "执委会推选-团长二次推选", tag = "查询可以二次推选的名单", param = true, result = true)
|
||||||
|
public Result getDelegationUser(String teacherMeetId) {
|
||||||
|
Teacher_congress_delegate db = dao.fetch(Teacher_congress_delegate.class,
|
||||||
|
Cnd.where(Teacher_congress_delegate::getSessionId, "=", teacherMeetId)
|
||||||
|
.and(Teacher_congress_delegate::getUserId, "=", SecurityUtil.getUserId()));
|
||||||
|
if (ObjectUtil.isEmpty(db)) {
|
||||||
|
return Result.error("没有权限,只有代表团团长才能推选");
|
||||||
|
}
|
||||||
|
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||||
|
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||||
|
if (ObjectUtil.isEmpty(config)) {
|
||||||
|
return Result.error("请先配置基础信息");
|
||||||
|
}
|
||||||
|
if (config.getSecondStartTime().getTime() > System.currentTimeMillis()) {
|
||||||
|
return Result.error("请等待二次预选开始时间");
|
||||||
|
}
|
||||||
|
if (config.getSecondEndTime().getTime() < System.currentTimeMillis()) {
|
||||||
|
return Result.error("二次预选已结束");
|
||||||
|
}
|
||||||
|
List<ExecutiveCommitteeTwoPush> userValue = dao.query(ExecutiveCommitteeTwoPush.class,
|
||||||
|
Cnd.where("teacherMeetId", "=", teacherMeetId)
|
||||||
|
.and("pushUserId", "=", SecurityUtil.getUserId()));
|
||||||
|
List<String> userIds = userValue.stream().map(v -> v.getUserId()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
|
||||||
|
cnd.andEX("t1.userId", "not in", userIds);
|
||||||
|
cnd.andEX("t1.userId", "!=", SecurityUtil.getUserId());
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t1.*,
|
||||||
|
t2.sex,
|
||||||
|
TIMESTAMPDIFF(
|
||||||
|
YEAR,
|
||||||
|
t2.birthday,
|
||||||
|
CURDATE()) age
|
||||||
|
FROM
|
||||||
|
executive_committee_one_push t1
|
||||||
|
LEFT JOIN `vw_user` t2 ON t1.userId = t2.id
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> userData = baseService.listMap(sql);
|
||||||
|
return Result.success(Map.of("userData", userData, "userValue", userValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("executiveCommittee.delegationTwoPush")
|
||||||
|
@ApiOperation("推选委员")
|
||||||
|
@SLog(type = "executiveCommitteePreparatoryGroupPush", tag = "执委会推选-团长二次推选", msg = "推选委员")
|
||||||
|
public Result addOnePush(@Param("userValue") String[] userValue,
|
||||||
|
String teacherMeetId) {
|
||||||
|
try {
|
||||||
|
Teacher_congress_delegate db = dao.fetch(Teacher_congress_delegate.class,
|
||||||
|
Cnd.where(Teacher_congress_delegate::getSessionId, "=", teacherMeetId)
|
||||||
|
.and(Teacher_congress_delegate::getUserId, "=", SecurityUtil.getUserId()));
|
||||||
|
if (ObjectUtil.isEmpty(db)) {
|
||||||
|
return Result.error("没有权限,只有代表团团长才能推选");
|
||||||
|
}
|
||||||
|
|
||||||
|
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||||
|
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||||
|
if (ObjectUtil.isEmpty(config)) {
|
||||||
|
return Result.error("请先配置基础信息");
|
||||||
|
}
|
||||||
|
if (config.getSecondStartTime().getTime() > System.currentTimeMillis()) {
|
||||||
|
return Result.error("请等待二次预选开始时间");
|
||||||
|
}
|
||||||
|
if (config.getSecondEndTime().getTime() < System.currentTimeMillis()) {
|
||||||
|
return Result.error("二次预选已结束");
|
||||||
|
}
|
||||||
|
int dbCount = dao.count(ExecutiveCommitteeTwoPush.class,
|
||||||
|
Cnd.where("pushUserId", "=", SecurityUtil.getUserId())
|
||||||
|
.and("teacherMeetId", "=", teacherMeetId));
|
||||||
|
if (dbCount + userValue.length > config.getCommitteeQuotaCount()) {
|
||||||
|
return Result.error("人数限报" + config.getCommitteeQuotaCount() + "人");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Teacher_congress_delegate> dbList = dao.query(Teacher_congress_delegate.class,
|
||||||
|
Cnd.where(Teacher_congress_delegate::getSessionId, "=", teacherMeetId)
|
||||||
|
.andEX(Teacher_congress_delegate::getUserId, "in", userValue));
|
||||||
|
List<ExecutiveCommitteeTwoPush> list = new ArrayList<>();
|
||||||
|
for (String id : userValue) {
|
||||||
|
Teacher_congress_delegate jdhDb = dbList.stream().filter(v -> v.getUserId().equals(id)).findFirst().orElse(null);
|
||||||
|
if (ObjectUtil.isEmpty(jdhDb)) {
|
||||||
|
return Result.error("请选择正确的代表!");
|
||||||
|
}
|
||||||
|
ExecutiveCommitteeTwoPush twoPush = new ExecutiveCommitteeTwoPush();
|
||||||
|
twoPush.setPushDate(DateUtil.date());
|
||||||
|
twoPush.setUserId(id);
|
||||||
|
twoPush.setPushDelegationId(db.getDelegationId());
|
||||||
|
twoPush.setPushUserId(SecurityUtil.getUserId());
|
||||||
|
twoPush.setPushUserName(SecurityUtil.getUserUsername());
|
||||||
|
twoPush.setPushLoginName(SecurityUtil.getUserLoginname());
|
||||||
|
twoPush.setTeacherMeetId(teacherMeetId);
|
||||||
|
list.add(twoPush);
|
||||||
|
}
|
||||||
|
dao.insert(list);
|
||||||
|
return Result.success("添加成功!");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return Result.error("添加失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除推选人员")
|
||||||
|
@SaCheckPermission("executiveCommittee.delegationTwoPush")
|
||||||
|
@SLog(type = "executiveCommitteePreparatoryGroupPush", tag = "执委会推选-团长二次推选", msg = "删除推选人员")
|
||||||
|
public Result doDelete( String id) {
|
||||||
|
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class, Cnd.NEW());
|
||||||
|
if (ObjectUtil.isEmpty(config)) {
|
||||||
|
return Result.error("请先配置基础信息");
|
||||||
|
}
|
||||||
|
if (config.getSecondEndTime().getTime() < System.currentTimeMillis()) {
|
||||||
|
return Result.error("二次预选已结束不能删除!");
|
||||||
|
}
|
||||||
|
int num = dao.clear(ExecutiveCommitteeTwoPush.class, Cnd.where("id", "=", id));
|
||||||
|
return num >= 0 ? Result.success() : Result.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+133
@@ -0,0 +1,133 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.param.ExecutiveCommitteePageForm;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.service.ExecutiveCommitteeConfigService;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.service.ExecutiveCommitteeMemberService;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.vo.EnrollmentRegistrationPageForm;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 08:40
|
||||||
|
* @description 委员会名单
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/executiveCommittee/executiveCommitteeMember")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "两委会推选-委员会名单")
|
||||||
|
public class ExecutiveCommitteeMemberController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private ExecutiveCommitteeMemberService committeeMemberService;
|
||||||
|
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@SaCheckPermission("executiveCommittee.executiveCommitteeMember")
|
||||||
|
@Ok("beetl:/platform/zhgh/democratic/executiveCommittee/executiveCommitteeMember/index.html")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("executiveCommittee.executiveCommitteeMember")
|
||||||
|
public Result pageData(ExecutiveCommitteePageForm pageForm) {
|
||||||
|
Sql sql = committeeMemberService.getSql(pageForm);
|
||||||
|
Pagination pagination = committeeMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询每个人的推选人")
|
||||||
|
@SaCheckPermission("executiveCommittee.executiveCommitteeMember")
|
||||||
|
public Result onView(String teacherMeetId,
|
||||||
|
String userId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
select
|
||||||
|
tp.*,
|
||||||
|
u.unitName,
|
||||||
|
u.unionName,
|
||||||
|
u.sex,
|
||||||
|
u.mobile,
|
||||||
|
dbt.name as delegationName
|
||||||
|
from
|
||||||
|
executive_committee_two_push tp
|
||||||
|
left join vw_user u on u.id = tp.pushUserId
|
||||||
|
left join teacher_congress_delegation dbt on dbt.id = tp.pushDelegationId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("tp.teacherMeetId", "=", teacherMeetId);
|
||||||
|
cnd.and("tp.userId", "=", userId);
|
||||||
|
cnd.desc("tp.pushDate");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> listMap = committeeMemberService.listMap(sql);
|
||||||
|
return Result.success(listMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("executiveCommittee.executiveCommitteeMember")
|
||||||
|
public void doExportExcel(@Param("data") ExecutiveCommitteePageForm pageForm, HttpServletResponse response) {
|
||||||
|
|
||||||
|
Sql sql = committeeMemberService.getSql(pageForm);
|
||||||
|
|
||||||
|
List<NutMap> map = committeeMemberService.listMap(sql);
|
||||||
|
|
||||||
|
try {
|
||||||
|
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||||
|
ExcelExportEntity no = new ExcelExportEntity("序号", "no", 10);
|
||||||
|
no.setFormat("isAddIndex");
|
||||||
|
entityList.add(no);
|
||||||
|
|
||||||
|
entityList.add(new ExcelExportEntity("姓名", "userName", 10));
|
||||||
|
entityList.add(new ExcelExportEntity("工号", "loginName", 10));
|
||||||
|
entityList.add(new ExcelExportEntity("性别", "sex", 10));
|
||||||
|
entityList.add(new ExcelExportEntity("联系方式", "mobile", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("所属单位", "unitName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("所属代表团", "delegationName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("票数", "pushCount", 20));
|
||||||
|
|
||||||
|
response.setContentType("application/octet-stream");
|
||||||
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("委员会预选名单.xlsx", "UTF-8"));
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, map);
|
||||||
|
workbook.write(response.getOutputStream());
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+221
@@ -0,0 +1,221 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.lang.Validator;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.extra.pinyin.PinyinUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeConfig;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeOnePush;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/25 16:49
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/executiveCommittee/preparatoryGroupPush")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "执委会推选-筹备组推选")
|
||||||
|
public class ExecutiveCommitteePushController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
|
||||||
|
@Ok("beetl:/platform/zhgh/democratic/executiveCommittee/preparatoryGroupPush/index.html")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
String teacherMeetId,
|
||||||
|
String delegationId,
|
||||||
|
String unionId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t1.*,
|
||||||
|
t2.name AS unitName,
|
||||||
|
t3.name unionName,
|
||||||
|
t4.sex,
|
||||||
|
TIMESTAMPDIFF(
|
||||||
|
YEAR,
|
||||||
|
t4.birthday,
|
||||||
|
CURDATE()) AS age,
|
||||||
|
t5.name AS delegationName
|
||||||
|
FROM
|
||||||
|
`executive_committee_one_push` t1
|
||||||
|
LEFT JOIN sys_unit t2 ON t1.unitId = t2.id
|
||||||
|
LEFT JOIN `sys_union` t3 ON t3.id = t2.unionid
|
||||||
|
LEFT JOIN `vw_user` t4 ON t4.id = t1.userId
|
||||||
|
LEFT JOIN teacher_congress_delegation t5 ON t5.id = t1.delegationId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
|
||||||
|
cnd.andEX("t1.delegationId", "=", delegationId);
|
||||||
|
cnd.andEX("t3.id", "=", unionId);
|
||||||
|
cnd.andEX("t1.addType", "=", 2);
|
||||||
|
if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
cnd.and(pageForm.getSearchName(), "LIKE", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
}
|
||||||
|
cnd.asc("t5.code").asc("t1.firstLetter");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return Result.success(baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
|
||||||
|
@ApiOperation("查询可以推选委员和已经推选的人员")
|
||||||
|
public Result getDelegationUser(String teacherMeetId) {
|
||||||
|
List<ExecutiveCommitteeOnePush> userValue = dao.query(ExecutiveCommitteeOnePush.class,
|
||||||
|
Cnd.where("teacherMeetId", "=", teacherMeetId)
|
||||||
|
.and("addType", "=", 2));
|
||||||
|
List<ExecutiveCommitteeOnePush> onePushList = dao.query(ExecutiveCommitteeOnePush.class, Cnd.NEW());
|
||||||
|
List<String> userIds = onePushList.stream().map(ExecutiveCommitteeOnePush::getUserId).collect(Collectors.toList());
|
||||||
|
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("db.sessionId", "=", teacherMeetId);
|
||||||
|
cnd.andEX("db.userId", "not in", userIds);
|
||||||
|
cnd.andEX("db.userId", "!=", SecurityUtil.getUserId());
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
db.*,
|
||||||
|
TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) AS age
|
||||||
|
FROM
|
||||||
|
teacher_congress_delegate db
|
||||||
|
LEFT JOIN `vw_user` u ON db.userId = u.id
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> userData = baseService.listMap(sql);
|
||||||
|
return Result.success(Map.of("userData", userData, "userValue", userValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
|
||||||
|
@SLog(type = "executiveCommitteePreparatoryGroupPush", tag = "执委会推选-筹备组推选", msg = "推选委员")
|
||||||
|
public Result addOnePush(@Param("userValue") String[] userValue,
|
||||||
|
String teacherMeetId) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||||
|
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||||
|
if (ObjectUtil.isEmpty(config)) {
|
||||||
|
return Result.error("请先配置基础信息");
|
||||||
|
}
|
||||||
|
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
|
||||||
|
return Result.error("请等待一次预选开始时间");
|
||||||
|
}
|
||||||
|
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
|
||||||
|
return Result.error("一次预选已结束");
|
||||||
|
}
|
||||||
|
|
||||||
|
int dbCount = dao.count(ExecutiveCommitteeOnePush.class,
|
||||||
|
Cnd.where("teacherMeetId", "=", teacherMeetId)
|
||||||
|
.and("addType", "=", 2));
|
||||||
|
if (dbCount + userValue.length > config.getPrepareGroupQuotaCount()) {
|
||||||
|
return Result.error("人数限报" + config.getPrepareGroupQuotaCount() + "人");
|
||||||
|
}
|
||||||
|
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t1.*
|
||||||
|
FROM
|
||||||
|
teacher_congress_delegate t1
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("t1.sessionId", "=", teacherMeetId);
|
||||||
|
cnd.andEX("t1.userId", "in", userValue);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> dbList = baseService.listMap(sql);
|
||||||
|
|
||||||
|
List<ExecutiveCommitteeOnePush> list = new ArrayList<>();
|
||||||
|
for (String id : userValue) {
|
||||||
|
NutMap jdhDb = dbList.stream().filter(v -> v.getString("userId").equals(id)).findFirst().orElse(null);
|
||||||
|
if (ObjectUtil.isEmpty(jdhDb)) {
|
||||||
|
return Result.error("请选择正确的代表!");
|
||||||
|
}
|
||||||
|
ExecutiveCommitteeOnePush onePush = new ExecutiveCommitteeOnePush();
|
||||||
|
onePush.setPushDate(DateUtil.date());
|
||||||
|
onePush.setUserId(jdhDb.getString("userId"));
|
||||||
|
onePush.setUserName(jdhDb.getString("userName"));
|
||||||
|
onePush.setLoginName(jdhDb.getString("loginName"));
|
||||||
|
onePush.setDelegationId(jdhDb.getString("delegationId"));
|
||||||
|
onePush.setUnitId(jdhDb.getString("unitId"));
|
||||||
|
onePush.setTeacherMeetId(teacherMeetId);
|
||||||
|
String firstLetter = String.valueOf(getFirstLetter(jdhDb.getString("userName")));
|
||||||
|
onePush.setFirstLetter(firstLetter);
|
||||||
|
onePush.setAddType(2);
|
||||||
|
list.add(onePush);
|
||||||
|
}
|
||||||
|
dao.insert(list);
|
||||||
|
return Result.success("添加成功!");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return Result.error("添加失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
|
||||||
|
@SLog(type = "executiveCommitteePreparatoryGroupPush", tag = "执委会推选-筹备组推选", msg = "删除推选的人")
|
||||||
|
public Result doDelete(String id) {
|
||||||
|
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class, Cnd.NEW());
|
||||||
|
if (ObjectUtil.isEmpty(config)) {
|
||||||
|
return Result.error("请先配置基础信息");
|
||||||
|
}
|
||||||
|
int num = dao.clear(ExecutiveCommitteeOnePush.class, Cnd.where("id", "=", id));
|
||||||
|
return num >= 0 ? Result.success() : Result.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static char getFirstLetter(String str) {
|
||||||
|
if (str == null || str.isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("字符串不能为空");
|
||||||
|
}
|
||||||
|
char firstChar = str.charAt(0);
|
||||||
|
if (Validator.isChinese(String.valueOf(firstChar))) {
|
||||||
|
return Character.toUpperCase(PinyinUtil.getPinyin(firstChar).charAt(0));
|
||||||
|
} else if (Character.isLetter(firstChar)) {
|
||||||
|
return Character.toUpperCase(firstChar);
|
||||||
|
} else {
|
||||||
|
return firstChar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+79
@@ -0,0 +1,79 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.models;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ExecutiveCommitteeConfig
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/6/20 15:30
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("executive_committee_config")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("执委会成员推选配置表")
|
||||||
|
public class ExecutiveCommitteeConfig extends BaseModel implements Serializable {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所属教代会ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String teacherMeetId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("筹备组推荐名额数")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer prepareGroupQuotaCount;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("委员会预选人数")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer committeeQuotaCount;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("代表团推荐名额总数")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer delegationQuotaCount;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("一次预选开始时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
private DateTime firstStartTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("一次预选结束时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
private DateTime firstEndTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("二次预选开始时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
private DateTime secondStartTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("二次预选结束时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
private DateTime secondEndTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("各代表团名额数")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<NutMap> delegationQuotaList;
|
||||||
|
|
||||||
|
}
|
||||||
+85
@@ -0,0 +1,85 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.models;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/6/20 16:16
|
||||||
|
* @description 执委会成员推选表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("executive_committee_one_push")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("执委会成员推选表")
|
||||||
|
public class ExecutiveCommitteeOnePush extends BaseModel implements Serializable {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("代表用户ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所属教代会ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String teacherMeetId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所属代表团")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String delegationId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工号")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("职称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String jobTitle;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("职称级别")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String jobTitleLevel;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("单位ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unitId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("推选时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
private DateTime pushDate;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("姓氏排序")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String firstLetter;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("设置类型(1.团长2.筹备组加的)")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer addType;
|
||||||
|
|
||||||
|
}
|
||||||
+64
@@ -0,0 +1,64 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.models;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/6/20 17:10
|
||||||
|
* @description 二次推选
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("executive_committee_two_push")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("执委会成员推选表")
|
||||||
|
public class ExecutiveCommitteeTwoPush extends BaseModel implements Serializable {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("代表用户ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所属教代会ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String teacherMeetId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("推选的代表团")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String pushDelegationId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("推选人")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String pushUserId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String pushUserName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工号")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String pushLoginName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("推选时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
private DateTime pushDate;
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.param;
|
||||||
|
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 09:27
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ExecutiveCommitteePageForm extends PageForm {
|
||||||
|
|
||||||
|
private String teacherMeetId;
|
||||||
|
private String delegationId;
|
||||||
|
private String unionId;
|
||||||
|
private String unitId;
|
||||||
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ExecutiveCommitteeConfigService
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/6/20 15:31
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface ExecutiveCommitteeConfigService extends BaseService<ExecutiveCommitteeConfig> {
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.param.ExecutiveCommitteePageForm;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
|
||||||
|
public interface ExecutiveCommitteeMemberService extends BaseService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Sql getSql(ExecutiveCommitteePageForm pageForm);
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeConfig;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.service.ExecutiveCommitteeConfigService;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ExecutiveCommitteeConfigServiceImpl
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/6/20 15:31
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class ExecutiveCommitteeConfigServiceImpl extends BaseServiceImpl<ExecutiveCommitteeConfig> implements ExecutiveCommitteeConfigService {
|
||||||
|
|
||||||
|
public ExecutiveCommitteeConfigServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
}
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.executiveCommittee.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.param.ExecutiveCommitteePageForm;
|
||||||
|
import com.budwk.app.zhgh.democratic.executiveCommittee.service.ExecutiveCommitteeMemberService;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 09:22
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class ExecutiveCommitteeMemberServiceImpl extends BaseServiceImpl implements ExecutiveCommitteeMemberService {
|
||||||
|
public ExecutiveCommitteeMemberServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sql getSql(ExecutiveCommitteePageForm pageForm) {
|
||||||
|
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
op.*,
|
||||||
|
u.sex,
|
||||||
|
it.name unitName,
|
||||||
|
un.name unionName,
|
||||||
|
u.mobile,
|
||||||
|
dbt.name as delegationName,
|
||||||
|
TIMESTAMPDIFF(
|
||||||
|
YEAR,
|
||||||
|
u.birthday,
|
||||||
|
CURDATE()) AS age,
|
||||||
|
( SELECT count( 1 ) FROM executive_committee_two_push tp WHERE tp.userId = op.userId ) as pushCount
|
||||||
|
FROM
|
||||||
|
executive_committee_one_push op
|
||||||
|
LEFT JOIN sys_unit it ON op.unitId = it.id
|
||||||
|
LEFT JOIN `sys_union` un ON it.unionid = un.id
|
||||||
|
left join vw_user u on op.userId = u.id
|
||||||
|
left join teacher_congress_delegation dbt on dbt.id = op.delegationId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("op.teacherMeetId", "=", pageForm.getTeacherMeetId());
|
||||||
|
cnd.andEX("op.unitId", "=", pageForm.getUnitId());
|
||||||
|
cnd.andEX("it.unionid", "=", pageForm.getUnionId());
|
||||||
|
cnd.andEX("op.delegationId", "=", pageForm.getDelegationId());
|
||||||
|
if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
cnd.and(pageForm.getSearchName(), "LIKE", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
|
}
|
||||||
|
cnd.desc("pushCount");
|
||||||
|
cnd.asc("op.firstLetter");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return sql;
|
||||||
|
}
|
||||||
|
}
|
||||||
+130
@@ -0,0 +1,130 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.prepare.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_quota_allocation;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 14:11
|
||||||
|
* @description 代表名额分配
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/teacherCongress/prepare/quotaAllocation")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Api(tags = "教代会届次管理")
|
||||||
|
public class TeacherCongressQuotaAllocationController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/democratic/teachercongress/prepare/quotaAllocation/index.html")
|
||||||
|
@SaCheckPermission("tc.prepare.quotaAllocation")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("tc.prepare.quotaAllocation")
|
||||||
|
@ApiOperation(value = "分工会列表")
|
||||||
|
public Result pageData(String unionId, String sessionId) {
|
||||||
|
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
un.NAME AS unionName,
|
||||||
|
tcqa.allocationNum,
|
||||||
|
tcqa.ratio,
|
||||||
|
tcqa.seniorTeaNum,
|
||||||
|
tcqa.ordinaryTeaNum,
|
||||||
|
tcqa.femaleNum,
|
||||||
|
tcqa.less45Num,
|
||||||
|
COALESCE(u_count, 0) AS memberCount,
|
||||||
|
COALESCE(db_count, 0) AS dbCount
|
||||||
|
FROM
|
||||||
|
sys_union un
|
||||||
|
LEFT JOIN teacher_congress_quota_allocation tcqa ON tcqa.sessionId = @sessionId
|
||||||
|
AND tcqa.unionId = un.id
|
||||||
|
LEFT JOIN (SELECT unionId, COUNT(id) AS u_count FROM vw_user WHERE member = 1 GROUP BY unionId) u ON u.unionId = un.id
|
||||||
|
LEFT JOIN (SELECT unionId, COUNT(id) AS db_count FROM teacher_congress_delegate WHERE sessionId = @sessionId GROUP BY unionId) db ON db.unionId = un.id
|
||||||
|
$condition
|
||||||
|
""").setParam("sessionId", sessionId);
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("un.id", "=", unionId);
|
||||||
|
cnd.groupBy("un.id");
|
||||||
|
cnd.asc("un.unionCode");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> list = baseService.listMap(sql);
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("tc.prepare.quotaAllocation")
|
||||||
|
@ApiOperation(value = "分工会列表")
|
||||||
|
public Result getUnionLimit(String sessionId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
un.id AS unionId,
|
||||||
|
un.`name` AS unionName,
|
||||||
|
un.unionCode,
|
||||||
|
COALESCE(u_count, 0) AS memberCount,
|
||||||
|
t2.sessionId,
|
||||||
|
t2.allocationNum,
|
||||||
|
t2.ratio,
|
||||||
|
t2.seniorTeaNum,
|
||||||
|
t2.ordinaryTeaNum,
|
||||||
|
t2.femaleNum,
|
||||||
|
t2.less45Num
|
||||||
|
FROM
|
||||||
|
`sys_union` un
|
||||||
|
LEFT JOIN (SELECT unionId, COUNT(id) AS u_count FROM vw_user WHERE member = 1 GROUP BY unionId) u ON u.unionId = un.id
|
||||||
|
LEFT JOIN teacher_congress_quota_allocation t2 ON t2.unionId = un.id
|
||||||
|
AND t2.sessionId = @sessionId
|
||||||
|
ORDER BY
|
||||||
|
un.unionCode
|
||||||
|
""");
|
||||||
|
sql.setParam("sessionId", sessionId);
|
||||||
|
List<NutMap> nutMaps = baseService.listMap(sql);
|
||||||
|
return Result.success(nutMaps);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("tc.prepare.quotaAllocation")
|
||||||
|
@ApiOperation("添加分配")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Result doQuotaAllocation(@Param("list")Teacher_congress_quota_allocation[] list,String sessionId){
|
||||||
|
|
||||||
|
dao.clear(Teacher_congress_quota_allocation.class,
|
||||||
|
Cnd.where(Teacher_congress_quota_allocation::getSessionId, "=", sessionId));
|
||||||
|
for (Teacher_congress_quota_allocation quotaAllocation : list) {
|
||||||
|
quotaAllocation.setSessionId(sessionId);
|
||||||
|
}
|
||||||
|
dao.insert(list);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+76
@@ -0,0 +1,76 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.prepare.models;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 14:35
|
||||||
|
* @description 名额分配
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("teacher_congress_quota_allocation")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("名额分配")
|
||||||
|
public class Teacher_congress_quota_allocation extends BaseModel {
|
||||||
|
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("教代会ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String sessionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("分工会ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("名额分配数")
|
||||||
|
@ColDefine(type = ColType.INT, width = 4)
|
||||||
|
@Default("0")
|
||||||
|
private Integer allocationNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("名额分配比例")
|
||||||
|
@ColDefine(type = ColType.DOUBLE, width = 4)
|
||||||
|
@Default("0")
|
||||||
|
private Double ratio;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("高级职称专任教师代表数")
|
||||||
|
@ColDefine(type = ColType.INT, width = 4)
|
||||||
|
@Default("0")
|
||||||
|
private Integer seniorTeaNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("专任教师代表数")
|
||||||
|
@ColDefine(type = ColType.INT, width = 4)
|
||||||
|
@Default("0")
|
||||||
|
private Integer ordinaryTeaNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("女代表数")
|
||||||
|
@ColDefine(type = ColType.INT, width = 4)
|
||||||
|
@Default("0")
|
||||||
|
private Integer femaleNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("45岁以下代表数")
|
||||||
|
@ColDefine(type = ColType.INT, width = 4)
|
||||||
|
@Default("0")
|
||||||
|
private Integer less45Num;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+152
@@ -0,0 +1,152 @@
|
|||||||
|
package com.budwk.app.zhgh.enrollmentRegistration.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.lang.Dict;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
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.sys.models.Sys_user;
|
||||||
|
import com.budwk.app.sys.views.View_user;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.model.EnrollmentRegistration;
|
||||||
|
import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudget;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/21 16:16
|
||||||
|
* @description 子女入学登记
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/enrollmentRegistration/apply")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "子女入学登记填写")
|
||||||
|
public class EnrollmentRegistrationApplyController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private FlowEngine flowEngine;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/enrollmentRegistration/apply/index.html")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.apply")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询可以登记的计划")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.apply")
|
||||||
|
public Result getEnrollmentRegistrationPlan() {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
plan.*,
|
||||||
|
dict.`name` registrationTypeName
|
||||||
|
FROM
|
||||||
|
`enrollment_registration_plan` plan
|
||||||
|
LEFT JOIN sys_dict dict ON dict.`code` = plan.registrationType
|
||||||
|
WHERE
|
||||||
|
NOW() BETWEEN plan.startTime
|
||||||
|
AND plan.endTime
|
||||||
|
""");
|
||||||
|
List<NutMap> map = baseService.listMap(sql);
|
||||||
|
return Result.success(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("enrollmentRegistration.apply")
|
||||||
|
@ApiOperation("保存申请")
|
||||||
|
@SLog(type = "enrollmentRegistrationApply", tag = "子女入学管理-子女入学登记", msg = "保存子女入学登记")
|
||||||
|
public Result save(@Param("data") EnrollmentRegistration enrollmentRegistration) {
|
||||||
|
View_user user = baseService.dao().fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
|
||||||
|
enrollmentRegistration.setUserId(SecurityUtil.getUserId());
|
||||||
|
enrollmentRegistration.setLoginName(SecurityUtil.getUserLoginname());
|
||||||
|
enrollmentRegistration.setUserName(SecurityUtil.getUserUsername());
|
||||||
|
enrollmentRegistration.setUnitId(SecurityUtil.getUnitId());
|
||||||
|
enrollmentRegistration.setUnitName(user.getUnitName());
|
||||||
|
enrollmentRegistration.setUnionId(SecurityUtil.getUnionId());
|
||||||
|
enrollmentRegistration.setUnionName(user.getUnionName());
|
||||||
|
enrollmentRegistration.setApplyTime(DateUtil.now());
|
||||||
|
baseService.insertOrUpdate(enrollmentRegistration);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("enrollmentRegistration.apply")
|
||||||
|
@ApiOperation("提交申请")
|
||||||
|
@SLog(type = "enrollmentRegistrationApply", tag = "子女入学管理-子女入学登记", msg = "提交子女入学登记")
|
||||||
|
public Result submit(@Param("data") EnrollmentRegistration enrollmentRegistration) {
|
||||||
|
if (StrUtil.isBlank(enrollmentRegistration.getId())) {
|
||||||
|
View_user user = baseService.dao().fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
|
||||||
|
enrollmentRegistration.setUserId(SecurityUtil.getUserId());
|
||||||
|
enrollmentRegistration.setLoginName(SecurityUtil.getUserLoginname());
|
||||||
|
enrollmentRegistration.setUserName(SecurityUtil.getUserUsername());
|
||||||
|
enrollmentRegistration.setUnitId(SecurityUtil.getUnitId());
|
||||||
|
enrollmentRegistration.setUnitName(user.getUnitName());
|
||||||
|
enrollmentRegistration.setUnionId(SecurityUtil.getUnionId());
|
||||||
|
enrollmentRegistration.setUnionName(user.getUnionName());
|
||||||
|
enrollmentRegistration.setApplyTime(DateUtil.now());
|
||||||
|
}
|
||||||
|
baseService.insertOrUpdate(enrollmentRegistration);
|
||||||
|
// 开启流程实例
|
||||||
|
Dict args = Dict.create();
|
||||||
|
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||||
|
args.set(FlowConst.FORM_DATA, enrollmentRegistration);
|
||||||
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("ZNRXDJ", enrollmentRegistration.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
|
// 自动完成第一个申请任务
|
||||||
|
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||||
|
for (ProcessTask task : doingTaskList) {
|
||||||
|
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckLogin
|
||||||
|
@ApiOperation("查询身份证是否重复")
|
||||||
|
public Result getIsRepeatByIdCard(String idCard, String id) {
|
||||||
|
int count = baseService.dao().count(EnrollmentRegistration.class,
|
||||||
|
Cnd.where(EnrollmentRegistration::getChildrenIdCard, "=", idCard)
|
||||||
|
.and("YEAR(applyTime)", "=", DateUtil.thisYear())
|
||||||
|
.andEX(EnrollmentRegistration::getId, "!=", id));
|
||||||
|
|
||||||
|
|
||||||
|
return Result.success(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckLogin
|
||||||
|
public Result findOne(String id) {
|
||||||
|
return Result.success(baseService.dao().fetch(EnrollmentRegistration.class, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+86
@@ -0,0 +1,86 @@
|
|||||||
|
package com.budwk.app.zhgh.enrollmentRegistration.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/22 15:13
|
||||||
|
* @description 子女入学我的登记
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/enrollmentRegistration/applyList")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "子女入学我的登记")
|
||||||
|
public class EnrollmentRegistrationApplyListController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/enrollmentRegistration/applyList/index.html")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.applyList")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.applyList")
|
||||||
|
public Result pageData(PageForm pageForm, Integer year) {
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
enrollment_registration 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
|
||||||
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
||||||
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+75
@@ -0,0 +1,75 @@
|
|||||||
|
package com.budwk.app.zhgh.enrollmentRegistration.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.model.EnrollmentRegistrationPlan;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/21 10:38
|
||||||
|
* @description 子女入学登记计划
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/enrollmentRegistration/plan")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "子女入学登记计划")
|
||||||
|
public class EnrollmentRegistrationPlanController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/enrollmentRegistration/plan/index.html")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.plan")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.plan")
|
||||||
|
public Result pageData(PageForm pageForm, String year) {
|
||||||
|
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT * FROM `enrollment_registration_plan` $condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and(EnrollmentRegistrationPlan::getYear, "=", year);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("提交登记计划")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.plan")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SLog(type = "outlayReimburseApply", tag = "子女入学管理-登记计划", msg = "提交登记计划")
|
||||||
|
public Result onSubmit(@Param("data") EnrollmentRegistrationPlan enrollmentRegistrationPlan) {
|
||||||
|
baseService.insertOrUpdate(enrollmentRegistrationPlan);
|
||||||
|
|
||||||
|
return Result.success();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+115
@@ -0,0 +1,115 @@
|
|||||||
|
package com.budwk.app.zhgh.enrollmentRegistration.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/22 16:27
|
||||||
|
* @description 校工会审核
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "子女入学管理-校工会审核")
|
||||||
|
@At("/platform/enrollmentRegistration/schoolAudit")
|
||||||
|
public class EnrollmentRegistrationSchoolAuditController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/enrollmentRegistration/schoolAudit/index.html")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.schoolAudit")
|
||||||
|
public void index() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.schoolAudit")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
Integer year,
|
||||||
|
String unionId,
|
||||||
|
String unitId,
|
||||||
|
String registrationType,
|
||||||
|
Boolean approval) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
YEAR(info.applyTime) year,
|
||||||
|
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 taskVariable,
|
||||||
|
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||||
|
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||||
|
FROM
|
||||||
|
wf_process_task t
|
||||||
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
|
LEFT JOIN enrollment_registration info ON info.id = ins.businessNo
|
||||||
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||||
|
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("t.taskName", "=", "fcdea609-e3e9-41bc-94c0-61d09ab03dcc");
|
||||||
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
|
cnd.andEX("info.unionId","=",unionId);
|
||||||
|
cnd.andEX("info.unitId","=",unitId);
|
||||||
|
cnd.andEX("info.registrationType","=",registrationType);
|
||||||
|
|
||||||
|
if (approval) {
|
||||||
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllNotEmpty(pageForm.getSearchName(), pageForm.getSearchKeyword())) {
|
||||||
|
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||||
|
}
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
||||||
|
cnd.groupBy("t.id");
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("t.createdAt");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination<NutMap> pageVO = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pageVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+210
@@ -0,0 +1,210 @@
|
|||||||
|
package com.budwk.app.zhgh.enrollmentRegistration.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.core.util.URLUtil;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.bpm.service.BpmService;
|
||||||
|
import com.budwk.app.flow.engine.FlowEngine;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.sys.models.Sys_dict;
|
||||||
|
import com.budwk.app.sys.services.SysDictService;
|
||||||
|
import com.budwk.app.sys.services.SysFileService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.model.EnrollmentRegistration;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.service.EnrollmentRegistrationSummaryService;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.vo.EnrollmentRegistrationPageForm;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayReimburse.vo.OutlayReimbursePageForm;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
import org.nutz.lang.util.ByteInputStream;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.BufferedOutputStream;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/22 15:13
|
||||||
|
* @description 子女入学我的登记
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/enrollmentRegistration/summary")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "子女入学查询统计")
|
||||||
|
public class EnrollmentRegistrationSummaryController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private EnrollmentRegistrationSummaryService enrollmentRegistrationSummaryService;
|
||||||
|
@Inject
|
||||||
|
private SysDictService sysDictService;
|
||||||
|
@Inject
|
||||||
|
private SysFileService sysFileService;
|
||||||
|
@Inject
|
||||||
|
private FlowEngine flowEngine;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/enrollmentRegistration/summary/index.html")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.summary")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.summary")
|
||||||
|
public Result pageData(EnrollmentRegistrationPageForm pageForm) {
|
||||||
|
Sql sql = enrollmentRegistrationSummaryService.getSql(pageForm);
|
||||||
|
Pagination pagination = enrollmentRegistrationSummaryService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除子女入学信息")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("enrollmentRegistration.summary")
|
||||||
|
@SLog(tag = "子女入学-查询统计", type = "enrollmentRegistration", msg = "删除id: ${args[0]}")
|
||||||
|
public Result doDelete(String id){
|
||||||
|
enrollmentRegistrationSummaryService.dao().delete(EnrollmentRegistration.class,id);
|
||||||
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.summary")
|
||||||
|
public void doExportExcel(@Param("data") EnrollmentRegistrationPageForm pageForm, HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
Sql sql = enrollmentRegistrationSummaryService.getSql(pageForm);
|
||||||
|
List<NutMap> map = enrollmentRegistrationSummaryService.listMap(sql);
|
||||||
|
|
||||||
|
List<Sys_dict> dictList = sysDictService.getSubListByCode("ENROLLMENT_REGISTRATION_TYPE");
|
||||||
|
|
||||||
|
map.forEach(item -> {
|
||||||
|
Sys_dict dict = dictList.stream().filter(sys_dict -> sys_dict.getCode().equals(item.getString("registrationType"))).findFirst().orElse(null);
|
||||||
|
item.put("registrationTypeName", dict.getName());
|
||||||
|
});
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||||
|
ExcelExportEntity no = new ExcelExportEntity("序号", "no", 10);
|
||||||
|
no.setFormat("isAddIndex");
|
||||||
|
entityList.add(no);
|
||||||
|
|
||||||
|
entityList.add(new ExcelExportEntity("子女姓名", "childrenName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("教职工姓名", "userName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("所属工会", "unionName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("所属单位", "unitName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("手机号码", "mobile", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("登记类型", "registrationTypeName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("填报时间", "applyTime", 20));
|
||||||
|
|
||||||
|
response.setContentType("application/octet-stream");
|
||||||
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("子女信息登记汇总.xlsx", "UTF-8"));
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, map);
|
||||||
|
workbook.write(response.getOutputStream());
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.summary")
|
||||||
|
public void doExportZip(@Param("data") EnrollmentRegistrationPageForm pageForm, HttpServletResponse response) {
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
response.setContentType("application/octet-stream");
|
||||||
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLUtil.encode("子女入学.zip"));
|
||||||
|
Sql sql = enrollmentRegistrationSummaryService.getSql(pageForm);
|
||||||
|
List<NutMap> map = enrollmentRegistrationSummaryService.listMap(sql);
|
||||||
|
List<Sys_dict> dictList = sysDictService.getSubListByCode("ENROLLMENT_REGISTRATION_TYPE");
|
||||||
|
|
||||||
|
ZipOutputStream zipOutputStream = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
|
||||||
|
|
||||||
|
map.forEach(item -> {
|
||||||
|
try {
|
||||||
|
String childrenName = item.getString("childrenName");
|
||||||
|
String userName = item.getString("userName");
|
||||||
|
Sys_dict dict = dictList.stream().filter(sys_dict -> sys_dict.getCode().equals(item.getString("registrationType"))).findFirst().orElse(null);
|
||||||
|
|
||||||
|
List<JSONObject> huKouFiles = Json.fromJsonAsList(JSONObject.class, item.getString("huKouFiles"));
|
||||||
|
List<JSONObject> birthCertificateFiles = item.getList("birthCertificateFiles", JSONObject.class);
|
||||||
|
List<JSONObject> mergedList = new ArrayList<>();
|
||||||
|
mergedList.addAll(huKouFiles);
|
||||||
|
mergedList.addAll(birthCertificateFiles);
|
||||||
|
for (JSONObject file : mergedList) {
|
||||||
|
|
||||||
|
String fileName = file.getStr("name");
|
||||||
|
|
||||||
|
JSONObject entries = file.getJSONObject("response");
|
||||||
|
String filepath = entries.getStr("data");
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(filepath)) {
|
||||||
|
int indexOf = filepath.lastIndexOf("?");
|
||||||
|
String fileId = filepath.substring(indexOf + 4);
|
||||||
|
zipOutputStream.putNextEntry(new ZipEntry(dict.getName() + userName + "【" + childrenName + "】" + item.getString("createdAt") + "/" + fileName));
|
||||||
|
byte[] bytes = sysFileService.download(fileId);
|
||||||
|
ByteInputStream byteIs = new ByteInputStream(bytes);
|
||||||
|
IOUtils.copy(byteIs, zipOutputStream);
|
||||||
|
byteIs.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
zipOutputStream.closeEntry();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
zipOutputStream.flush();
|
||||||
|
zipOutputStream.close();
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+111
@@ -0,0 +1,111 @@
|
|||||||
|
package com.budwk.app.zhgh.enrollmentRegistration.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/22 16:27
|
||||||
|
* @description 分工会审核
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "子女入学管理-分工会审核")
|
||||||
|
@At("/platform/enrollmentRegistration/unionAudit")
|
||||||
|
public class EnrollmentRegistrationUnionAuditController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/enrollmentRegistration/unionAudit/index.html")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.unionAudit")
|
||||||
|
public void index() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.unionAudit")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
Integer year,
|
||||||
|
String registrationType,
|
||||||
|
Boolean approval) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
YEAR(info.applyTime) year,
|
||||||
|
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 taskVariable,
|
||||||
|
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||||
|
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||||
|
FROM
|
||||||
|
wf_process_task t
|
||||||
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
|
LEFT JOIN enrollment_registration info ON info.id = ins.businessNo
|
||||||
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||||
|
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("t.taskName", "=", "4a824460-80cf-4596-9b4b-1cf667296bb1");
|
||||||
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
|
cnd.andEX("info.registrationType","=",registrationType);
|
||||||
|
|
||||||
|
if (approval) {
|
||||||
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllNotEmpty(pageForm.getSearchName(), pageForm.getSearchKeyword())) {
|
||||||
|
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||||
|
}
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
||||||
|
cnd.groupBy("t.id");
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("t.createdAt");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination<NutMap> pageVO = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pageVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+114
-3
@@ -1,13 +1,13 @@
|
|||||||
package com.budwk.app.zhgh.enrollmentRegistration.model;
|
package com.budwk.app.zhgh.enrollmentRegistration.model;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import com.budwk.app.base.model.BaseModel;
|
import com.budwk.app.base.model.BaseModel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.nutz.dao.entity.annotation.Comment;
|
import org.nutz.dao.entity.annotation.*;
|
||||||
import org.nutz.dao.entity.annotation.Table;
|
|
||||||
import org.nutz.dao.entity.annotation.TableMeta;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhf
|
* @author zhf
|
||||||
@@ -20,4 +20,115 @@ import java.io.Serializable;
|
|||||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
@Comment("入学登记表")
|
@Comment("入学登记表")
|
||||||
public class EnrollmentRegistration extends BaseModel implements Serializable {
|
public class EnrollmentRegistration extends BaseModel implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Prev(els = {@EL("uuid()")})
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 30)
|
||||||
|
@Comment("登记类型(字典)")
|
||||||
|
private String registrationType;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 30)
|
||||||
|
@Comment("监护人(教工)姓名")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 30)
|
||||||
|
@Comment("工号")
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
@Comment("userId")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 30)
|
||||||
|
@Comment("手机号码")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||||
|
@Comment("所在单位")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
@Comment("所在单位Id")
|
||||||
|
private String unitId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||||
|
@Comment("所在工会")
|
||||||
|
private String unionName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
@Comment("所在工会Id")
|
||||||
|
private String unionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||||
|
@Comment("监护人与学生关系")
|
||||||
|
private String childRelationship;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 30)
|
||||||
|
@Comment("子女姓名")
|
||||||
|
private String childrenName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 30)
|
||||||
|
@Comment("性别")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 30)
|
||||||
|
@Comment("身份证号")
|
||||||
|
private String childrenIdCard;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||||
|
@Comment("现就读学校")
|
||||||
|
private String childrenCurrentSchool;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||||
|
@Comment("拟报就读学校")
|
||||||
|
private String childrenPlanSchool;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||||
|
@Comment("子女户口所在地")
|
||||||
|
private String childrenHuKouAddress;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||||
|
@Comment("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||||
|
@Comment("填写时间")
|
||||||
|
private String applyTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
@Comment("户口簿照片")
|
||||||
|
private List<JSONObject> huKouFiles;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
@Comment("子女出生证照片")
|
||||||
|
private List<JSONObject> birthCertificateFiles;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
package com.budwk.app.zhgh.enrollmentRegistration.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/21 10:29
|
||||||
|
* @description 子女入学登记计划
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("enrollment_registration_plan")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("入学登记表")
|
||||||
|
public class EnrollmentRegistrationPlan extends BaseModel implements Serializable {
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Prev(els = {@EL("uuid()")})
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 4)
|
||||||
|
@Comment("年份")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 30)
|
||||||
|
@Comment("登记类型(字典)")
|
||||||
|
private String registrationType;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
@Comment("开始时间")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
@Comment("结束时间")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
@Comment("大于某个出生日期能选")
|
||||||
|
private String greaterThanBirthday;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
@Comment("小于某个出生日期能选")
|
||||||
|
private String lessThanBirthday;
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package com.budwk.app.zhgh.enrollmentRegistration.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.vo.EnrollmentRegistrationPageForm;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
|
||||||
|
public interface EnrollmentRegistrationSummaryService extends BaseService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Sql getSql(EnrollmentRegistrationPageForm pageForm);
|
||||||
|
}
|
||||||
+62
@@ -0,0 +1,62 @@
|
|||||||
|
package com.budwk.app.zhgh.enrollmentRegistration.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.service.EnrollmentRegistrationSummaryService;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.vo.EnrollmentRegistrationPageForm;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/22 17:30
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class EnrollmentRegistrationSummaryServiceImpl extends BaseServiceImpl implements EnrollmentRegistrationSummaryService {
|
||||||
|
public EnrollmentRegistrationSummaryServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sql getSql(EnrollmentRegistrationPageForm pageForm) {
|
||||||
|
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
|
||||||
|
enrollment_registration 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
|
||||||
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", pageForm.getYear());
|
||||||
|
cnd.and("ins.state", "=", ProcessTaskStateEnum.FINISHED.getCode());
|
||||||
|
cnd.andEX("info.unionId","=",pageForm.getUnionId());
|
||||||
|
cnd.andEX("info.unitId","=",pageForm.getUnitId());
|
||||||
|
cnd.andEX("info.registrationType","=",pageForm.getRegistrationType());
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return sql;
|
||||||
|
}
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
package com.budwk.app.zhgh.enrollmentRegistration.vo;
|
||||||
|
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/25 08:40
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class EnrollmentRegistrationPageForm extends PageForm {
|
||||||
|
|
||||||
|
|
||||||
|
private Integer year;
|
||||||
|
private String unionId;
|
||||||
|
private String unitId;
|
||||||
|
private String registrationType;
|
||||||
|
}
|
||||||
@@ -275,7 +275,7 @@ public class IntegralManageController {
|
|||||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
entities.add(new ExcelExportEntity("工号", "loginName", 20));
|
entities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||||
entities.add(new ExcelExportEntity("姓名", "userName", 20));
|
entities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||||
entities.add(new ExcelExportEntity("增加积分", "integral", 20));
|
entities.add(new ExcelExportEntity("积分", "integral", 20));
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
|
||||||
CommonDownloadUtil.download("积分增加导入模板.xlsx", workbook, response);
|
CommonDownloadUtil.download("积分增加导入模板.xlsx", workbook, response);
|
||||||
|
|||||||
+2
-1
@@ -196,8 +196,9 @@ public class IntegralManageServiceImpl extends BaseServiceImpl<IntegralDetail> i
|
|||||||
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cnd.andEX("ind.year", "=", year);
|
||||||
cnd.andEX("u.unionId", "=", unionId);
|
cnd.andEX("u.unionId", "=", unionId);
|
||||||
cnd.andEX("u.unionId", "=", unitId);
|
cnd.andEX("u.unitId", "=", unitId);
|
||||||
cnd.andEX("u.personType", "=", personType);
|
cnd.andEX("u.personType", "=", personType);
|
||||||
cnd.andEX("u.userState", "=", userState);
|
cnd.andEX("u.userState", "=", userState);
|
||||||
cnd.andEX("DATE(ind.integralTime)", "=", integralTime);
|
cnd.andEX("DATE(ind.integralTime)", "=", integralTime);
|
||||||
|
|||||||
+30
-5
@@ -5,9 +5,16 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
import com.budwk.app.sys.models.Sys_role;
|
||||||
|
import com.budwk.app.sys.models.Sys_user_role;
|
||||||
|
import com.budwk.app.sys.services.SysRoleService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.club.model.SysClub;
|
||||||
|
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||||
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
|
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
|
||||||
import com.budwk.app.zhgh.integral.controller.IntegralManageController;
|
import com.budwk.app.zhgh.integral.controller.IntegralManageController;
|
||||||
import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudget;
|
import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudget;
|
||||||
@@ -52,6 +59,11 @@ public class ActivityBudgetApplyController {
|
|||||||
@Inject
|
@Inject
|
||||||
private ActivityBudgetService activityBudgetService;
|
private ActivityBudgetService activityBudgetService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SysClubService sysClubService;
|
||||||
|
@Inject
|
||||||
|
private SysRoleService sysRoleService;
|
||||||
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/outlay/activityBudget/apply/index.html")
|
@Ok("beetl:/platform/zhgh/outlay/activityBudget/apply/index.html")
|
||||||
@@ -59,11 +71,6 @@ public class ActivityBudgetApplyController {
|
|||||||
public void index() {
|
public void index() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@At("/form")
|
|
||||||
@Ok("beetl:/platform/zhgh/outlay/activityBudget/apply/form.html")
|
|
||||||
@SaCheckPermission("activity.budget.apply")
|
|
||||||
public void form() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@@ -72,6 +79,7 @@ public class ActivityBudgetApplyController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SLog(type = "activityBudgetApply", tag = "年度预算申报-预算申报", msg = "提交年度预算申报")
|
@SLog(type = "activityBudgetApply", tag = "年度预算申报-预算申报", msg = "提交年度预算申报")
|
||||||
public Result submit(@Param("data") ActivityBudget activityBudget) {
|
public Result submit(@Param("data") ActivityBudget activityBudget) {
|
||||||
|
activityBudget.setApplyDate(DateUtil.now());
|
||||||
return activityBudgetService.submit(activityBudget);
|
return activityBudgetService.submit(activityBudget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,6 +92,7 @@ public class ActivityBudgetApplyController {
|
|||||||
activityBudget.setUserId(SecurityUtil.getUserId());
|
activityBudget.setUserId(SecurityUtil.getUserId());
|
||||||
activityBudget.setLoginName(SecurityUtil.getUserLoginname());
|
activityBudget.setLoginName(SecurityUtil.getUserLoginname());
|
||||||
activityBudget.setUserName(SecurityUtil.getUserUsername());
|
activityBudget.setUserName(SecurityUtil.getUserUsername());
|
||||||
|
activityBudget.setApplyDate(DateUtil.now());
|
||||||
activityBudgetService.insertOrUpdate(activityBudget);
|
activityBudgetService.insertOrUpdate(activityBudget);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
@@ -125,6 +134,22 @@ public class ActivityBudgetApplyController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询协会,超级管理员查全部的")
|
||||||
|
@SaCheckLogin
|
||||||
|
public Result listClub(){
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
|
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_PRESIDENT);
|
||||||
|
List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId()));
|
||||||
|
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
||||||
|
cnd.and("id", "in", myClubId);
|
||||||
|
}
|
||||||
|
List<SysClub> list = sysClubService.query(cnd);
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
package com.budwk.app.zhgh.outlay.activityBudget.conteoller;
|
package com.budwk.app.zhgh.outlay.activityBudget.conteoller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -133,7 +134,7 @@ public class ActivityBudgetApplyListController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("查询单个预算详细信息")
|
@ApiOperation("查询单个预算详细信息")
|
||||||
@SaCheckPermission("activity.budget.applyList")
|
@SaCheckLogin
|
||||||
public Result findOne(String id) {
|
public Result findOne(String id) {
|
||||||
return Result.success(activityBudgetService.findOne(id));
|
return Result.success(activityBudgetService.findOne(id));
|
||||||
}
|
}
|
||||||
|
|||||||
+8
@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
@@ -97,6 +98,13 @@ public class ActivityBudgetSchoolAuditController {
|
|||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
|
group.orLike("info.loginName", pageForm.getSearchKeyword());
|
||||||
|
group.orLike("info.userName", pageForm.getSearchKeyword());
|
||||||
|
cnd.and(group);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
cnd.andEX("YEAR(info.applyDate)", "=", year);
|
cnd.andEX("YEAR(info.applyDate)", "=", year);
|
||||||
cnd.and(Cnd.likeEX("info.activityMatter", activityMatter));
|
cnd.and(Cnd.likeEX("info.activityMatter", activityMatter));
|
||||||
|
|||||||
-130
@@ -1,130 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.outlay.activityBudget.interceptor;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.budwk.app.base.result.Result;
|
|
||||||
import com.budwk.app.flow.constant.FlowConst;
|
|
||||||
import com.budwk.app.flow.engine.FlowInterceptor;
|
|
||||||
import com.budwk.app.flow.engine.core.Execution;
|
|
||||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
|
||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
|
||||||
import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudget;
|
|
||||||
import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudgetDetails;
|
|
||||||
import com.budwk.app.zhgh.outlay.activityBudget.service.ActivityBudgetService;
|
|
||||||
import com.budwk.app.zhgh.outlay.outlayManage.school.model.OutlayManageSchool;
|
|
||||||
import com.budwk.app.zhgh.outlay.outlayManage.union.model.OutlayManageUnion;
|
|
||||||
import org.nutz.dao.Chain;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.dao.Dao;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.json.Json;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhf
|
|
||||||
* @date 2025/7/28 17:01
|
|
||||||
* @description 活动预算申报提交后置拦截器
|
|
||||||
*/
|
|
||||||
public class OutlayActBudgetApplyPostInterceptor implements FlowInterceptor {
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void intercept(Execution execution) {
|
|
||||||
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
|
|
||||||
ActivityBudget activityBudget = Json.fromJson(ActivityBudget.class, formDataStr);
|
|
||||||
|
|
||||||
Dao dao = ServiceContext.find(Dao.class);
|
|
||||||
|
|
||||||
if (StrUtil.isEmpty(activityBudget.getId())) {
|
|
||||||
activityBudget.setUserId(SecurityUtil.getUserId());
|
|
||||||
activityBudget.setLoginName(SecurityUtil.getUserLoginname());
|
|
||||||
activityBudget.setUserName(SecurityUtil.getUserUsername());
|
|
||||||
//查询分工会这个项目有没有申报过
|
|
||||||
// if (List.of("ACTIVITY_BUDGET_TYPE_TWO").contains(activityBudget.getBudgetTypeCode())) {
|
|
||||||
// int activityMatterCount = dao.count(ActivityBudget.class, Cnd.where("activityMatter", "=",
|
|
||||||
// activityBudget.getActivityMatter()).and("unionId", "=", SecurityUtil.getUnionId()));
|
|
||||||
// if (activityMatterCount > 0) {
|
|
||||||
// return Result.error(activityBudget.getActivityMatter() + "已填写申请!");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
//删除预算详情表
|
|
||||||
if (StrUtil.isNotBlank(activityBudget.getId())) {
|
|
||||||
dao.clear(ActivityBudgetDetails.class, Cnd.where("budgetId", "=", activityBudget.getId()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (List.of("superadmin").contains(SecurityUtil.getUserLoginname())) {
|
|
||||||
//如果是超级管理员就可以直接提交不用审核
|
|
||||||
activityBudget.setTotalBudgetMoney(activityBudget.getDeclareTotalBudgetMoney());
|
|
||||||
ActivityBudget budget = null;
|
|
||||||
if (StrUtil.isNotBlank(activityBudget.getId())) {
|
|
||||||
budget = dao.fetch(ActivityBudget.class, activityBudget.getId());
|
|
||||||
}
|
|
||||||
//如果申报的是校工会预算
|
|
||||||
if (activityBudget.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_ONE")) {
|
|
||||||
OutlayManageSchool outlayManageSchool = dao.fetch(OutlayManageSchool.class, Cnd.where("year", "=", DateUtil.thisYear()));
|
|
||||||
if (ObjectUtil.isNotEmpty(outlayManageSchool)) {
|
|
||||||
if (StrUtil.isNotBlank(activityBudget.getId())) {
|
|
||||||
//如果传过来有预算Id,代表是修改的,那么就减去原来的金额
|
|
||||||
outlayManageSchool.setTotalQuota(outlayManageSchool.getTotalQuota().subtract(budget.getTotalBudgetMoney()));
|
|
||||||
}
|
|
||||||
//直接修改为现在传过来的金额
|
|
||||||
outlayManageSchool.setTotalQuota(outlayManageSchool.getTotalQuota().add(activityBudget.getTotalBudgetMoney()));
|
|
||||||
dao.updateIgnoreNull(outlayManageSchool);
|
|
||||||
}
|
|
||||||
} else if (activityBudget.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_TWO")) {
|
|
||||||
//如果申报的是分工会预算
|
|
||||||
OutlayManageUnion outlayManageUnion = dao.fetch(OutlayManageUnion.class,
|
|
||||||
Cnd.where("year", "=", DateUtil.thisYear())
|
|
||||||
.and("unionId", "=", activityBudget.getUnionId()));
|
|
||||||
if (ObjectUtil.isNotEmpty(outlayManageUnion)) {
|
|
||||||
if (StrUtil.isNotBlank(activityBudget.getId())) {
|
|
||||||
outlayManageUnion.setTotalQuota(outlayManageUnion.getTotalQuota().subtract(budget.getTotalBudgetMoney()));
|
|
||||||
}
|
|
||||||
outlayManageUnion.setTotalQuota(outlayManageUnion.getTotalQuota().add(activityBudget.getTotalBudgetMoney()));
|
|
||||||
dao.updateIgnoreNull(outlayManageUnion);
|
|
||||||
}
|
|
||||||
} else if (activityBudget.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_THREE")) {
|
|
||||||
//如果不等于校工会预算才往表里面加预算
|
|
||||||
//代表协会可能用的是校工会的预算
|
|
||||||
// if (!activityBudget.getIsSchoolBudget()) {
|
|
||||||
// jf_club jfClub = dao.fetch(jf_club.class, Cnd.where("year", "=", DateUtil.getYear())
|
|
||||||
// .and("club_id", "=", activityBudget.getClubId()));
|
|
||||||
// if (ObjectUtil.isNotEmpty(jfClub)) {
|
|
||||||
// if (StrUtil.isNotBlank(activityBudget.getId())) {
|
|
||||||
// jfClub.setTotalQuota(jfClub.getTotalQuota().subtract(budget.getTotalBudgetMoney()));
|
|
||||||
// }
|
|
||||||
// jfClub.setTotalQuota(jfClub.getTotalQuota().add(activityBudget.getTotalBudgetMoney()));
|
|
||||||
// dao.updateIgnoreNull(jfClub);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
} else if (activityBudget.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_FOUR")) {
|
|
||||||
// 更新其他经费表
|
|
||||||
// JfOther jfOther = dao.fetch(JfOther.class, Cnd.where("year", "=", DateUtil.getYear()));
|
|
||||||
// if (ObjectUtil.isNotEmpty(jfOther)) {
|
|
||||||
// if (StrUtil.isNotBlank(activityBudget.getId())) {
|
|
||||||
// jfOther.setTotalQuota(jfOther.getTotalQuota().subtract(budget.getTotalBudgetMoney()));
|
|
||||||
// }
|
|
||||||
// jfOther.setTotalQuota(jfOther.getTotalQuota().add(activityBudget.getTotalBudgetMoney()));
|
|
||||||
// dao.updateIgnoreNull(jfOther);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dao.insertOrUpdate(activityBudget);
|
|
||||||
// for (ActivityBudgetDetails details : activityBudget.getBudgetDetails()) {
|
|
||||||
// details.setBudgetId(activityBudget.getId());
|
|
||||||
// }
|
|
||||||
// //添加预算详情表
|
|
||||||
// dao.insert(activityBudget.getBudgetDetails());
|
|
||||||
|
|
||||||
execution.getArgs().set(FlowConst.FORM_DATA,Json.toJson(activityBudget));
|
|
||||||
|
|
||||||
int instanceId = execution.getArgs().getInt(FlowConst.PROCESS_INSTANCE_ID_KEY);
|
|
||||||
dao.update(ProcessInstance.class, Chain.make("businessNo", activityBudget.getId()), Cnd.where(ProcessInstance::getId, "=", instanceId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+2
-1
@@ -6,6 +6,7 @@ import com.budwk.app.base.service.BaseService;
|
|||||||
import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudget;
|
import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudget;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ public interface ActivityBudgetService extends BaseService<ActivityBudget> {
|
|||||||
*/
|
*/
|
||||||
Result submit(ActivityBudget activityBudget);
|
Result submit(ActivityBudget activityBudget);
|
||||||
|
|
||||||
ActivityBudget findOne(String id);
|
NutMap findOne(String id);
|
||||||
|
|
||||||
|
|
||||||
void doExport(Integer year, String activityMatter, HttpServletResponse response);
|
void doExport(Integer year, String activityMatter, HttpServletResponse response);
|
||||||
|
|||||||
+11
-10
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
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.entity.ProcessTaskActor;
|
import com.budwk.app.flow.entity.ProcessTaskActor;
|
||||||
@@ -15,6 +16,7 @@ import org.nutz.dao.Cnd;
|
|||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -31,6 +33,11 @@ public class ActivityBudgetApplyStatisticsServiceImpl extends BaseServiceImpl im
|
|||||||
super(dao);
|
super(dao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private FlowEngine flowEngine;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Sql getsql(Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter) {
|
public Sql getsql(Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
@@ -38,9 +45,11 @@ public class ActivityBudgetApplyStatisticsServiceImpl extends BaseServiceImpl im
|
|||||||
YEAR(ab.applyDate) year,
|
YEAR(ab.applyDate) year,
|
||||||
ab.*,
|
ab.*,
|
||||||
ins.id AS instanceId,
|
ins.id AS instanceId,
|
||||||
ins.businessNo
|
ins.businessNo,
|
||||||
|
abb.activityMatter activityMatterTwo
|
||||||
FROM
|
FROM
|
||||||
activity_budget ab
|
activity_budget ab
|
||||||
|
LEFT JOIN activity_budget abb ON abb.id = ab.schoolBudgetId
|
||||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = ab.id
|
LEFT JOIN wf_process_instance ins ON ins.businessNo = ab.id
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
@@ -82,17 +91,9 @@ public class ActivityBudgetApplyStatisticsServiceImpl extends BaseServiceImpl im
|
|||||||
//查出流程实例
|
//查出流程实例
|
||||||
ProcessInstance instance = dao().fetch(ProcessInstance.class, Cnd.where("businessNo", "=", id));
|
ProcessInstance instance = dao().fetch(ProcessInstance.class, Cnd.where("businessNo", "=", id));
|
||||||
if (ObjectUtil.isNotEmpty(instance)) {
|
if (ObjectUtil.isNotEmpty(instance)) {
|
||||||
//查询流程任务
|
|
||||||
List<ProcessTask> taskList = dao().query(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", instance.getId()));
|
|
||||||
List<Long> taskIds = taskList.stream().map(ProcessTask::getId).toList();
|
|
||||||
//删除流程任务下面所有的人员
|
|
||||||
dao().clear(ProcessTask.class, Cnd.where(ProcessTaskActor::getProcessTaskId, "in", taskIds));
|
|
||||||
//删除流程任务
|
|
||||||
dao().clear(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", instance.getId()));
|
|
||||||
//删除流程实例
|
|
||||||
dao().delete(ProcessInstance.class, instance.getId());
|
|
||||||
//删除预算
|
//删除预算
|
||||||
dao().delete(ActivityBudget.class, id);
|
dao().delete(ActivityBudget.class, id);
|
||||||
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-13
@@ -64,26 +64,30 @@ public class ActivityBudgetQueryStatisticsServiceImpl extends BaseServiceImpl im
|
|||||||
return listMap(sql);
|
return listMap(sql);
|
||||||
|
|
||||||
} else if (outlayManageSource.equals("ACTIVITY_BUDGET_TYPE_THREE")) {
|
} else if (outlayManageSource.equals("ACTIVITY_BUDGET_TYPE_THREE")) {
|
||||||
/* Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@year `year`,
|
@YEAR `year`,
|
||||||
sc.`code` AS clubCode,
|
sc.clubCode,
|
||||||
sc.`name` AS clubName,
|
sc.clubName,
|
||||||
|
ab.clubId,
|
||||||
COALESCE(SUM(ab.totalBudgetMoney), 0) AS totalBudgetMoney
|
COALESCE(SUM(ab.totalBudgetMoney), 0) AS totalBudgetMoney
|
||||||
FROM
|
FROM
|
||||||
sys_club sc
|
activity_budget ab
|
||||||
LEFT JOIN activity_budget ab ON ab.clubId = sc.id
|
LEFT JOIN sys_club sc ON ab.clubId = sc.id
|
||||||
AND ab.outlayManageSource = 'ACTIVITY_BUDGET_TYPE_THREE'
|
LEFT JOIN wf_process_instance wpi ON wpi.businessNo = ab.id
|
||||||
AND ab.auditState = 4
|
|
||||||
AND YEAR(ab.applyDate)=@year
|
|
||||||
$condition
|
$condition
|
||||||
""").setParam("year", year);
|
""").setParam("year", year);
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.andEX("sc.id", "=", clubId);
|
cnd.andEX("ab.clubId", "=", clubId);
|
||||||
cnd.groupBy("sc.id");
|
cnd.andEX("ab.isSchoolBudget", "=", 0);
|
||||||
cnd.asc("sc.`code`");
|
cnd.andEX("ab.outlayManageSource", "=", "ACTIVITY_BUDGET_TYPE_THREE");
|
||||||
|
cnd.andEX("wpi.state", "=", 20);
|
||||||
|
cnd.andEX("YEAR(ab.applyDate)", "=", year);
|
||||||
|
cnd.groupBy("ab.clubId");
|
||||||
|
cnd.asc("sc.clubCode");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return listMap(sql);*/
|
sql.setCondition(cnd);
|
||||||
|
return listMap(sql);
|
||||||
}
|
}
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-5
@@ -88,7 +88,6 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
|
|||||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
||||||
AND t.taskState = 10
|
AND t.taskState = 10
|
||||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
if (StrUtil.isNotBlank(activityMatter)) {
|
if (StrUtil.isNotBlank(activityMatter)) {
|
||||||
@@ -136,7 +135,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
|
|||||||
int activityMatterCount = count(Cnd.where("activityMatter", "=",
|
int activityMatterCount = count(Cnd.where("activityMatter", "=",
|
||||||
activityBudget.getActivityMatter()).and("unionId", "=", SecurityUtil.getUnionId()));
|
activityBudget.getActivityMatter()).and("unionId", "=", SecurityUtil.getUnionId()));
|
||||||
if (activityMatterCount > 0) {
|
if (activityMatterCount > 0) {
|
||||||
return Result.error(activityBudget.getActivityMatter() + "已填写申请!");
|
// return Result.error(activityBudget.getActivityMatter() + "已填写申请!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -228,9 +227,21 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActivityBudget findOne(String id) {
|
public NutMap findOne(String id) {
|
||||||
ActivityBudget activityBudget = fetchLinks(fetch(id), "budgetDetails", Cnd.NEW().asc("detailsOrder"));
|
Sql sql = Sqls.create("""
|
||||||
// activityBudget.setAllocationEditAuditList(dao().query(Audit.class, Cnd.where("parentId", "=", activityBudget.getId())));
|
SELECT
|
||||||
|
ab.*,
|
||||||
|
abb.activityMatter activityMatterTwo
|
||||||
|
FROM
|
||||||
|
activity_budget ab
|
||||||
|
LEFT JOIN activity_budget abb ON abb.id = ab.schoolBudgetId
|
||||||
|
WHERE
|
||||||
|
ab.id = @id
|
||||||
|
""").setParam("id",id);
|
||||||
|
sql.setCallback(Sqls.callback.map());
|
||||||
|
execute(sql);
|
||||||
|
NutMap activityBudget = (NutMap) sql.getResult();
|
||||||
|
activityBudget.put("budgetDetails", dao().query(ActivityBudgetDetails.class, Cnd.where("budgetId", "=", id)));
|
||||||
return activityBudget;
|
return activityBudget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,11 @@ public class OutlayUseDetail extends BaseModel implements Serializable {
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
private String activityNumber;
|
private String activityNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("业务Id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String outlayReimburseId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("活动时间")
|
@Comment("活动时间")
|
||||||
@ColDefine(type = ColType.VARCHAR)
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
|||||||
+1
@@ -115,6 +115,7 @@ public class OutlayManageUnionController {
|
|||||||
WHERE
|
WHERE
|
||||||
YEAR(ab.applyDate) = @year
|
YEAR(ab.applyDate) = @year
|
||||||
AND ab.outlayManageSource = 'ACTIVITY_BUDGET_TYPE_TWO'
|
AND ab.outlayManageSource = 'ACTIVITY_BUDGET_TYPE_TWO'
|
||||||
|
AND ab.isSchoolBudget =0
|
||||||
AND wpi.state = 20
|
AND wpi.state = 20
|
||||||
""").setParam("year", DateUtil.thisYear());
|
""").setParam("year", DateUtil.thisYear());
|
||||||
List<NutMap> budgetList = baseService.listMap(sql);
|
List<NutMap> budgetList = baseService.listMap(sql);
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,6 @@
|
|||||||
package com.budwk.app.zhgh.outlay.outlayReimburse.controller;
|
package com.budwk.app.zhgh.outlay.outlayReimburse.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.lang.Dict;
|
import cn.hutool.core.lang.Dict;
|
||||||
@@ -71,7 +72,7 @@ public class OutlayReimburseApplyController {
|
|||||||
@ApiOperation("查询这个预算已经报销了的金额")
|
@ApiOperation("查询这个预算已经报销了的金额")
|
||||||
@SaCheckPermission("outlay.reimburse.apply")
|
@SaCheckPermission("outlay.reimburse.apply")
|
||||||
public Result getBxMoneyByBudgetId(String budgetId) {
|
public Result getBxMoneyByBudgetId(String budgetId) {
|
||||||
return Result.success(outlayReimburseApplyService.getBxMoneyByActivityId(budgetId));
|
return Result.success(outlayReimburseApplyService.getBxMoneyByActivityId(budgetId,null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -136,8 +137,7 @@ public class OutlayReimburseApplyController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("outlay.reimburse.apply")
|
@SaCheckLogin
|
||||||
@ApiOperation("保存申请")
|
|
||||||
public Result findOne(String id){
|
public Result findOne(String id){
|
||||||
return Result.success(outlayReimburseApplyService.fetch(id));
|
return Result.success(outlayReimburseApplyService.fetch(id));
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -70,10 +70,12 @@ public class OutlayReimburseApplyListController {
|
|||||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
||||||
AND t.taskState = 10
|
AND t.taskState = 10
|
||||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
||||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
|
sql.setCondition(cnd);
|
||||||
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-12
@@ -9,6 +9,7 @@ import com.budwk.app.base.service.BaseService;
|
|||||||
import com.budwk.app.base.utils.PageUtil;
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayReimburse.vo.OutlayReimbursePageForm;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -49,13 +50,7 @@ public class OutlayReimburseSchoolCnAuditController {
|
|||||||
@At
|
@At
|
||||||
@ApiOperation("分页查询")
|
@ApiOperation("分页查询")
|
||||||
@SaCheckPermission("outlay.reimburse.schoolCnAudit")
|
@SaCheckPermission("outlay.reimburse.schoolCnAudit")
|
||||||
public Result pageData(PageForm pageForm,
|
public Result pageData(OutlayReimbursePageForm pageForm) {
|
||||||
Integer year,
|
|
||||||
String unionId,
|
|
||||||
String clubId,
|
|
||||||
Boolean approval,
|
|
||||||
String outlayManageSource,
|
|
||||||
String activityMatter) {
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
info.*,
|
info.*,
|
||||||
@@ -88,16 +83,19 @@ public class OutlayReimburseSchoolCnAuditController {
|
|||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("t.taskName", "=", "714574d6-29c3-4a2c-bc63-ecef38a0d6d0");
|
cnd.and("t.taskName", "=", "714574d6-29c3-4a2c-bc63-ecef38a0d6d0");
|
||||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
cnd.andEX("info.unionId", "=", unionId);
|
cnd.andEX("info.unionId", "=", pageForm.getUnionId());
|
||||||
cnd.andEX("info.outlayManageSource", "=", outlayManageSource);
|
cnd.andEX("info.outlayManageSource", "=", pageForm.getOutlayManageSource());
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", pageForm.getYear());
|
||||||
if (approval) {
|
if (pageForm.getApproval()) {
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
if (StrUtil.isAllNotEmpty(pageForm.getSearchName(), pageForm.getSearchKeyword())) {
|
||||||
|
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||||
|
}
|
||||||
|
|
||||||
cnd.groupBy("t.id");
|
cnd.groupBy("t.id");
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("t.createdAt").desc("info.applyTime");
|
cnd.desc("t.createdAt").desc("info.applyTime");
|
||||||
|
|||||||
+12
-11
@@ -13,6 +13,7 @@ import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
|||||||
import com.budwk.app.sys.models.Sys_dict;
|
import com.budwk.app.sys.models.Sys_dict;
|
||||||
import com.budwk.app.sys.services.SysDictService;
|
import com.budwk.app.sys.services.SysDictService;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayReimburse.vo.OutlayReimbursePageForm;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -56,13 +57,7 @@ public class OutlayReimburseSchoolKjAuditController {
|
|||||||
@At
|
@At
|
||||||
@ApiOperation("分页查询")
|
@ApiOperation("分页查询")
|
||||||
@SaCheckPermission("outlay.reimburse.schoolKjAudit")
|
@SaCheckPermission("outlay.reimburse.schoolKjAudit")
|
||||||
public Result pageData(PageForm pageForm,
|
public Result pageData(OutlayReimbursePageForm pageForm) {
|
||||||
Integer year,
|
|
||||||
String unionId,
|
|
||||||
String clubId,
|
|
||||||
Boolean approval,
|
|
||||||
String outlayManageSource,
|
|
||||||
String activityMatter) {
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
info.*,
|
info.*,
|
||||||
@@ -95,16 +90,22 @@ public class OutlayReimburseSchoolKjAuditController {
|
|||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("t.taskName", "=", "930aed03-677b-41d7-8920-7d9b45a7abc9");
|
cnd.and("t.taskName", "=", "930aed03-677b-41d7-8920-7d9b45a7abc9");
|
||||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
cnd.andEX("info.unionId", "=", unionId);
|
cnd.andEX("info.unionId", "=", pageForm.getUnionId());
|
||||||
cnd.andEX("info.outlayManageSource", "=", outlayManageSource);
|
cnd.andEX("info.outlayManageSource", "=", pageForm.getOutlayManageSource());
|
||||||
|
cnd.andEX("info.detailsTypeId", "=", pageForm.getDetailsTypeId());
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", pageForm.getYear());
|
||||||
|
|
||||||
if (approval) {
|
if (pageForm.getApproval()) {
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
if (StrUtil.isAllNotEmpty(pageForm.getSearchName(), pageForm.getSearchKeyword())) {
|
||||||
|
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
cnd.groupBy("t.id");
|
cnd.groupBy("t.id");
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("t.createdAt").desc("info.applyTime");
|
cnd.desc("t.createdAt").desc("info.applyTime");
|
||||||
|
|||||||
+12
-11
@@ -13,6 +13,7 @@ import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
|||||||
import com.budwk.app.sys.models.Sys_dict;
|
import com.budwk.app.sys.models.Sys_dict;
|
||||||
import com.budwk.app.sys.services.SysDictService;
|
import com.budwk.app.sys.services.SysDictService;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayReimburse.vo.OutlayReimbursePageForm;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -56,13 +57,7 @@ public class OutlayReimburseSchoolZxAuditController {
|
|||||||
@At
|
@At
|
||||||
@ApiOperation("分页查询")
|
@ApiOperation("分页查询")
|
||||||
@SaCheckPermission("outlay.reimburse.schoolZxAudit")
|
@SaCheckPermission("outlay.reimburse.schoolZxAudit")
|
||||||
public Result pageData(PageForm pageForm,
|
public Result pageData(OutlayReimbursePageForm pageForm) {
|
||||||
Integer year,
|
|
||||||
String unionId,
|
|
||||||
String clubId,
|
|
||||||
Boolean approval,
|
|
||||||
String outlayManageSource,
|
|
||||||
String activityMatter) {
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
info.*,
|
info.*,
|
||||||
@@ -95,16 +90,22 @@ public class OutlayReimburseSchoolZxAuditController {
|
|||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("t.taskName", "=", "c433d966-05f4-45b4-b845-755b600d852a");
|
cnd.and("t.taskName", "=", "c433d966-05f4-45b4-b845-755b600d852a");
|
||||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
cnd.andEX("info.unionId", "=", unionId);
|
cnd.andEX("info.unionId", "=", pageForm.getUnionId());
|
||||||
cnd.andEX("info.outlayManageSource", "=", outlayManageSource);
|
cnd.andEX("info.outlayManageSource", "=", pageForm.getOutlayManageSource());
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", pageForm.getYear());
|
||||||
|
cnd.andEX("info.detailsTypeId", "=", pageForm.getDetailsTypeId());
|
||||||
|
|
||||||
if (approval) {
|
if (pageForm.getApproval()) {
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
} else {
|
} else {
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
if (StrUtil.isAllNotEmpty(pageForm.getSearchName(), pageForm.getSearchKeyword())) {
|
||||||
|
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
cnd.groupBy("t.id");
|
cnd.groupBy("t.id");
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("t.createdAt").desc("info.applyTime");
|
cnd.desc("t.createdAt").desc("info.applyTime");
|
||||||
|
|||||||
+123
@@ -0,0 +1,123 @@
|
|||||||
|
package com.budwk.app.zhgh.outlay.outlayReimburse.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.sys.models.Sys_dict;
|
||||||
|
import com.budwk.app.sys.services.SysDictService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayReimburse.service.OutlayReimburseSummaryService;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayReimburse.vo.OutlayReimbursePageForm;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/20 17:43
|
||||||
|
* @description 报销汇总
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/outlay/reimburse/summary")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Api("我的报销")
|
||||||
|
public class OutlayReimburseSummaryController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private OutlayReimburseSummaryService outlayReimburseSummaryService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SysDictService sysDictService;
|
||||||
|
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/outlay/outlayReimburse/summary/index.html")
|
||||||
|
@SaCheckPermission("outlay.reimburse.summary")
|
||||||
|
public void index() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("outlay.reimburse.summary")
|
||||||
|
public Result pageData(OutlayReimbursePageForm pageForm) {
|
||||||
|
Sql sql = outlayReimburseSummaryService.getSql(pageForm);
|
||||||
|
Pagination pagination = outlayReimburseSummaryService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("outlay.reimburse.summary")
|
||||||
|
public void doExportUserExcel(@Param("data") OutlayReimbursePageForm pageForm, HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
Sql sql = outlayReimburseSummaryService.getSql(pageForm);
|
||||||
|
List<NutMap> map = outlayReimburseSummaryService.listMap(sql);
|
||||||
|
|
||||||
|
List<Sys_dict> dictList = sysDictService.getSubListByCode("ACTIVITY_BUDGET_TYPE");
|
||||||
|
List<Sys_dict> dictList2 = sysDictService.getSubListByCode("ACTIVITY_BUDGET_DETAILS_TYPE");
|
||||||
|
|
||||||
|
map.forEach(item -> {
|
||||||
|
Sys_dict dict = dictList.stream().filter(sys_dict -> sys_dict.getCode().equals(item.getString("outlayManageSource"))).findFirst().orElse(null);
|
||||||
|
item.put("outlayManageSourceName", dict.getName());
|
||||||
|
Sys_dict dict2 = dictList2.stream().filter(sys_dict -> sys_dict.getCode().equals(item.getString("detailsTypeId"))).findFirst().orElse(null);
|
||||||
|
item.put("detailsTypeName", dict2.getName());
|
||||||
|
|
||||||
|
if (List.of("ACTIVITY_BUDGET_TYPE_ONE", "ACTIVITY_BUDGET_TYPE_FOUR").contains(item.getString("outlayManageSource"))) {
|
||||||
|
item.put("helpUnitName", dict.getName());
|
||||||
|
}else if (item.getString("outlayManageSource").equals("ACTIVITY_BUDGET_TYPE_TWO")){
|
||||||
|
item.put("helpUnitName", item.getString("unionName"));
|
||||||
|
}else if (item.getString("outlayManageSource").equals("ACTIVITY_BUDGET_TYPE_THREE")){
|
||||||
|
item.put("helpUnitName", item.getString("clubName"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||||
|
ExcelExportEntity no = new ExcelExportEntity("序号", "no", 10);
|
||||||
|
no.setFormat("isAddIndex");
|
||||||
|
entityList.add(no);
|
||||||
|
|
||||||
|
entityList.add(new ExcelExportEntity("经办人工号", "loginName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("活动类型", "outlayManageSourceName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("申报单位", "helpUnitName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("金额", "money", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("明细类", "detailsTypeName", 50));
|
||||||
|
entityList.add(new ExcelExportEntity("申报时间", "applyTime", 20));
|
||||||
|
|
||||||
|
response.setContentType("application/octet-stream");
|
||||||
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("报销汇总名单.xlsx", "UTF-8"));
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, map);
|
||||||
|
workbook.write(response.getOutputStream());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
package com.budwk.app.zhgh.outlay.outlayReimburse.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.sys.services.SysDictService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/19 16:50
|
||||||
|
* @description 分工会主席审核
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "费用报销管理-分工会主席审核")
|
||||||
|
@At("/platform/outlay/reimburse/unionAudit")
|
||||||
|
public class OutlayReimburseUnionAuditController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
@Inject
|
||||||
|
private SysDictService sysDictService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/outlay/outlayReimburse/unionAudit/index.html")
|
||||||
|
@SaCheckPermission("outlay.reimburse.unionAudit")
|
||||||
|
public void index() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("outlay.reimburse.unionAudit")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
Integer year,
|
||||||
|
String clubId,
|
||||||
|
Boolean approval,
|
||||||
|
String outlayManageSource) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
YEAR(info.applyTime) year,
|
||||||
|
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 taskVariable,
|
||||||
|
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||||
|
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||||
|
FROM
|
||||||
|
wf_process_task t
|
||||||
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
|
LEFT JOIN outlay_reimburse info ON info.id = ins.businessNo
|
||||||
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||||
|
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("t.taskName", "=", "d818a045-14c9-4668-993c-e18a1f4fc0c7");
|
||||||
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
|
cnd.andEX("info.outlayManageSource", "=", outlayManageSource);
|
||||||
|
|
||||||
|
if (approval) {
|
||||||
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllNotEmpty(pageForm.getSearchName(), pageForm.getSearchKeyword())) {
|
||||||
|
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||||
|
}
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
||||||
|
cnd.groupBy("t.id");
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("t.createdAt").desc("info.applyTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination<NutMap> pageVO = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pageVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.outlay.outlayReimburse.interceptor;
|
|
||||||
|
|
||||||
import com.budwk.app.flow.constant.FlowConst;
|
|
||||||
import com.budwk.app.flow.engine.FlowInterceptor;
|
|
||||||
import com.budwk.app.flow.engine.core.Execution;
|
|
||||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
|
||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
|
||||||
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
|
|
||||||
import com.budwk.app.zhgh.outlay.outlayReimburse.model.OutlayReimburse;
|
|
||||||
import org.nutz.dao.Chain;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.dao.Dao;
|
|
||||||
import org.nutz.json.Json;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhf
|
|
||||||
* @date 2025/7/30 15:58
|
|
||||||
* @description
|
|
||||||
*/
|
|
||||||
public class OutlayReimburseApplyPostInterceptor implements FlowInterceptor {
|
|
||||||
@Override
|
|
||||||
public void intercept(Execution execution) {
|
|
||||||
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
|
|
||||||
OutlayReimburse outlayReimburse = Json.fromJson(OutlayReimburse.class, formDataStr);
|
|
||||||
|
|
||||||
Dao dao = ServiceContext.find(Dao.class);
|
|
||||||
dao.insertOrUpdate(outlayReimburse);
|
|
||||||
execution.getArgs().set("outlayManageSource", outlayReimburse.getOutlayManageSource());
|
|
||||||
execution.getArgs().set(FlowConst.FORM_DATA, Json.toJson(outlayReimburse));
|
|
||||||
|
|
||||||
int instanceId = execution.getArgs().getInt(FlowConst.PROCESS_INSTANCE_ID_KEY);
|
|
||||||
dao.update(ProcessInstance.class, Chain.make("businessNo", outlayReimburse.getId()), Cnd.where(ProcessInstance::getId, "=", instanceId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+78
@@ -1,7 +1,25 @@
|
|||||||
package com.budwk.app.zhgh.outlay.outlayReimburse.interceptor;
|
package com.budwk.app.zhgh.outlay.outlayReimburse.interceptor;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.budwk.app.base.exception.BaseException;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
import com.budwk.app.flow.engine.FlowInterceptor;
|
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||||
import com.budwk.app.flow.engine.core.Execution;
|
import com.budwk.app.flow.engine.core.Execution;
|
||||||
|
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.outlay.activityBudget.models.ActivityBudget;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayManage.model.OutlayUseDetail;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayManage.school.model.OutlayManageSchool;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayManage.union.model.OutlayManageUnion;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayReimburse.model.OutlayReimburse;
|
||||||
|
import lombok.SneakyThrows;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhf
|
* @author zhf
|
||||||
@@ -11,6 +29,66 @@ import com.budwk.app.flow.engine.core.Execution;
|
|||||||
public class OutlayReimburseSchoolZxAuditPostInterceptor implements FlowInterceptor {
|
public class OutlayReimburseSchoolZxAuditPostInterceptor implements FlowInterceptor {
|
||||||
@Override
|
@Override
|
||||||
public void intercept(Execution execution) {
|
public void intercept(Execution execution) {
|
||||||
|
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
|
||||||
|
OutlayReimburse outlayReimburse = Json.fromJson(OutlayReimburse.class, formDataStr);
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
OutlayUseDetail detail = new OutlayUseDetail();
|
||||||
|
|
||||||
|
detail.setProjectName(outlayReimburse.getActivityMatter());
|
||||||
|
detail.setAdjustMoney(outlayReimburse.getMoney());
|
||||||
|
detail.setAdjustMoney(outlayReimburse.getMoney());
|
||||||
|
detail.setAdjustReason(outlayReimburse.getPaymentContent());
|
||||||
|
detail.setAdjustUserId(SecurityUtil.getUserId());
|
||||||
|
detail.setAdjustUserName(SecurityUtil.getUserUsername());
|
||||||
|
detail.setAdjustLoginName(SecurityUtil.getUserLoginname());
|
||||||
|
detail.setOutlayReimburseId(outlayReimburse.getId());
|
||||||
|
detail.setActivityTime(outlayReimburse.getActivityTime());
|
||||||
|
// 更新校工会经费表
|
||||||
|
if (outlayReimburse.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_ONE")) {
|
||||||
|
OutlayManageSchool school = dao.fetch(OutlayManageSchool.class, Cnd.where("year", "=", DateUtil.thisYear()));
|
||||||
|
if (ObjectUtil.isEmpty(school)) {
|
||||||
|
throw new BaseException("该年份没有设置金额!");
|
||||||
|
}
|
||||||
|
school.setUsedQuota(school.getUsedQuota().add(outlayReimburse.getMoney()));
|
||||||
|
dao.updateIgnoreNull(school);
|
||||||
|
|
||||||
|
//添加使用记录到经费管理表
|
||||||
|
detail.setOutlayManageId(school.getId());
|
||||||
|
dao.insert(detail);
|
||||||
|
} else if (outlayReimburse.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_TWO")) {
|
||||||
|
|
||||||
|
ActivityBudget budget = dao.fetch(ActivityBudget.class, Cnd.where("id", "=", outlayReimburse.getBudgetId()));
|
||||||
|
if (ObjectUtil.isNotEmpty(budget)&&budget.getIsSchoolBudget()){
|
||||||
|
//如果分工会报销了校工会的余额
|
||||||
|
OutlayManageSchool school = dao.fetch(OutlayManageSchool.class, Cnd.where("year", "=", DateUtil.thisYear()));
|
||||||
|
if (ObjectUtil.isEmpty(school)) {
|
||||||
|
throw new BaseException("该年份没有设置金额!");
|
||||||
|
}
|
||||||
|
school.setUsedQuota(school.getUsedQuota().add(outlayReimburse.getMoney()));
|
||||||
|
dao.updateIgnoreNull(school);
|
||||||
|
|
||||||
|
//添加使用记录到经费管理表
|
||||||
|
detail.setOutlayManageId(school.getId());
|
||||||
|
dao.insert(detail);
|
||||||
|
}else{
|
||||||
|
// 更新分工会活动经费表
|
||||||
|
OutlayManageUnion manageUnion = dao.fetch(OutlayManageUnion.class,
|
||||||
|
Cnd.where("year", "=", DateUtil.thisYear())
|
||||||
|
.and("unionId", "=", outlayReimburse.getUnionId()));
|
||||||
|
if (ObjectUtil.isEmpty(manageUnion)) {
|
||||||
|
throw new BaseException("该年份没有设置金额!");
|
||||||
|
}
|
||||||
|
if (manageUnion.getTotalQuota().subtract(manageUnion.getUsedQuota()).compareTo(outlayReimburse.getMoney()) < 0) {
|
||||||
|
throw new BaseException("剩余配额不足!剩余:" + manageUnion.getTotalQuota().subtract(manageUnion.getUsedQuota()));
|
||||||
|
}
|
||||||
|
manageUnion.setUsedQuota(manageUnion.getUsedQuota().add(outlayReimburse.getMoney()));
|
||||||
|
dao.updateIgnoreNull(manageUnion);
|
||||||
|
|
||||||
|
//添加使用记录到经费管理表
|
||||||
|
detail.setOutlayManageId(manageUnion.getId());
|
||||||
|
dao.insert(detail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,12 @@ public class OutlayReimburse extends BaseModel implements Serializable {
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
private String activityTime;
|
private String activityTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("活动人数")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String activityNumber;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("支付内容")
|
@Comment("支付内容")
|
||||||
@ColDefine(type = ColType.TEXT)
|
@ColDefine(type = ColType.TEXT)
|
||||||
|
|||||||
+2
-1
@@ -24,9 +24,10 @@ public interface OutlayReimburseApplyService extends BaseService<OutlayReimburse
|
|||||||
/**
|
/**
|
||||||
* 查询这个预算已经报销了的金额
|
* 查询这个预算已经报销了的金额
|
||||||
* @param budgetId
|
* @param budgetId
|
||||||
|
* @param isSchoolBudget 是否是校会预算
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
BigDecimal getBxMoneyByActivityId(String budgetId);
|
BigDecimal getBxMoneyByActivityId(String budgetId,Boolean isSchoolBudget);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断这个报销的记录预算是否充足
|
* 判断这个报销的记录预算是否充足
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package com.budwk.app.zhgh.outlay.outlayReimburse.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.outlay.outlayReimburse.vo.OutlayReimbursePageForm;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
|
||||||
|
public interface OutlayReimburseSummaryService extends BaseService {
|
||||||
|
|
||||||
|
|
||||||
|
Sql getSql(OutlayReimbursePageForm outlayReimbursePageForm);
|
||||||
|
}
|
||||||
+10
-3
@@ -40,6 +40,7 @@ public class OutlayReimburseApplyServiceImpl extends BaseServiceImpl<OutlayReimb
|
|||||||
String sqlStr = """
|
String sqlStr = """
|
||||||
SELECT
|
SELECT
|
||||||
ab.id,
|
ab.id,
|
||||||
|
ab.isSchoolBudget,
|
||||||
ab.schoolBudgetId,
|
ab.schoolBudgetId,
|
||||||
ab.totalBudgetMoney,
|
ab.totalBudgetMoney,
|
||||||
ab.isRepeatReimburse,
|
ab.isRepeatReimburse,
|
||||||
@@ -120,7 +121,7 @@ public class OutlayReimburseApplyServiceImpl extends BaseServiceImpl<OutlayReimb
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BigDecimal getBxMoneyByActivityId(String budgetId) {
|
public BigDecimal getBxMoneyByActivityId(String budgetId,Boolean isSchoolBudget) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
rei.money
|
rei.money
|
||||||
@@ -131,6 +132,11 @@ public class OutlayReimburseApplyServiceImpl extends BaseServiceImpl<OutlayReimb
|
|||||||
rei.budgetId = @budgetId
|
rei.budgetId = @budgetId
|
||||||
AND ins.state = 20
|
AND ins.state = 20
|
||||||
""").setParam("budgetId", budgetId);
|
""").setParam("budgetId", budgetId);
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (isSchoolBudget!=null){
|
||||||
|
cnd.and("isSchoolBudget", "=", isSchoolBudget);
|
||||||
|
}
|
||||||
|
|
||||||
List<NutMap> reiList = listMap(sql);
|
List<NutMap> reiList = listMap(sql);
|
||||||
|
|
||||||
BigDecimal totalMoney = reiList.stream()
|
BigDecimal totalMoney = reiList.stream()
|
||||||
@@ -152,8 +158,8 @@ public class OutlayReimburseApplyServiceImpl extends BaseServiceImpl<OutlayReimb
|
|||||||
//判断是否可以重复报
|
//判断是否可以重复报
|
||||||
if (budget.getIsRepeatReimburse()) {
|
if (budget.getIsRepeatReimburse()) {
|
||||||
//1.查询已经报销了的总金额
|
//1.查询已经报销了的总金额
|
||||||
BigDecimal bXMoney = getBxMoneyByActivityId(budgetId);
|
|
||||||
if (budget.getIsSchoolBudget()) {
|
if (budget.getIsSchoolBudget()) {
|
||||||
|
BigDecimal bXMoney = getBxMoneyByActivityId(budgetId,budget.getIsSchoolBudget());
|
||||||
//如果是分工会进来并且报销的活动是校会预算
|
//如果是分工会进来并且报销的活动是校会预算
|
||||||
// 1. 计算本次加上之前的报销总金额
|
// 1. 计算本次加上之前的报销总金额
|
||||||
BigDecimal totalReimbursement = bXMoney.add(moneyBig);
|
BigDecimal totalReimbursement = bXMoney.add(moneyBig);
|
||||||
@@ -164,6 +170,7 @@ public class OutlayReimburseApplyServiceImpl extends BaseServiceImpl<OutlayReimb
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
BigDecimal bXMoney = getBxMoneyByActivityId(budgetId,budget.getIsSchoolBudget());
|
||||||
//如果是自己的项目就能超20%
|
//如果是自己的项目就能超20%
|
||||||
//1.算出现在还能报销多少钱
|
//1.算出现在还能报销多少钱
|
||||||
BigDecimal twentyPercent = budget.getTotalBudgetMoney().multiply(new BigDecimal("20")).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP);
|
BigDecimal twentyPercent = budget.getTotalBudgetMoney().multiply(new BigDecimal("20")).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP);
|
||||||
@@ -196,7 +203,7 @@ public class OutlayReimburseApplyServiceImpl extends BaseServiceImpl<OutlayReimb
|
|||||||
//如果报销的项目是可以重复报销的
|
//如果报销的项目是可以重复报销的
|
||||||
if (budget.getIsRepeatReimburse()) {
|
if (budget.getIsRepeatReimburse()) {
|
||||||
//这个预算已经报销了多少钱
|
//这个预算已经报销了多少钱
|
||||||
BigDecimal totalMoney = getBxMoneyByActivityId(budgetId);
|
BigDecimal totalMoney = getBxMoneyByActivityId(budgetId,null);
|
||||||
//查出这个活动有没有跟其他预算关联,如果跟其他预算关联了,代表当前这条预算是分工会也能报校工会也能报,
|
//查出这个活动有没有跟其他预算关联,如果跟其他预算关联了,代表当前这条预算是分工会也能报校工会也能报,
|
||||||
// schoolBudgetId字段不为空就代表这条预算是使用的校工会的金额
|
// schoolBudgetId字段不为空就代表这条预算是使用的校工会的金额
|
||||||
List<ActivityBudget> budgetList = dao().query(ActivityBudget.class,
|
List<ActivityBudget> budgetList = dao().query(ActivityBudget.class,
|
||||||
|
|||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
package com.budwk.app.zhgh.outlay.outlayReimburse.vo;
|
||||||
|
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/21 09:19
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OutlayReimbursePageForm extends PageForm {
|
||||||
|
private Integer year;
|
||||||
|
private String unionId;
|
||||||
|
private String outlayManageSource;
|
||||||
|
private String detailsTypeId;
|
||||||
|
|
||||||
|
private Boolean approval;
|
||||||
|
private String clubId;
|
||||||
|
}
|
||||||
+150
@@ -0,0 +1,150 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
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.service.ExcellentRecuperationLineService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 20:13
|
||||||
|
* @description 活动管理
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/excellentRecuperation/activityList")
|
||||||
|
@Api("优秀教职工疗休养管理")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class ExcellentRecuperationActivityListController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ExcellentRecuperationLineService excellentRecuperationLineService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/excellentRecuperation/activityList/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页")
|
||||||
|
@SaCheckPermission("excellentRecuperation.activityList")
|
||||||
|
public Result pageData(PageForm pageForm, String year) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
select * from excellent_recuperation_activity $condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("YEAR(signUpStartTime)", "=", year);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = excellentRecuperationLineService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("获取线路列表")
|
||||||
|
@SaCheckPermission("excellentRecuperation.activityList")
|
||||||
|
public Result onSubmit(@Param("data") ExcellentRecuperationActivity excellentRecuperationActivity) {
|
||||||
|
if (StrUtil.isNotBlank(excellentRecuperationActivity.getId())) {
|
||||||
|
dao.clear(ExcellentRecuperationQuotaAllocation.class, Cnd.where("activityId", "=", excellentRecuperationActivity.getId()));
|
||||||
|
excellentRecuperationActivity.getUnionQuotaAllocationList().stream().forEach(v->{
|
||||||
|
v.setActivityId(excellentRecuperationActivity.getId());
|
||||||
|
});
|
||||||
|
dao.insert(excellentRecuperationActivity.getUnionQuotaAllocationList());
|
||||||
|
dao.update(excellentRecuperationActivity);
|
||||||
|
}else{
|
||||||
|
dao.insertWith(excellentRecuperationActivity, "unionQuotaAllocationList");
|
||||||
|
}
|
||||||
|
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("获取线路列表")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("excellentRecuperation.activityList")
|
||||||
|
@SLog(type = "excellentRecuperation", tag = "优秀教职工疗休养-活动管理", msg = "删除线路")
|
||||||
|
public Result onDelete(@Param("id") String id) {
|
||||||
|
dao.delete(ExcellentRecuperationActivity.class, id);
|
||||||
|
dao.clear(ExcellentRecuperationQuotaAllocation.class, Cnd.where("activityId", "=", id));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("获取活动详细信息")
|
||||||
|
@SaCheckLogin
|
||||||
|
public Result findOne(String id) {
|
||||||
|
ExcellentRecuperationActivity recuperationActivity = dao.fetchLinks(dao.fetch(ExcellentRecuperationActivity.class, id), "unionQuotaAllocationList", Cnd.NEW().asc("unionCode"));
|
||||||
|
List<ExcellentRecuperationLine> lineList = excellentRecuperationLineService.query(Cnd.where("id", "in", recuperationActivity.getLinIds()));
|
||||||
|
List<String> lingNames = lineList.stream().map(ExcellentRecuperationLine::getLineName).toList();
|
||||||
|
recuperationActivity.setLinNames(StrUtil.join(",", lingNames));
|
||||||
|
return Result.success(recuperationActivity);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("获取线路列表")
|
||||||
|
@SaCheckPermission("excellentRecuperation.activityList")
|
||||||
|
public Result listLineListByThisYear() {
|
||||||
|
List<ExcellentRecuperationLine> excellentRecuperationLines = excellentRecuperationLineService.listLineListByThisYear();
|
||||||
|
return Result.success(excellentRecuperationLines);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("获取分工会以及分工会的会员数")
|
||||||
|
@SaCheckPermission("excellentRecuperation.activityList")
|
||||||
|
public Result listUnion() {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
un.id unionId,
|
||||||
|
un.`name` unionName,
|
||||||
|
un.unionCode,
|
||||||
|
COUNT(u.id) memberNum
|
||||||
|
FROM
|
||||||
|
`sys_union` un
|
||||||
|
LEFT JOIN vw_user u ON u.unionId = un.id
|
||||||
|
AND u.member = 1
|
||||||
|
GROUP BY
|
||||||
|
un.id
|
||||||
|
ORDER BY
|
||||||
|
un.unionCode
|
||||||
|
""");
|
||||||
|
List<NutMap> list = excellentRecuperationLineService.listMap(sql);
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+262
@@ -0,0 +1,262 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.lang.Dict;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
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.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.ExcellentRecuperationSignUpUser;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/27 11:12
|
||||||
|
* @description 活动报名
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/excellentRecuperation/activitySignUp")
|
||||||
|
@Api("优秀教职工疗休养报名")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class ExcellentRecuperationActivitySignUpController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private FlowEngine flowEngine;
|
||||||
|
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/excellentRecuperation/activitySignUp/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页")
|
||||||
|
@SaCheckPermission("excellentRecuperation.activitySignUp")
|
||||||
|
public Result pageData(PageForm pageForm, String year, String unionId, String activityId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
erqa.*,
|
||||||
|
era.activityName,
|
||||||
|
era.signUpStartTime,
|
||||||
|
era.signUpEndTIme
|
||||||
|
FROM
|
||||||
|
`excellent_recuperation_quota_allocation` erqa
|
||||||
|
LEFT JOIN excellent_recuperation_activity era ON era.id = erqa.activityId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SYSADMIN.name())) {
|
||||||
|
cnd.and("erqa.unionId", "=", SecurityUtil.getUnionId());
|
||||||
|
}
|
||||||
|
cnd.andEX("YEAR(era.signUpStartTime)", "=", year);
|
||||||
|
cnd.andEX("erqa.unionId", "=", unionId);
|
||||||
|
cnd.and("erqa.activityId", "=", activityId);
|
||||||
|
cnd.asc("erqa.unionCode");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("保存")
|
||||||
|
@SaCheckPermission("excellentRecuperation.activitySignUp")
|
||||||
|
@SLog(type = "excellentRecuperationActivitySignUp", tag = "优秀教职工疗休养-活动报名", msg = "保存疗休养报名")
|
||||||
|
public Result save(@Param("data") ExcellentRecuperationSignUpUser signUpUser) {
|
||||||
|
List<ExcellentRecuperationSignUpUser> userList = dao.query(ExcellentRecuperationSignUpUser.class, Cnd.where("activityId", "=", signUpUser.getActivityId()));
|
||||||
|
List<String> userIds = userList.stream().map(ExcellentRecuperationSignUpUser::getUserId).toList();
|
||||||
|
if (StrUtil.isBlank(signUpUser.getId()) && userIds.contains(signUpUser.getUserId())) {
|
||||||
|
return Result.error("该用户已报名");
|
||||||
|
}
|
||||||
|
signUpUser.setSignUpTime(DateUtil.now());
|
||||||
|
baseService.insertOrUpdate(signUpUser);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("enrollmentRegistration.apply")
|
||||||
|
@ApiOperation("提交")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SLog(type = "excellentRecuperationActivitySignUp", tag = "优秀教职工疗休养-活动报名", msg = "提交疗休养报名")
|
||||||
|
public Result submit(@Param("data") ExcellentRecuperationSignUpUser signUpUser) {
|
||||||
|
List<ExcellentRecuperationSignUpUser> userList = dao.query(ExcellentRecuperationSignUpUser.class, Cnd.where("activityId", "=", signUpUser.getActivityId()));
|
||||||
|
List<String> userIds = userList.stream().map(ExcellentRecuperationSignUpUser::getUserId).toList();
|
||||||
|
if (StrUtil.isBlank(signUpUser.getId()) && userIds.contains(signUpUser.getUserId())) {
|
||||||
|
return Result.error("该用户已报名");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isBlank(signUpUser.getId())) {
|
||||||
|
signUpUser.setSignUpTime(DateUtil.now());
|
||||||
|
}
|
||||||
|
baseService.insertOrUpdate(signUpUser);
|
||||||
|
// 开启流程实例
|
||||||
|
Dict args = Dict.create();
|
||||||
|
args.set(FlowConst.FORM_DATA, signUpUser);
|
||||||
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("YXJZGLXY", signUpUser.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
|
// 自动完成第一个申请任务
|
||||||
|
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||||
|
for (ProcessTask task : doingTaskList) {
|
||||||
|
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除报名信息")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("enrollmentRegistration.summary")
|
||||||
|
@SLog(tag = "优秀教职工疗休养-活动报名", type = "excellentRecuperationActivitySignUp", msg = "删除id: ${args[0]}")
|
||||||
|
public Result doDelete(String id) {
|
||||||
|
dao.delete(ExcellentRecuperationSignUpUser.class, id);
|
||||||
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询当前工会当前活动报名的人员")
|
||||||
|
@SaCheckPermission("excellentRecuperation.activitySignUp")
|
||||||
|
public Result listQuotaAllocation(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);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> map = baseService.listMap(sql);
|
||||||
|
return Result.success(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("根据年份获取疗休养活动")
|
||||||
|
@SaCheckPermission("excellentRecuperation.activitySignUp")
|
||||||
|
public Result listActivityByYear(String year) {
|
||||||
|
List<ExcellentRecuperationActivity> activityList = dao.query(ExcellentRecuperationActivity.class,
|
||||||
|
Cnd.where("YEAR(signUpStartTime)", "=", year).desc("signUpStartTime"));
|
||||||
|
return Result.success(activityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("根据活动id获取线路")
|
||||||
|
@SaCheckPermission("excellentRecuperation.activitySignUp")
|
||||||
|
public Result listLineByActivityId(String id) {
|
||||||
|
ExcellentRecuperationActivity activity = dao.fetch(ExcellentRecuperationActivity.class, id);
|
||||||
|
List<ExcellentRecuperationLine> lineList = dao.query(ExcellentRecuperationLine.class, Cnd.where("id", "in", activity.getLinIds()));
|
||||||
|
return Result.success(lineList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询用户")
|
||||||
|
@SaCheckPermission("excellentRecuperation.activitySignUp")
|
||||||
|
public Object listUser(String keyword, String unionId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
username userName,
|
||||||
|
loginname loginName,
|
||||||
|
sex,
|
||||||
|
mobile,
|
||||||
|
IFNULL(unitname, '暂无') as unitName,
|
||||||
|
unitId,
|
||||||
|
unionId,
|
||||||
|
unionName,
|
||||||
|
idCard
|
||||||
|
from
|
||||||
|
vw_user
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (StrUtil.isNotBlank(keyword)) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.or(View_user::getLoginname, "like", "%" + keyword + "%");
|
||||||
|
seg.or(View_user::getUsername, "like", "%" + keyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
cnd.and(View_user::getUnionId, "=", unionId);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = baseService.listPageMap(1, 50, sql);
|
||||||
|
return Result.success(pagination.getList());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询单个报名信息")
|
||||||
|
@SaCheckLogin
|
||||||
|
public Result findUserSignUp(String id){
|
||||||
|
return Result.success(dao.fetch(ExcellentRecuperationSignUpUser.class, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+145
@@ -0,0 +1,145 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationLine;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service.ExcellentRecuperationLineService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationLine;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Chain;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 18:59
|
||||||
|
* @description 线路管理
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/excellentRecuperation/line")
|
||||||
|
@Api("疗休养线路管理")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class ExcellentRecuperationLineController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private ExcellentRecuperationLineService lineService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/excellentRecuperation/line/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("excellentRecuperation.line")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param(value = "startYear") Integer startYear,
|
||||||
|
@Param(value = "endYear") Integer endYear,
|
||||||
|
@Param(value = "travelAgencyId") String travelAgencyId,
|
||||||
|
@Param(value = "lineName") String lineName,
|
||||||
|
@Param(value = "unionId") String unionId,
|
||||||
|
@Param(value = "lotId") String lotId) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("line.`year`", ">=", startYear);
|
||||||
|
cnd.andEX("line.`year`", "<=", endYear);
|
||||||
|
cnd.andEX("line.travelAgencyId", "=", travelAgencyId);
|
||||||
|
cnd.andEX("line.lotId", "=", lotId);
|
||||||
|
cnd.and(Cnd.likeEX("line.lineName", lineName));
|
||||||
|
|
||||||
|
cnd.desc("year").asc("serialNumber").asc("line.createdAt");
|
||||||
|
Pagination pagination = lineService.pageData(pageForm, cnd);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("获取编号")
|
||||||
|
@SaCheckPermission("excellentRecuperation.line")
|
||||||
|
public Result getNo() {
|
||||||
|
Object serialNumber = dao.func2(ExcellentRecuperationLine.class, "max", "serialNumber");
|
||||||
|
serialNumber = Objects.requireNonNullElse(serialNumber, 0);
|
||||||
|
return Result.success(Integer.parseInt(serialNumber.toString()) + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增/编辑疗休养线路")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("excellentRecuperation.line")
|
||||||
|
@SLog(type = "excellentRecuperation", tag = "新增/编辑疗休养线路", msg = "新增/编辑疗休养线路")
|
||||||
|
public Result onSubmit(ExcellentRecuperationLine line) {
|
||||||
|
if (StrUtil.isBlank(line.getId())) {
|
||||||
|
if (lineService.count(Cnd.where("serialNumber", "=", line.getSerialNumber())) > 0) {
|
||||||
|
return Result.error("编号已存在");
|
||||||
|
}
|
||||||
|
lineService.insert( line);
|
||||||
|
} else {
|
||||||
|
if (lineService.count(Cnd.where("serialNumber", "=", line.getSerialNumber()).and("id", "!=", line.getId())) > 0) {
|
||||||
|
return Result.error("编号已存在");
|
||||||
|
}
|
||||||
|
lineService.update( line);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/openClosedLine/?")
|
||||||
|
@ApiOperation("开启或关闭线路")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("excellentRecuperation.line")
|
||||||
|
@SLog(type = "excellentRecuperation", tag = "开启或关闭线路", msg = "开启或关闭线路")
|
||||||
|
public Result openClosedLine(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
lineService.update(Chain.makeSpecial("isDisabled", "isDisabled ^ 1"), Cnd.where("id", "=", id));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除线路")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("excellentRecuperation.line")
|
||||||
|
@SLog(type = "excellentRecuperation", tag = "删除线路", msg = "删除线路")
|
||||||
|
public Result onDelete(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
lineService.delete(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/selectLineInfoById/?")
|
||||||
|
@ApiOperation("查询线路")
|
||||||
|
@SaCheckPermission("excellentRecuperation.line")
|
||||||
|
public Result selectLineInfoById(String id) {
|
||||||
|
Assert.notBlank(id);
|
||||||
|
ExcellentRecuperationLine line = lineService.fetchLinks(lineService.fetch(id), "travelAgency");
|
||||||
|
return Result.success(line);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+140
@@ -0,0 +1,140 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationActivity;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/28 08:42
|
||||||
|
* @description 校工会审核
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/excellentRecuperation/schoolAudit")
|
||||||
|
@Api("疗休养校工会审核报名人员")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class ExcellentRecuperationSchoolAuditController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/excellentRecuperation/schoolAudit/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("excellentRecuperation.schoolAudit")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param(value = "year") Integer year,
|
||||||
|
@Param(value = "unionId") String unionId,
|
||||||
|
@Param(value = "activityId") String activityId,
|
||||||
|
@Param(value = "unitId") String unitId,
|
||||||
|
@Param(value = "approval") Boolean approval) {
|
||||||
|
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 taskVariable,
|
||||||
|
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||||
|
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||||
|
FROM
|
||||||
|
wf_process_task t
|
||||||
|
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||||
|
LEFT JOIN excellent_recuperation_sign_user info ON info.id = ins.businessNo
|
||||||
|
LEFT JOIN excellent_recuperation_line line ON line.id = info.lineId
|
||||||
|
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||||
|
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||||
|
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("YEAR(info.signUpTime)", "=", year);
|
||||||
|
cnd.andEX("info.activityId", "=", activityId);
|
||||||
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
|
cnd.andEX("info.unitId", "=", unitId);
|
||||||
|
|
||||||
|
cnd.and("t.taskName", "=", "0a8a7e2f-bc0d-4849-8c97-5ef61ac0478b");
|
||||||
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
|
|
||||||
|
if (approval) {
|
||||||
|
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||||
|
} else {
|
||||||
|
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchName())&& StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||||
|
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("info.signUpTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
cnd.groupBy("t.id");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination<NutMap> pageVO = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pageVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("根据年份获取疗休养活动")
|
||||||
|
@SaCheckPermission("excellentRecuperation.schoolAudit")
|
||||||
|
public Result listActivityByYear(String year) {
|
||||||
|
List<ExcellentRecuperationActivity> activityList = dao.query(ExcellentRecuperationActivity.class,
|
||||||
|
Cnd.where("YEAR(signUpStartTime)", "=", year).desc("signUpStartTime"));
|
||||||
|
return Result.success(activityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+125
@@ -0,0 +1,125 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.flow.engine.FlowEngine;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.sys.models.Sys_dict;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.model.EnrollmentRegistration;
|
||||||
|
import com.budwk.app.zhgh.enrollmentRegistration.vo.EnrollmentRegistrationPageForm;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationActivity;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service.ExcellentRecuperationSummaryService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.vo.ExcellentRecuperationPageForm;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/28 10:11
|
||||||
|
* @description 查询统计
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/excellentRecuperation/summary")
|
||||||
|
@Api("疗休养查询统计")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class ExcellentRecuperationSummaryController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ExcellentRecuperationSummaryService excellentRecuperationSummaryService;
|
||||||
|
@Inject
|
||||||
|
private FlowEngine flowEngine;
|
||||||
|
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/excellentRecuperation/summary/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.summary")
|
||||||
|
public Result pageData(ExcellentRecuperationPageForm pageForm) {
|
||||||
|
Sql sql = excellentRecuperationSummaryService.getsql(pageForm);
|
||||||
|
Pagination pagination = excellentRecuperationSummaryService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除疗休养报名人员")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("enrollmentRegistration.summary")
|
||||||
|
@SLog(tag = "优秀教职工疗休养", msg = "删除疗休养报名人员id: ${args[0]}")
|
||||||
|
public Result doDelete(String id) {
|
||||||
|
excellentRecuperationSummaryService.dao().delete(EnrollmentRegistration.class, id);
|
||||||
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("enrollmentRegistration.summary")
|
||||||
|
public void doExportExcel(@Param("data") ExcellentRecuperationPageForm pageForm, HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
ExcellentRecuperationActivity activity = excellentRecuperationSummaryService.dao().fetch(ExcellentRecuperationActivity.class, pageForm.getActivityId());
|
||||||
|
Sql sql = excellentRecuperationSummaryService.getsql(pageForm);
|
||||||
|
List<NutMap> map = excellentRecuperationSummaryService.listMap(sql);
|
||||||
|
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||||
|
ExcelExportEntity no = new ExcelExportEntity("序号", "no", 10);
|
||||||
|
no.setFormat("isAddIndex");
|
||||||
|
entityList.add(no);
|
||||||
|
|
||||||
|
entityList.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("手机号码", "mobile", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("身份证号", "idCard", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("线路", "lineName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("所属工会", "unionName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("所属单位", "unitName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("报名时间", "signUpTime", 20));
|
||||||
|
|
||||||
|
response.setContentType("application/octet-stream");
|
||||||
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(activity.getActivityName() + "疗休养报名人员汇总.xlsx", "UTF-8"));
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, map);
|
||||||
|
workbook.write(response.getOutputStream());
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+269
@@ -0,0 +1,269 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.model.ExcelImportRes;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
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;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.AdaptBy;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
import org.nutz.mvc.upload.TempFile;
|
||||||
|
import org.nutz.mvc.upload.UploadAdaptor;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 18:10
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/excellentRecuperation/travelAgency")
|
||||||
|
@Api("疗休养旅行社管理")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class ExcellentRecuperationTravelAgencyController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private ExcellentRecuperationTravelAgencyService travelAgencyService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/excellentRecuperation/travelAgency/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("excellentRecuperation.travelAgency")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param(value = "year") Integer year) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("year", "=", year);
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("contact", pageForm.getSearchKeyword());
|
||||||
|
seg.orLike("travelAgencyName", pageForm.getSearchKeyword());
|
||||||
|
seg.orLike("serialNumber", pageForm.getSearchKeyword());
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
} else {
|
||||||
|
cnd.asc("serialNumber");
|
||||||
|
}
|
||||||
|
Pagination pagination = travelAgencyService.pageData(pageForm, cnd);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增/编辑疗休养旅行社")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("excellentRecuperation.travelAgency")
|
||||||
|
@SLog(type = "excellentRecuperation", tag = "新增/编辑疗休养旅行社", msg = "新增/编辑疗休养旅行社")
|
||||||
|
public Result onSubmit(ExcellentRecuperationTravelAgency travelAgency) {
|
||||||
|
if (StrUtil.isBlank(travelAgency.getId())) {
|
||||||
|
if (travelAgencyService.count(Cnd.where("serialNumber", "=", travelAgency.getSerialNumber())) > 0) {
|
||||||
|
return Result.error("编号已存在");
|
||||||
|
}
|
||||||
|
travelAgencyService.addTravelAgency(travelAgency);
|
||||||
|
} else {
|
||||||
|
if (travelAgencyService.count(Cnd.where("serialNumber", "=", travelAgency.getSerialNumber()).and("id", "!=", travelAgency.getId())) > 0) {
|
||||||
|
return Result.error("编号已存在");
|
||||||
|
}
|
||||||
|
travelAgencyService.editTravelAgency(travelAgency);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/openClosedTravelAgency/?")
|
||||||
|
@ApiOperation("开启或关闭旅行社")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("excellentRecuperation.travelAgency")
|
||||||
|
@SLog(type = "excellentRecuperation", tag = "开启或关闭旅行社", msg = "开启或关闭旅行社")
|
||||||
|
public Result openClosedTravelAgency(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
travelAgencyService.openTravelAgency(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除旅行社")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("excellentRecuperation.travelAgency")
|
||||||
|
@SLog(type = "excellentRecuperation", tag = "删除旅行社", msg = "删除旅行社")
|
||||||
|
public Result onDelete(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
travelAgencyService.deleteTravelAgency(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询旅行社")
|
||||||
|
@SaCheckPermission("excellentRecuperation.travelAgency")
|
||||||
|
public Result selectTravelAgency(Integer year) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("year", "=", year);
|
||||||
|
List<ExcellentRecuperationTravelAgency> list = travelAgencyService.selectAllTravelAgencyByYear(cnd);
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("年度区间查询旅行社")
|
||||||
|
@SaCheckPermission("excellentRecuperation.travelAgency")
|
||||||
|
public Result selectTravelAgencyByYears(Integer startYear, Integer endYear) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("year", ">=", startYear);
|
||||||
|
cnd.andEX("year", "<=", endYear);
|
||||||
|
List<ExcellentRecuperationTravelAgency> list = travelAgencyService.selectAllTravelAgencyByYear(cnd);
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("根据旅行社id查线路")
|
||||||
|
@SaCheckPermission("excellentRecuperation.travelAgency")
|
||||||
|
public Result selectLineByAgencyId(String agencyId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT id,lineName FROM `the_rapy_recuperation_line` WHERE travelAgencyId=@travelAgencyId
|
||||||
|
""").setParam("travelAgencyId", agencyId);
|
||||||
|
List<NutMap> listMap = travelAgencyService.listMap(sql);
|
||||||
|
return Result.success(listMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("excellentRecuperation.travelAgency")
|
||||||
|
public void downloadTemplate(HttpServletResponse response) {
|
||||||
|
|
||||||
|
List<NutMap> list = new ArrayList<>();
|
||||||
|
NutMap map = new NutMap();
|
||||||
|
map.put("year", 2025);
|
||||||
|
map.put("serialNumber", 1);
|
||||||
|
map.put("travelAgencyName", "杭州海外旅游有限公司");
|
||||||
|
map.put("contact", "张三");
|
||||||
|
map.put("contactMobileNumber", "17867895678");
|
||||||
|
map.put("email", "123@qq.com");
|
||||||
|
map.put("isDisabled", "是");
|
||||||
|
list.add(map);
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
|
entities.add(new ExcelExportEntity("年度", "year", 20));
|
||||||
|
entities.add(new ExcelExportEntity("排序编号", "serialNumber", 20));
|
||||||
|
entities.add(new ExcelExportEntity("旅行社名称", "travelAgencyName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("旅行社联系人", "contact", 20));
|
||||||
|
entities.add(new ExcelExportEntity("联系电话", "contactMobileNumber", 20));
|
||||||
|
entities.add(new ExcelExportEntity("邮箱", "email", 20));
|
||||||
|
entities.add(new ExcelExportEntity("官网", "officialWebsite", 20));
|
||||||
|
entities.add(new ExcelExportEntity("备注", "note", 20));
|
||||||
|
ExcelExportEntity excelExport = new ExcelExportEntity("是否启用(是/否)", "isDisabled", 20);
|
||||||
|
String[] options = {"是_1", "否_0"};
|
||||||
|
excelExport.setReplace(options);
|
||||||
|
excelExport.setAddressList(true);
|
||||||
|
entities.add(excelExport);
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list);
|
||||||
|
CommonDownloadUtil.download("旅行社导入模板.xlsx", workbook, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("旅行社导入")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("excellentRecuperation.travelAgency")
|
||||||
|
@SLog(type = "excellentRecuperation", tag = "旅行社导入", msg = "旅行社导入")
|
||||||
|
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||||
|
public Result travelAgencyImport(@Param("file") TempFile file) {
|
||||||
|
List<TravelAgencyExcelMode> travelAgency = ExcelImportUtil.importExcel(file.getFile(), TravelAgencyExcelMode.class, new ImportParams());
|
||||||
|
// 创建结果集
|
||||||
|
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));
|
||||||
|
|
||||||
|
for (int i = 0; i < travelAgency.size(); i++) {
|
||||||
|
TravelAgencyExcelMode travel = travelAgency.get(i);
|
||||||
|
if(travel.getYear() == null) {
|
||||||
|
travel.setErrInfo("年度为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(travel.getTravelAgencyName())) {
|
||||||
|
travel.setErrInfo("旅行社名称为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
RecuperationTravelAgency agency = new RecuperationTravelAgency();
|
||||||
|
if (Strings.isNotBlank(map.get(travel.getTravelAgencyName()))){
|
||||||
|
agency.setId(map.get(travel.getTravelAgencyName()));
|
||||||
|
}
|
||||||
|
if ("是".equals(travel.getIsDisabled())) {
|
||||||
|
agency.setDisabled(false);
|
||||||
|
} else if ("否".equals(travel.getIsDisabled())) {
|
||||||
|
agency.setDisabled(true);
|
||||||
|
}
|
||||||
|
agency.setContact(travel.getContact());
|
||||||
|
agency.setTravelAgencyName(travel.getTravelAgencyName());
|
||||||
|
agency.setSerialNumber(travel.getSerialNumber());
|
||||||
|
agency.setEmail(travel.getEmail());
|
||||||
|
agency.setContactMobileNumber(travel.getContactMobileNumber());
|
||||||
|
agency.setNote(travel.getNote());
|
||||||
|
agency.setYear(travel.getYear());
|
||||||
|
agency.setOfficialWebsite(travel.getOfficialWebsite());
|
||||||
|
try {
|
||||||
|
dao.insertOrUpdate(agency);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("导入旅行社失败:{}", e.getMessage());
|
||||||
|
travel.setErrInfo("添加失败", i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加错误记录
|
||||||
|
excelImportRes.setErrorDetails(travelAgency.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
|
||||||
|
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
|
||||||
|
excelImportRes.setSuccessCount(Math.max(travelAgency.size() - excelImportRes.getFailedCount(), 0));
|
||||||
|
return Result.success(excelImportRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+66
@@ -0,0 +1,66 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 21:26
|
||||||
|
* @description 疗休养活动
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("excellent_recuperation_activity")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养活动")
|
||||||
|
public class ExcellentRecuperationActivity extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("报名开始时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String signUpStartTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("报名截止时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String signUpEndTIme;
|
||||||
|
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("活动内容")
|
||||||
|
@ColDefine(type = ColType.TEXT)
|
||||||
|
private String activityContent;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("附件")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<JSONObject> files;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("活动线路")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<String> linIds;
|
||||||
|
|
||||||
|
private String linNames;
|
||||||
|
|
||||||
|
@Many(field = "activityId")
|
||||||
|
private List<ExcellentRecuperationQuotaAllocation> unionQuotaAllocationList;
|
||||||
|
|
||||||
|
}
|
||||||
+75
@@ -0,0 +1,75 @@
|
|||||||
|
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.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 18:36
|
||||||
|
* @description 线路管理
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("excellent_recuperation_line")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养旅行社")
|
||||||
|
public class ExcellentRecuperationLine extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("编号")
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("线路名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("旅行社Id")
|
||||||
|
private String travelAgencyId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(customType = "text")
|
||||||
|
@Comment("疗休养内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("年度")
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("是否禁用")
|
||||||
|
private boolean isDisabled;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("缩略图")
|
||||||
|
private String file;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("联系人")
|
||||||
|
private String lineContact;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("联系电话")
|
||||||
|
private String lineContactPhone;
|
||||||
|
|
||||||
|
@One(field = "travelAgencyId")
|
||||||
|
private ExcellentRecuperationTravelAgency travelAgency;
|
||||||
|
|
||||||
|
}
|
||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/27 08:49
|
||||||
|
* @description 疗休养分配名额
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("excellent_recuperation_quota_allocation")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养活动")
|
||||||
|
public class ExcellentRecuperationQuotaAllocation extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("活动Id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String activityId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工会Id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工会名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unionName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工会编码")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unionCode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("名额分配数")
|
||||||
|
@ColDefine(type = ColType.INT, width = 4)
|
||||||
|
@Default("0")
|
||||||
|
private Integer allocationNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("会员数量")
|
||||||
|
@ColDefine(type = ColType.INT, width = 4)
|
||||||
|
@Default("0")
|
||||||
|
private Integer memberNum;
|
||||||
|
|
||||||
|
}
|
||||||
+94
@@ -0,0 +1,94 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/27 16:13
|
||||||
|
* @description 疗休养报名人员
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("excellent_recuperation_sign_user")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养报名人员")
|
||||||
|
public class ExcellentRecuperationSignUpUser extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("姓名Id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("活动Id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String activityId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("线路Id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("联系电话")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("身份证号")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工号")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工会Id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工会名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
private String unionName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("单位Id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unitId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("单位名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("附件")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<JSONObject> files;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("报名时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String signUpTime;
|
||||||
|
|
||||||
|
}
|
||||||
+77
@@ -0,0 +1,77 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 18:06
|
||||||
|
* @description 旅行社管理
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("excellent_recuperation_travel_agency")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养旅行社")
|
||||||
|
public class ExcellentRecuperationTravelAgency extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("旅行社编号")
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("旅行社名称")
|
||||||
|
private String travelAgencyName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
@Comment("旅行社联系人")
|
||||||
|
private String contact;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 11)
|
||||||
|
@Comment("旅行社联系人手机")
|
||||||
|
private String contactMobileNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("旅行社邮箱")
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("旅行社官网")
|
||||||
|
private String officialWebsite;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("年度")
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("是否禁用")
|
||||||
|
private boolean isDisabled;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("缩略图")
|
||||||
|
private String file;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationLine;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ExcellentRecuperationLineService extends BaseService<ExcellentRecuperationLine> {
|
||||||
|
|
||||||
|
|
||||||
|
Pagination pageData(PageForm pageForm, Cnd cnd);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前年度的线路列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ExcellentRecuperationLine> listLineListByThisYear();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.vo.ExcellentRecuperationPageForm;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
|
||||||
|
public interface ExcellentRecuperationSummaryService extends BaseService {
|
||||||
|
|
||||||
|
Sql getsql(ExcellentRecuperationPageForm pageForm);
|
||||||
|
}
|
||||||
+65
@@ -0,0 +1,65 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationTravelAgency;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationTravelAgency;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
public interface ExcellentRecuperationTravelAgencyService extends BaseService<ExcellentRecuperationTravelAgency> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除旅行社
|
||||||
|
*
|
||||||
|
* @param travelAgencyId 旅行社 ID
|
||||||
|
*/
|
||||||
|
void deleteTravelAgency(String travelAgencyId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加旅行社
|
||||||
|
*
|
||||||
|
* @param travelAgency 旅行社
|
||||||
|
*/
|
||||||
|
void addTravelAgency(ExcellentRecuperationTravelAgency travelAgency);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑旅行社
|
||||||
|
*
|
||||||
|
* @param travelAgency 旅行社
|
||||||
|
*/
|
||||||
|
void editTravelAgency(ExcellentRecuperationTravelAgency travelAgency);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开启或关闭旅行社
|
||||||
|
*
|
||||||
|
* @param travelAgencyId 旅行社id
|
||||||
|
*/
|
||||||
|
void openTravelAgency(String travelAgencyId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面数据
|
||||||
|
*
|
||||||
|
* @param pageForm 分页参数
|
||||||
|
* @param cnd cnd
|
||||||
|
* @return {@link Pagination}
|
||||||
|
*/
|
||||||
|
Pagination pageData(PageForm pageForm, Cnd cnd);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询旅行社
|
||||||
|
*
|
||||||
|
* @param cnd cnd
|
||||||
|
* @return {@link List}<{@link RecuperationTravelAgency}>
|
||||||
|
*/
|
||||||
|
List<ExcellentRecuperationTravelAgency> selectAllTravelAgencyByYear(Cnd cnd);
|
||||||
|
|
||||||
|
}
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.model.ExcellentRecuperationLine;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service.ExcellentRecuperationLineService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/26 19:09
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class ExcellentRecuperationLineServiceImpl extends BaseServiceImpl<ExcellentRecuperationLine> implements ExcellentRecuperationLineService {
|
||||||
|
public ExcellentRecuperationLineServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination pageData(PageForm pageForm, Cnd cnd) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
line.id,
|
||||||
|
line.serialNumber,
|
||||||
|
line.lineName,
|
||||||
|
line.year,
|
||||||
|
line.isDisabled,
|
||||||
|
line.file AS fileId,
|
||||||
|
u.username AS createUserName,
|
||||||
|
ta.travelAgencyName,
|
||||||
|
ta.contact,
|
||||||
|
ta.contactMobileNumber,
|
||||||
|
ta.officialWebsite
|
||||||
|
FROM
|
||||||
|
excellent_recuperation_line line
|
||||||
|
LEFT JOIN excellent_recuperation_travel_agency ta ON ta.id = line.travelAgencyId
|
||||||
|
LEFT JOIN sys_user u ON u.id = line.createdBy
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ExcellentRecuperationLine> listLineListByThisYear() {
|
||||||
|
|
||||||
|
List<ExcellentRecuperationLine> lineList = query(Cnd.where("isDisabled", "=", true).and("year", "=", DateUtil.thisYear()));
|
||||||
|
return lineList;
|
||||||
|
}
|
||||||
|
}
|
||||||
+70
@@ -0,0 +1,70 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service.ExcellentRecuperationSummaryService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.excellentRecuperation.vo.ExcellentRecuperationPageForm;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/28 10:24
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class ExcellentRecuperationSummaryServiceImpl extends BaseServiceImpl implements ExcellentRecuperationSummaryService {
|
||||||
|
public ExcellentRecuperationSummaryServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sql getsql(ExcellentRecuperationPageForm pageForm) {
|
||||||
|
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.andEX("YEAR(info.signUpTime)", "=", pageForm.getYear());
|
||||||
|
cnd.andEX("info.activityId", "=", pageForm.getActivityId());
|
||||||
|
cnd.andEX("info.unionId", "=", pageForm.getUnionId());
|
||||||
|
cnd.andEX("info.unitId", "=", pageForm.getUnitId());
|
||||||
|
cnd.and("ins.state", "=", ProcessTaskStateEnum.FINISHED.getCode());
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchName())&& StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||||
|
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||||
|
}
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return sql;
|
||||||
|
}
|
||||||
|
}
|
||||||
+67
@@ -0,0 +1,67 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
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.model.RecuperationTravelAgency;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Chain;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class ExcellentRecuperationTravelAgencyServiceImpl extends BaseServiceImpl<ExcellentRecuperationTravelAgency> implements ExcellentRecuperationTravelAgencyService {
|
||||||
|
|
||||||
|
public ExcellentRecuperationTravelAgencyServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTravelAgency(String travelAgencyId) {
|
||||||
|
delete(travelAgencyId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addTravelAgency(ExcellentRecuperationTravelAgency travelAgency) {
|
||||||
|
insert(travelAgency);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editTravelAgency(ExcellentRecuperationTravelAgency travelAgency) {
|
||||||
|
update(travelAgency);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void openTravelAgency(String travelAgencyId) {
|
||||||
|
update(Chain.makeSpecial("isDisabled", "isDisabled ^ 1"), Cnd.where("id", "=", travelAgencyId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination pageData(PageForm pageForm, Cnd cnd) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
select
|
||||||
|
*,
|
||||||
|
file as fileId
|
||||||
|
from
|
||||||
|
excellent_recuperation_travel_agency
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ExcellentRecuperationTravelAgency> selectAllTravelAgencyByYear(Cnd cnd) {
|
||||||
|
return dao().query(ExcellentRecuperationTravelAgency.class, cnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.excellentRecuperation.vo;
|
||||||
|
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2025/8/28 10:23
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ExcellentRecuperationPageForm extends PageForm {
|
||||||
|
|
||||||
|
private String year;
|
||||||
|
private String unionId;
|
||||||
|
private String unitId;
|
||||||
|
private String activityId;
|
||||||
|
}
|
||||||
+194
@@ -0,0 +1,194 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="关键字">
|
||||||
|
<el-input v-model="pageForm.searchKeyword" placeholder="请填写内容">
|
||||||
|
<el-select
|
||||||
|
slot="prepend"
|
||||||
|
v-model="pageForm.searchName"
|
||||||
|
placeholder="查询"
|
||||||
|
style="width: 100px;"
|
||||||
|
>
|
||||||
|
<el-option label="工号" value="t1.loginName"></el-option>
|
||||||
|
<el-option label="姓名" value="t1.userName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="教代会">
|
||||||
|
<el-select
|
||||||
|
v-model="pageForm.teacherMeetId"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择教代会"
|
||||||
|
style="width:100%;"
|
||||||
|
@change="doSearch"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in teacherMeets"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.fullName"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select clearable filterable placeholder="所属工会" style="width: 100%" v-model="pageForm.unionId">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionOptions"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never" class="mt10">
|
||||||
|
<table-tool label="上报列表">
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="$refs.onePushFormalRef.onOpen(pageForm.teacherMeetId)"
|
||||||
|
>委员推选
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
ref="tableRef"
|
||||||
|
:data="tableData"
|
||||||
|
row-key="id"
|
||||||
|
@sort-change="pageOrder"
|
||||||
|
>
|
||||||
|
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||||
|
label="序号"
|
||||||
|
fixed
|
||||||
|
type="index"
|
||||||
|
width="50"></el-table-column>
|
||||||
|
<el-table-column align="center" label="工号" prop="loginName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="姓名" prop="userName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="年龄" prop="age"></el-table-column>
|
||||||
|
<el-table-column align="center" label="性别" prop="sex"></el-table-column>
|
||||||
|
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="100" fixed="right">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
@click="onDelete(row)"
|
||||||
|
>删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
<delegation-one-push-formal-dialog ref="onePushFormalRef" @refresh="doSearch"></delegation-one-push-formal-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<!--#include("onePushFormalDialog.js"){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/executiveCommittee/delegationOnePush/pageData",
|
||||||
|
pageForm: {
|
||||||
|
searchName: 't1.userName',
|
||||||
|
teacherMeetId: null,
|
||||||
|
unionId: null
|
||||||
|
},
|
||||||
|
teacherMeets: [],
|
||||||
|
unionOptions: [],
|
||||||
|
delegations: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"delegation-one-push-formal-dialog": DELEGATION_ONE_PUSH_FORMAL_DIALOG
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
|
await this.getAllJdh()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getAllDelegation(id) {
|
||||||
|
this.$axios.post("/platform/teacherCongress/common/listDelegation", {sessionId: id}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.delegations = resp.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getAllJdh() {
|
||||||
|
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.teacherMeets = resp.data
|
||||||
|
if (this.teacherMeets && this.teacherMeets.length > 0) {
|
||||||
|
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
|
||||||
|
this.getAllDelegation(this.teacherMeets[0].id)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
this.$confirm('确定要删除该条数据吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
const resp = await this.$axios.post('/platform/executiveCommittee/delegationOnePush/doDelete', {id: row.id})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.doSearch()
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel__item.el-checkbox {
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
margin-right: 0;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-checkbox__input {
|
||||||
|
vertical-align: top;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .transfer-item {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel {
|
||||||
|
height: 60vh;
|
||||||
|
width: unset !important;
|
||||||
|
flex: 2 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel__body {
|
||||||
|
height: calc(100% - 40px) !important;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.pushFormDialog .el-transfer-panel__list.is-filterable {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+95
@@ -0,0 +1,95 @@
|
|||||||
|
const DELEGATION_ONE_PUSH_FORMAL_DIALOG = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div class="pushFormDialog">
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
title="执委会委员推选"
|
||||||
|
width="70%"
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-transfer
|
||||||
|
ref="transfer"
|
||||||
|
v-model="userValue"
|
||||||
|
:data="userData"
|
||||||
|
:filter-method="filterMethod"
|
||||||
|
:props="{key: 'userId',label: 'name'}"
|
||||||
|
:right-default-checked="rightChecked"
|
||||||
|
:titles="['可推选人员名单', '当前选择']"
|
||||||
|
filterable
|
||||||
|
class="transfer-high"
|
||||||
|
>
|
||||||
|
<div slot-scope="{ option }">
|
||||||
|
<div class="transfer-item">
|
||||||
|
<div class="transfer-item-name">{{ option.userName }} - {{ option.loginName }}</div>
|
||||||
|
<div class="transfer-item-details">
|
||||||
|
<span class="detail-item">
|
||||||
|
{{option.sex}}
|
||||||
|
</span>
|
||||||
|
<span class="detail-item">{{ option.age }}岁</span>
|
||||||
|
<span class="detail-item">{{ option.jobTitle }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-transfer>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
userValue: [],
|
||||||
|
userData: [],
|
||||||
|
rightChecked: [],
|
||||||
|
attendanceRightChecked: [],
|
||||||
|
teacherMeetId: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async onOpen(teacherMeetId) {
|
||||||
|
|
||||||
|
this.teacherMeetId = teacherMeetId
|
||||||
|
this.userValue = []
|
||||||
|
this.userData = []
|
||||||
|
const {
|
||||||
|
code,
|
||||||
|
msg,
|
||||||
|
data
|
||||||
|
} = await this.$axios.post('/platform/executiveCommittee/delegationOnePush/getDelegationUser', {teacherMeetId: teacherMeetId})
|
||||||
|
if (code === 0) {
|
||||||
|
data.userData.forEach(v => {
|
||||||
|
this.userData.push({userId: v.userId, ...v})
|
||||||
|
})
|
||||||
|
this.dialogVisible = true
|
||||||
|
}else{
|
||||||
|
this.$message.error(msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filterMethod(query, item) {
|
||||||
|
return item.userName.indexOf(query) > -1
|
||||||
|
},
|
||||||
|
async onConfirm() {
|
||||||
|
const {
|
||||||
|
code,
|
||||||
|
msg
|
||||||
|
} = await this.$axios.post('/platform/executiveCommittee/delegationOnePush/addOnePush', {
|
||||||
|
userValue: JSON.stringify(this.userValue),
|
||||||
|
teacherMeetId: this.teacherMeetId
|
||||||
|
})
|
||||||
|
if (code === 0) {
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$message.success(msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
}else{
|
||||||
|
this.$message.error(msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
+193
@@ -0,0 +1,193 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="关键字">
|
||||||
|
<el-input v-model="pageForm.searchKeyword" placeholder="请填写内容">
|
||||||
|
<el-select
|
||||||
|
slot="prepend"
|
||||||
|
v-model="pageForm.searchName"
|
||||||
|
placeholder="查询"
|
||||||
|
style="width: 100px;"
|
||||||
|
>
|
||||||
|
<el-option label="工号" value="t1.loginName"></el-option>
|
||||||
|
<el-option label="姓名" value="t1.userName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="教代会">
|
||||||
|
<el-select
|
||||||
|
v-model="pageForm.teacherMeetId"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择教代会"
|
||||||
|
style="width:100%;"
|
||||||
|
@change="doSearch"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in teacherMeets"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.fullName"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select clearable filterable placeholder="所属工会" style="width: 100%" v-model="pageForm.unionId">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionOptions"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never" class="mt10">
|
||||||
|
<table-tool label="上报列表">
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="$refs.onePushFormalRef.onOpen(pageForm.teacherMeetId)"
|
||||||
|
>委员推选
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
ref="tableRef"
|
||||||
|
:data="tableData"
|
||||||
|
row-key="id"
|
||||||
|
@sort-change="pageOrder"
|
||||||
|
>
|
||||||
|
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||||
|
label="序号"
|
||||||
|
fixed
|
||||||
|
type="index"
|
||||||
|
width="50"></el-table-column>
|
||||||
|
<el-table-column align="center" label="工号" prop="loginName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="姓名" prop="userName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="年龄" prop="age"></el-table-column>
|
||||||
|
<el-table-column align="center" label="性别" prop="sex"></el-table-column>
|
||||||
|
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="100" fixed="right">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
@click="onDelete(row)"
|
||||||
|
>删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
<delegation-two-push-formal-dialog ref="onePushFormalRef" @refresh="doSearch"></delegation-two-push-formal-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<!--#include("twoPushFormalDialog.js"){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/executiveCommittee/delegationTwoPush/pageData",
|
||||||
|
pageForm: {
|
||||||
|
searchName: 't1.userName',
|
||||||
|
teacherMeetId: null,
|
||||||
|
unionId: null
|
||||||
|
},
|
||||||
|
teacherMeets: [],
|
||||||
|
unionOptions: [],
|
||||||
|
delegations: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"delegation-two-push-formal-dialog": DELEGATION_TWO_PUSH_FORMAL_DIALOG
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
|
await this.getAllJdh()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getAllDelegation(id) {
|
||||||
|
this.$axios.post("/platform/teacherCongress/common/listDelegation", {sessionId: id}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.delegations = resp.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getAllJdh() {
|
||||||
|
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.teacherMeets = resp.data
|
||||||
|
if (this.teacherMeets && this.teacherMeets.length > 0) {
|
||||||
|
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
|
||||||
|
this.getAllDelegation(this.teacherMeets[0].id)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
this.$confirm('确定要删除该条数据吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
const resp = await this.$axios.post('/platform/executiveCommittee/delegationTwoPush/doDelete', {id: row.id})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.doSearch()
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel__item.el-checkbox {
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
margin-right: 0;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-checkbox__input {
|
||||||
|
vertical-align: top;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .transfer-item {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel {
|
||||||
|
height: 60vh;
|
||||||
|
width: unset !important;
|
||||||
|
flex: 2 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel__body {
|
||||||
|
height: calc(100% - 40px) !important;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.pushFormDialog .el-transfer-panel__list.is-filterable {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+142
@@ -0,0 +1,142 @@
|
|||||||
|
const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div class="pushFormDialog">
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
title="团长二次推选"
|
||||||
|
width="70%"
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-transfer
|
||||||
|
ref="transfer"
|
||||||
|
v-model="userValue"
|
||||||
|
:data="userData"
|
||||||
|
:filter-method="filterMethod"
|
||||||
|
:props="{key: 'userId',label: 'name'}"
|
||||||
|
:right-default-checked="rightChecked"
|
||||||
|
:titles="['可推选人员名单', '当前选择']"
|
||||||
|
filterable
|
||||||
|
class="transfer-high"
|
||||||
|
>
|
||||||
|
<div slot-scope="{ option }">
|
||||||
|
<div class="transfer-item">
|
||||||
|
<div class="transfer-item-name">{{ option.userName }} - {{ option.loginName }}</div>
|
||||||
|
<div class="transfer-item-details">
|
||||||
|
<span class="detail-item">
|
||||||
|
{{option.sex}}
|
||||||
|
</span>
|
||||||
|
<span class="detail-item">{{ option.age }}岁</span>
|
||||||
|
<span class="detail-item">{{ option.jobTitle }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-transfer>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
userValue: [],
|
||||||
|
userData: [],
|
||||||
|
rightChecked: [],
|
||||||
|
attendanceRightChecked: [],
|
||||||
|
teacherMeetId: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async onOpen(teacherMeetId) {
|
||||||
|
this.teacherMeetId = teacherMeetId
|
||||||
|
this.userValue = []
|
||||||
|
this.userData = []
|
||||||
|
const {
|
||||||
|
code,
|
||||||
|
msg,
|
||||||
|
data
|
||||||
|
} = await this.$axios.post('/platform/executiveCommittee/delegationTwoPush/getDelegationUser', {teacherMeetId: teacherMeetId})
|
||||||
|
if (code === 0) {
|
||||||
|
data.userData.forEach(v => {
|
||||||
|
this.userData.push({userId: v.userId, ...v})
|
||||||
|
})
|
||||||
|
this.dialogVisible = true
|
||||||
|
}else{
|
||||||
|
this.$message.error(msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filterMethod(query, item) {
|
||||||
|
return item.userName.indexOf(query) > -1
|
||||||
|
},
|
||||||
|
async onConfirm() {
|
||||||
|
const {
|
||||||
|
code,
|
||||||
|
msg
|
||||||
|
} = await this.$axios.post('/platform/executiveCommittee/delegationTwoPush/addOnePush', {
|
||||||
|
userValue: JSON.stringify(this.userValue),
|
||||||
|
teacherMeetId: this.teacherMeetId
|
||||||
|
})
|
||||||
|
if (code === 0) {
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$message.success(msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
}else{
|
||||||
|
this.$message.error(msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
.pushFormDialog .el-transfer-panel__item.el-checkbox {
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
margin-right: 0;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-checkbox__input {
|
||||||
|
vertical-align: top;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .transfer-item {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .transfer-item-name {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .transfer-item-details {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .detail-item {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel {
|
||||||
|
height: 60vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel__body {
|
||||||
|
height: calc(100% - 40px) !important;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel__list.is-filterable {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
}
|
||||||
+176
@@ -0,0 +1,176 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="教代会届次">
|
||||||
|
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="mt10" shadow="never">
|
||||||
|
<table-tool label="基础信息"></table-tool>
|
||||||
|
<el-form ref="form" label-width="140px" :model="formData" :rules="formRules">
|
||||||
|
<el-form-item prop="prepareGroupQuotaCount" label="筹备组推荐名额数">
|
||||||
|
<el-input-number v-model="formData.prepareGroupQuotaCount" placeholder="请填写筹备组推荐名额数"
|
||||||
|
style="width: 100%"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="committeeQuotaCount" label="委员会预选人数">
|
||||||
|
<el-input-number v-model="formData.committeeQuotaCount"
|
||||||
|
placeholder="请填写委员会预选人数" style="width: 100%"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="delegationQuotaCount" label="代表团推荐总数">
|
||||||
|
<el-input-number v-model="formData.delegationQuotaCount"
|
||||||
|
placeholder="请填写代表团推荐名额总数" style="width: 100%"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="firstTime" label="第一次预选时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.firstTime"
|
||||||
|
style="width: 100%"
|
||||||
|
type="datetimerange"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="请选择开始日期"
|
||||||
|
end-placeholder="请选择结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="secondTime" label="第二次预选时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.secondTime"
|
||||||
|
style="width: 100%"
|
||||||
|
type="datetimerange"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="请选择开始日期"
|
||||||
|
end-placeholder="请选择结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<table-tool label="代表团名额分配"></table-tool>
|
||||||
|
<el-table :data="formData.delegationQuotaList" show-summar size="mini" max-height="500">
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
type="index"
|
||||||
|
:index="indexMethod"
|
||||||
|
label="序号"
|
||||||
|
width="80px"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
:key="column.prop"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template v-if="column.prop === 'quotaCount'" #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.quotaCount"
|
||||||
|
:precision="0"
|
||||||
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
:max="100"
|
||||||
|
></el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-row type="flex" justify="end" class="mt20">
|
||||||
|
<el-button type="primary" @click="onHandle">提 交</el-button>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
openJdhList:[],
|
||||||
|
pageForm: {
|
||||||
|
sessionId: ''
|
||||||
|
},
|
||||||
|
tableColumns: [
|
||||||
|
{prop: 'delegationName', label: '代表团名称', sortable: true},
|
||||||
|
{prop: 'memberCount', label: '会员人数', sortable: true},
|
||||||
|
{prop: 'quotaCount', label: '分配人数', sortable: true}
|
||||||
|
],
|
||||||
|
formData: {},
|
||||||
|
formRules: {
|
||||||
|
prepareGroupQuotaCount: [{required: true, message: '必填', trigger: ['blur']}],
|
||||||
|
committeeQuotaCount: [{required: true, message: '必填', trigger: ['blur']}],
|
||||||
|
delegationQuotaCount: [{required: true, message: '必填', trigger: ['blur']}],
|
||||||
|
firstTime: [{required: true, message: '必填', trigger: ['blur']}],
|
||||||
|
secondTime: [{required: true, message: '必填', trigger: ['blur']}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async fetchConfig() {
|
||||||
|
const resp = await this.$axios.post("/platform/executiveCommittee/executiveCommitteeConfig/fetchConfig", {sessionId: this.pageForm.sessionId})
|
||||||
|
this.$set(resp.data, 'firstTime', [resp.data.firstStartTime || '', resp.data.firstEndTime || ''])
|
||||||
|
this.$set(resp.data, 'secondTime', [resp.data.secondStartTime || '', resp.data.secondEndTime || ''])
|
||||||
|
this.formData = resp.data
|
||||||
|
},
|
||||||
|
getAllJdh() {
|
||||||
|
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.openJdhList = resp.data
|
||||||
|
if (this.openJdhList.length > 0) {
|
||||||
|
this.pageForm.sessionId = this.openJdhList[0].id
|
||||||
|
this.fetchConfig()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onHandle() {
|
||||||
|
this.$refs['form'].validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm('您确定要提交吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
const total = this.formData.delegationQuotaList.reduce((sum, item) => sum + (item.quotaCount || 0), 0)
|
||||||
|
if (total > this.formData.delegationQuotaCount) {
|
||||||
|
this.$message.warning('各代表团名额分配数之和不能超过' + this.formData.delegationQuotaCount)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.formData.firstTime && this.formData.firstTime.length > 1) {
|
||||||
|
this.$set(this.formData, 'firstStartTime', this.formData.firstTime[0])
|
||||||
|
this.$set(this.formData, 'firstEndTime', this.formData.firstTime[1])
|
||||||
|
}
|
||||||
|
if (this.formData.secondTime && this.formData.secondTime.length > 1) {
|
||||||
|
this.$set(this.formData, 'secondStartTime', this.formData.secondTime[0])
|
||||||
|
this.$set(this.formData, 'secondEndTime', this.formData.secondTime[1])
|
||||||
|
}
|
||||||
|
this.$set(this.formData, 'teacherMeetId', this.pageForm.sessionId)
|
||||||
|
this.$set(this.formData, 'delegationQuotaList', JSON.stringify(this.formData.delegationQuotaList))
|
||||||
|
const resp = await this.$axios.post('/platform/executiveCommittee/executiveCommitteeConfig/onHandle', this.formData)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
await this.fetchConfig()
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.getAllJdh()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+192
@@ -0,0 +1,192 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="关键字">
|
||||||
|
<el-input v-model="pageForm.searchKeyword" placeholder="请填写内容">
|
||||||
|
<el-select
|
||||||
|
slot="prepend"
|
||||||
|
v-model="pageForm.searchName"
|
||||||
|
placeholder="查询"
|
||||||
|
style="width: 100px;"
|
||||||
|
>
|
||||||
|
<el-option label="工号" value="t1.loginName"></el-option>
|
||||||
|
<el-option label="姓名" value="t1.userName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="教代会">
|
||||||
|
<el-select
|
||||||
|
v-model="pageForm.teacherMeetId"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择教代会"
|
||||||
|
style="width:100%;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in teacherMeets"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.fullName"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select clearable filterable placeholder="所属工会" style="width: 100%"
|
||||||
|
v-model="pageForm.unionId" @change="flushUnits" @clear="flushUnits">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||||
|
v-for="item in unionOptions"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属单位">
|
||||||
|
<el-select clearable filterable style="width: 100%"
|
||||||
|
placeholder="请选择所属单位" v-model="pageForm.unitId">
|
||||||
|
<el-option
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in unitOptions">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="mt10" shadow="never">
|
||||||
|
<table-tool label="名单列表">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="doExportExcel"
|
||||||
|
>导出名单
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
ref="tableRef"
|
||||||
|
:data="tableData"
|
||||||
|
row-key="id"
|
||||||
|
@sort-change="pageOrder"
|
||||||
|
>
|
||||||
|
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||||
|
label="序号"
|
||||||
|
fixed
|
||||||
|
type="index"
|
||||||
|
width="50"></el-table-column>
|
||||||
|
<el-table-column align="center" label="工号" prop="loginName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="姓名" prop="userName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="年龄" prop="age"></el-table-column>
|
||||||
|
<el-table-column align="center" label="性别" prop="sex"></el-table-column>
|
||||||
|
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="所属代表团" prop="delegationName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="票数" prop="pushCount"></el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="130" fixed="right">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
@click="openView(row)"
|
||||||
|
>推选详情
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
|
<el-dialog title="投票详情" :close-on-click-modal="false" :visible.sync="infoDialogVisible" top="50px"
|
||||||
|
width="60%">
|
||||||
|
<el-table :data="chooseUserTableData" max-height="500">
|
||||||
|
<el-table-column align="center" header-align="center" label="序号" type="index" width="60px"></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" prop="pushUserName" label="推选人"></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" prop="pushLoginName" label="推选人工号"></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" prop="sex" label="性别"></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" prop="mobile" label="联系方式"></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" prop="unitName" label="所属单位"></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" prop="delegationName" label="所属代表团"></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" prop="pushDate" label="推选时间">
|
||||||
|
<template #default="{row}">
|
||||||
|
{{ $moment(row.pushDate).format('YYYY-MM-DD') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-row class="mt20" justify="end" type="flex">
|
||||||
|
<el-button type="primary" @click="infoDialogVisible = false">确定</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const vue = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/executiveCommittee/executiveCommitteeMember/pageData",
|
||||||
|
pageForm: {
|
||||||
|
searchName: 't1.userName',
|
||||||
|
},
|
||||||
|
teacherMeets: [],
|
||||||
|
unionOptions: [],
|
||||||
|
unitOptions: [],
|
||||||
|
chooseUserTableData: [],
|
||||||
|
infoDialogVisible: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {},
|
||||||
|
async created() {
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
|
this.unitOptions = await this.$businessTool.listUnit()
|
||||||
|
await this.getAllJdh()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doExportExcel() {
|
||||||
|
this.$downLoad("/platform/executiveCommittee/executiveCommitteeMember/doExportExcel", {
|
||||||
|
data: JSON.stringify(this.pageForm)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
openView(row) {
|
||||||
|
this.$axios.post('/platform/executiveCommittee/executiveCommitteeMember/onView', {
|
||||||
|
teacherMeetId: this.pageForm.teacherMeetId,
|
||||||
|
userId: row.userId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.chooseUserTableData = res.data
|
||||||
|
this.infoDialogVisible = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async flushUnits() {
|
||||||
|
this.$set(this.pageForm, "unitId", null)
|
||||||
|
this.unitOptions = []
|
||||||
|
if (this.pageForm.unionId) {
|
||||||
|
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
|
||||||
|
this.unitOptions = data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getAllJdh() {
|
||||||
|
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.teacherMeets = resp.data
|
||||||
|
if (this.teacherMeets && this.teacherMeets.length > 0) {
|
||||||
|
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+208
@@ -0,0 +1,208 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="关键字">
|
||||||
|
<el-input v-model="pageForm.searchKeyword" placeholder="请填写内容">
|
||||||
|
<el-select
|
||||||
|
slot="prepend"
|
||||||
|
v-model="pageForm.searchName"
|
||||||
|
placeholder="查询"
|
||||||
|
style="width: 100px;"
|
||||||
|
>
|
||||||
|
<el-option label="工号" value="t1.loginName"></el-option>
|
||||||
|
<el-option label="姓名" value="t1.userName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="教代会">
|
||||||
|
<el-select
|
||||||
|
v-model="pageForm.teacherMeetId"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择教代会"
|
||||||
|
style="width:100%;"
|
||||||
|
@change="teacherMeetChange(pageForm.teacherMeetId)"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in teacherMeets"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.fullName"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select clearable filterable placeholder="所属工会" style="width: 100%"
|
||||||
|
v-model="pageForm.unionId">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||||
|
v-for="item in unionOptions"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="代表团">
|
||||||
|
<el-select clearable filterable placeholder="代表团" style="width: 100%"
|
||||||
|
v-model="pageForm.delegationId">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||||
|
v-for="item in delegations"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never" class="mt10">
|
||||||
|
<table-tool label="上报列表">
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="$refs.onePushFormalRef.onOpen(pageForm.teacherMeetId)"
|
||||||
|
>委员推选
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
ref="tableRef"
|
||||||
|
:data="tableData"
|
||||||
|
row-key="id"
|
||||||
|
@sort-change="pageOrder"
|
||||||
|
>
|
||||||
|
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||||
|
label="序号"
|
||||||
|
fixed
|
||||||
|
type="index"
|
||||||
|
width="50"></el-table-column>
|
||||||
|
<el-table-column align="center" label="工号" prop="loginName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="姓名" prop="userName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="年龄" prop="age"></el-table-column>
|
||||||
|
<el-table-column align="center" label="性别" prop="sex"></el-table-column>
|
||||||
|
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="所属代表团" prop="delegationName"></el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="100" fixed="right">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
@click="onDelete(row)"
|
||||||
|
>删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
<push-formal-dialog ref="onePushFormalRef" @refresh="doSearch"></push-formal-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<!--#include("pushFormalDialog.js"){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/executiveCommittee/preparatoryGroupPush/pageData",
|
||||||
|
pageForm: {
|
||||||
|
searchName: 't1.userName',
|
||||||
|
teacherMeetId: null,
|
||||||
|
unionId: null
|
||||||
|
},
|
||||||
|
teacherMeets: [],
|
||||||
|
unionOptions: [],
|
||||||
|
delegations: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"push-formal-dialog": PUSH_FORMAL_DIALOG
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
|
await this.getAllJdh()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async teacherMeetChange(val) {
|
||||||
|
this.$set(this.pageForm, 'delegationId', null)
|
||||||
|
this.getAllDelegation(val)
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
|
getAllDelegation(id) {
|
||||||
|
this.$axios.post("/platform/teacherCongress/common/listDelegation", {sessionId: id}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.delegations = resp.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getAllJdh() {
|
||||||
|
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.teacherMeets = resp.data
|
||||||
|
if (this.teacherMeets && this.teacherMeets.length > 0) {
|
||||||
|
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
|
||||||
|
this.getAllDelegation(this.teacherMeets[0].id)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
this.$confirm('确定要删除该条数据吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
const resp = await this.$axios.post('/platform/executiveCommittee/delegationOnePush/doDelete', {id: row.id})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.doSearch()
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel__item.el-checkbox {
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
margin-right: 0;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-checkbox__input {
|
||||||
|
vertical-align: top;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .transfer-item {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel {
|
||||||
|
height: 60vh;
|
||||||
|
width: unset !important;
|
||||||
|
flex: 2 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pushFormDialog .el-transfer-panel__body {
|
||||||
|
height: calc(100% - 40px) !important;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.pushFormDialog .el-transfer-panel__list.is-filterable {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+87
@@ -0,0 +1,87 @@
|
|||||||
|
const PUSH_FORMAL_DIALOG = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div class="pushFormDialog">
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
title="执委会委员推选"
|
||||||
|
width="70%"
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-transfer
|
||||||
|
ref="transfer"
|
||||||
|
v-model="userValue"
|
||||||
|
:data="userData"
|
||||||
|
:filter-method="filterMethod"
|
||||||
|
:props="{key: 'userId',label: 'name'}"
|
||||||
|
:right-default-checked="rightChecked"
|
||||||
|
:titles="['可推选人员名单', '当前选择']"
|
||||||
|
filterable
|
||||||
|
class="transfer-high"
|
||||||
|
>
|
||||||
|
<div slot-scope="{ option }">
|
||||||
|
<div class="transfer-item">
|
||||||
|
<div class="transfer-item-name">{{ option.userName }} - {{ option.loginName }}</div>
|
||||||
|
<div class="transfer-item-details">
|
||||||
|
<span class="detail-item">
|
||||||
|
{{option.sex}}
|
||||||
|
</span>
|
||||||
|
<span class="detail-item">{{ option.age }}岁</span>
|
||||||
|
<span class="detail-item">{{ option.jobTitle }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-transfer>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
userValue: [],
|
||||||
|
userData: [],
|
||||||
|
rightChecked: [],
|
||||||
|
attendanceRightChecked: [],
|
||||||
|
teacherMeetId: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async onOpen(teacherMeetId) {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.teacherMeetId = teacherMeetId
|
||||||
|
this.userValue = []
|
||||||
|
this.userData = []
|
||||||
|
const {
|
||||||
|
code,
|
||||||
|
data
|
||||||
|
} = await this.$axios.post('/platform/executiveCommittee/preparatoryGroupPush/getDelegationUser', {teacherMeetId: teacherMeetId})
|
||||||
|
if (code === 0) {
|
||||||
|
data.userData.forEach(v => {
|
||||||
|
this.userData.push({userId: v.userId, ...v})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filterMethod(query, item) {
|
||||||
|
return item.userName.indexOf(query) > -1
|
||||||
|
},
|
||||||
|
async onConfirm() {
|
||||||
|
const {
|
||||||
|
code,
|
||||||
|
msg
|
||||||
|
} = await this.$axios.post('/platform/executiveCommittee/preparatoryGroupPush/addOnePush', {
|
||||||
|
userValue: JSON.stringify(this.userValue),
|
||||||
|
teacherMeetId: this.teacherMeetId
|
||||||
|
})
|
||||||
|
if (code === 0) {
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$message.success(msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
+110
@@ -0,0 +1,110 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="教代会">
|
||||||
|
<el-select
|
||||||
|
v-model="pageForm.sessionId"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择教代会"
|
||||||
|
style="width:100%;"
|
||||||
|
@change="doSearch"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in sessionOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.fullName"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select clearable filterable placeholder="所属工会" style="width: 100%" v-model="pageForm.unionId">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||||
|
v-for="item in unionOptions"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<table-tool label="名额分配列表">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="openManual"
|
||||||
|
>分配名额
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
|
<el-table-column type="index" width="50" :index="indexMethod" label="序号"></el-table-column>
|
||||||
|
<el-table-column prop="unionName" label="工会名称"></el-table-column>
|
||||||
|
<el-table-column prop="memberCount" label="会员人数"></el-table-column>
|
||||||
|
<el-table-column prop="dbCount" label="代表人数"></el-table-column>
|
||||||
|
<el-table-column prop="allocationNum" label="名额分配人数"></el-table-column>
|
||||||
|
<el-table-column prop="seniorTeaNum" label="高级职称专任教师代表数"></el-table-column>
|
||||||
|
<el-table-column prop="ordinaryTeaNum" label="专任教师代表数"></el-table-column>
|
||||||
|
<el-table-column prop="femaleNum" label="女代表数"></el-table-column>
|
||||||
|
<el-table-column prop="less45Num" label="45岁以下代表数"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<manual-allocation-dialog ref="manualAllocationDialog" @refresh="doSearch"></manual-allocation-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<!--#include("manualAllocationDialog.js"){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
sessionOptions: [],
|
||||||
|
unionOptions: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"manual-allocation-dialog": MANUAL_ALLOCATION_DIALOG
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openManual() {
|
||||||
|
this.$refs.manualAllocationDialog.onOpen(this.pageForm.sessionId)
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.tableLoading = true
|
||||||
|
this.$axios.post("/platform/teacherCongress/prepare/quotaAllocation/pageData", this.pageForm).then(resp => {
|
||||||
|
this.tableLoading = false
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.tableData = resp.data
|
||||||
|
} else {
|
||||||
|
this.$message.error(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getAllJdh() {
|
||||||
|
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.sessionOptions = resp.data
|
||||||
|
if (this.sessionOptions && this.sessionOptions.length > 0) {
|
||||||
|
this.$set(this.pageForm, 'sessionId', this.sessionOptions[0].id)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
|
await this.getAllJdh()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+190
@@ -0,0 +1,190 @@
|
|||||||
|
const MANUAL_ALLOCATION_DIALOG = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<el-dialog :visible.sync="manualAllocationDialog" title="手动分配名额" width="80%" :close-on-click-modal="false"
|
||||||
|
top="50px">
|
||||||
|
<table-tool label="比例设置">
|
||||||
|
一键比例:
|
||||||
|
<el-input-number
|
||||||
|
style="width: 150px"
|
||||||
|
v-model="unionUserNumOneKeyRatio"
|
||||||
|
:precision="0"
|
||||||
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
placeholder="请输入一键比例"
|
||||||
|
size="small"
|
||||||
|
:max="100"
|
||||||
|
></el-input-number>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
style="margin-left: 6px"
|
||||||
|
@click="applyScaleSettings"
|
||||||
|
>应用比例设置
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
|
||||||
|
<el-table :data="unionLimit" max-height="500">
|
||||||
|
<el-table-column prop="unionName" label="分工会"></el-table-column>
|
||||||
|
<el-table-column prop="memberCount" label="会员人数"></el-table-column>
|
||||||
|
<el-table-column align="center" prop="ratio" label="比例(%)">
|
||||||
|
<template v-slot="{$index,row}">
|
||||||
|
<el-input-number
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="row.ratio"
|
||||||
|
:precision="0"
|
||||||
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
:max="100"
|
||||||
|
@change="(val) => ratioChange(val, $index)"
|
||||||
|
></el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="allocationNum" label="分配人数">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-input-number
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="row.allocationNum"
|
||||||
|
:precision="0"
|
||||||
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
:max="row.memberCount"
|
||||||
|
></el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="seniorTeaNum" label="高级职称专任教师代表数">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-input-number
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="row.seniorTeaNum"
|
||||||
|
:precision="0"
|
||||||
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
:max="row.quota"
|
||||||
|
></el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="ordinaryTeaNum" label="专任教师代表数">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-input-number
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="row.ordinaryTeaNum"
|
||||||
|
:precision="0"
|
||||||
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
:max="row.quota"
|
||||||
|
></el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="femaleNum" label="女代表数">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-input-number
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="row.femaleNum"
|
||||||
|
:precision="0"
|
||||||
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
:max="row.quota"
|
||||||
|
></el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="less45Num" label="45岁以下代表数">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-input-number
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="row.less45Num"
|
||||||
|
:precision="0"
|
||||||
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
:max="row.quota"
|
||||||
|
></el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-row class="mt20" justify="end" type="flex">
|
||||||
|
<el-button type="danger" @click="clearUnionLimit">清空当前已分配</el-button>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="manualAllocationDialog = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="doManualAllocationSub">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
unionUserNumOneKeyRatio: null,
|
||||||
|
sessionId: "",
|
||||||
|
unionLimit: [],
|
||||||
|
manualAllocationDialog: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async doManualAllocationSub() {
|
||||||
|
const hasNull = this.unionLimit.some(v => v.allocationNum === undefined)
|
||||||
|
if (hasNull) {
|
||||||
|
this.$message.warning('还有未设置的数据!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const confirm = await this.$confirm('您确定要分配吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).catch(err => err)
|
||||||
|
if (confirm === 'confirm') {
|
||||||
|
const {
|
||||||
|
code,
|
||||||
|
msg
|
||||||
|
} = await this.$axios.post('/platform/teacherCongress/prepare/quotaAllocation/doQuotaAllocation', {
|
||||||
|
list: JSON.stringify(this.unionLimit),
|
||||||
|
sessionId: this.sessionId
|
||||||
|
})
|
||||||
|
if (code === 0) {
|
||||||
|
this.manualAllocationDialog = false
|
||||||
|
this.$message.success(msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async clearUnionLimit() {
|
||||||
|
const confirm = await this.$confirm('确定要清空分工会人数限制吗, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).catch(err => err)
|
||||||
|
if (confirm === 'confirm') {
|
||||||
|
this.unionLimit = []
|
||||||
|
this.unionUserNumOneKeyRatio = null
|
||||||
|
await this.getUnionUsers()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
applyScaleSettings() {
|
||||||
|
this.unionLimit.forEach(v => {
|
||||||
|
v.ratio = this.unionUserNumOneKeyRatio
|
||||||
|
if (v.ratio) {
|
||||||
|
const num = parseFloat((v.memberCount * v.ratio / 100).toFixed(0))
|
||||||
|
v.allocationNum = (num === 0 ? 1 : num)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
ratioChange(val, index) {
|
||||||
|
const v = this.unionLimit[index]
|
||||||
|
const num = parseFloat((v.memberCount * v.ratio / 100).toFixed(0))
|
||||||
|
v.allocationNum = (num === 0 ? 1 : num)
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
getUnionUsers() {
|
||||||
|
this.$axios.post('/platform/teacherCongress/prepare/quotaAllocation/getUnionLimit', {sessionId: this.sessionId}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.unionLimit = resp.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async onOpen(sessionId) {
|
||||||
|
this.sessionId = sessionId
|
||||||
|
this.manualAllocationDialog = true
|
||||||
|
this.getUnionUsers()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,297 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<snaker-start slot="header" label="子女入学登记" define_key="ZNRXDJ"></snaker-start>
|
||||||
|
<el-form :model="formData" ref="formRef" class="flow-task-form">
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="登记类型" :span="2">
|
||||||
|
<el-form-item prop="registrationType"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-radio-group v-model="formData.registrationType">
|
||||||
|
<el-radio border :label="i.registrationType" :key="i.registrationType"
|
||||||
|
v-for="i in registrationTypeOption">
|
||||||
|
{{i.registrationTypeName}}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="监护人(教工)姓名">
|
||||||
|
{{formData.userName}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="工号">
|
||||||
|
{{formData.loginName}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="手机号码">
|
||||||
|
<el-form-item prop="mobile"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-input v-model="formData.mobile" placeholder="请输入手机号码"
|
||||||
|
maxlength="20"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="所在单位">
|
||||||
|
{{formData.unitName}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="监护人与学生关系">
|
||||||
|
<el-form-item prop="childRelationship"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-select clearable placeholder="请选择监护人与学生关系"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="formData.childRelationship">
|
||||||
|
<el-option :label="item.name" :value="item.code"
|
||||||
|
v-for="item in dict.type.ENROLLMENT_REGISTRATION_CHILD_RELATIONSHIP"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item></el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="子女姓名">
|
||||||
|
<el-form-item prop="childrenName"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-input v-model="formData.childrenName" placeholder="请输入子女姓名"
|
||||||
|
maxlength="30"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="性别">
|
||||||
|
<el-form-item prop="sex"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-select clearable placeholder="请选择性别"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="formData.sex">
|
||||||
|
<el-option label="男" value="男"></el-option>
|
||||||
|
<el-option label="女" value="女"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="身份证号">
|
||||||
|
<el-form-item prop="childrenIdCard"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-input v-model="formData.childrenIdCard" placeholder="请输入身份证号"
|
||||||
|
maxlength="19">
|
||||||
|
<el-button slot="append" icon="el-icon-search" @click="getIsRepeatByIdCard"></el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="现就读学校">
|
||||||
|
<el-form-item prop="childrenCurrentSchool"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-input v-model="formData.childrenCurrentSchool" placeholder="请输入现就读学校"
|
||||||
|
maxlength="30"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="拟报就读学校">
|
||||||
|
<el-form-item prop="childrenPlanSchool"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-select clearable placeholder="请选择拟报就读学校"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="formData.childrenPlanSchool">
|
||||||
|
<el-option :label="item.name" :value="item.code"
|
||||||
|
v-for="item in dict.type.ENROLLMENT_REGISTRATION_CHILDREN_PLAN_SCHOOL"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="子女户口所在地">
|
||||||
|
<el-form-item prop="childrenHuKouAddress"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-input v-model="formData.childrenHuKouAddress" placeholder="请输入子女户口所在地"
|
||||||
|
maxlength="30"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="备注">
|
||||||
|
<el-form-item prop="note"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-input v-model="formData.note" placeholder="请填写户籍所在地派出所"
|
||||||
|
maxlength="50"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item></el-descriptions-item>
|
||||||
|
<el-descriptions-item label="户口簿照片" :span="2">
|
||||||
|
<el-form-item prop="huKouFiles"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<file-upload :upload_number="10" :value.sync="formData.huKouFiles"
|
||||||
|
upload_result_type="url"
|
||||||
|
upload_text="请上传户口首页、户主页、父母和子女页"
|
||||||
|
complete_result upload_mode="drag"
|
||||||
|
upload_result_category="array"></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="子女出生证照片" :span="2">
|
||||||
|
<el-form-item prop="birthCertificateFiles">
|
||||||
|
<file-upload :upload_number="10" :value.sync="formData.birthCertificateFiles"
|
||||||
|
upload_result_type="url"
|
||||||
|
complete_result upload_mode="drag"
|
||||||
|
upload_result_category="array"></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
</el-descriptions>
|
||||||
|
</el-form>
|
||||||
|
<el-row type="flex" justify="end" class="mt20">
|
||||||
|
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||||
|
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
dicts: ["ENROLLMENT_REGISTRATION_CHILD_RELATIONSHIP", "ENROLLMENT_REGISTRATION_CHILDREN_PLAN_SCHOOL"],
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
bizId: GetQueryString("bizId"),
|
||||||
|
taskId: GetQueryString("taskId"),
|
||||||
|
registrationTypeOption: [],
|
||||||
|
childRelationshipOption: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getEnrollmentRegistrationPlan() {
|
||||||
|
this.$axios.post("/platform/enrollmentRegistration/apply/getEnrollmentRegistrationPlan").then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.registrationTypeOption = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 保存
|
||||||
|
onSave() {
|
||||||
|
this.getIsRepeatByIdCard().then(flag => {
|
||||||
|
if (flag) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$confirm("您确定保存吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/enrollmentRegistration/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success("保存成功")
|
||||||
|
window.location.href = '/platform/enrollmentRegistration/applyList/index'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 提交
|
||||||
|
onSubmit() {
|
||||||
|
this.getIsRepeatByIdCard().then(flag => {
|
||||||
|
if (flag) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/enrollmentRegistration/apply/submit', {
|
||||||
|
data: JSON.stringify(this.formData),
|
||||||
|
taskId: GetQueryString("taskId")
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success("提交成功")
|
||||||
|
window.location.href = '/platform/enrollmentRegistration/applyList/index'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
onFinishTask() {
|
||||||
|
this.getIsRepeatByIdCard().then(flag => {
|
||||||
|
if (flag) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/flow/common/executeTask', {
|
||||||
|
data: JSON.stringify({
|
||||||
|
processTaskId: GetQueryString("taskId"),
|
||||||
|
submitType: 5
|
||||||
|
})
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success("提交成功")
|
||||||
|
window.location.href = '/platform/enrollmentRegistration/applyList/index'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getIsRepeatByIdCard() {
|
||||||
|
if (!this.formData.childrenIdCard){
|
||||||
|
this.$message.error("请填写子女身份证号码")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const res = await this.$axios.post('/platform/enrollmentRegistration/apply/getIsRepeatByIdCard', {
|
||||||
|
idCard: this.formData.childrenIdCard,
|
||||||
|
id: this.formData.id
|
||||||
|
})
|
||||||
|
if (res.code === 0) {
|
||||||
|
if (res.data > 0) {
|
||||||
|
this.$message.error("该身份证在本年度已填报!")
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
this.$message.success("该身份证在本年度暂未填报!")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async findOne(id) {
|
||||||
|
const resp = await $.get('/platform/enrollmentRegistration/apply/findOne', {id})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
return resp.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
init() {
|
||||||
|
if (this.bizId) {
|
||||||
|
this.findOne(this.bizId).then(async data => {
|
||||||
|
this.formData = data
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.formData = {
|
||||||
|
userName: this.$store.state.user.username,
|
||||||
|
loginName: this.$store.state.user.loginname,
|
||||||
|
unitName: this.$store.state.user.unit.name,
|
||||||
|
mobile: this.$store.state.user.mobile,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.init()
|
||||||
|
this.getEnrollmentRegistrationPlan()
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="选择年"
|
||||||
|
style="width: 100%"
|
||||||
|
type="year"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="mt10" shadow="never">
|
||||||
|
<table-tool label="填报列表">
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="childrenName" label="子女姓名"></el-table-column>
|
||||||
|
<el-table-column prop="userName" label="教职工姓名"></el-table-column>
|
||||||
|
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||||
|
<el-table-column prop="mobile" label="手机号码"></el-table-column>
|
||||||
|
<el-table-column prop="registrationType" label="登记类型">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<dict-tag :options="dict.type.ENROLLMENT_REGISTRATION_TYPE"
|
||||||
|
:value="row.registrationType"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="applyTime" label="填报时间"></el-table-column>
|
||||||
|
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||||
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||||
|
size="small"></enum-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||||
|
width="300px">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-button @click="openView(row)" size="mini" type="primary">
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="openEdit(row)" size="mini" type="primary"
|
||||||
|
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="doDelete(row.id)" size="mini" type="danger"
|
||||||
|
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
dicts: ["ENROLLMENT_REGISTRATION_TYPE", "ENROLLMENT_REGISTRATION_CHILD_RELATIONSHIP", "ENROLLMENT_REGISTRATION_CHILDREN_PLAN_SCHOOL"],
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/enrollmentRegistration/applyList/pageData",
|
||||||
|
pageForm: {
|
||||||
|
year: moment().format("YYYY"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {},
|
||||||
|
methods: {
|
||||||
|
openView(row) {
|
||||||
|
},
|
||||||
|
openEdit(row) {
|
||||||
|
window.location.href = '/platform/enrollmentRegistration/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||||
|
},
|
||||||
|
onRevoke(row) {
|
||||||
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doDelete(id) {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
const ENROLLMENT_REGISTRATION_INFO = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="process-title">
|
||||||
|
申请信息
|
||||||
|
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||||
|
</div>
|
||||||
|
<el-descriptions :column="3" border>
|
||||||
|
<el-descriptions-item label="监护人(教工)姓名">{{viewData.userName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="手机号码">{{viewData.mobile}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="所在单位">{{viewData.unitName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="监护人与学生关系">
|
||||||
|
<dict-tag :options="dict.type.ENROLLMENT_REGISTRATION_CHILD_RELATIONSHIP"
|
||||||
|
:value="viewData.childRelationship"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="登记类型">
|
||||||
|
<dict-tag :options="dict.type.ENROLLMENT_REGISTRATION_TYPE"
|
||||||
|
:value="viewData.registrationType"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="子女姓名">
|
||||||
|
{{viewData.childrenName}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="性别">
|
||||||
|
{{viewData.sex}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="身份证号">
|
||||||
|
{{viewData.childrenIdCard}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="现就读学校">
|
||||||
|
{{viewData.childrenCurrentSchool}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="拟报就读学校">
|
||||||
|
<dict-tag :options="dict.type.ENROLLMENT_REGISTRATION_CHILDREN_PLAN_SCHOOL"
|
||||||
|
:value="viewData.childrenPlanSchool"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="子女户口所在地">
|
||||||
|
{{viewData.childrenHuKouAddress}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="备注" :span="2">
|
||||||
|
{{viewData.note}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item></el-descriptions-item>
|
||||||
|
<el-descriptions-item :span="3" label="户口簿照片">
|
||||||
|
<file-preview :files="viewData.huKouFiles" complete_result></file-preview>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item :span="3" label="子女出生证照片">
|
||||||
|
<file-preview :files="viewData.birthCertificateFiles" complete_result></file-preview>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<template v-for="(task,index) in doneTasks">
|
||||||
|
<div class="task-panel mt10">
|
||||||
|
<div class="task-panel-header">{{ task.displayName }}</div>
|
||||||
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||||
|
v-if="task.ext.isFirstTaskNode">
|
||||||
|
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||||
|
}}({{task.ext.initiatorAccount}})
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理结果">
|
||||||
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
|
:value="task.ext.submitType"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||||
|
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||||
|
}}({{task.taskFormData.loginName}})
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理结果">
|
||||||
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
|
:value="task.ext.submitType"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode" :span="3">
|
||||||
|
{{
|
||||||
|
task.taskFormData.opinion
|
||||||
|
}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="签字" v-if="!task.ext.isFirstTaskNode" :span="3">
|
||||||
|
<el-image :src="task.ext.tf_userSign" fit="cover" style="height: 60px"
|
||||||
|
v-if="task.ext.tf_userSign"></el-image>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<slot></slot>
|
||||||
|
|
||||||
|
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
dicts: ["ENROLLMENT_REGISTRATION_TYPE", "ENROLLMENT_REGISTRATION_CHILD_RELATIONSHIP", "ENROLLMENT_REGISTRATION_CHILDREN_PLAN_SCHOOL"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
viewData: {},
|
||||||
|
doneTasks: [],
|
||||||
|
row: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 打开
|
||||||
|
onOpen(row) {
|
||||||
|
this.row = row
|
||||||
|
this.getInfo()
|
||||||
|
this.getDoneTasks()
|
||||||
|
},
|
||||||
|
// 获取申请信息
|
||||||
|
getInfo() {
|
||||||
|
this.$axios.post('/platform/enrollmentRegistration/apply/findOne', {id: this.row.id}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.viewData = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取已办任务审批记录
|
||||||
|
getDoneTasks() {
|
||||||
|
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.doneTasks = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查看流程图
|
||||||
|
openChart(){
|
||||||
|
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,200 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="选择年"
|
||||||
|
style="width: 100%"
|
||||||
|
type="year"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="mt10" shadow="never">
|
||||||
|
<table-tool label="申报列表">
|
||||||
|
<el-button @click="openAdd" size="small" class="ml10" type="primary">
|
||||||
|
创建计划
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="year" label="年度"></el-table-column>
|
||||||
|
<el-table-column prop="startTime" label="开始时间"></el-table-column>
|
||||||
|
<el-table-column prop="endTime" label="结束时间"></el-table-column>
|
||||||
|
<el-table-column prop="registrationType" label="登记类型">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<dict-tag :options="registrationTypeOption"
|
||||||
|
:value="row.registrationType"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||||
|
width="300px">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-button @click="openEdit(row)" size="mini" type="primary">
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="doDelete(row.id)" size="mini" type="danger">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</guava>
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="dialogVisible" title="创建计划" width="40%">
|
||||||
|
<el-form :model="formData" :rules="formRules" ref="formRef" label-width="150px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
prop="year" label="年度"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="年度"
|
||||||
|
style="width: 100%"
|
||||||
|
type="year"
|
||||||
|
v-model="formData.year"
|
||||||
|
value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="登记类型" prop="registrationType"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-select placeholder="请选择登记类型"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="formData.registrationType">
|
||||||
|
<el-option
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
v-for="item in registrationTypeOption">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
prop="startTime" label="开始时间"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="开始时间"
|
||||||
|
style="width: 100%"
|
||||||
|
type="datetime"
|
||||||
|
v-model="formData.startTime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
prop="endTime" label="结束时间"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="结束时间"
|
||||||
|
style="width: 100%"
|
||||||
|
type="datetime"
|
||||||
|
v-model="formData.endTime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
prop="greaterThanBirthday" label="大于某个出生日期能填">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="大于某个出生日期能选"
|
||||||
|
style="width: 100%"
|
||||||
|
type="date"
|
||||||
|
v-model="formData.greaterThanBirthday"
|
||||||
|
value-format="yyyy-MM-dd"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
prop="lessThanBirthday" label="小于某个出生日期能填">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="小于某个出生日期能填"
|
||||||
|
style="width: 100%"
|
||||||
|
type="date"
|
||||||
|
v-model="formData.lessThanBirthday"
|
||||||
|
value-format="yyyy-MM-dd"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<el-row type="flex" justify="end" class="mt20">
|
||||||
|
<el-button type="primary" plain @click="dialogVisible=false">关闭</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit">提交</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/enrollmentRegistration/plan/pageData",
|
||||||
|
pageForm: {
|
||||||
|
year: moment().format("YYYY")
|
||||||
|
},
|
||||||
|
dialogVisible: false,
|
||||||
|
registrationTypeOption: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onSubmit() {
|
||||||
|
this.$refs.formRef.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/enrollmentRegistration/plan/onSubmit", {data: JSON.stringify(this.formData)}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success("保存成功")
|
||||||
|
this.doSearch()
|
||||||
|
this.dialogVisible = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
openEdit(row) {
|
||||||
|
const data = clone(row)
|
||||||
|
this.formData = data
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
openAdd() {
|
||||||
|
this.formData = {
|
||||||
|
year: moment().format("YYYY")
|
||||||
|
}
|
||||||
|
this.dialogVisible = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.registrationTypeOption = await this.$businessTool.getDictOptions("ENROLLMENT_REGISTRATION_TYPE")
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,225 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="选择年"
|
||||||
|
style="width: 100%"
|
||||||
|
type="year"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="填报人">
|
||||||
|
<el-input @keyup.enter.native="doSearch" clearable
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="pageForm.searchKeyword">
|
||||||
|
<el-select placeholder="查询类型" slot="prepend"
|
||||||
|
style="width: 100px;"
|
||||||
|
v-model="pageForm.searchName">
|
||||||
|
<el-option label="姓名" value="info.userName"></el-option>
|
||||||
|
<el-option label="工号" value="info.loginName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="登记类型">
|
||||||
|
<el-select clearable placeholder="登记类型"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="pageForm.registrationType">
|
||||||
|
<el-option :label="item.name" :value="item.code"
|
||||||
|
v-for="item in dict.type.ENROLLMENT_REGISTRATION_TYPE"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId" placeholder="请选择分工会" clearable style="width: 100%"
|
||||||
|
@change="flushUnits" @clear="flushUnits">
|
||||||
|
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属单位">
|
||||||
|
<el-select placeholder="所属单位" style="width: 100%" v-model="pageForm.unitId" clearable
|
||||||
|
filterable>
|
||||||
|
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||||
|
<el-radio-button :label="true">已审核</el-radio-button>
|
||||||
|
<el-radio-button :label="false">未审核</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="childrenName" label="子女姓名"></el-table-column>
|
||||||
|
<el-table-column prop="userName" label="教职工姓名"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
|
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||||
|
<el-table-column prop="mobile" label="手机号码"></el-table-column>
|
||||||
|
<el-table-column prop="registrationType" label="登记类型">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<dict-tag :options="dict.type.ENROLLMENT_REGISTRATION_TYPE"
|
||||||
|
:value="row.registrationType"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="applyTime" label="填报时间"></el-table-column>
|
||||||
|
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||||
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||||
|
size="small"></enum-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||||
|
width="300px">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<enrollment-registration-info ref="enrollmentRegistrationInfo">
|
||||||
|
<div v-if="showApprovalForm">
|
||||||
|
<div class="process-title">
|
||||||
|
{{formData.taskName}}
|
||||||
|
</div>
|
||||||
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||||
|
class="flow-task-form">
|
||||||
|
<el-form-item label="审批意见" prop="tf_opinion"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||||
|
</el-form-item>
|
||||||
|
<!--
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"-->
|
||||||
|
<el-form-item label="签字" prop="tf_userSign"
|
||||||
|
>
|
||||||
|
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row type="flex" justify="end">
|
||||||
|
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||||
|
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||||
|
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||||
|
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</enrollment-registration-info>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('../info.js'){}#-->
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
dicts: ["ENROLLMENT_REGISTRATION_TYPE", "ENROLLMENT_REGISTRATION_CHILD_RELATIONSHIP", "ENROLLMENT_REGISTRATION_CHILDREN_PLAN_SCHOOL"],
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/enrollmentRegistration/schoolAudit/pageData",
|
||||||
|
pageForm: {
|
||||||
|
year: moment().format("YYYY"),
|
||||||
|
searchName: "info.userName",
|
||||||
|
approval: false
|
||||||
|
},
|
||||||
|
showApprovalForm: false,
|
||||||
|
unionOptions: [],
|
||||||
|
unitOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"enrollment-registration-info": ENROLLMENT_REGISTRATION_INFO
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openView(row) {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.showApprovalForm = false
|
||||||
|
this.$refs.enrollmentRegistrationInfo.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleTaskAction(val) {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
|
})
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$refs.guava.index()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onRevoke(row) {
|
||||||
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "info"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
openAudit(row) {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.showApprovalForm = true
|
||||||
|
this.formData = {
|
||||||
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
|
}
|
||||||
|
this.$refs.enrollmentRegistrationInfo.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async flushUnits() {
|
||||||
|
this.$set(this.pageForm, "unitId", null)
|
||||||
|
this.units = []
|
||||||
|
if (this.pageForm.unionId) {
|
||||||
|
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
|
this.unitOptions = await this.$businessTool.listUnit()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="选择年"
|
||||||
|
style="width: 100%"
|
||||||
|
type="year"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="填报人">
|
||||||
|
<el-input @keyup.enter.native="doSearch" clearable
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="pageForm.searchKeyword">
|
||||||
|
<el-select placeholder="查询类型" slot="prepend"
|
||||||
|
style="width: 100px;"
|
||||||
|
v-model="pageForm.searchName">
|
||||||
|
<el-option label="姓名" value="info.userName"></el-option>
|
||||||
|
<el-option label="工号" value="info.loginName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="登记类型">
|
||||||
|
<el-select clearable placeholder="登记类型"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="pageForm.registrationType">
|
||||||
|
<el-option :label="item.name" :value="item.code"
|
||||||
|
v-for="item in dict.type.ENROLLMENT_REGISTRATION_TYPE"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId" placeholder="请选择分工会" clearable style="width: 100%"
|
||||||
|
@change="flushUnits" @clear="flushUnits">
|
||||||
|
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属单位">
|
||||||
|
<el-select placeholder="所属单位" style="width: 100%" v-model="pageForm.unitId" clearable
|
||||||
|
filterable>
|
||||||
|
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<el-button @click="doExportExcel" size="mini" type="primary">导出汇总名单
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="doExportZip" size="mini" type="primary">导出附件zip
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="childrenName" label="子女姓名"></el-table-column>
|
||||||
|
<el-table-column prop="userName" label="教职工姓名"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
|
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||||
|
<el-table-column prop="mobile" label="手机号码"></el-table-column>
|
||||||
|
<el-table-column prop="registrationType" label="登记类型">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<dict-tag :options="dict.type.ENROLLMENT_REGISTRATION_TYPE"
|
||||||
|
:value="row.registrationType"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="applyTime" label="填报时间"></el-table-column>
|
||||||
|
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||||
|
width="300px">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button @click="doDelete(row)" size="mini" type="danger"
|
||||||
|
v-if="$auth.hasRoleOr(['SYSADMIN'])">删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<template #view>
|
||||||
|
<enrollment-registration-info ref="enrollmentRegistrationInfo">
|
||||||
|
|
||||||
|
</enrollment-registration-info>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('../info.js'){}#-->
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
dicts: ["ENROLLMENT_REGISTRATION_TYPE", "ENROLLMENT_REGISTRATION_CHILD_RELATIONSHIP", "ENROLLMENT_REGISTRATION_CHILDREN_PLAN_SCHOOL"],
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/enrollmentRegistration/summary/pageData",
|
||||||
|
pageForm: {
|
||||||
|
year: moment().format("YYYY"),
|
||||||
|
searchName: "info.userName",
|
||||||
|
approval: false
|
||||||
|
},
|
||||||
|
showApprovalForm: false,
|
||||||
|
unionOptions: [],
|
||||||
|
unitOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"enrollment-registration-info": ENROLLMENT_REGISTRATION_INFO
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doDelete(row) {
|
||||||
|
this.$confirm("确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/enrollmentRegistration/summary/doDelete", {id: row.id}).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success("删除成功")
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doExportExcel() {
|
||||||
|
this.$downLoad("/platform/enrollmentRegistration/summary/doExportExcel", {
|
||||||
|
data: JSON.stringify(this.pageForm)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doExportZip() {
|
||||||
|
this.$downLoad("/platform/enrollmentRegistration/summary/doExportZip", {
|
||||||
|
data: JSON.stringify(this.pageForm)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
openView(row) {
|
||||||
|
this.$refs.guava.view(() => {
|
||||||
|
this.showApprovalForm = false
|
||||||
|
this.$refs.enrollmentRegistrationInfo.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async flushUnits() {
|
||||||
|
this.$set(this.pageForm, "unitId", null)
|
||||||
|
this.units = []
|
||||||
|
if (this.pageForm.unionId) {
|
||||||
|
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
|
this.unitOptions = await this.$businessTool.listUnit()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,200 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="选择年"
|
||||||
|
style="width: 100%"
|
||||||
|
type="year"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="填报人">
|
||||||
|
<el-input @keyup.enter.native="doSearch" clearable
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="pageForm.searchKeyword">
|
||||||
|
<el-select placeholder="查询类型" slot="prepend"
|
||||||
|
style="width: 100px;"
|
||||||
|
v-model="pageForm.searchName">
|
||||||
|
<el-option label="姓名" value="info.userName"></el-option>
|
||||||
|
<el-option label="工号" value="info.loginName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="登记类型">
|
||||||
|
<el-select clearable placeholder="登记类型"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="pageForm.registrationType">
|
||||||
|
<el-option :label="item.name" :value="item.code"
|
||||||
|
v-for="item in dict.type.ENROLLMENT_REGISTRATION_TYPE"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||||
|
<el-radio-button :label="true">已审核</el-radio-button>
|
||||||
|
<el-radio-button :label="false">未审核</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="childrenName" label="子女姓名"></el-table-column>
|
||||||
|
<el-table-column prop="userName" label="教职工姓名"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
|
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||||
|
<el-table-column prop="mobile" label="手机号码"></el-table-column>
|
||||||
|
<el-table-column prop="registrationType" label="登记类型">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<dict-tag :options="dict.type.ENROLLMENT_REGISTRATION_TYPE"
|
||||||
|
:value="row.registrationType"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="applyTime" label="填报时间"></el-table-column>
|
||||||
|
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||||
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||||
|
size="small"></enum-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||||
|
width="300px">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<enrollment-registration-info ref="enrollmentRegistrationInfo">
|
||||||
|
<div v-if="showApprovalForm">
|
||||||
|
<div class="process-title">
|
||||||
|
{{formData.taskName}}
|
||||||
|
</div>
|
||||||
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||||
|
class="flow-task-form">
|
||||||
|
<el-form-item label="审批意见" prop="tf_opinion"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||||
|
</el-form-item>
|
||||||
|
<!--
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||||
|
-->
|
||||||
|
<el-form-item label="签字" prop="tf_userSign"
|
||||||
|
>
|
||||||
|
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row type="flex" justify="end">
|
||||||
|
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||||
|
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||||
|
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||||
|
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</enrollment-registration-info>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('../info.js'){}#-->
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
dicts: ["ENROLLMENT_REGISTRATION_TYPE", "ENROLLMENT_REGISTRATION_CHILD_RELATIONSHIP", "ENROLLMENT_REGISTRATION_CHILDREN_PLAN_SCHOOL"],
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/enrollmentRegistration/unionAudit/pageData",
|
||||||
|
pageForm: {
|
||||||
|
year: moment().format("YYYY"),
|
||||||
|
searchName: "info.userName",
|
||||||
|
approval:false
|
||||||
|
},
|
||||||
|
showApprovalForm: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"enrollment-registration-info": ENROLLMENT_REGISTRATION_INFO
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openView(row) {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.showApprovalForm = false
|
||||||
|
this.$refs.enrollmentRegistrationInfo.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleTaskAction(val) {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
|
})
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$refs.guava.index()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onRevoke(row) {
|
||||||
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "info"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
openAudit(row) {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.showApprovalForm = true
|
||||||
|
this.formData = {
|
||||||
|
processTaskId: row.taskId,
|
||||||
|
taskName: row.curTaskName
|
||||||
|
}
|
||||||
|
this.$refs.enrollmentRegistrationInfo.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -1,337 +0,0 @@
|
|||||||
<div id="outlay-act-budget-apply-form" v-cloak>
|
|
||||||
<el-form :model="formData" :rules="formRules" ref="formRef" class="flow-task-form">
|
|
||||||
<el-descriptions :column="2" border>
|
|
||||||
<el-descriptions-item label="申报人姓名">{{formData.userName}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="申报时间">{{formData.applyDate}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="联系方式">
|
|
||||||
<el-form-item label="联系方式" prop="mobile">
|
|
||||||
<el-input placeholder="请输入联系方式" v-model="formData.mobile"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="预算类型">
|
|
||||||
<el-form-item label="预算类型" prop="outlayManageSource">
|
|
||||||
<el-select @change="budgetTypeCodeChange"
|
|
||||||
placeholder="请选择预算类型"
|
|
||||||
style="width: 100%;"
|
|
||||||
v-model="formData.outlayManageSource">
|
|
||||||
<el-option
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.code"
|
|
||||||
v-for="item in budgetTypeOption">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="申报(承办)单位">
|
|
||||||
<el-form-item label="申报(承办)单位" prop="helpUnitName"
|
|
||||||
v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(formData.outlayManageSource)">
|
|
||||||
<el-input placeholder="请输入申报(承办)单位" readonly
|
|
||||||
type="text" v-model="formData.helpUnitName"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="申报(承办)单位" prop="unionId"
|
|
||||||
v-if="formData.outlayManageSource==='ACTIVITY_BUDGET_TYPE_TWO'">
|
|
||||||
<el-select v-model="formData.unionId" filterable @change="unionChange"
|
|
||||||
clearable
|
|
||||||
:disabled="!['superadmin'].includes($store.state.user.loginname)"
|
|
||||||
placeholder="请选择工会" style="width: 100%;">
|
|
||||||
<el-option v-for="item in unionList" :label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="申报(承办)单位" prop="clubId"
|
|
||||||
v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
|
|
||||||
<el-select @change="clubChange"
|
|
||||||
placeholder="请选择申报(承办)单位"
|
|
||||||
style="width: 100%;" v-model="formData.clubId">
|
|
||||||
<el-option
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.clubName"
|
|
||||||
:value="item.id"
|
|
||||||
v-for="item in clubOption">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="活动项目">
|
|
||||||
<el-form-item
|
|
||||||
prop="activityMatter" label="活动项目">
|
|
||||||
<el-input maxlength="50" placeholder="请输入项目"
|
|
||||||
v-model="formData.activityMatter"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="活动时间">
|
|
||||||
<el-form-item
|
|
||||||
prop="activityDate" label="活动时间">
|
|
||||||
<el-input maxlength="50" placeholder="请输入活动时间"
|
|
||||||
v-model="formData.activityDate"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="预算金额(元)">
|
|
||||||
<el-form-item
|
|
||||||
prop="declareTotalBudgetMoney" label="预算金额(元)"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-input-number :min="0" :precision="2"
|
|
||||||
:disabled="formData.budgetDetails&&formData.budgetDetails.length>0"
|
|
||||||
placeholder="请输入预算金额"
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="formData.declareTotalBudgetMoney"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
|
|
||||||
<!--<el-descriptions-item label="是否可以重复报销"
|
|
||||||
v-if="['superadmin'].includes($store.state.user.loginname)">
|
|
||||||
<el-form-item
|
|
||||||
prop="isRepeatReimburse" label="是否可以重复报销"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-radio-group v-model="formData.isRepeatReimburse">
|
|
||||||
<el-radio-button :label="true">可以</el-radio-button>
|
|
||||||
<el-radio-button :label="false">不可以</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>-->
|
|
||||||
<el-descriptions-item label="是否属于校工会预算"
|
|
||||||
v-if="['ACTIVITY_BUDGET_TYPE_TWO','ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)
|
|
||||||
&&['superadmin'].includes($store.state.user.loginname)" :span="2">
|
|
||||||
<el-form-item
|
|
||||||
prop="isSchoolBudget" label="是否属于校工会预算"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-radio-group v-model="formData.isSchoolBudget">
|
|
||||||
<el-radio-button :label="true">属于</el-radio-button>
|
|
||||||
<el-radio-button :label="false">不属于</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item v-if="!['ACTIVITY_BUDGET_TYPE_TWO','ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)
|
|
||||||
&&!['superadmin'].includes($store.state.user.loginname)"></el-descriptions-item>
|
|
||||||
|
|
||||||
<el-descriptions-item label="校工会预算" v-if="formData.isSchoolBudget" :span="2">
|
|
||||||
<el-form-item
|
|
||||||
prop="schoolBudgetId" label="校工会预算"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
|
||||||
>
|
|
||||||
<el-select v-model="formData.schoolBudgetId" filterable
|
|
||||||
default-first-option
|
|
||||||
placeholder="请选择校工会预算" style="width: 100%">
|
|
||||||
<el-option :label="item.activityMatter"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
v-for="item in activityList"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
|
|
||||||
<el-descriptions-item label="活动内容(如训练、装备等)" :span="2">
|
|
||||||
<el-form-item
|
|
||||||
prop="activityContent" label="活动内容(如训练、装备等)">
|
|
||||||
<text-editor v-model="formData.activityContent"></text-editor>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
</el-form>
|
|
||||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @save-draft="handleSaveDraft"
|
|
||||||
@cancel="handleCancel"></snaker-flow-task-form-action>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
const vue = new Vue({
|
|
||||||
el: '#outlay-act-budget-apply-form',
|
|
||||||
store,
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
id: GetQueryString("businessId"),
|
|
||||||
activityList: [],
|
|
||||||
budgetTypeOption: [],
|
|
||||||
unionList: [],
|
|
||||||
clubOption: [],
|
|
||||||
formRules: {
|
|
||||||
outlayManageSource: [{
|
|
||||||
required: true,
|
|
||||||
message: '必填',
|
|
||||||
trigger: ['blur', 'change']
|
|
||||||
}],
|
|
||||||
activityMatter: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
fundsUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
clubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
helpUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
unionId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
},
|
|
||||||
formData: {
|
|
||||||
budgetDetails: []
|
|
||||||
},
|
|
||||||
dialogVisible: false,
|
|
||||||
editType: "apply"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async findOne(id) {
|
|
||||||
const resp = await $.get('/platform/activity/budget/applyList/findOne', {id})
|
|
||||||
if (resp.code === 0) {
|
|
||||||
if (resp.data.budgets) {
|
|
||||||
resp.data.budgets = JSON.parse(resp.data.budgets)
|
|
||||||
}
|
|
||||||
return resp.data
|
|
||||||
}
|
|
||||||
},
|
|
||||||
init() {
|
|
||||||
if (this.id) {
|
|
||||||
this.findOne(this.id).then(data => {
|
|
||||||
this.formData = data
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.formData = {
|
|
||||||
isSchoolBudget: false,
|
|
||||||
isRepeatReimburse: true,
|
|
||||||
budgetDetails: [],
|
|
||||||
applyDate: this.$moment().format('YYYY-MM-DD'),
|
|
||||||
userName: this.$store.state.user.username,
|
|
||||||
mobile: this.$store.state.user.mobile,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
clubChange(val) {
|
|
||||||
const club = this.clubOption.find(c => c.id === val)
|
|
||||||
this.formData.helpUnitName = club.clubName
|
|
||||||
},
|
|
||||||
unionChange(id) {
|
|
||||||
if (id) {
|
|
||||||
const union = this.unionList.find(c => c.id === id)
|
|
||||||
this.$set(this.formData, "helpUnitName", union.unionname)
|
|
||||||
} else {
|
|
||||||
this.$set(this.formData, "helpUnitName", '')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
budgetTypeCodeChange(val) {
|
|
||||||
if (val === "ACTIVITY_BUDGET_TYPE_ONE") {
|
|
||||||
this.$set(this.formData, "helpUnitName", "校工会")
|
|
||||||
} else if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
|
|
||||||
this.$set(this.formData, "helpUnitName", this.$store.state.user.union.name)
|
|
||||||
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
|
|
||||||
} else if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(val)) {
|
|
||||||
this.$set(this.formData, "helpUnitName", '')
|
|
||||||
this.$set(this.formData, "clubId", '')
|
|
||||||
} else {
|
|
||||||
this.$set(this.formData, "helpUnitName", "校工会")
|
|
||||||
}
|
|
||||||
if (val) {
|
|
||||||
const budgetType = this.budgetTypeOption.find(b => b.code === val)
|
|
||||||
this.$set(this.formData, "budgetTypeId", budgetType.code)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async getActivityBudgetType() {
|
|
||||||
const data = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
|
||||||
let budgetTypeOption = []
|
|
||||||
if (this.$auth.hasRoleOr(['SYSADMIN'])) {
|
|
||||||
this.budgetTypeOption = data
|
|
||||||
} else {
|
|
||||||
if (this.$auth.hasRoleOr(['SCHOOL_UNION_ADMIN'])) {
|
|
||||||
data.map(v => {
|
|
||||||
if (["ACTIVITY_BUDGET_TYPE_ONE"].includes(v.code)) {
|
|
||||||
budgetTypeOption.push(v)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (this.$auth.hasRoleOr(['BRANCH_UNION_ADMIN', 'BRANCH_UNION_CHAIRMAN'])) {
|
|
||||||
data.map(v => {
|
|
||||||
if (["ACTIVITY_BUDGET_TYPE_TWO"].includes(v.code)) {
|
|
||||||
budgetTypeOption.push(v)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (this.$auth.hasRoleOr(['CLUB_PRESIDENT'])) {
|
|
||||||
data.map(v => {
|
|
||||||
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
|
|
||||||
budgetTypeOption.push(v)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.budgetTypeOption = budgetTypeOption
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
getSchoolBudget() {
|
|
||||||
this.$axios.post("/platform/activity/budget/apply/getSchoolBudget").then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.activityList = res.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
handleTaskAction(val) {
|
|
||||||
this.$refs.formRef.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$confirm('确定要提交数据吗?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios
|
|
||||||
.post("/flow/common/startInstanceAndExecute", {
|
|
||||||
...val,
|
|
||||||
bizData: JSON.stringify(this.formData)
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success("操作成功")
|
|
||||||
// 发送完成消息
|
|
||||||
window.parent.postMessage(
|
|
||||||
{
|
|
||||||
type: "task-complete"
|
|
||||||
},
|
|
||||||
"*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
handleSaveDraft(val) {
|
|
||||||
this.$refs.formRef.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$axios
|
|
||||||
.post("/flow/common/startInstance", {
|
|
||||||
...val,
|
|
||||||
bizData: JSON.stringify(this.formData)
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success("操作成功")
|
|
||||||
// 发送完成消息
|
|
||||||
window.parent.postMessage(
|
|
||||||
{
|
|
||||||
type: "task-complete"
|
|
||||||
},
|
|
||||||
"*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
handleCancel() {
|
|
||||||
this.$confirm('取消将关闭当前页面并不会保存, 是否继续?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
window.close()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
this.init()
|
|
||||||
await this.getActivityBudgetType()
|
|
||||||
await this.getSchoolBudget()
|
|
||||||
this.unionList = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
@@ -112,8 +112,8 @@ layout("/layouts/platform.html"){
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item v-if="!['ACTIVITY_BUDGET_TYPE_TWO','ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)
|
<!-- <el-descriptions-item v-if="!['ACTIVITY_BUDGET_TYPE_TWO','ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)
|
||||||
&&!['superadmin'].includes($store.state.user.loginname)"></el-descriptions-item>
|
&&!['superadmin'].includes($store.state.user.loginname)"></el-descriptions-item>-->
|
||||||
|
|
||||||
<el-descriptions-item label="校工会预算" v-if="formData.isSchoolBudget" :span="2">
|
<el-descriptions-item label="校工会预算" v-if="formData.isSchoolBudget" :span="2">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
@@ -325,12 +325,14 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.init()
|
this.init()
|
||||||
await this.getActivityBudgetType()
|
await this.getActivityBudgetType()
|
||||||
await this.getSchoolBudget()
|
await this.getSchoolBudget()
|
||||||
this.unionList = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
this.unionList = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||||
|
this.clubOption = await this.$businessTool.listCLubByRole()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+22
-16
@@ -21,20 +21,6 @@ layout("/layouts/platform.html"){
|
|||||||
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
|
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
|
||||||
clearable></el-input>
|
clearable></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="协会"
|
|
||||||
v-if="!pageForm.outlayManageSource||pageForm.outlayManageSource==='ACTIVITY_BUDGET_TYPE_THREE'">
|
|
||||||
<el-select clearable
|
|
||||||
placeholder="请选择协会"
|
|
||||||
style="width: 100%;" v-model="pageForm.clubId">
|
|
||||||
<el-option
|
|
||||||
:key="item.stid"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.stid"
|
|
||||||
v-for="item in clubOption">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
|
|
||||||
<search-item label="分工会"
|
<search-item label="分工会"
|
||||||
v-if="!pageForm.outlayManageSource||pageForm.outlayManageSource==='ACTIVITY_BUDGET_TYPE_TWO'">
|
v-if="!pageForm.outlayManageSource||pageForm.outlayManageSource==='ACTIVITY_BUDGET_TYPE_TWO'">
|
||||||
<el-select v-model="pageForm.unionId" filterable
|
<el-select v-model="pageForm.unionId" filterable
|
||||||
@@ -45,6 +31,21 @@ layout("/layouts/platform.html"){
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
<search-item label="协会"
|
||||||
|
v-if="!pageForm.outlayManageSource||pageForm.outlayManageSource==='ACTIVITY_BUDGET_TYPE_THREE'">
|
||||||
|
<el-select clearable
|
||||||
|
placeholder="请选择协会"
|
||||||
|
style="width: 100%;" v-model="pageForm.clubId">
|
||||||
|
<el-option
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.clubName"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in clubOption">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</search>
|
</search>
|
||||||
|
|
||||||
@@ -93,9 +94,13 @@ layout("/layouts/platform.html"){
|
|||||||
<dict-tag :options="budgetTypeOption"
|
<dict-tag :options="budgetTypeOption"
|
||||||
:value="row.outlayManageSource"></dict-tag>
|
:value="row.outlayManageSource"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot="{row}" v-else-if="column.prop==='note'">
|
||||||
|
<span v-if="row.schoolBudgetId">费用使用校工会中的:{{row.activityMatterTwo}}</span>
|
||||||
|
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||||
width="300">
|
width="200">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button @click="openView(row)" size="mini" type="primary">
|
<el-button @click="openView(row)" size="mini" type="primary">
|
||||||
查看
|
查看
|
||||||
@@ -144,7 +149,7 @@ layout("/layouts/platform.html"){
|
|||||||
clubId: "",
|
clubId: "",
|
||||||
},
|
},
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: 'year', label: '年度', width: '80'},
|
{prop: 'year', label: '年度', width: '80', fixed: "left"},
|
||||||
{prop: 'userName', label: '申报人姓名', fixed: "left"},
|
{prop: 'userName', label: '申报人姓名', fixed: "left"},
|
||||||
{prop: 'loginName', label: '申报人工号', fixed: "left"},
|
{prop: 'loginName', label: '申报人工号', fixed: "left"},
|
||||||
{prop: 'mobile', label: '联系方式', width: '120'},
|
{prop: 'mobile', label: '联系方式', width: '120'},
|
||||||
@@ -153,6 +158,7 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'activityMatter', label: '活动项目', width: '300'},
|
{prop: 'activityMatter', label: '活动项目', width: '300'},
|
||||||
{prop: 'declareTotalBudgetMoney', label: '申报预算金额'},
|
{prop: 'declareTotalBudgetMoney', label: '申报预算金额'},
|
||||||
{prop: 'totalBudgetMoney', label: '审核预算金额'},
|
{prop: 'totalBudgetMoney', label: '审核预算金额'},
|
||||||
|
{prop: 'note', label: '备注'},
|
||||||
{prop: 'applyDate', label: '申报时间'},
|
{prop: 'applyDate', label: '申报时间'},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ const ACTIVITY_BUDGET_INFO = {
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="最终预算金额(元)">{{viewData.totalBudgetMoney}}</el-descriptions-item>
|
<el-descriptions-item label="最终预算金额(元)">{{viewData.totalBudgetMoney}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="申报时间">{{viewData.applyDate}}</el-descriptions-item>
|
<el-descriptions-item label="申报时间">{{viewData.applyDate}}</el-descriptions-item>
|
||||||
<el-descriptions-item :span="2"></el-descriptions-item>
|
<el-descriptions-item v-if="viewData.isSchoolBudget" label="校工会预算">{{viewData.activityMatterTwo}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item v-if="!viewData.isSchoolBudget"></el-descriptions-item>
|
||||||
|
<el-descriptions-item></el-descriptions-item>
|
||||||
<el-descriptions-item label="活动内容(如训练、装备等)" :span="3">
|
<el-descriptions-item label="活动内容(如训练、装备等)" :span="3">
|
||||||
<div v-html="viewData.activityContent"></div>
|
<div v-html="viewData.activityContent"></div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|||||||
+19
-4
@@ -24,13 +24,13 @@ layout("/layouts/platform.html"){
|
|||||||
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
|
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
|
||||||
clearable></el-input>
|
clearable></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="分工会">
|
<search-item label="分工会"
|
||||||
<el-select v-model="formData.unionId" filterable
|
v-if="!pageForm.outlayManageSource||pageForm.outlayManageSource==='ACTIVITY_BUDGET_TYPE_TWO'">
|
||||||
|
<el-select v-model="pageForm.unionId" filterable
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择工会" style="width: 100%;">
|
placeholder="请选择工会" style="width: 100%;">
|
||||||
<el-option v-for="item in unionList" :label="item.name"
|
<el-option v-for="item in unionList" :label="item.name"
|
||||||
:value="item.id"
|
:value="item.id">
|
||||||
:key="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
@@ -38,6 +38,15 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<table-tool label="申报列表">
|
<table-tool label="申报列表">
|
||||||
|
<el-radio-group @change="budgetTypeCodeChange" size="small"
|
||||||
|
style="margin-left: 10px;"
|
||||||
|
v-model="pageForm.outlayManageSource">
|
||||||
|
<el-radio-button :label="item.code"
|
||||||
|
:key="item.code" v-for="item in budgetTypeOption">
|
||||||
|
{{item.name}}
|
||||||
|
</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
|
||||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||||
<el-radio-button :label="true">已审核</el-radio-button>
|
<el-radio-button :label="true">已审核</el-radio-button>
|
||||||
<el-radio-button :label="false">未审核</el-radio-button>
|
<el-radio-button :label="false">未审核</el-radio-button>
|
||||||
@@ -138,6 +147,11 @@ layout("/layouts/platform.html"){
|
|||||||
"activity-budget-info": ACTIVITY_BUDGET_INFO
|
"activity-budget-info": ACTIVITY_BUDGET_INFO
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
budgetTypeCodeChange() {
|
||||||
|
this.$set(this.pageForm, "unionId", '')
|
||||||
|
this.$set(this.pageForm, "clubId", '')
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
onRevoke(row) {
|
onRevoke(row) {
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
@@ -197,6 +211,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
||||||
|
this.budgetTypeOption.unshift({name: "全部类型", code: ""})
|
||||||
this.unionList = await this.$businessTool.listUnion()
|
this.unionList = await this.$businessTool.listUnion()
|
||||||
this.pageData()
|
this.pageData()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,203 +0,0 @@
|
|||||||
<div id="outlay-reimburse-apply-form" v-cloak>
|
|
||||||
<el-form :model="formData" ref="formRef" class="flow-task-form">
|
|
||||||
<el-descriptions :column="2" border>
|
|
||||||
<el-descriptions-item label="活动类型" :span="2">
|
|
||||||
<el-form-item label="活动类型" prop="outlayManageSource"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-radio-group v-model="formData.outlayManageSource" @change="outlayManageSourceChange">
|
|
||||||
<el-radio border :label="i.code" :key="i.code" v-for="i in budgetTypeOption">
|
|
||||||
{{i.name}}
|
|
||||||
</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="申报人姓名">{{formData.userName}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="申报人工号">{{formData.loginName}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="联系方式">
|
|
||||||
<el-form-item label="联系方式" prop="mobile"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-input v-model="formData.mobile" placeholder="请输入联系方式"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="所属协会"
|
|
||||||
v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
|
|
||||||
<el-form-item label="所属协会" prop="clubId"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-select v-model="formData.clubId" @change="getBudgetMoneyOrActivity"
|
|
||||||
style="width: 100%"
|
|
||||||
placeholder="请选择所属协会">
|
|
||||||
<el-option
|
|
||||||
v-for="item in clubList"
|
|
||||||
:key="item.clubid"
|
|
||||||
:label="item.clubName"
|
|
||||||
:value="item.clubid">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="经费余额">
|
|
||||||
<el-form-item label="经费余额" prop="budgetMoney">
|
|
||||||
<el-input v-model="budgetMoney" readonly></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="活动事项"
|
|
||||||
v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
|
|
||||||
<el-form-item label="活动事项" prop="activityMatter"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-input v-model="formData.activityMatter" placeholder="请输入活动事项"
|
|
||||||
maxlength="100"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="活动事项"
|
|
||||||
v-if="!['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
|
|
||||||
<el-form-item label="活动事项" prop="budgetId"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-select v-model="formData.budgetId" filterable
|
|
||||||
@change="budgetIdChange"
|
|
||||||
default-first-option
|
|
||||||
placeholder="请选择项目名称" style="width: 100%">
|
|
||||||
<el-option :label="item.activityMatter"
|
|
||||||
:value="item.id"
|
|
||||||
v-for="item in activityList"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item v-if="!['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)"></el-descriptions-item>
|
|
||||||
<el-descriptions-item label="金额":span="2">
|
|
||||||
<el-form-item label="金额" prop="money"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-input v-model="formData.money" :placeholder="moneyPlaceholder"
|
|
||||||
type="number"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="活动时间">
|
|
||||||
<el-form-item label="活动时间" prop="activityTime"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-date-picker v-model="formData.activityTime"
|
|
||||||
placeholder="活动时间"
|
|
||||||
style="width: 100%" type="date"
|
|
||||||
value-format="yyyy-MM-dd">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item
|
|
||||||
v-if="!['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)"></el-descriptions-item>
|
|
||||||
<el-descriptions-item label="支付内容" :span="2">
|
|
||||||
<el-form-item label="支付内容" prop="paymentContent"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<el-input v-model="formData.paymentContent" :autosize="{ minRows: 4, maxRows: 8}"
|
|
||||||
maxlength="500"
|
|
||||||
placeholder="请填写支付内容" type="textarea"></el-input>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="附件" :span="2">
|
|
||||||
<el-form-item label="附件" prop="files"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<file-upload :upload_number="10" :value.sync="formData.files"
|
|
||||||
upload_result_type="url"
|
|
||||||
complete_result upload_mode="drag"
|
|
||||||
upload_result_category="array"></file-upload>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="签字" :span="2">
|
|
||||||
<el-form-item label="签字" prop="userSign"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<pc-signature v-model="formData.userSign"></pc-signature>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
</el-form>
|
|
||||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @save-draft="handleSaveDraft"
|
|
||||||
@cancel="handleCancel"></snaker-flow-task-form-action>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
const vue = new Vue({
|
|
||||||
el: '#outlay-reimburse-apply-form',
|
|
||||||
store,
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
id: GetQueryString("businessId"),
|
|
||||||
formData: {},
|
|
||||||
budgetTypeOption: [],
|
|
||||||
clubList: [],
|
|
||||||
activityList: [],
|
|
||||||
moneyPlaceholder: "请输入金额",
|
|
||||||
budgetMoney: 0,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
handleTaskAction(val) {
|
|
||||||
this.$refs.formRef.validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
this.$confirm('确定要提交数据吗?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios.post("/platform/outlay/reimburse/apply/bxAddValidate",this.formData)
|
|
||||||
// this.$axios
|
|
||||||
// .post("/flow/common/startInstanceAndExecute", {
|
|
||||||
// ...val,
|
|
||||||
// bizData: JSON.stringify(this.formData)
|
|
||||||
// })
|
|
||||||
// .then((res) => {
|
|
||||||
// if (res.code === 0) {
|
|
||||||
// this.$message.success("操作成功")
|
|
||||||
// // 发送完成消息
|
|
||||||
// window.parent.postMessage(
|
|
||||||
// {
|
|
||||||
// type: "task-complete"
|
|
||||||
// },
|
|
||||||
// "*"
|
|
||||||
// )
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleSaveDraft(val) {
|
|
||||||
this.$confirm('确定要提交数据吗?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios.post("/platform/outlay/reimburse/apply/bxAddValidate",this.formData)
|
|
||||||
/* this.$axios
|
|
||||||
.post("/flow/common/startInstance", {
|
|
||||||
...val,
|
|
||||||
bizData: JSON.stringify(this.formData)
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success("操作成功")
|
|
||||||
// 发送完成消息
|
|
||||||
window.parent.postMessage(
|
|
||||||
{
|
|
||||||
type: "task-complete"
|
|
||||||
},
|
|
||||||
"*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})*/
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleCancel() {
|
|
||||||
this.$confirm('取消将关闭当前页面并不会保存, 是否继续?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
window.close()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
this.init()
|
|
||||||
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
@@ -5,7 +5,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<snaker-start slot="header" label="年度预算申报" define_key="FYBXSQ"></snaker-start>
|
<snaker-start slot="header" label="费用报销申请" define_key="FYBXSQ"></snaker-start>
|
||||||
<el-form :model="formData" ref="formRef" class="flow-task-form">
|
<el-form :model="formData" ref="formRef" class="flow-task-form">
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border>
|
||||||
<el-descriptions-item label="活动类型" :span="2">
|
<el-descriptions-item label="活动类型" :span="2">
|
||||||
@@ -71,11 +71,17 @@ layout("/layouts/platform.html"){
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item
|
<el-descriptions-item
|
||||||
v-if="!['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)"></el-descriptions-item>
|
v-if="!['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)"></el-descriptions-item>
|
||||||
<el-descriptions-item label="金额" :span="2">
|
<el-descriptions-item label="活动人数">
|
||||||
|
<el-form-item label="活动人数" prop="activityNumber"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-input-number v-model="formData.activityNumber" :min="0"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="金额">
|
||||||
<el-form-item label="金额" prop="money"
|
<el-form-item label="金额" prop="money"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
<el-input v-model="formData.money" :placeholder="moneyPlaceholder"
|
<el-input-number :min="1" v-model="formData.money"
|
||||||
type="number"></el-input>
|
:placeholder="moneyPlaceholder"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="活动时间">
|
<el-descriptions-item label="活动时间">
|
||||||
@@ -109,8 +115,9 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="签字" :span="2">
|
<el-descriptions-item label="签字" :span="2">
|
||||||
|
<!-- :rules="[{required:true,message:'必填',trigger:['change','blur']}]"-->
|
||||||
<el-form-item label="签字" prop="userSign"
|
<el-form-item label="签字" prop="userSign"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
>
|
||||||
<pc-signature v-model="formData.userSign"></pc-signature>
|
<pc-signature v-model="formData.userSign"></pc-signature>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -224,14 +231,14 @@ layout("/layouts/platform.html"){
|
|||||||
const data = this.activityList.find(a => a.id === val)
|
const data = this.activityList.find(a => a.id === val)
|
||||||
if (this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_TWO") {
|
if (this.formData.outlayManageSource === "ACTIVITY_BUDGET_TYPE_TWO") {
|
||||||
//如果是分工会
|
//如果是分工会
|
||||||
|
const money = await this.getBxMoneyByBudgetId(val)
|
||||||
if (data.isSchoolBudget) {
|
if (data.isSchoolBudget) {
|
||||||
//如果这一条分工会活动预算金额是属于校工会的
|
//如果这一条分工会活动预算金额是属于校工会的
|
||||||
this.moneyPlaceholder = "预算金额" + data.totalBudgetMoney + "元"
|
this.moneyPlaceholder = "预算金额" + data.totalBudgetMoney + "元,已报销金额:" + money
|
||||||
} else {
|
} else {
|
||||||
//如果这一条分工会活动活动,并且预算金额也是自己分工会的
|
//如果这一条分工会活动活动,并且预算金额也是自己分工会的
|
||||||
if (data.isRepeatReimburse) {
|
if (data.isRepeatReimburse) {
|
||||||
//如果这一条活动预算可以重复报销
|
//如果这一条活动预算可以重复报销
|
||||||
const money = await this.getBxMoneyByBudgetId(val)
|
|
||||||
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,已报销金额:" + money + ",不能超过20%"
|
this.moneyPlaceholder = "预算金额:" + data.totalBudgetMoney + "元,已报销金额:" + money + ",不能超过20%"
|
||||||
} else {
|
} else {
|
||||||
//如果如果不能重复报销暂无判断
|
//如果如果不能重复报销暂无判断
|
||||||
@@ -295,7 +302,9 @@ layout("/layouts/platform.html"){
|
|||||||
return resp.data
|
return resp.data
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
init() {
|
async init() {
|
||||||
|
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
||||||
|
const budgetTypeOption = []
|
||||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -341,7 +350,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.init()
|
this.init()
|
||||||
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,6 +6,18 @@ layout("/layouts/platform.html"){
|
|||||||
<div id="app">
|
<div id="app">
|
||||||
<guava ref="guava">
|
<guava ref="guava">
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="选择年"
|
||||||
|
style="width: 100%"
|
||||||
|
type="year"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<table-tool>
|
<table-tool>
|
||||||
@@ -58,9 +70,15 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<template #view>
|
||||||
|
<outlay-reimburse-info ref="outlayReimburseInfo"></outlay-reimburse-info>
|
||||||
|
|
||||||
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
<!--#include('../info.js'){}#-->
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
store,
|
store,
|
||||||
@@ -68,12 +86,21 @@ layout("/layouts/platform.html"){
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageDataUrl: "/platform/outlay/reimburse/applyList/pageData",
|
pageDataUrl: "/platform/outlay/reimburse/applyList/pageData",
|
||||||
budgetTypeOption: []
|
budgetTypeOption: [],
|
||||||
|
pageForm: {
|
||||||
|
year: moment().format("YYYY"),
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"outlay-reimburse-info": OUTLAY_REIMBURSE_INFO
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openView(row) {
|
openView(row) {
|
||||||
|
this.$refs.guava.view(() => {
|
||||||
|
this.showApprovalForm = false
|
||||||
|
this.$refs.outlayReimburseInfo.onOpen(row)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
openEdit(row) {
|
openEdit(row) {
|
||||||
window.location.href = '/platform/outlay/reimburse/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
window.location.href = '/platform/outlay/reimburse/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const OUTLAY_REIMBURSE_INFO = {
|
|||||||
<el-descriptions-item label="活动时间">
|
<el-descriptions-item label="活动时间">
|
||||||
{{viewData.activityTime}}
|
{{viewData.activityTime}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item></el-descriptions-item>
|
<el-descriptions-item label="活动人数">{{viewData.activityNumber}}</el-descriptions-item>
|
||||||
<el-descriptions-item></el-descriptions-item>
|
<el-descriptions-item></el-descriptions-item>
|
||||||
<el-descriptions-item label="支付内容" :span="3">
|
<el-descriptions-item label="支付内容" :span="3">
|
||||||
<div style="white-space: pre-line">{{viewData.paymentContent}}</div>
|
<div style="white-space: pre-line">{{viewData.paymentContent}}</div>
|
||||||
@@ -61,7 +61,7 @@ const OUTLAY_REIMBURSE_INFO = {
|
|||||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
:value="task.ext.submitType"></dict-tag>
|
:value="task.ext.submitType"></dict-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="明细类" v-if="!task.ext.isFirstTaskNode&&index===2" :span="3">
|
<el-descriptions-item label="明细类" v-if="!task.ext.isFirstTaskNode&&task.taskName==='930aed03-677b-41d7-8920-7d9b45a7abc9'" :span="3">
|
||||||
<dict-tag :options="detailsTypeOption"
|
<dict-tag :options="detailsTypeOption"
|
||||||
:value="task.ext.detailsTypeId"></dict-tag>
|
:value="task.ext.detailsTypeId"></dict-tag>
|
||||||
|
|
||||||
|
|||||||
+32
-2
@@ -17,6 +17,32 @@ layout("/layouts/platform.html"){
|
|||||||
value-format="yyyy">
|
value-format="yyyy">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
<search-item label="经办人">
|
||||||
|
<el-input @keyup.enter.native="doSearch" clearable
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="pageForm.searchKeyword">
|
||||||
|
<el-select placeholder="查询类型" slot="prepend"
|
||||||
|
style="width: 100px;"
|
||||||
|
v-model="pageForm.searchName">
|
||||||
|
<el-option label="姓名" value="info.userName"></el-option>
|
||||||
|
<el-option label="工号" value="info.loginName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId" placeholder="请选择分工会" clearable style="width: 100%">
|
||||||
|
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="活动类型">
|
||||||
|
<el-select clearable placeholder="活动类型"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="pageForm.outlayManageSource">
|
||||||
|
<el-option :label="item.name" :value="item.code"
|
||||||
|
v-for="item in budgetTypeOption"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
</search>
|
</search>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
@@ -78,8 +104,9 @@ layout("/layouts/platform.html"){
|
|||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- :rules="[{required:true,message:'必填',trigger:['change','blur']}]"-->
|
||||||
<el-form-item label="签字" prop="tf_userSign"
|
<el-form-item label="签字" prop="tf_userSign"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
>
|
||||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -104,9 +131,11 @@ layout("/layouts/platform.html"){
|
|||||||
return {
|
return {
|
||||||
pageDataUrl: "/platform/outlay/reimburse/schoolCnAudit/pageData",
|
pageDataUrl: "/platform/outlay/reimburse/schoolCnAudit/pageData",
|
||||||
budgetTypeOption: [],
|
budgetTypeOption: [],
|
||||||
|
unionOptions: [],
|
||||||
pageForm: {
|
pageForm: {
|
||||||
year: moment().format("YYYY"),
|
year: moment().format("YYYY"),
|
||||||
approval: false
|
approval: false,
|
||||||
|
searchName: "info.userName",
|
||||||
},
|
},
|
||||||
showApprovalForm: false
|
showApprovalForm: false
|
||||||
|
|
||||||
@@ -173,6 +202,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
this.pageData()
|
this.pageData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
+50
-2
@@ -17,6 +17,44 @@ layout("/layouts/platform.html"){
|
|||||||
value-format="yyyy">
|
value-format="yyyy">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
<search-item label="经办人">
|
||||||
|
<el-input @keyup.enter.native="doSearch" clearable
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="pageForm.searchKeyword">
|
||||||
|
<el-select placeholder="查询类型" slot="prepend"
|
||||||
|
style="width: 100px;"
|
||||||
|
v-model="pageForm.searchName">
|
||||||
|
<el-option label="姓名" value="info.userName"></el-option>
|
||||||
|
<el-option label="工号" value="info.loginName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId" placeholder="请选择分工会" clearable style="width: 100%">
|
||||||
|
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="活动类型">
|
||||||
|
<el-select clearable placeholder="活动类型"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="pageForm.outlayManageSource">
|
||||||
|
<el-option :label="item.name" :value="item.code"
|
||||||
|
v-for="item in budgetTypeOption"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="明细类">
|
||||||
|
<el-select v-model="pageForm.detailsTypeId"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择明细类" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in detailsTypeOption"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
</search>
|
</search>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
@@ -45,6 +83,12 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="money" label="金额"></el-table-column>
|
<el-table-column prop="money" label="金额"></el-table-column>
|
||||||
|
<el-table-column prop="detailsTypeId" label="明细类">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<dict-tag :options="detailsTypeOption"
|
||||||
|
:value="row.detailsTypeId"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="applyTime" label="申报时间"></el-table-column>
|
<el-table-column prop="applyTime" label="申报时间"></el-table-column>
|
||||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
@@ -78,8 +122,9 @@ layout("/layouts/platform.html"){
|
|||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- :rules="[{required:true,message:'必填',trigger:['change','blur']}]"-->
|
||||||
<el-form-item label="签字" prop="tf_userSign"
|
<el-form-item label="签字" prop="tf_userSign"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
>
|
||||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -190,12 +235,14 @@ layout("/layouts/platform.html"){
|
|||||||
budgetTypeOption: [],
|
budgetTypeOption: [],
|
||||||
pageForm: {
|
pageForm: {
|
||||||
year: moment().format("YYYY"),
|
year: moment().format("YYYY"),
|
||||||
approval: false
|
approval: false,
|
||||||
|
searchName: "info.userName",
|
||||||
},
|
},
|
||||||
showApprovalForm: false,
|
showApprovalForm: false,
|
||||||
passDialogVisible: false,
|
passDialogVisible: false,
|
||||||
detailsTypeOption: [],
|
detailsTypeOption: [],
|
||||||
detailsTypeList: [],
|
detailsTypeList: [],
|
||||||
|
unionOptions: [],
|
||||||
detailsTypeDialogVisible: false
|
detailsTypeDialogVisible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -328,6 +375,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
||||||
this.detailsTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_DETAILS_TYPE")
|
this.detailsTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_DETAILS_TYPE")
|
||||||
this.detailsTypeList = clone(this.detailsTypeOption)
|
this.detailsTypeList = clone(this.detailsTypeOption)
|
||||||
|
|||||||
+53
-4
@@ -17,6 +17,44 @@ layout("/layouts/platform.html"){
|
|||||||
value-format="yyyy">
|
value-format="yyyy">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
<search-item label="经办人">
|
||||||
|
<el-input @keyup.enter.native="doSearch" clearable
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="pageForm.searchKeyword">
|
||||||
|
<el-select placeholder="查询类型" slot="prepend"
|
||||||
|
style="width: 100px;"
|
||||||
|
v-model="pageForm.searchName">
|
||||||
|
<el-option label="姓名" value="info.userName"></el-option>
|
||||||
|
<el-option label="工号" value="info.loginName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId" placeholder="请选择分工会" clearable style="width: 100%">
|
||||||
|
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="活动类型">
|
||||||
|
<el-select clearable placeholder="活动类型"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="pageForm.outlayManageSource">
|
||||||
|
<el-option :label="item.name" :value="item.code"
|
||||||
|
v-for="item in budgetTypeOption"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="明细类">
|
||||||
|
<el-select v-model="pageForm.detailsTypeId"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择明细类" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in detailsTypeOption"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
</search>
|
</search>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
@@ -45,6 +83,12 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="money" label="金额"></el-table-column>
|
<el-table-column prop="money" label="金额"></el-table-column>
|
||||||
|
<el-table-column prop="detailsTypeId" label="明细类">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<dict-tag :options="detailsTypeOption"
|
||||||
|
:value="row.detailsTypeId"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="applyTime" label="申报时间"></el-table-column>
|
<el-table-column prop="applyTime" label="申报时间"></el-table-column>
|
||||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
@@ -78,8 +122,9 @@ layout("/layouts/platform.html"){
|
|||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- :rules="[{required:true,message:'必填',trigger:['change','blur']}]"-->
|
||||||
<el-form-item label="签字" prop="tf_userSign"
|
<el-form-item label="签字" prop="tf_userSign"
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
>
|
||||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -106,10 +151,12 @@ layout("/layouts/platform.html"){
|
|||||||
budgetTypeOption: [],
|
budgetTypeOption: [],
|
||||||
pageForm: {
|
pageForm: {
|
||||||
year: moment().format("YYYY"),
|
year: moment().format("YYYY"),
|
||||||
approval: false
|
approval: false,
|
||||||
|
searchName: "info.userName",
|
||||||
},
|
},
|
||||||
showApprovalForm: false
|
showApprovalForm: false,
|
||||||
|
detailsTypeOption:[],
|
||||||
|
unionOptions:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -173,6 +220,8 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
||||||
|
this.detailsTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_DETAILS_TYPE")
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
this.pageData()
|
this.pageData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,161 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="选择年"
|
||||||
|
style="width: 100%"
|
||||||
|
type="year"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy">
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="经办人">
|
||||||
|
<el-input @keyup.enter.native="doSearch" clearable
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="pageForm.searchKeyword">
|
||||||
|
<el-select placeholder="查询类型" slot="prepend"
|
||||||
|
style="width: 100px;"
|
||||||
|
v-model="pageForm.searchName">
|
||||||
|
<el-option label="姓名" value="info.userName"></el-option>
|
||||||
|
<el-option label="工号" value="info.loginName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId" placeholder="请选择分工会" clearable style="width: 100%">
|
||||||
|
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="活动类型">
|
||||||
|
<el-select clearable placeholder="活动类型"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="pageForm.outlayManageSource">
|
||||||
|
<el-option :label="item.name" :value="item.code"
|
||||||
|
v-for="item in budgetTypeOption"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="明细类">
|
||||||
|
<el-select v-model="pageForm.detailsTypeId"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择明细类" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in detailsTypeOption"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<table-tool label="申请列表">
|
||||||
|
<el-button @click="doExportUserExcel" size="mini" type="primary">导出汇总名单
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="经办人工号"></el-table-column>
|
||||||
|
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||||
|
<el-table-column prop="outlayManageSource" label="活动类型">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<dict-tag :options="budgetTypeOption"
|
||||||
|
:value="row.outlayManageSource"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="activityMatter" label="活动事项"></el-table-column>
|
||||||
|
<el-table-column prop="helpUnitName" label="申报单位">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span v-if="['ACTIVITY_BUDGET_TYPE_ONE'].includes(row.outlayManageSource)">校工会</span>
|
||||||
|
<span v-if="['ACTIVITY_BUDGET_TYPE_TWO'].includes(row.outlayManageSource)">{{row.unionName}}</span>
|
||||||
|
<span v-if="['ACTIVITY_BUDGET_TYPE_THREE','ACTIVITY_BUDGET_TYPE_FOUR'].includes(row.outlayManageSource)">{{row.clubName}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="money" label="金额"></el-table-column>
|
||||||
|
<el-table-column prop="detailsTypeId" label="明细类">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<dict-tag :options="detailsTypeOption"
|
||||||
|
:value="row.detailsTypeId"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="applyTime" label="申报时间"></el-table-column>
|
||||||
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||||
|
size="small"></enum-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" width="100px">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<template #view>
|
||||||
|
<outlay-reimburse-info ref="outlayReimburseInfo">
|
||||||
|
</outlay-reimburse-info>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('../info.js'){}#-->
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/outlay/reimburse/summary/pageData",
|
||||||
|
budgetTypeOption: [],
|
||||||
|
pageForm: {
|
||||||
|
year: moment().format("YYYY"),
|
||||||
|
approval: false,
|
||||||
|
searchName: "info.userName",
|
||||||
|
},
|
||||||
|
showApprovalForm: false,
|
||||||
|
detailsTypeOption:[],
|
||||||
|
unionOptions:[]
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"outlay-reimburse-info": OUTLAY_REIMBURSE_INFO
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openView(row) {
|
||||||
|
this.$refs.guava.view(() => {
|
||||||
|
this.showApprovalForm = false
|
||||||
|
this.$refs.outlayReimburseInfo.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doExportUserExcel(){
|
||||||
|
this.$downLoad("/platform/outlay/reimburse/summary/doExportUserExcel", {
|
||||||
|
data: JSON.stringify(this.pageForm)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
||||||
|
this.detailsTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_DETAILS_TYPE")
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user