260720
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.gxmu.entity.WorkLedger;
|
||||
import com.gxwebsoft.gxmu.param.WorkLedgerParam;
|
||||
import com.gxwebsoft.gxmu.service.WorkLedgerService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class BaseWorkLedgerControllerSupport extends BaseController {
|
||||
|
||||
protected ApiResult<PageResult<WorkLedger>> pageWorkLedgers(WorkLedgerService service,
|
||||
WorkLedgerParam param,
|
||||
String ledgerType) {
|
||||
param.setLedgerType(ledgerType);
|
||||
PageParam<WorkLedger, WorkLedgerParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(service.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"unit_name", "responsible_person")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
protected ApiResult<PageResult<WorkLedger>> userPageWorkLedgers(WorkLedgerService service,
|
||||
WorkLedgerParam param,
|
||||
String ledgerType) {
|
||||
param.setLedgerType(ledgerType);
|
||||
param.setUserId(getLoginUserId());
|
||||
PageParam<WorkLedger, WorkLedgerParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(service.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"unit_name", "responsible_person")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
protected ApiResult<List<WorkLedger>> listWorkLedgers(WorkLedgerService service,
|
||||
WorkLedgerParam param,
|
||||
String ledgerType) {
|
||||
param.setLedgerType(ledgerType);
|
||||
PageParam<WorkLedger, WorkLedgerParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(service.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"unit_name", "responsible_person"))));
|
||||
}
|
||||
|
||||
protected ApiResult<WorkLedger> getWorkLedger(WorkLedgerService service, Integer id) {
|
||||
return success(service.getById(id));
|
||||
}
|
||||
|
||||
protected ApiResult<?> saveWorkLedger(WorkLedgerService service, WorkLedger workLedger, String ledgerType) {
|
||||
workLedger.setLedgerType(ledgerType);
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
workLedger.setUserId(loginUser.getUserId());
|
||||
}
|
||||
return service.save(workLedger) ? success("添加成功") : fail("添加失败");
|
||||
}
|
||||
|
||||
protected ApiResult<?> updateWorkLedger(WorkLedgerService service, WorkLedger workLedger, String ledgerType) {
|
||||
workLedger.setLedgerType(ledgerType);
|
||||
return service.updateById(workLedger) ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
protected ApiResult<?> removeWorkLedger(WorkLedgerService service, Integer id) {
|
||||
return service.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
protected ApiResult<?> updateBatchWorkLedger(WorkLedgerService service, BatchParam<WorkLedger> batchParam, String ledgerType) {
|
||||
if (batchParam.getData() != null) {
|
||||
batchParam.getData().setLedgerType(ledgerType);
|
||||
}
|
||||
return batchParam.update(service, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
protected ApiResult<?> removeBatchWorkLedger(WorkLedgerService service, List<Integer> ids) {
|
||||
return service.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.Organization;
|
||||
import com.gxwebsoft.common.system.service.OrganizationService;
|
||||
import com.gxwebsoft.gxmu.entity.ClassInfo;
|
||||
import com.gxwebsoft.gxmu.model.ClassImportItem;
|
||||
import com.gxwebsoft.gxmu.param.ClassInfoParam;
|
||||
import com.gxwebsoft.gxmu.service.ClassInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 班级管理控制器
|
||||
*/
|
||||
@Api(tags = "班级管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/class")
|
||||
public class ClassInfoController extends BaseController {
|
||||
private static final int IMPORT_PARENT_ID = 24;
|
||||
|
||||
@Resource
|
||||
private ClassInfoService classInfoService;
|
||||
@Resource
|
||||
private OrganizationService organizationService;
|
||||
|
||||
@ApiOperation("分页查询班级")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ClassInfo>> page(ClassInfoParam param) {
|
||||
param.setTenantId(getTenantId());
|
||||
return success(classInfoService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询班级列表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ClassInfo>> list(ClassInfoParam param) {
|
||||
param.setTenantId(getTenantId());
|
||||
return success(classInfoService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询班级")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ClassInfo> get(@PathVariable("id") Integer id) {
|
||||
return success(classInfoService.getByIdRel(id, getTenantId()));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加班级")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ClassInfo classInfo) {
|
||||
if (classInfo.getCollegeId() == null) {
|
||||
return fail("请选择所属机构");
|
||||
}
|
||||
Organization organization = organizationService.getOne(new LambdaQueryWrapper<Organization>()
|
||||
.eq(Organization::getOrganizationId, classInfo.getCollegeId())
|
||||
.eq(Organization::getTenantId, getTenantId()));
|
||||
if (organization == null) {
|
||||
return fail("所属机构不存在");
|
||||
}
|
||||
classInfo.setTenantId(getTenantId());
|
||||
return classInfoService.save(classInfo) ? success("添加成功") : fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改班级")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ClassInfo classInfo) {
|
||||
if (classInfo.getCollegeId() == null) {
|
||||
return fail("请选择所属机构");
|
||||
}
|
||||
Organization organization = organizationService.getOne(new LambdaQueryWrapper<Organization>()
|
||||
.eq(Organization::getOrganizationId, classInfo.getCollegeId())
|
||||
.eq(Organization::getTenantId, getTenantId()));
|
||||
if (organization == null) {
|
||||
return fail("所属机构不存在");
|
||||
}
|
||||
classInfo.setTenantId(getTenantId());
|
||||
return classInfoService.updateById(classInfo) ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@ApiOperation("批量导入班级")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<?> importBatch(@RequestBody List<ClassImportItem> items) {
|
||||
if (items == null || items.isEmpty()) {
|
||||
return fail("导入数据不能为空");
|
||||
}
|
||||
int tenantId = getTenantId();
|
||||
int successCount = 0;
|
||||
int skipCount = 0;
|
||||
Set<String> batchKeys = new HashSet<>();
|
||||
for (int index = 0; index < items.size(); index++) {
|
||||
ClassImportItem item = items.get(index);
|
||||
int rowNo = index + 2;
|
||||
String collegeName = item.getCollegeName() == null ? "" : item.getCollegeName().trim();
|
||||
String className = item.getClassName() == null ? "" : item.getClassName().trim();
|
||||
if (collegeName.isEmpty()) {
|
||||
return fail("第 " + rowNo + " 行缺少所属学院");
|
||||
}
|
||||
if (className.isEmpty()) {
|
||||
return fail("第 " + rowNo + " 行缺少班级名称");
|
||||
}
|
||||
Organization organization = getOrCreateImportOrganization(collegeName, tenantId);
|
||||
String batchKey = organization.getOrganizationId() + "_" + className;
|
||||
if (!batchKeys.add(batchKey)) {
|
||||
skipCount++;
|
||||
continue;
|
||||
}
|
||||
ClassInfo exists = classInfoService.getOne(new LambdaQueryWrapper<ClassInfo>()
|
||||
.eq(ClassInfo::getTenantId, tenantId)
|
||||
.eq(ClassInfo::getCollegeId, organization.getOrganizationId())
|
||||
.eq(ClassInfo::getClassName, className));
|
||||
if (exists != null) {
|
||||
skipCount++;
|
||||
continue;
|
||||
}
|
||||
ClassInfo classInfo = new ClassInfo();
|
||||
classInfo.setTenantId(tenantId);
|
||||
classInfo.setCollegeId(organization.getOrganizationId());
|
||||
classInfo.setClassName(className);
|
||||
classInfo.setClassCode(emptyToNull(item.getClassCode()));
|
||||
classInfo.setGradeYear(item.getGradeYear());
|
||||
classInfo.setCounselorName(emptyToNull(item.getCounselorName()));
|
||||
classInfo.setCounselorPhone(emptyToNull(item.getCounselorPhone()));
|
||||
classInfo.setStudentCount(item.getStudentCount());
|
||||
classInfo.setSortNumber(item.getSortNumber() == null ? 0 : item.getSortNumber());
|
||||
classInfo.setStatus(item.getStatus() == null ? 1 : item.getStatus());
|
||||
classInfo.setRemark(emptyToNull(item.getRemark()));
|
||||
if (!classInfoService.save(classInfo)) {
|
||||
return fail("第 " + rowNo + " 行导入失败");
|
||||
}
|
||||
successCount++;
|
||||
}
|
||||
return success("成功导入 " + successCount + " 条班级数据,跳过重复数据 " + skipCount + " 条");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除班级")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return classInfoService.remove(new LambdaQueryWrapper<ClassInfo>()
|
||||
.eq(ClassInfo::getId, id)
|
||||
.eq(ClassInfo::getTenantId, getTenantId())) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改班级")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<ClassInfo> batchParam) {
|
||||
return batchParam.update(classInfoService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除班级")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return classInfoService.remove(new LambdaQueryWrapper<ClassInfo>()
|
||||
.in(ClassInfo::getId, ids)
|
||||
.eq(ClassInfo::getTenantId, getTenantId())) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private Organization getOrCreateImportOrganization(String collegeName, Integer tenantId) {
|
||||
Organization organization = organizationService.getOne(new LambdaQueryWrapper<Organization>()
|
||||
.eq(Organization::getTenantId, tenantId)
|
||||
.eq(Organization::getParentId, IMPORT_PARENT_ID)
|
||||
.eq(Organization::getOrganizationName, collegeName));
|
||||
if (organization != null) {
|
||||
return organization;
|
||||
}
|
||||
Organization insert = new Organization();
|
||||
insert.setTenantId(tenantId);
|
||||
insert.setParentId(IMPORT_PARENT_ID);
|
||||
insert.setOrganizationName(collegeName);
|
||||
insert.setOrganizationFullName(collegeName);
|
||||
insert.setSortNumber(0);
|
||||
organizationService.save(insert);
|
||||
return insert;
|
||||
}
|
||||
|
||||
private String emptyToNull(String value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
String text = value.trim();
|
||||
return text.isEmpty() ? null : text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gxmu.entity.College;
|
||||
import com.gxwebsoft.gxmu.param.CollegeParam;
|
||||
import com.gxwebsoft.gxmu.service.CollegeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学院管理控制器
|
||||
*/
|
||||
@Api(tags = "学院管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/college")
|
||||
public class CollegeController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private CollegeService collegeService;
|
||||
|
||||
@ApiOperation("分页查询学院")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<College>> page(CollegeParam param) {
|
||||
param.setTenantId(getTenantId());
|
||||
return success(collegeService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询学院列表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<College>> list(CollegeParam param) {
|
||||
param.setTenantId(getTenantId());
|
||||
return success(collegeService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询学院")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<College> get(@PathVariable("id") Integer id) {
|
||||
return success(collegeService.getByIdRel(id, getTenantId()));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加学院")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody College college) {
|
||||
college.setTenantId(getTenantId());
|
||||
return collegeService.save(college) ? success("添加成功") : fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改学院")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody College college) {
|
||||
college.setTenantId(getTenantId());
|
||||
return collegeService.updateById(college) ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除学院")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return collegeService.remove(new LambdaQueryWrapper<College>()
|
||||
.eq(College::getId, id)
|
||||
.eq(College::getTenantId, getTenantId())) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改学院")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<College> batchParam) {
|
||||
return batchParam.update(collegeService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除学院")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return collegeService.remove(new LambdaQueryWrapper<College>()
|
||||
.in(College::getId, ids)
|
||||
.eq(College::getTenantId, getTenantId())) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gxmu.entity.CrossSchoolActivityArticle;
|
||||
import com.gxwebsoft.gxmu.param.CrossSchoolActivityArticleParam;
|
||||
import com.gxwebsoft.gxmu.service.CrossSchoolActivityArticleService;
|
||||
import com.gxwebsoft.gxmu.service.CrossSchoolActivityCrawlerService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 跨校活动情报文章控制器
|
||||
*
|
||||
* @author Codex
|
||||
* @since 2026-07-04
|
||||
*/
|
||||
@Api(tags = "跨校活动情报文章")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/cross-school-activity-article")
|
||||
public class CrossSchoolActivityArticleController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private CrossSchoolActivityArticleService crossSchoolActivityArticleService;
|
||||
|
||||
@Resource
|
||||
private CrossSchoolActivityCrawlerService crossSchoolActivityCrawlerService;
|
||||
|
||||
@ApiOperation("分页查询跨校活动情报文章")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CrossSchoolActivityArticle>> page(CrossSchoolActivityArticleParam param) {
|
||||
return success(crossSchoolActivityArticleService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询跨校活动情报文章")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CrossSchoolActivityArticle>> list(CrossSchoolActivityArticleParam param) {
|
||||
return success(crossSchoolActivityArticleService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询跨校活动情报文章")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CrossSchoolActivityArticle> get(@PathVariable("id") Integer id) {
|
||||
return success(crossSchoolActivityArticleService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("同步跨校活动情报文章")
|
||||
@PostMapping("/sync")
|
||||
public ApiResult<Integer> sync() {
|
||||
return success(crossSchoolActivityCrawlerService.syncAll());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.gxmu.service.DeclareService;
|
||||
import com.gxwebsoft.gxmu.entity.Declare;
|
||||
import com.gxwebsoft.gxmu.param.DeclareParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 申报管理控制器
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-28 15:06:52
|
||||
*/
|
||||
@Api(tags = "申报管理管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/declare")
|
||||
public class DeclareController extends BaseController {
|
||||
private static final String TZBCY_MODULE = "gxmu_tzbcy_form";
|
||||
|
||||
@Resource
|
||||
private DeclareService declareService;
|
||||
|
||||
@ApiOperation("分页查询申报管理")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Declare>> page(DeclareParam param) {
|
||||
// 使用关联查询
|
||||
return success(declareService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户申报管理")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<Declare>> userPage(DeclareParam param) {
|
||||
Integer loginUserId = getLoginUserId();
|
||||
param.setUserId(loginUserId == null ? null : loginUserId.longValue());
|
||||
return success(declareService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部申报管理")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Declare>> list(DeclareParam param) {
|
||||
// 使用关联查询
|
||||
return success(declareService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询申报管理")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Declare> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(declareService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加申报管理")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Declare declare) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
declare.setUserId(loginUser.getUserId());
|
||||
}
|
||||
String validateMessage = normalizeAndValidateDeclare(declare);
|
||||
if (validateMessage != null) {
|
||||
return fail(validateMessage);
|
||||
}
|
||||
if (declareService.save(declare)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改申报管理")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Declare declare) {
|
||||
String validateMessage = normalizeAndValidateDeclare(declare);
|
||||
if (validateMessage != null) {
|
||||
return fail(validateMessage);
|
||||
}
|
||||
if (declareService.updateById(declare)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除申报管理")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (declareService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加申报管理")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Declare> list) {
|
||||
if (declareService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改申报管理")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<Declare> batchParam) {
|
||||
if (batchParam.update(declareService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除申报管理")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (declareService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
private String normalizeAndValidateDeclare(Declare declare) {
|
||||
if (declare == null) {
|
||||
return "参数不正确";
|
||||
}
|
||||
if (!TZBCY_MODULE.equals(declare.getModule())) {
|
||||
declare.setProjectType(null);
|
||||
declare.setProjectGroup(null);
|
||||
declare.setFormProjectType(null);
|
||||
declare.setFormProjectGroup(null);
|
||||
declare.setPublicProjectType(null);
|
||||
declare.setPublicProjectGroup(null);
|
||||
return null;
|
||||
}
|
||||
if (StrUtil.isBlank(declare.getFormProjectType())) {
|
||||
if (StrUtil.isNotBlank(declare.getProjectType())) {
|
||||
declare.setFormProjectType(declare.getProjectType());
|
||||
} else {
|
||||
return "挑战杯申报请配置项目申报表项目类型";
|
||||
}
|
||||
}
|
||||
if (StrUtil.isBlank(declare.getFormProjectGroup())) {
|
||||
if (StrUtil.isNotBlank(declare.getProjectGroup())) {
|
||||
declare.setFormProjectGroup(declare.getProjectGroup());
|
||||
} else {
|
||||
return "挑战杯申报请配置项目申报表项目分组";
|
||||
}
|
||||
}
|
||||
if (StrUtil.isBlank(declare.getPublicProjectType())) {
|
||||
declare.setPublicProjectType(declare.getFormProjectType());
|
||||
}
|
||||
if (StrUtil.isBlank(declare.getPublicProjectGroup())) {
|
||||
declare.setPublicProjectGroup(declare.getFormProjectGroup());
|
||||
}
|
||||
declare.setFormProjectType(declare.getFormProjectType().trim());
|
||||
declare.setFormProjectGroup(declare.getFormProjectGroup().trim());
|
||||
declare.setPublicProjectType(declare.getPublicProjectType().trim());
|
||||
declare.setPublicProjectGroup(declare.getPublicProjectGroup().trim());
|
||||
declare.setProjectType(declare.getFormProjectType());
|
||||
declare.setProjectGroup(declare.getFormProjectGroup());
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gxmu.entity.WorkLedger;
|
||||
import com.gxwebsoft.gxmu.param.WorkLedgerParam;
|
||||
import com.gxwebsoft.gxmu.service.WorkLedgerService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "基层团支部工作台账")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/league-branch-ledger")
|
||||
public class LeagueBranchLedgerController extends BaseWorkLedgerControllerSupport {
|
||||
private static final String LEDGER_TYPE = "league_branch";
|
||||
|
||||
@Resource
|
||||
private WorkLedgerService workLedgerService;
|
||||
|
||||
@ApiOperation("分页查询基层团支部工作台账")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<WorkLedger>> page(WorkLedgerParam param) {
|
||||
return pageWorkLedgers(workLedgerService, param, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户基层团支部工作台账")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<WorkLedger>> userPage(WorkLedgerParam param) {
|
||||
return userPageWorkLedgers(workLedgerService, param, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部基层团支部工作台账")
|
||||
@GetMapping()
|
||||
public ApiResult<List<WorkLedger>> list(WorkLedgerParam param) {
|
||||
return listWorkLedgers(workLedgerService, param, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询基层团支部工作台账")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<WorkLedger> get(@PathVariable("id") Integer id) {
|
||||
return getWorkLedger(workLedgerService, id);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加基层团支部工作台账")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody WorkLedger workLedger) {
|
||||
return saveWorkLedger(workLedgerService, workLedger, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改基层团支部工作台账")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody WorkLedger workLedger) {
|
||||
return updateWorkLedger(workLedgerService, workLedger, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除基层团支部工作台账")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return removeWorkLedger(workLedgerService, id);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改基层团支部工作台账")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<WorkLedger> batchParam) {
|
||||
return updateBatchWorkLedger(workLedgerService, batchParam, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除基层团支部工作台账")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return removeBatchWorkLedger(workLedgerService, ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gxmu.entity.WorkLedger;
|
||||
import com.gxwebsoft.gxmu.param.WorkLedgerParam;
|
||||
import com.gxwebsoft.gxmu.service.WorkLedgerService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "基层团委工作台账")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/league-committee-ledger")
|
||||
public class LeagueCommitteeLedgerController extends BaseWorkLedgerControllerSupport {
|
||||
private static final String LEDGER_TYPE = "league_committee";
|
||||
|
||||
@Resource
|
||||
private WorkLedgerService workLedgerService;
|
||||
|
||||
@ApiOperation("分页查询基层团委工作台账")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<WorkLedger>> page(WorkLedgerParam param) {
|
||||
return pageWorkLedgers(workLedgerService, param, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户基层团委工作台账")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<WorkLedger>> userPage(WorkLedgerParam param) {
|
||||
return userPageWorkLedgers(workLedgerService, param, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部基层团委工作台账")
|
||||
@GetMapping()
|
||||
public ApiResult<List<WorkLedger>> list(WorkLedgerParam param) {
|
||||
return listWorkLedgers(workLedgerService, param, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询基层团委工作台账")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<WorkLedger> get(@PathVariable("id") Integer id) {
|
||||
return getWorkLedger(workLedgerService, id);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加基层团委工作台账")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody WorkLedger workLedger) {
|
||||
return saveWorkLedger(workLedgerService, workLedger, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改基层团委工作台账")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody WorkLedger workLedger) {
|
||||
return updateWorkLedger(workLedgerService, workLedger, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除基层团委工作台账")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return removeWorkLedger(workLedgerService, id);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改基层团委工作台账")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<WorkLedger> batchParam) {
|
||||
return updateBatchWorkLedger(workLedgerService, batchParam, LEDGER_TYPE);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除基层团委工作台账")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return removeBatchWorkLedger(workLedgerService, ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.gxmu.entity.QmgcForm;
|
||||
import com.gxwebsoft.gxmu.param.QmgcFormParam;
|
||||
import com.gxwebsoft.gxmu.service.QmgcFormService;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowStarterService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
import com.gxwebsoft.gxmu.util.QmgcDocxExportUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* 青马工程培训班学员登记表控制器
|
||||
*/
|
||||
@Api(tags = "青马工程培训班学员登记表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/qmgc-form")
|
||||
public class QmgcFormController extends BaseController {
|
||||
@Resource
|
||||
private QmgcFormService qmgcFormService;
|
||||
@Resource
|
||||
private ReviewFlowStarterService reviewFlowStarterService;
|
||||
@Resource
|
||||
private FileRecordService fileRecordService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
@ApiOperation("分页查询青马工程培训班学员登记表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<QmgcForm>> page(QmgcFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<QmgcForm, QmgcFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(qmgcFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "phone", "school_info")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户青马工程培训班学员登记表")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<QmgcForm>> userPage(QmgcFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<QmgcForm, QmgcFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(qmgcFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "phone", "school_info")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部青马工程培训班学员登记表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<QmgcForm>> list(QmgcFormParam param) {
|
||||
PageParam<QmgcForm, QmgcFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(qmgcFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "phone", "school_info"))));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("导出青马工程培训班学员登记表")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export(@RequestBody QmgcFormParam param, HttpServletRequest request) throws IOException {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<QmgcForm, QmgcFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
List<QmgcForm> records = qmgcFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "phone", "school_info")));
|
||||
if (records == null || records.isEmpty()) {
|
||||
return fail("暂无可导出的数据");
|
||||
}
|
||||
|
||||
String yearText = resolveYearText(param, records);
|
||||
String relativePath = "file/docx/" + yearText + "年青马工程培训班学员登记表_" + System.currentTimeMillis() + ".zip";
|
||||
File targetFile = new File(uploadPath + relativePath);
|
||||
File parentFile = targetFile.getParentFile();
|
||||
if (parentFile != null && !parentFile.exists()) {
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(targetFile);
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) {
|
||||
QmgcDocxExportUtil.writeExportZip(zipOutputStream, records);
|
||||
zipOutputStream.finish();
|
||||
}
|
||||
|
||||
FileRecord result = new FileRecord();
|
||||
result.setCreateUserId(getLoginUserId());
|
||||
result.setName(targetFile.getName());
|
||||
result.setPath(targetFile.getAbsolutePath());
|
||||
result.setContentType("application/zip");
|
||||
result.setUrl(requestURL + "/" + relativePath);
|
||||
fileRecordService.save(result);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询青马工程培训班学员登记表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<QmgcForm> get(@PathVariable("id") Integer id) {
|
||||
return success(qmgcFormService.getById(id));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加青马工程培训班学员登记表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody QmgcForm qmgcForm) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
qmgcForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (qmgcFormService.save(qmgcForm)) {
|
||||
reviewFlowStarterService.startReview("gxmu_qmgc_form", qmgcForm.getId());
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改青马工程培训班学员登记表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody QmgcForm qmgcForm) {
|
||||
if (qmgcFormService.updateById(qmgcForm)) {
|
||||
reviewFlowStarterService.restartReviewWhenLastRejected("gxmu_qmgc_form", qmgcForm.getId());
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除青马工程培训班学员登记表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return qmgcFormService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改青马工程培训班学员登记表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<QmgcForm> batchParam) {
|
||||
return batchParam.update(qmgcFormService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除青马工程培训班学员登记表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return qmgcFormService.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private String resolveYearText(QmgcFormParam param, List<QmgcForm> records) {
|
||||
if (param.getYear() != null) {
|
||||
return String.valueOf(param.getYear());
|
||||
}
|
||||
if (records != null && !records.isEmpty() && records.get(0).getYear() != null) {
|
||||
return String.valueOf(records.get(0).getYear());
|
||||
}
|
||||
return String.valueOf(java.time.LocalDate.now().getYear());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowConfigService;
|
||||
import com.gxwebsoft.gxmu.entity.ReviewFlowConfig;
|
||||
import com.gxwebsoft.gxmu.param.ReviewFlowConfigParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 控制器
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 10:37:18
|
||||
*/
|
||||
@Api(tags = "管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/review-flow-config")
|
||||
public class ReviewFlowConfigController extends BaseController {
|
||||
@Resource
|
||||
private ReviewFlowConfigService reviewFlowConfigService;
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ReviewFlowConfig>> page(ReviewFlowConfigParam param) {
|
||||
// 使用关联查询
|
||||
return success(reviewFlowConfigService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<ReviewFlowConfig>> userPage(ReviewFlowConfigParam param) {
|
||||
param.setUserId(getLoginUserId());
|
||||
return success(reviewFlowConfigService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ReviewFlowConfig>> list(ReviewFlowConfigParam param) {
|
||||
// 使用关联查询
|
||||
return success(reviewFlowConfigService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('gxmu:reviewFlowConfig:list')")
|
||||
@ApiOperation("根据id查询")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ReviewFlowConfig> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(reviewFlowConfigService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ReviewFlowConfig reviewFlowConfig) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
reviewFlowConfig.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (reviewFlowConfigService.save(reviewFlowConfig)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ReviewFlowConfig reviewFlowConfig) {
|
||||
if (reviewFlowConfigService.updateById(reviewFlowConfig)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (reviewFlowConfigService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ReviewFlowConfig> list) {
|
||||
if (reviewFlowConfigService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<ReviewFlowConfig> batchParam) {
|
||||
if (batchParam.update(reviewFlowConfigService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (reviewFlowConfigService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowService;
|
||||
import com.gxwebsoft.gxmu.entity.ReviewFlow;
|
||||
import com.gxwebsoft.gxmu.param.ReviewFlowParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 审核流控制器
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 10:37:18
|
||||
*/
|
||||
@Api(tags = "审核流管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/review-flow")
|
||||
public class ReviewFlowController extends BaseController {
|
||||
@Resource
|
||||
private ReviewFlowService reviewFlowService;
|
||||
|
||||
@ApiOperation("分页查询审核流")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ReviewFlow>> page(ReviewFlowParam param) {
|
||||
// 使用关联查询
|
||||
return success(reviewFlowService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户审核流")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<ReviewFlow>> userPage(ReviewFlowParam param) {
|
||||
param.setUserId(getLoginUserId());
|
||||
return success(reviewFlowService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部审核流")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ReviewFlow>> list(ReviewFlowParam param) {
|
||||
// 使用关联查询
|
||||
return success(reviewFlowService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询审核流")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ReviewFlow> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(reviewFlowService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加审核流")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ReviewFlow reviewFlow) {
|
||||
// 记录当前登录用户id
|
||||
// ReviewFlow checkByName = reviewFlowService.getByTitle(reviewFlow.getTitle());
|
||||
// if (checkByName != null) {
|
||||
// return fail("该名称已存在");
|
||||
// }
|
||||
if (reviewFlowService.save(reviewFlow)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改审核流")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ReviewFlow reviewFlow) {
|
||||
// ReviewFlow checkByName = reviewFlowService.getByTitle(reviewFlow.getTitle());
|
||||
// if (checkByName != null && !Objects.equals(checkByName.getId(), reviewFlow.getId())) {
|
||||
// return fail("该名称已存在");
|
||||
// }
|
||||
if (reviewFlowService.updateById(reviewFlow)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除审核流")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (reviewFlowService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加审核流")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ReviewFlow> list) {
|
||||
if (reviewFlowService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改审核流")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<ReviewFlow> batchParam) {
|
||||
if (batchParam.update(reviewFlowService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除审核流")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (reviewFlowService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.gxmu.entity.ReviewFlow;
|
||||
import com.gxwebsoft.gxmu.entity.ReviewFlowConfig;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowConfigService;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowService;
|
||||
import com.gxwebsoft.gxmu.service.ReviewListService;
|
||||
import com.gxwebsoft.gxmu.entity.ReviewList;
|
||||
import com.gxwebsoft.gxmu.param.ReviewListParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审核列表控制器
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 15:50:51
|
||||
*/
|
||||
@Api(tags = "审核列表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/review-list")
|
||||
public class ReviewListController extends BaseController {
|
||||
@Resource
|
||||
private ReviewListService reviewListService;
|
||||
@Resource
|
||||
private ReviewFlowConfigService reviewFlowConfigService;
|
||||
@Resource
|
||||
private ReviewFlowService reviewFlowService;
|
||||
|
||||
@ApiOperation("分页查询审核列表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ReviewList>> page(ReviewListParam param) {
|
||||
applyRoleScopeForReviewList(param);
|
||||
applyBackendOrganizationScopeForReviewList(param);
|
||||
// 使用关联查询
|
||||
return success(reviewListService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询聚合后的审核列表")
|
||||
@GetMapping("/groupPage")
|
||||
public ApiResult<PageResult<ReviewList>> groupPage(ReviewListParam param) {
|
||||
applyRoleScopeForReviewList(param);
|
||||
applyBackendOrganizationScopeForReviewList(param);
|
||||
return success(reviewListService.pageGroupRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户审核列表")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<ReviewList>> userPage(ReviewListParam param) {
|
||||
param.setUserId(getLoginUserId());
|
||||
return success(reviewListService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部审核列表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ReviewList>> list(ReviewListParam param) {
|
||||
// 使用关联查询
|
||||
return success(reviewListService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('gxmu:reviewList:list')")
|
||||
@ApiOperation("根据id查询审核列表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ReviewList> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(reviewListService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加审核列表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ReviewList reviewList) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
reviewList.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (reviewListService.save(reviewList)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改审核列表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ReviewList reviewList) {
|
||||
if (reviewListService.updateById(reviewList)) {
|
||||
// 通过进入下一个
|
||||
if (reviewList.getStatus().equals(1)) {
|
||||
ReviewFlowConfig reviewFlowConfig = reviewFlowConfigService.getByModule(reviewList.getModule());
|
||||
if (reviewFlowConfig != null) {
|
||||
ReviewFlow reviewFlow = reviewFlowService.getById(reviewFlowConfig.getFlowId());
|
||||
if (reviewFlow != null) {
|
||||
List<ReviewFlow> reviewFlowList = reviewFlowService.listByTitle(reviewFlow.getTitle());
|
||||
if (reviewFlowList != null && !reviewFlowList.isEmpty()) {
|
||||
if (reviewList.getSortNumber() + 1 < reviewFlowList.size()) {
|
||||
ReviewFlow nextOne = reviewFlowList.get(reviewList.getSortNumber() + 1);
|
||||
if (nextOne != null) {
|
||||
ReviewList nextReviewList = new ReviewList();
|
||||
nextReviewList.setPk(reviewList.getPk());
|
||||
nextReviewList.setModule(reviewList.getModule());
|
||||
nextReviewList.setUserId(nextOne.getReviewUserId());
|
||||
nextReviewList.setSortNumber(reviewList.getSortNumber() + 1);
|
||||
reviewListService.save(nextReviewList);
|
||||
}
|
||||
}
|
||||
// switch (reviewList.getModule()) {
|
||||
// case "cms_manuscript": {
|
||||
// // 社团指导老师/二级学院团委书记-团委社团管理部/团委办公室-学校团委组织宣传部,拟发布后,再提交给团委副书记-团委书记
|
||||
// if ()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除审核列表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (reviewListService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加审核列表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ReviewList> list) {
|
||||
if (reviewListService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改审核列表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<ReviewList> batchParam) {
|
||||
if (batchParam.update(reviewListService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除审核列表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (reviewListService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
private void applyBackendOrganizationScopeForReviewList(ReviewListParam param) {
|
||||
if (!isBackendAccess(param) || !hasBackendScopeRole()) {
|
||||
return;
|
||||
}
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser == null || loginUser.getOrganizationId() == null) {
|
||||
return;
|
||||
}
|
||||
com.gxwebsoft.common.system.param.UserParam userParam = new com.gxwebsoft.common.system.param.UserParam();
|
||||
userParam.setBackendAccess(true);
|
||||
applyBackendOrganizationScope(userParam);
|
||||
param.setOrganizationIds(userParam.getOrganizationIds());
|
||||
}
|
||||
|
||||
private void applyRoleScopeForReviewList(ReviewListParam param) {
|
||||
java.util.Set<String> roleCodes = getLoginUserRoleCodes();
|
||||
if (roleCodes.contains("SchoolYouthLeagueCommittee") || roleCodes.contains("admin") || roleCodes.contains("superAdmin")) {
|
||||
return;
|
||||
}
|
||||
Integer loginUserId = getLoginUserId();
|
||||
if (loginUserId != null) {
|
||||
param.setUserId(loginUserId);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
import com.gxwebsoft.common.system.entity.Organization;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.common.system.service.OrganizationService;
|
||||
import com.gxwebsoft.gxmu.entity.SjqnForm;
|
||||
import com.gxwebsoft.gxmu.param.SjqnFormParam;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowStarterService;
|
||||
import com.gxwebsoft.gxmu.service.SjqnFormService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
import com.gxwebsoft.gxmu.util.SjqnDocxExportUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* 十佳青年申报表控制器
|
||||
*/
|
||||
@Api(tags = "十佳青年申报表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/sjqn-form")
|
||||
public class SjqnFormController extends BaseController {
|
||||
@Resource
|
||||
private SjqnFormService sjqnFormService;
|
||||
@Resource
|
||||
private ReviewFlowStarterService reviewFlowStarterService;
|
||||
@Resource
|
||||
private FileRecordService fileRecordService;
|
||||
@Resource
|
||||
private OrganizationService organizationService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
@ApiOperation("分页查询十佳青年申报表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<SjqnForm>> page(SjqnFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<SjqnForm, SjqnFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(sjqnFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "unit_name", "apply_type")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户十佳青年申报表")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<SjqnForm>> userPage(SjqnFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<SjqnForm, SjqnFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(sjqnFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "unit_name", "apply_type")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部十佳青年申报表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<SjqnForm>> list(SjqnFormParam param) {
|
||||
PageParam<SjqnForm, SjqnFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(sjqnFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "unit_name", "apply_type"))));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("导出十佳青年岗位能手申报材料")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export(@RequestBody SjqnFormParam param, HttpServletRequest request) throws IOException {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<SjqnForm, SjqnFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
List<SjqnForm> records = sjqnFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "unit_name", "apply_type")));
|
||||
if (records == null || records.isEmpty()) {
|
||||
return fail("暂无可导出的数据");
|
||||
}
|
||||
|
||||
User loginUser = getLoginUser();
|
||||
Map<Integer, String> contactMap = new LinkedHashMap<>();
|
||||
for (SjqnForm form : records) {
|
||||
contactMap.put(form.getId(), loginUser == null ? "" : valueOf(loginUser.getPhone()));
|
||||
}
|
||||
|
||||
SjqnDocxExportUtil.SummaryMeta summaryMeta = new SjqnDocxExportUtil.SummaryMeta();
|
||||
summaryMeta.setYearText(resolveYearText(param, records));
|
||||
summaryMeta.setReporter(loginUser == null ? "" : resolveReporter(loginUser));
|
||||
summaryMeta.setContact(loginUser == null ? "" : valueOf(loginUser.getPhone()));
|
||||
summaryMeta.setOrganizationPartyOpinion(resolveOrganizationPartyOpinion(loginUser));
|
||||
|
||||
String relativePath = "file/docx/十佳青年岗位能手申报材料_" + System.currentTimeMillis() + ".zip";
|
||||
File targetFile = new File(uploadPath + relativePath);
|
||||
File parentFile = targetFile.getParentFile();
|
||||
if (parentFile != null && !parentFile.exists()) {
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(targetFile);
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) {
|
||||
SjqnDocxExportUtil.writeExportZip(zipOutputStream, records, summaryMeta, contactMap);
|
||||
zipOutputStream.finish();
|
||||
}
|
||||
|
||||
FileRecord result = new FileRecord();
|
||||
result.setCreateUserId(getLoginUserId());
|
||||
result.setName(targetFile.getName());
|
||||
result.setPath(targetFile.getAbsolutePath());
|
||||
result.setContentType("application/zip");
|
||||
result.setUrl(requestURL + "/" + relativePath);
|
||||
fileRecordService.save(result);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询十佳青年申报表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<SjqnForm> get(@PathVariable("id") Integer id) {
|
||||
return success(sjqnFormService.getById(id));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加十佳青年申报表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody SjqnForm sjqnForm) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
sjqnForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (sjqnFormService.save(sjqnForm)) {
|
||||
reviewFlowStarterService.startReview("gxmu_sjqn", sjqnForm.getId());
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改十佳青年申报表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody SjqnForm sjqnForm) {
|
||||
if (sjqnFormService.updateById(sjqnForm)) {
|
||||
reviewFlowStarterService.restartReviewWhenLastRejected("gxmu_sjqn", sjqnForm.getId());
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除十佳青年申报表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return sjqnFormService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改十佳青年申报表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<SjqnForm> batchParam) {
|
||||
return batchParam.update(sjqnFormService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除十佳青年申报表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return sjqnFormService.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private String resolveYearText(SjqnFormParam param, List<SjqnForm> records) {
|
||||
if (param.getYear() != null) {
|
||||
return String.valueOf(param.getYear());
|
||||
}
|
||||
if (records != null && !records.isEmpty() && records.get(0).getYear() != null) {
|
||||
return String.valueOf(records.get(0).getYear());
|
||||
}
|
||||
return String.valueOf(java.time.LocalDate.now().getYear());
|
||||
}
|
||||
|
||||
private String resolveReporter(User loginUser) {
|
||||
if (loginUser == null) {
|
||||
return "";
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getRealName())) {
|
||||
return loginUser.getRealName().trim();
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getNickname())) {
|
||||
return loginUser.getNickname().trim();
|
||||
}
|
||||
return valueOf(loginUser.getUsername());
|
||||
}
|
||||
|
||||
private String resolveOrganizationPartyOpinion(User loginUser) {
|
||||
if (loginUser == null || loginUser.getOrganizationId() == null) {
|
||||
return "(盖章)";
|
||||
}
|
||||
Organization organization = organizationService.getByIdRel(loginUser.getOrganizationId());
|
||||
String organizationName = organization == null ? "" : valueOf(organization.getOrganizationName());
|
||||
return organizationName.isEmpty() ? "(盖章)" : organizationName + "(盖章)";
|
||||
}
|
||||
|
||||
private String valueOf(String value) {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
import com.gxwebsoft.common.system.entity.Organization;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.common.system.service.OrganizationService;
|
||||
import com.gxwebsoft.gxmu.entity.SjtbzbsjForm;
|
||||
import com.gxwebsoft.gxmu.param.SjtbzbsjFormParam;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowStarterService;
|
||||
import com.gxwebsoft.gxmu.service.SjtbzbsjFormService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
import com.gxwebsoft.gxmu.util.SjtbzbsjDocxExportUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* 十佳团支部书记申报表控制器
|
||||
*/
|
||||
@Api(tags = "十佳团支部书记申报表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/sjtbzbsj-form")
|
||||
public class SjtbzbsjFormController extends BaseController {
|
||||
@Resource
|
||||
private SjtbzbsjFormService sjtbzbsjFormService;
|
||||
@Resource
|
||||
private ReviewFlowStarterService reviewFlowStarterService;
|
||||
@Resource
|
||||
private FileRecordService fileRecordService;
|
||||
@Resource
|
||||
private OrganizationService organizationService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
@ApiOperation("分页查询十佳团支部书记申报表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<SjtbzbsjForm>> page(SjtbzbsjFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<SjtbzbsjForm, SjtbzbsjFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(sjtbzbsjFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "college_class", "branch_name")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户十佳团支部书记申报表")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<SjtbzbsjForm>> userPage(SjtbzbsjFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<SjtbzbsjForm, SjtbzbsjFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(sjtbzbsjFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "college_class", "branch_name")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部十佳团支部书记申报表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<SjtbzbsjForm>> list(SjtbzbsjFormParam param) {
|
||||
PageParam<SjtbzbsjForm, SjtbzbsjFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(sjtbzbsjFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "college_class", "branch_name"))));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("导出十佳团支部书记申报材料")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export(@RequestBody SjtbzbsjFormParam param, HttpServletRequest request) throws IOException {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<SjtbzbsjForm, SjtbzbsjFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
List<SjtbzbsjForm> records = sjtbzbsjFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "college_class", "branch_name")));
|
||||
if (records == null || records.isEmpty()) {
|
||||
return fail("暂无可导出的数据");
|
||||
}
|
||||
|
||||
User loginUser = getLoginUser();
|
||||
Map<Integer, String> contactMap = new LinkedHashMap<>();
|
||||
for (SjtbzbsjForm form : records) {
|
||||
contactMap.put(form.getId(), loginUser == null ? "" : valueOf(loginUser.getPhone()));
|
||||
}
|
||||
|
||||
SjtbzbsjDocxExportUtil.SummaryMeta summaryMeta = new SjtbzbsjDocxExportUtil.SummaryMeta();
|
||||
summaryMeta.setYearText(resolveYearText(param, records));
|
||||
summaryMeta.setReporter(loginUser == null ? "" : resolveReporter(loginUser));
|
||||
summaryMeta.setContact(loginUser == null ? "" : valueOf(loginUser.getPhone()));
|
||||
summaryMeta.setOrganizationPartyOpinion(resolveOrganizationPartyOpinion(loginUser));
|
||||
|
||||
String relativePath = "file/docx/十佳团支部书记申报材料_" + System.currentTimeMillis() + ".zip";
|
||||
File targetFile = new File(uploadPath + relativePath);
|
||||
File parentFile = targetFile.getParentFile();
|
||||
if (parentFile != null && !parentFile.exists()) {
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(targetFile);
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) {
|
||||
SjtbzbsjDocxExportUtil.writeExportZip(zipOutputStream, records, summaryMeta, contactMap);
|
||||
zipOutputStream.finish();
|
||||
}
|
||||
|
||||
FileRecord result = new FileRecord();
|
||||
result.setCreateUserId(getLoginUserId());
|
||||
result.setName(targetFile.getName());
|
||||
result.setPath(targetFile.getAbsolutePath());
|
||||
result.setContentType("application/zip");
|
||||
result.setUrl(requestURL + "/" + relativePath);
|
||||
fileRecordService.save(result);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询十佳团支部书记申报表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<SjtbzbsjForm> get(@PathVariable("id") Integer id) {
|
||||
return success(sjtbzbsjFormService.getById(id));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加十佳团支部书记申报表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody SjtbzbsjForm sjtbzbsjForm) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
sjtbzbsjForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (sjtbzbsjFormService.save(sjtbzbsjForm)) {
|
||||
reviewFlowStarterService.startReview("gxmu_sjtbzbsj", sjtbzbsjForm.getId());
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改十佳团支部书记申报表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody SjtbzbsjForm sjtbzbsjForm) {
|
||||
if (sjtbzbsjFormService.updateById(sjtbzbsjForm)) {
|
||||
reviewFlowStarterService.restartReviewWhenLastRejected("gxmu_sjtbzbsj", sjtbzbsjForm.getId());
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除十佳团支部书记申报表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return sjtbzbsjFormService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改十佳团支部书记申报表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<SjtbzbsjForm> batchParam) {
|
||||
return batchParam.update(sjtbzbsjFormService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除十佳团支部书记申报表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return sjtbzbsjFormService.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private String resolveYearText(SjtbzbsjFormParam param, List<SjtbzbsjForm> records) {
|
||||
if (param.getYear() != null) {
|
||||
return String.valueOf(param.getYear());
|
||||
}
|
||||
if (records != null && !records.isEmpty() && records.get(0).getYear() != null) {
|
||||
return String.valueOf(records.get(0).getYear());
|
||||
}
|
||||
return String.valueOf(java.time.LocalDate.now().getYear());
|
||||
}
|
||||
|
||||
private String resolveReporter(User loginUser) {
|
||||
if (loginUser == null) {
|
||||
return "";
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getRealName())) {
|
||||
return loginUser.getRealName().trim();
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getNickname())) {
|
||||
return loginUser.getNickname().trim();
|
||||
}
|
||||
return valueOf(loginUser.getUsername());
|
||||
}
|
||||
|
||||
private String resolveOrganizationPartyOpinion(User loginUser) {
|
||||
if (loginUser == null || loginUser.getOrganizationId() == null) {
|
||||
return "(盖章)";
|
||||
}
|
||||
Organization organization = organizationService.getByIdRel(loginUser.getOrganizationId());
|
||||
String organizationName = organization == null ? "" : valueOf(organization.getOrganizationName());
|
||||
return organizationName.isEmpty() ? "(盖章)" : organizationName + "(盖章)";
|
||||
}
|
||||
|
||||
private String valueOf(String value) {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,406 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
import com.gxwebsoft.common.system.entity.Organization;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.common.system.service.OrganizationService;
|
||||
import com.gxwebsoft.gxmu.model.TyglDataCenterResult;
|
||||
import com.gxwebsoft.gxmu.entity.TyglForm;
|
||||
import com.gxwebsoft.gxmu.model.TyglDataCenterRecord;
|
||||
import com.gxwebsoft.gxmu.model.TyglDataCenterSummary;
|
||||
import com.gxwebsoft.gxmu.param.TyglGrowthArchivesUpdateParam;
|
||||
import com.gxwebsoft.gxmu.param.TyglMemberRecordsUpdateParam;
|
||||
import com.gxwebsoft.gxmu.param.TyglFormParam;
|
||||
import com.gxwebsoft.gxmu.service.TyglFormService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 团员管理控制器
|
||||
*/
|
||||
@Api(tags = "团员管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/tygl-form")
|
||||
public class TyglFormController extends BaseController {
|
||||
@Resource
|
||||
private TyglFormService tyglFormService;
|
||||
@Resource
|
||||
private OrganizationService organizationService;
|
||||
@Resource
|
||||
private FileRecordService fileRecordService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
@ApiOperation("分页查询团员管理")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<TyglForm>> page(TyglFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<TyglForm, TyglFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("serial_no asc,id desc");
|
||||
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<TyglForm> wrapper =
|
||||
page.getWrapperWithConsumer(queryWrapper -> {
|
||||
if (param.getUserIds() != null && !param.getUserIds().isEmpty()) {
|
||||
queryWrapper.in("user_id", param.getUserIds());
|
||||
}
|
||||
}, "keywords", "userIds");
|
||||
return success(new PageResult<>(tyglFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(wrapper, param.getKeywords(),
|
||||
"name", "phone", "league_position", "college", "class_name", "id_card_no")).getRecords(),
|
||||
page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户团员管理")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<TyglForm>> userPage(TyglFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<TyglForm, TyglFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("serial_no asc,id desc");
|
||||
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<TyglForm> wrapper =
|
||||
page.getWrapperWithConsumer(queryWrapper -> {
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
if (param.getUserIds() != null && !param.getUserIds().isEmpty()) {
|
||||
queryWrapper.in("user_id", param.getUserIds());
|
||||
}
|
||||
}, "keywords", "userIds");
|
||||
return success(new PageResult<>(tyglFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(wrapper, param.getKeywords(),
|
||||
"name", "phone", "league_position", "college", "class_name", "id_card_no")).getRecords(),
|
||||
page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部团员管理")
|
||||
@GetMapping()
|
||||
public ApiResult<List<TyglForm>> list(TyglFormParam param) {
|
||||
PageParam<TyglForm, TyglFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("serial_no asc,id desc");
|
||||
return success(tyglFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "phone", "league_position", "college", "class_name", "id_card_no"))));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("导出团员管理")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export(@RequestBody TyglFormParam param, HttpServletRequest request) throws IOException {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<TyglForm, TyglFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("serial_no asc,id desc");
|
||||
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<TyglForm> wrapper =
|
||||
page.getWrapperWithConsumer(queryWrapper -> {
|
||||
if (param.getUserIds() != null && !param.getUserIds().isEmpty()) {
|
||||
queryWrapper.in("user_id", param.getUserIds());
|
||||
}
|
||||
}, "keywords", "userIds");
|
||||
List<TyglForm> records = tyglFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(wrapper, param.getKeywords(),
|
||||
"name", "phone", "league_position", "college", "class_name", "id_card_no")));
|
||||
|
||||
String relativePath = "file/excel/团员管理导出" + System.currentTimeMillis() + ".xls";
|
||||
File targetFile = new File(uploadPath + relativePath);
|
||||
File parentFile = targetFile.getParentFile();
|
||||
if (parentFile != null && !parentFile.exists()) {
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
|
||||
try (HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
FileOutputStream output = new FileOutputStream(targetFile)) {
|
||||
HSSFSheet sheet = workbook.createSheet("团员管理");
|
||||
sheet.setColumnWidth(0, 10 * 256);
|
||||
sheet.setColumnWidth(1, 14 * 256);
|
||||
sheet.setColumnWidth(2, 10 * 256);
|
||||
sheet.setColumnWidth(3, 14 * 256);
|
||||
sheet.setColumnWidth(4, 24 * 256);
|
||||
sheet.setColumnWidth(5, 24 * 256);
|
||||
sheet.setColumnWidth(6, 16 * 256);
|
||||
sheet.setColumnWidth(7, 18 * 256);
|
||||
sheet.setColumnWidth(8, 20 * 256);
|
||||
sheet.setColumnWidth(9, 28 * 256);
|
||||
sheet.setColumnWidth(10, 24 * 256);
|
||||
sheet.setColumnWidth(11, 16 * 256);
|
||||
sheet.setColumnWidth(12, 18 * 256);
|
||||
sheet.setColumnWidth(13, 16 * 256);
|
||||
|
||||
HSSFRow headerRow = sheet.createRow(0);
|
||||
headerRow.createCell(0).setCellValue("序号");
|
||||
headerRow.createCell(1).setCellValue("姓名");
|
||||
headerRow.createCell(2).setCellValue("性别");
|
||||
headerRow.createCell(3).setCellValue("民族");
|
||||
headerRow.createCell(4).setCellValue("学院");
|
||||
headerRow.createCell(5).setCellValue("班级");
|
||||
headerRow.createCell(6).setCellValue("政治面貌");
|
||||
headerRow.createCell(7).setCellValue("手机号码");
|
||||
headerRow.createCell(8).setCellValue("团内职务");
|
||||
headerRow.createCell(9).setCellValue("所属团支部");
|
||||
headerRow.createCell(10).setCellValue("身份证号");
|
||||
headerRow.createCell(11).setCellValue("出生日期");
|
||||
headerRow.createCell(12).setCellValue("团籍是否在本组织");
|
||||
headerRow.createCell(13).setCellValue("入团年月");
|
||||
|
||||
int rowNum = 1;
|
||||
for (TyglForm form : records) {
|
||||
fillBranchOrganizationName(form);
|
||||
HSSFRow dataRow = sheet.createRow(rowNum++);
|
||||
dataRow.createCell(0).setCellValue(toExportValue(form.getSerialNo()));
|
||||
dataRow.createCell(1).setCellValue(toExportValue(form.getName()));
|
||||
dataRow.createCell(2).setCellValue(toExportValue(form.getGender()));
|
||||
dataRow.createCell(3).setCellValue(toExportValue(form.getNation()));
|
||||
dataRow.createCell(4).setCellValue(toExportValue(form.getCollege()));
|
||||
dataRow.createCell(5).setCellValue(toExportValue(form.getClassName()));
|
||||
dataRow.createCell(6).setCellValue(toExportValue(form.getPolitics()));
|
||||
dataRow.createCell(7).setCellValue(toExportValue(form.getPhone()));
|
||||
dataRow.createCell(8).setCellValue(toExportValue(form.getLeaguePosition()));
|
||||
dataRow.createCell(9).setCellValue(toExportValue(form.getBranchOrganizationName()));
|
||||
dataRow.createCell(10).setCellValue(toExportValue(form.getIdCardNo()));
|
||||
dataRow.createCell(11).setCellValue(toExportValue(form.getBirthDate()));
|
||||
dataRow.createCell(12).setCellValue(toExportValue(form.getArchiveInCurrentOrg()));
|
||||
dataRow.createCell(13).setCellValue(toExportValue(form.getJoinMonth()));
|
||||
}
|
||||
workbook.write(output);
|
||||
output.flush();
|
||||
}
|
||||
|
||||
FileRecord result = new FileRecord();
|
||||
result.setCreateUserId(getLoginUserId());
|
||||
result.setName(targetFile.getName());
|
||||
result.setPath(targetFile.getAbsolutePath());
|
||||
result.setUrl(requestURL + "/" + relativePath);
|
||||
fileRecordService.save(result);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询团员管理")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<TyglForm> get(@PathVariable("id") Integer id) {
|
||||
return success(fillBranchOrganizationName(tyglFormService.getById(id)));
|
||||
}
|
||||
|
||||
@ApiOperation("查询当前用户团员管理")
|
||||
@GetMapping("/current")
|
||||
public ApiResult<?> current() {
|
||||
Integer userId = getLoginUserId();
|
||||
if (userId == null) {
|
||||
return success();
|
||||
}
|
||||
return success(fillBranchOrganizationName(tyglFormService.getCurrentUserForm(userId, getTenantId())));
|
||||
}
|
||||
|
||||
@ApiOperation("查询团员青年数据分析中心明细")
|
||||
@GetMapping("/data-center")
|
||||
public ApiResult<TyglDataCenterResult> dataCenter() {
|
||||
List<TyglForm> records = tyglFormService.list(new LambdaQueryWrapper<TyglForm>()
|
||||
.select(TyglForm::getId, TyglForm::getSerialNo, TyglForm::getName, TyglForm::getGender,
|
||||
TyglForm::getNation, TyglForm::getCollege, TyglForm::getClassName,
|
||||
TyglForm::getPolitics, TyglForm::getPhone, TyglForm::getLeaguePosition,
|
||||
TyglForm::getBranchOrganizationId, TyglForm::getBranchOrganizationName,
|
||||
TyglForm::getIdCardNo, TyglForm::getBirthDate,
|
||||
TyglForm::getArchiveInCurrentOrg, TyglForm::getJoinMonth,
|
||||
TyglForm::getMemberRecords, TyglForm::getGrowthArchives)
|
||||
.eq(TyglForm::getTenantId, getTenantId())
|
||||
.orderByAsc(TyglForm::getSerialNo)
|
||||
.orderByDesc(TyglForm::getId));
|
||||
List<TyglDataCenterRecord> detailRecords = records.stream()
|
||||
.map(this::toDataCenterRecord)
|
||||
.collect(Collectors.toList());
|
||||
TyglDataCenterResult result = new TyglDataCenterResult();
|
||||
result.setRecords(detailRecords);
|
||||
result.setSummary(buildDataCenterSummary(records, detailRecords));
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加团员管理")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody TyglForm tyglForm) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
tyglForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
fillBranchOrganizationName(tyglForm);
|
||||
return tyglFormService.save(tyglForm) ? success("添加成功") : fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改团员管理")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody TyglForm tyglForm) {
|
||||
fillBranchOrganizationName(tyglForm);
|
||||
return tyglFormService.updateById(tyglForm) ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("更新团员记录")
|
||||
@PutMapping("/member-records/{id}")
|
||||
public ApiResult<?> updateMemberRecords(@PathVariable("id") Integer id,
|
||||
@RequestBody TyglMemberRecordsUpdateParam param) {
|
||||
return tyglFormService.updateMemberRecords(id, param) ? success("保存成功") : fail("保存失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("更新成长档案")
|
||||
@PutMapping("/growth-archives/{id}")
|
||||
public ApiResult<?> updateGrowthArchives(@PathVariable("id") Integer id,
|
||||
@RequestBody TyglGrowthArchivesUpdateParam param) {
|
||||
return tyglFormService.updateGrowthArchives(id, param) ? success("保存成功") : fail("保存失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除团员管理")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return tyglFormService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改团员管理")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<TyglForm> batchParam) {
|
||||
return batchParam.update(tyglFormService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除团员管理")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return tyglFormService.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private TyglDataCenterRecord toDataCenterRecord(TyglForm form) {
|
||||
TyglDataCenterRecord record = new TyglDataCenterRecord();
|
||||
record.setId(form.getId());
|
||||
record.setSerialNo(form.getSerialNo());
|
||||
record.setName(normalizeDisplayValue(form.getName(), "未填写"));
|
||||
record.setGender(normalizeDisplayValue(form.getGender(), "未填写"));
|
||||
record.setNation(normalizeDisplayValue(form.getNation(), "未填写"));
|
||||
record.setPhone(normalizeDisplayValue(form.getPhone(), "未填写"));
|
||||
record.setLeaguePosition(normalizeDisplayValue(form.getLeaguePosition(), "未填写"));
|
||||
record.setArchiveInCurrentOrg(normalizeDisplayValue(form.getArchiveInCurrentOrg(), "未填写"));
|
||||
record.setJoinMonth(normalizeDisplayValue(form.getJoinMonth(), "未填写"));
|
||||
record.setJoinYear(extractJoinYear(form.getJoinMonth()));
|
||||
record.setMemberRecordCount(form.getMemberRecords() == null ? 0 : form.getMemberRecords().size());
|
||||
record.setGrowthArchiveCount(form.getGrowthArchives() == null ? 0 : form.getGrowthArchives().size());
|
||||
record.setProfileStatus(record.getMemberRecordCount() > 0 || record.getGrowthArchiveCount() > 0
|
||||
? "已完善"
|
||||
: "待完善");
|
||||
return record;
|
||||
}
|
||||
|
||||
private TyglDataCenterSummary buildDataCenterSummary(List<TyglForm> sourceForms,
|
||||
List<TyglDataCenterRecord> detailRecords) {
|
||||
TyglDataCenterSummary summary = new TyglDataCenterSummary();
|
||||
int memberCount = detailRecords.size();
|
||||
int maleCount = (int) detailRecords.stream().filter(item -> "男".equals(item.getGender())).count();
|
||||
int femaleCount = (int) detailRecords.stream().filter(item -> "女".equals(item.getGender())).count();
|
||||
int archiveInOrgCount = (int) detailRecords.stream()
|
||||
.filter(item -> StrUtil.contains(item.getArchiveInCurrentOrg(), "是"))
|
||||
.count();
|
||||
int completedProfileCount = (int) detailRecords.stream()
|
||||
.filter(item -> "已完善".equals(item.getProfileStatus()))
|
||||
.count();
|
||||
int youthUnder28Count = (int) sourceForms.stream()
|
||||
.filter(this::isYouthUnder28)
|
||||
.count();
|
||||
|
||||
summary.setMemberCount(memberCount);
|
||||
summary.setMaleCount(maleCount);
|
||||
summary.setFemaleCount(femaleCount);
|
||||
summary.setArchiveInOrgCount(archiveInOrgCount);
|
||||
summary.setCompletedProfileCount(completedProfileCount);
|
||||
summary.setYouthUnder28Count(youthUnder28Count);
|
||||
summary.setGenderRatio(String.format(Locale.ROOT, "%d:%d", maleCount, femaleCount));
|
||||
summary.setMemberYouthRatio(formatMemberYouthRatio(memberCount, youthUnder28Count));
|
||||
return summary;
|
||||
}
|
||||
|
||||
private boolean isYouthUnder28(TyglForm form) {
|
||||
if (form == null || StrUtil.isBlank(form.getBirthDate())) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
java.time.LocalDate birthDate = java.time.LocalDate.parse(form.getBirthDate().trim());
|
||||
java.time.LocalDate today = java.time.LocalDate.now();
|
||||
int age = java.time.Period.between(birthDate, today).getYears();
|
||||
return age <= 28;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private String formatMemberYouthRatio(int memberCount, int youthUnder28Count) {
|
||||
if (youthUnder28Count <= 0) {
|
||||
return "0.00%";
|
||||
}
|
||||
double ratio = memberCount * 100D / youthUnder28Count;
|
||||
return String.format(Locale.ROOT, "%.2f%%", ratio);
|
||||
}
|
||||
|
||||
private TyglForm fillBranchOrganizationName(TyglForm form) {
|
||||
if (form == null) {
|
||||
return null;
|
||||
}
|
||||
Integer branchOrganizationId = form.getBranchOrganizationId();
|
||||
if (branchOrganizationId == null) {
|
||||
form.setBranchOrganizationName(null);
|
||||
return form;
|
||||
}
|
||||
if (StrUtil.isNotBlank(form.getBranchOrganizationName())) {
|
||||
form.setBranchOrganizationName(form.getBranchOrganizationName().trim());
|
||||
return form;
|
||||
}
|
||||
Organization organization = organizationService.getByIdRel(branchOrganizationId);
|
||||
form.setBranchOrganizationName(organization == null ? null : organization.getOrganizationName());
|
||||
return form;
|
||||
}
|
||||
|
||||
private String extractJoinYear(String joinMonth) {
|
||||
if (StrUtil.isBlank(joinMonth)) {
|
||||
return "未填写";
|
||||
}
|
||||
String normalized = joinMonth.trim();
|
||||
if (normalized.length() >= 4) {
|
||||
String year = normalized.substring(0, 4);
|
||||
if (year.matches("\\d{4}")) {
|
||||
return String.format(Locale.ROOT, "%s年", year);
|
||||
}
|
||||
}
|
||||
return "未填写";
|
||||
}
|
||||
|
||||
private String normalizeDisplayValue(String value, String defaultValue) {
|
||||
return StrUtil.isBlank(value) ? defaultValue : value.trim();
|
||||
}
|
||||
|
||||
private String toExportValue(Object value) {
|
||||
return value == null ? "" : String.valueOf(value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gxmu.entity.TzbProjectListRecord;
|
||||
import com.gxwebsoft.gxmu.param.TzbProjectListRecordParam;
|
||||
import com.gxwebsoft.gxmu.service.TzbProjectListRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挑战杯项目库列表控制器
|
||||
*
|
||||
* @author Codex
|
||||
* @since 2026-04-14
|
||||
*/
|
||||
@Api(tags = "挑战杯项目库列表")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/tzb-project-list")
|
||||
public class TzbProjectListController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private TzbProjectListRecordService tzbProjectListRecordService;
|
||||
|
||||
@ApiOperation("分页查询挑战杯项目库列表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<TzbProjectListRecord>> page(TzbProjectListRecordParam param) {
|
||||
return success(tzbProjectListRecordService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询挑战杯项目库列表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<TzbProjectListRecord>> list(TzbProjectListRecordParam param) {
|
||||
return success(tzbProjectListRecordService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询挑战杯项目库记录")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<TzbProjectListRecord> get(@PathVariable("id") Integer id) {
|
||||
return success(tzbProjectListRecordService.getByIdRel(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gxmu.entity.TzbTalentListRecord;
|
||||
import com.gxwebsoft.gxmu.param.TzbTalentListRecordParam;
|
||||
import com.gxwebsoft.gxmu.service.TzbTalentListRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挑战杯人才库列表控制器
|
||||
*
|
||||
* @author Codex
|
||||
* @since 2026-04-14
|
||||
*/
|
||||
@Api(tags = "挑战杯人才库列表")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/tzb-talent-list")
|
||||
public class TzbTalentListController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private TzbTalentListRecordService tzbTalentListRecordService;
|
||||
|
||||
@ApiOperation("分页查询挑战杯人才库列表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<TzbTalentListRecord>> page(TzbTalentListRecordParam param) {
|
||||
return success(tzbTalentListRecordService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询挑战杯人才库列表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<TzbTalentListRecord>> list(TzbTalentListRecordParam param) {
|
||||
return success(tzbTalentListRecordService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询挑战杯人才库记录")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<TzbTalentListRecord> get(@PathVariable("id") Integer id) {
|
||||
return success(tzbTalentListRecordService.getByIdRel(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.gxmu.entity.TzbcyForm;
|
||||
import com.gxwebsoft.gxmu.model.TzbcyStatisticsResult;
|
||||
import com.gxwebsoft.gxmu.param.TzbcyFormParam;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowStarterService;
|
||||
import com.gxwebsoft.gxmu.service.TzbcyFormService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
import com.gxwebsoft.gxmu.util.TzbcyFormItemNormalizer;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 挑战杯创业计划竞赛申报表控制器
|
||||
*/
|
||||
@Api(tags = "挑战杯创业计划竞赛申报表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/tzbcy-form")
|
||||
public class TzbcyFormController extends BaseController {
|
||||
@Resource
|
||||
private TzbcyFormService tzbcyFormService;
|
||||
@Resource
|
||||
private ReviewFlowStarterService reviewFlowStarterService;
|
||||
|
||||
@ApiOperation("分页查询挑战杯创业计划竞赛申报表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<TzbcyForm>> page(TzbcyFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, false);
|
||||
PageParam<TzbcyForm, TzbcyFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(tzbcyFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"project_name", "leader", "school_name")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户挑战杯创业计划竞赛申报表")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<TzbcyForm>> userPage(TzbcyFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, false);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<TzbcyForm, TzbcyFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(tzbcyFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"project_name", "leader", "school_name")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部挑战杯创业计划竞赛申报表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<TzbcyForm>> list(TzbcyFormParam param) {
|
||||
PageParam<TzbcyForm, TzbcyFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(tzbcyFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"project_name", "leader", "school_name"))));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询挑战杯创业计划竞赛申报表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<TzbcyForm> get(@PathVariable("id") Integer id) {
|
||||
return success(tzbcyFormService.getById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("查询挑战杯数据统计")
|
||||
@GetMapping("/statistics")
|
||||
public ApiResult<TzbcyStatisticsResult> statistics(@RequestParam(value = "year", required = false) Integer year) {
|
||||
return success(tzbcyFormService.getStatistics(year));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加挑战杯创业计划竞赛申报表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody TzbcyForm tzbcyForm) {
|
||||
normalizeForm(tzbcyForm);
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
tzbcyForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (tzbcyFormService.save(tzbcyForm)) {
|
||||
reviewFlowStarterService.startReview("gxmu_tzbcy_form", tzbcyForm.getId());
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改挑战杯创业计划竞赛申报表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody TzbcyForm tzbcyForm) {
|
||||
normalizeForm(tzbcyForm);
|
||||
if (tzbcyFormService.updateById(tzbcyForm)) {
|
||||
reviewFlowStarterService.restartReviewWhenLastRejected("gxmu_tzbcy_form", tzbcyForm.getId());
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除挑战杯创业计划竞赛申报表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return tzbcyFormService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改挑战杯创业计划竞赛申报表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<TzbcyForm> batchParam) {
|
||||
normalizeForm(batchParam.getData());
|
||||
return batchParam.update(tzbcyFormService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除挑战杯创业计划竞赛申报表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return tzbcyFormService.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private void normalizeForm(TzbcyForm form) {
|
||||
if (form == null) {
|
||||
return;
|
||||
}
|
||||
TzbcyFormItemNormalizer.normalize(form);
|
||||
form.setTeamMembers(filterItems(form.getTeamMembers(),
|
||||
item -> hasText(item.getName())
|
||||
|| hasText(item.getGender())
|
||||
|| hasText(item.getCollege())
|
||||
|| hasText(item.getGradeMajor())
|
||||
|| hasText(item.getPhone())
|
||||
|| hasText(item.getRemark())));
|
||||
form.setAdvisors(filterItems(form.getAdvisors(),
|
||||
item -> hasText(item.getName())
|
||||
|| hasText(item.getGender())
|
||||
|| hasText(item.getCollege())
|
||||
|| hasText(item.getTitle())
|
||||
|| hasText(item.getDuty())
|
||||
|| hasText(item.getPhone())));
|
||||
if (form.getTeamMembers() != null && !form.getTeamMembers().isEmpty()) {
|
||||
TzbcyForm.TeamMember leaderMember = form.getTeamMembers().get(0);
|
||||
form.setLeader(leaderMember.getName());
|
||||
form.setPhone(leaderMember.getPhone());
|
||||
}
|
||||
}
|
||||
|
||||
private <T> List<T> filterItems(List<T> items, Predicate<T> predicate) {
|
||||
if (items == null || items.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return items.stream().filter(Objects::nonNull).filter(predicate).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private boolean hasText(String value) {
|
||||
return value != null && !value.trim().isEmpty();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.gxmu.entity.TzbcyMaterial;
|
||||
import com.gxwebsoft.gxmu.param.TzbcyMaterialParam;
|
||||
import com.gxwebsoft.gxmu.service.TzbcyMaterialService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挑战杯申报材料控制器
|
||||
*/
|
||||
@Api(tags = "挑战杯申报材料管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/tzbcy-material")
|
||||
public class TzbcyMaterialController extends BaseController {
|
||||
@Resource
|
||||
private TzbcyMaterialService tzbcyMaterialService;
|
||||
@Resource
|
||||
private FileRecordService fileRecordService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
@ApiOperation("分页查询挑战杯申报材料")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<TzbcyMaterial>> page(TzbcyMaterialParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, false);
|
||||
return success(tzbcyMaterialService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询挑战杯申报材料列表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<TzbcyMaterial>> list(TzbcyMaterialParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, false);
|
||||
return success(tzbcyMaterialService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询挑战杯申报材料")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<TzbcyMaterial> get(@PathVariable("id") Integer id) {
|
||||
return success(tzbcyMaterialService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加挑战杯申报材料")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody TzbcyMaterial material) {
|
||||
FileRecord fileRecord = material.getFileId() == null ? null : fileRecordService.getById(material.getFileId());
|
||||
return tzbcyMaterialService.saveMaterial(material, fileRecord, getLoginUserId(), getTenantId())
|
||||
? success("提交成功") : fail("提交失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改挑战杯申报材料")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody TzbcyMaterial material) {
|
||||
FileRecord fileRecord = material.getFileId() == null ? null : fileRecordService.getById(material.getFileId());
|
||||
return tzbcyMaterialService.updateMaterial(material, fileRecord)
|
||||
? success("提交成功") : fail("提交失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("审核挑战杯申报材料")
|
||||
@PutMapping("/audit")
|
||||
public ApiResult<?> audit(@RequestBody AuditParam param) {
|
||||
return tzbcyMaterialService.audit(param.getId(), param.getStatus(), param.getRejectReason(), getLoginUserId())
|
||||
? success("审核成功") : fail("审核失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除挑战杯申报材料")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
TzbcyMaterial material = tzbcyMaterialService.getById(id);
|
||||
if (material != null && Integer.valueOf(1).equals(material.getStatus())) {
|
||||
return fail("材料已审核通过,不能删除");
|
||||
}
|
||||
return tzbcyMaterialService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("导出挑战杯申报材料ZIP")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<FileRecord> export(@RequestBody TzbcyMaterialParam param) throws IOException {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
return success(tzbcyMaterialService.exportZip(param, uploadPath, requestURL, getLoginUserId()));
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class AuditParam {
|
||||
private Integer id;
|
||||
private Integer status;
|
||||
private String rejectReason;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
import com.gxwebsoft.common.system.entity.Organization;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.common.system.service.OrganizationService;
|
||||
import com.gxwebsoft.gxmu.entity.WshqtwForm;
|
||||
import com.gxwebsoft.gxmu.param.WshqtwFormParam;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowStarterService;
|
||||
import com.gxwebsoft.gxmu.service.WshqtwFormService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
import com.gxwebsoft.gxmu.util.WshqtwDocxExportUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* 五四红旗团委申报表控制器
|
||||
*/
|
||||
@Api(tags = "五四红旗团委申报表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/wshqtw-form")
|
||||
public class WshqtwFormController extends BaseController {
|
||||
@Resource
|
||||
private WshqtwFormService wshqtwFormService;
|
||||
@Resource
|
||||
private ReviewFlowStarterService reviewFlowStarterService;
|
||||
@Resource
|
||||
private FileRecordService fileRecordService;
|
||||
@Resource
|
||||
private OrganizationService organizationService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
@ApiOperation("分页查询五四红旗团委申报表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<WshqtwForm>> page(WshqtwFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<WshqtwForm, WshqtwFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(wshqtwFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"org_name", "leader", "phone")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户五四红旗团委申报表")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<WshqtwForm>> userPage(WshqtwFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<WshqtwForm, WshqtwFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(wshqtwFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"org_name", "leader", "phone")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部五四红旗团委申报表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<WshqtwForm>> list(WshqtwFormParam param) {
|
||||
PageParam<WshqtwForm, WshqtwFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(wshqtwFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"org_name", "leader", "phone"))));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("导出五四红旗团委申报材料")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export(@RequestBody WshqtwFormParam param, HttpServletRequest request) throws IOException {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<WshqtwForm, WshqtwFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
List<WshqtwForm> records = wshqtwFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"org_name", "leader", "phone")));
|
||||
if (records == null || records.isEmpty()) {
|
||||
return fail("暂无可导出的数据");
|
||||
}
|
||||
|
||||
User loginUser = getLoginUser();
|
||||
WshqtwDocxExportUtil.SummaryMeta summaryMeta = new WshqtwDocxExportUtil.SummaryMeta();
|
||||
summaryMeta.setYearText(resolveYearText(param, records));
|
||||
summaryMeta.setReporter(loginUser == null ? "" : resolveReporter(loginUser));
|
||||
summaryMeta.setContact(loginUser == null ? "" : valueOf(loginUser.getPhone()));
|
||||
summaryMeta.setOrganizationPartyOpinion(resolveOrganizationPartyOpinion(loginUser));
|
||||
|
||||
String relativePath = "file/docx/五四红旗团委申报材料_" + System.currentTimeMillis() + ".zip";
|
||||
File targetFile = new File(uploadPath + relativePath);
|
||||
File parentFile = targetFile.getParentFile();
|
||||
if (parentFile != null && !parentFile.exists()) {
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(targetFile);
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) {
|
||||
WshqtwDocxExportUtil.writeExportZip(zipOutputStream, records, summaryMeta);
|
||||
zipOutputStream.finish();
|
||||
}
|
||||
|
||||
FileRecord result = new FileRecord();
|
||||
result.setCreateUserId(getLoginUserId());
|
||||
result.setName(targetFile.getName());
|
||||
result.setPath(targetFile.getAbsolutePath());
|
||||
result.setContentType("application/zip");
|
||||
result.setUrl(requestURL + "/" + relativePath);
|
||||
fileRecordService.save(result);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询五四红旗团委申报表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<WshqtwForm> get(@PathVariable("id") Integer id) {
|
||||
return success(wshqtwFormService.getById(id));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加五四红旗团委申报表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody WshqtwForm wshqtwForm) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
wshqtwForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (wshqtwFormService.save(wshqtwForm)) {
|
||||
reviewFlowStarterService.startReview("gxmu_wshqtw", wshqtwForm.getId());
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改五四红旗团委申报表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody WshqtwForm wshqtwForm) {
|
||||
if (wshqtwFormService.updateById(wshqtwForm)) {
|
||||
reviewFlowStarterService.restartReviewWhenLastRejected("gxmu_wshqtw", wshqtwForm.getId());
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除五四红旗团委申报表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return wshqtwFormService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改五四红旗团委申报表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<WshqtwForm> batchParam) {
|
||||
return batchParam.update(wshqtwFormService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除五四红旗团委申报表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return wshqtwFormService.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private String resolveYearText(WshqtwFormParam param, List<WshqtwForm> records) {
|
||||
if (param.getYear() != null) {
|
||||
return String.valueOf(param.getYear());
|
||||
}
|
||||
if (records != null && !records.isEmpty() && records.get(0).getYear() != null) {
|
||||
return String.valueOf(records.get(0).getYear());
|
||||
}
|
||||
return String.valueOf(java.time.LocalDate.now().getYear());
|
||||
}
|
||||
|
||||
private String resolveReporter(User loginUser) {
|
||||
if (loginUser == null) {
|
||||
return "";
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getRealName())) {
|
||||
return loginUser.getRealName().trim();
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getNickname())) {
|
||||
return loginUser.getNickname().trim();
|
||||
}
|
||||
return valueOf(loginUser.getUsername());
|
||||
}
|
||||
|
||||
private String resolveOrganizationPartyOpinion(User loginUser) {
|
||||
if (loginUser == null || loginUser.getOrganizationId() == null) {
|
||||
return "(盖章)";
|
||||
}
|
||||
Organization organization = organizationService.getByIdRel(loginUser.getOrganizationId());
|
||||
String organizationName = organization == null ? "" : valueOf(organization.getOrganizationName());
|
||||
return organizationName.isEmpty() ? "(盖章)" : organizationName + "(盖章)";
|
||||
}
|
||||
|
||||
private String valueOf(String value) {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
import com.gxwebsoft.common.system.entity.Organization;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.common.system.service.OrganizationService;
|
||||
import com.gxwebsoft.gxmu.entity.WshqtzbForm;
|
||||
import com.gxwebsoft.gxmu.param.WshqtzbFormParam;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowStarterService;
|
||||
import com.gxwebsoft.gxmu.service.WshqtzbFormService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
import com.gxwebsoft.gxmu.util.WshqtzbDocxExportUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* 五四红旗团支部申报表控制器
|
||||
*/
|
||||
@Api(tags = "五四红旗团支部申报表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/wshqtzb-form")
|
||||
public class WshqtzbFormController extends BaseController {
|
||||
@Resource
|
||||
private WshqtzbFormService wshqtzbFormService;
|
||||
@Resource
|
||||
private ReviewFlowStarterService reviewFlowStarterService;
|
||||
@Resource
|
||||
private FileRecordService fileRecordService;
|
||||
@Resource
|
||||
private OrganizationService organizationService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
@ApiOperation("分页查询五四红旗团支部申报表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<WshqtzbForm>> page(WshqtzbFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<WshqtzbForm, WshqtzbFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(wshqtzbFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"branch_name", "secretary", "contact")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户五四红旗团支部申报表")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<WshqtzbForm>> userPage(WshqtzbFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<WshqtzbForm, WshqtzbFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(wshqtzbFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"branch_name", "secretary", "contact")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部五四红旗团支部申报表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<WshqtzbForm>> list(WshqtzbFormParam param) {
|
||||
PageParam<WshqtzbForm, WshqtzbFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(wshqtzbFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"branch_name", "secretary", "contact"))));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("导出五四红旗团支部申报材料")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export(@RequestBody WshqtzbFormParam param, HttpServletRequest request) throws IOException {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<WshqtzbForm, WshqtzbFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
List<WshqtzbForm> records = wshqtzbFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"branch_name", "secretary", "contact")));
|
||||
if (records == null || records.isEmpty()) {
|
||||
return fail("暂无可导出的数据");
|
||||
}
|
||||
|
||||
User loginUser = getLoginUser();
|
||||
WshqtzbDocxExportUtil.SummaryMeta summaryMeta = new WshqtzbDocxExportUtil.SummaryMeta();
|
||||
summaryMeta.setYearText(resolveYearText(param, records));
|
||||
summaryMeta.setReporter(loginUser == null ? "" : resolveReporter(loginUser));
|
||||
summaryMeta.setContact(loginUser == null ? "" : valueOf(loginUser.getPhone()));
|
||||
summaryMeta.setOrganizationPartyOpinion(resolveOrganizationPartyOpinion(loginUser));
|
||||
|
||||
String relativePath = "file/docx/五四红旗团支部申报材料_" + System.currentTimeMillis() + ".zip";
|
||||
File targetFile = new File(uploadPath + relativePath);
|
||||
File parentFile = targetFile.getParentFile();
|
||||
if (parentFile != null && !parentFile.exists()) {
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(targetFile);
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) {
|
||||
WshqtzbDocxExportUtil.writeExportZip(zipOutputStream, records, summaryMeta);
|
||||
zipOutputStream.finish();
|
||||
}
|
||||
|
||||
FileRecord result = new FileRecord();
|
||||
result.setCreateUserId(getLoginUserId());
|
||||
result.setName(targetFile.getName());
|
||||
result.setPath(targetFile.getAbsolutePath());
|
||||
result.setContentType("application/zip");
|
||||
result.setUrl(requestURL + "/" + relativePath);
|
||||
fileRecordService.save(result);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询五四红旗团支部申报表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<WshqtzbForm> get(@PathVariable("id") Integer id) {
|
||||
return success(wshqtzbFormService.getById(id));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加五四红旗团支部申报表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody WshqtzbForm wshqtzbForm) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
wshqtzbForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (wshqtzbFormService.save(wshqtzbForm)) {
|
||||
reviewFlowStarterService.startReview("gxmu_wshqtzb", wshqtzbForm.getId());
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改五四红旗团支部申报表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody WshqtzbForm wshqtzbForm) {
|
||||
if (wshqtzbFormService.updateById(wshqtzbForm)) {
|
||||
reviewFlowStarterService.restartReviewWhenLastRejected("gxmu_wshqtzb", wshqtzbForm.getId());
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除五四红旗团支部申报表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return wshqtzbFormService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改五四红旗团支部申报表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<WshqtzbForm> batchParam) {
|
||||
return batchParam.update(wshqtzbFormService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除五四红旗团支部申报表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return wshqtzbFormService.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private String resolveYearText(WshqtzbFormParam param, List<WshqtzbForm> records) {
|
||||
if (param.getYear() != null) {
|
||||
return String.valueOf(param.getYear());
|
||||
}
|
||||
if (records != null && !records.isEmpty() && records.get(0).getYear() != null) {
|
||||
return String.valueOf(records.get(0).getYear());
|
||||
}
|
||||
return String.valueOf(java.time.LocalDate.now().getYear());
|
||||
}
|
||||
|
||||
private String resolveReporter(User loginUser) {
|
||||
if (loginUser == null) {
|
||||
return "";
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getRealName())) {
|
||||
return loginUser.getRealName().trim();
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getNickname())) {
|
||||
return loginUser.getNickname().trim();
|
||||
}
|
||||
return valueOf(loginUser.getUsername());
|
||||
}
|
||||
|
||||
private String resolveOrganizationPartyOpinion(User loginUser) {
|
||||
if (loginUser == null || loginUser.getOrganizationId() == null) {
|
||||
return "(盖章)";
|
||||
}
|
||||
Organization organization = organizationService.getByIdRel(loginUser.getOrganizationId());
|
||||
String organizationName = organization == null ? "" : valueOf(organization.getOrganizationName());
|
||||
return organizationName.isEmpty() ? "(盖章)" : organizationName + "(盖章)";
|
||||
}
|
||||
|
||||
private String valueOf(String value) {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,892 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.gxmu.entity.QmgcForm;
|
||||
import com.gxwebsoft.gxmu.entity.SjqnForm;
|
||||
import com.gxwebsoft.gxmu.entity.SjtbzbsjForm;
|
||||
import com.gxwebsoft.gxmu.entity.TzbcyForm;
|
||||
import com.gxwebsoft.gxmu.entity.WxxzxForm;
|
||||
import com.gxwebsoft.gxmu.entity.WshqtwForm;
|
||||
import com.gxwebsoft.gxmu.entity.WshqtzbForm;
|
||||
import com.gxwebsoft.gxmu.entity.YxgqtdgbForm;
|
||||
import com.gxwebsoft.gxmu.entity.YxgqtyForm;
|
||||
import com.gxwebsoft.gxmu.model.WxxzxDocxValidationResult;
|
||||
import com.gxwebsoft.gxmu.model.WxxzxTopicSemanticSearchResult;
|
||||
import com.gxwebsoft.gxmu.param.WxxzxMaterialUpdateParam;
|
||||
import com.gxwebsoft.gxmu.param.WxxzxFormParam;
|
||||
import com.gxwebsoft.gxmu.service.QmgcFormService;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowStarterService;
|
||||
import com.gxwebsoft.gxmu.service.SjqnFormService;
|
||||
import com.gxwebsoft.gxmu.service.SjtbzbsjFormService;
|
||||
import com.gxwebsoft.gxmu.service.TzbcyFormService;
|
||||
import com.gxwebsoft.gxmu.service.WxxzxFormService;
|
||||
import com.gxwebsoft.gxmu.service.WshqtwFormService;
|
||||
import com.gxwebsoft.gxmu.service.WshqtzbFormService;
|
||||
import com.gxwebsoft.gxmu.service.YxgqtdgbFormService;
|
||||
import com.gxwebsoft.gxmu.service.YxgqtyFormService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
import com.gxwebsoft.gxmu.util.WxxzxDocxExportUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRun;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* 未来学术之星课题申报表控制器
|
||||
*/
|
||||
@Api(tags = "未来学术之星课题申报表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/wxxzx-form")
|
||||
public class WxxzxFormController extends BaseController {
|
||||
private static final String PROJECT_BOOK_KEYWORD = "项目申报书";
|
||||
private static final String TITLE_FONT_CN = "黑体";
|
||||
private static final String TITLE_FONT_EN = "SimHei";
|
||||
private static final double TITLE_FONT_SIZE = 26D;
|
||||
private static final String BODY_FONT_CN = "宋体";
|
||||
private static final String BODY_FONT_EN = "SimSun";
|
||||
private static final double BODY_FONT_SIZE = 10.5D;
|
||||
private static final int MAX_DETAIL_ITEMS = 20;
|
||||
private static final int MAX_TOPIC_SEARCH_RESULTS = 30;
|
||||
private static final String DEFAULT_TOPIC_SEARCH_MODULE = "gxmu_wxxzx_project";
|
||||
private static final Map<String, String> TOPIC_SEARCH_MODULE_NAME_MAP;
|
||||
|
||||
static {
|
||||
Map<String, String> moduleNameMap = new LinkedHashMap<>();
|
||||
moduleNameMap.put("gxmu_sjqn", "十佳青年岗位能手");
|
||||
moduleNameMap.put("gxmu_sjtbzbsj", "十佳团支部书记");
|
||||
moduleNameMap.put("gxmu_wshqtw", "五四红旗团委");
|
||||
moduleNameMap.put("gxmu_wshqtzb", "五四红旗团支部");
|
||||
moduleNameMap.put("gxmu_yxgqtdgb", "优秀共青团干部");
|
||||
moduleNameMap.put("gxmu_yxgqty", "优秀共青团员");
|
||||
moduleNameMap.put("gxmu_tzbcy_form", "挑战杯");
|
||||
moduleNameMap.put("gxmu_qmgc_form", "青马工程");
|
||||
moduleNameMap.put(DEFAULT_TOPIC_SEARCH_MODULE, "未来学术之星");
|
||||
TOPIC_SEARCH_MODULE_NAME_MAP = Collections.unmodifiableMap(moduleNameMap);
|
||||
}
|
||||
|
||||
@Resource
|
||||
private WxxzxFormService wxxzxFormService;
|
||||
@Resource
|
||||
private SjqnFormService sjqnFormService;
|
||||
@Resource
|
||||
private SjtbzbsjFormService sjtbzbsjFormService;
|
||||
@Resource
|
||||
private WshqtwFormService wshqtwFormService;
|
||||
@Resource
|
||||
private WshqtzbFormService wshqtzbFormService;
|
||||
@Resource
|
||||
private YxgqtdgbFormService yxgqtdgbFormService;
|
||||
@Resource
|
||||
private YxgqtyFormService yxgqtyFormService;
|
||||
@Resource
|
||||
private TzbcyFormService tzbcyFormService;
|
||||
@Resource
|
||||
private QmgcFormService qmgcFormService;
|
||||
@Resource
|
||||
private ReviewFlowStarterService reviewFlowStarterService;
|
||||
@Resource
|
||||
private FileRecordService fileRecordService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
@ApiOperation("分页查询未来学术之星课题申报表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<WxxzxForm>> page(WxxzxFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<WxxzxForm, WxxzxFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(wxxzxFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"topic_name", "leader", "college_grade_class")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户未来学术之星课题申报表")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<WxxzxForm>> userPage(WxxzxFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<WxxzxForm, WxxzxFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(wxxzxFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"topic_name", "leader", "college_grade_class")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部未来学术之星课题申报表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<WxxzxForm>> list(WxxzxFormParam param) {
|
||||
PageParam<WxxzxForm, WxxzxFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(wxxzxFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"topic_name", "leader", "college_grade_class"))));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("导出未来学术之星课题申报材料")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export(@RequestBody WxxzxFormParam param, HttpServletRequest request) throws IOException {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<WxxzxForm, WxxzxFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
List<WxxzxForm> baseRecords = wxxzxFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"topic_name", "leader", "college_grade_class")));
|
||||
if (baseRecords == null || baseRecords.isEmpty()) {
|
||||
return fail("暂无可导出的数据");
|
||||
}
|
||||
|
||||
List<WxxzxForm> records = new ArrayList<>();
|
||||
for (WxxzxForm item : baseRecords) {
|
||||
if (item == null || item.getId() == null) {
|
||||
continue;
|
||||
}
|
||||
WxxzxForm full = wxxzxFormService.getById(item.getId());
|
||||
if (full != null) {
|
||||
records.add(full);
|
||||
}
|
||||
}
|
||||
if (records.isEmpty()) {
|
||||
return fail("暂无可导出的数据");
|
||||
}
|
||||
|
||||
WxxzxDocxExportUtil.SummaryMeta summaryMeta = new WxxzxDocxExportUtil.SummaryMeta();
|
||||
summaryMeta.setYearText(resolveYearText(param, records));
|
||||
summaryMeta.setReviewCollege(resolveReviewCollege(records));
|
||||
summaryMeta.setReviewReporter(resolveReviewReporter(records));
|
||||
summaryMeta.setReviewDate(resolveReviewDate(records));
|
||||
|
||||
String relativePath = "file/docx/未来学术之星申报材料_" + System.currentTimeMillis() + ".zip";
|
||||
File targetFile = new File(uploadPath + relativePath);
|
||||
File parentFile = targetFile.getParentFile();
|
||||
if (parentFile != null && !parentFile.exists()) {
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(targetFile);
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) {
|
||||
WxxzxDocxExportUtil.writeExportZip(zipOutputStream, records, summaryMeta);
|
||||
zipOutputStream.finish();
|
||||
}
|
||||
|
||||
FileRecord result = new FileRecord();
|
||||
result.setCreateUserId(getLoginUserId());
|
||||
result.setName(targetFile.getName());
|
||||
result.setPath(targetFile.getAbsolutePath());
|
||||
result.setContentType("application/zip");
|
||||
result.setUrl(requestURL + "/" + relativePath);
|
||||
fileRecordService.save(result);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询未来学术之星课题申报表")
|
||||
@GetMapping("/{id:\\d+}")
|
||||
public ApiResult<WxxzxForm> get(@PathVariable("id") Integer id) {
|
||||
return success(wxxzxFormService.getById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("项目主题语义检索")
|
||||
@GetMapping("/semantic-search")
|
||||
public ApiResult<List<WxxzxTopicSemanticSearchResult>> semanticSearch(
|
||||
@RequestParam(value = "keyword", required = false) String keyword,
|
||||
@RequestParam(value = "module", required = false) String module) {
|
||||
String normalizedKeyword = normalizeDisplayText(keyword);
|
||||
if (StrUtil.isBlank(normalizedKeyword)) {
|
||||
return success(new ArrayList<>());
|
||||
}
|
||||
String normalizedModule = resolveTopicSearchModule(module);
|
||||
if (normalizedModule == null) {
|
||||
return success(new ArrayList<>());
|
||||
}
|
||||
return success(searchTopicByModule(normalizedModule, normalizedKeyword));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加未来学术之星课题申报表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody WxxzxForm wxxzxForm) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
wxxzxForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (wxxzxFormService.save(wxxzxForm)) {
|
||||
reviewFlowStarterService.startReview("gxmu_wxxzx_project", wxxzxForm.getId());
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改未来学术之星课题申报表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody WxxzxForm wxxzxForm) {
|
||||
if (wxxzxFormService.updateById(wxxzxForm)) {
|
||||
reviewFlowStarterService.restartReviewWhenLastRejected("gxmu_wxxzx_project", wxxzxForm.getId());
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("更新未来学术之星过程材料")
|
||||
@PutMapping("/materials/{id}")
|
||||
public ApiResult<?> updateMaterials(@PathVariable("id") Integer id,
|
||||
@RequestBody WxxzxMaterialUpdateParam param) {
|
||||
return wxxzxFormService.updateMaterials(id, param) ? success("保存成功") : fail("保存失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("校验未来学术之星项目申报书docx格式")
|
||||
@PostMapping("/validate-project-book")
|
||||
public ApiResult<WxxzxDocxValidationResult> validateProjectBook(@RequestParam("file") MultipartFile file) {
|
||||
if (file == null || file.isEmpty()) {
|
||||
return fail("请上传docx文件", null);
|
||||
}
|
||||
String originalFilename = file.getOriginalFilename();
|
||||
if (StrUtil.isBlank(originalFilename) || !StrUtil.endWithIgnoreCase(originalFilename, ".docx")) {
|
||||
return fail("只能上传docx文件", null);
|
||||
}
|
||||
|
||||
WxxzxDocxValidationResult result = new WxxzxDocxValidationResult();
|
||||
result.setFileName(originalFilename);
|
||||
try (InputStream inputStream = file.getInputStream();
|
||||
XWPFDocument document = new XWPFDocument(inputStream)) {
|
||||
buildValidationResult(document, result);
|
||||
return success(result);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return fail("文件解析失败,请确认上传的是有效的docx文件", null);
|
||||
}
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除未来学术之星课题申报表")
|
||||
@DeleteMapping("/{id:\\d+}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return wxxzxFormService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改未来学术之星课题申报表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<WxxzxForm> batchParam) {
|
||||
return batchParam.update(wxxzxFormService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除未来学术之星课题申报表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return wxxzxFormService.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private String resolveYearText(WxxzxFormParam param, List<WxxzxForm> records) {
|
||||
if (param.getYear() != null) {
|
||||
return String.valueOf(param.getYear());
|
||||
}
|
||||
if (records != null && !records.isEmpty() && records.get(0).getYear() != null) {
|
||||
return String.valueOf(records.get(0).getYear());
|
||||
}
|
||||
return String.valueOf(java.time.LocalDate.now().getYear());
|
||||
}
|
||||
|
||||
private String resolveReviewCollege(List<WxxzxForm> records) {
|
||||
if (records == null) {
|
||||
return "";
|
||||
}
|
||||
for (WxxzxForm item : records) {
|
||||
if (StrUtil.isNotBlank(item.getReviewCollege())) {
|
||||
return item.getReviewCollege().trim();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private String resolveReviewReporter(List<WxxzxForm> records) {
|
||||
if (records == null) {
|
||||
return "";
|
||||
}
|
||||
for (WxxzxForm item : records) {
|
||||
if (StrUtil.isNotBlank(item.getReviewReporter())) {
|
||||
return item.getReviewReporter().trim();
|
||||
}
|
||||
}
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return "";
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getRealName())) {
|
||||
return loginUser.getRealName().trim();
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getNickname())) {
|
||||
return loginUser.getNickname().trim();
|
||||
}
|
||||
return loginUser.getUsername();
|
||||
}
|
||||
|
||||
private String resolveReviewDate(List<WxxzxForm> records) {
|
||||
if (records == null) {
|
||||
return "";
|
||||
}
|
||||
for (WxxzxForm item : records) {
|
||||
if (StrUtil.isNotBlank(item.getReviewDate())) {
|
||||
return item.getReviewDate().trim();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private WxxzxTopicSemanticSearchResult toTopicSearchResult(WxxzxForm form, String keyword) {
|
||||
WxxzxTopicSemanticSearchResult result = new WxxzxTopicSemanticSearchResult();
|
||||
result.setId(form.getId());
|
||||
result.setModule(DEFAULT_TOPIC_SEARCH_MODULE);
|
||||
result.setModuleName(TOPIC_SEARCH_MODULE_NAME_MAP.get(DEFAULT_TOPIC_SEARCH_MODULE));
|
||||
result.setTopicName(form.getTopicName());
|
||||
result.setTopicType(form.getTopicType());
|
||||
result.setRationale(form.getRationale());
|
||||
result.setSnippet(buildSnippet(form.getRationale(), keyword));
|
||||
result.setScore(calculateSemanticScore(form, keyword));
|
||||
return result;
|
||||
}
|
||||
|
||||
private String resolveTopicSearchModule(String module) {
|
||||
String normalizedModule = StrUtil.isBlank(module) ? DEFAULT_TOPIC_SEARCH_MODULE : module.trim();
|
||||
return TOPIC_SEARCH_MODULE_NAME_MAP.containsKey(normalizedModule) ? normalizedModule : null;
|
||||
}
|
||||
|
||||
private List<WxxzxTopicSemanticSearchResult> searchTopicByModule(String module, String keyword) {
|
||||
if ("gxmu_sjqn".equals(module)) {
|
||||
return finishTopicSearchResults(sjqnFormService.list(new LambdaQueryWrapper<SjqnForm>()
|
||||
.select(SjqnForm::getId, SjqnForm::getName, SjqnForm::getApplyType,
|
||||
SjqnForm::getMainStory, SjqnForm::getCreateTime, SjqnForm::getUpdateTime)
|
||||
.eq(SjqnForm::getTenantId, getTenantId())
|
||||
.like(SjqnForm::getName, keyword)
|
||||
.orderByDesc(SjqnForm::getUpdateTime)
|
||||
.orderByDesc(SjqnForm::getCreateTime))
|
||||
.stream()
|
||||
.map(item -> toTopicSearchResult(module, item.getId(), item.getName(), item.getApplyType(),
|
||||
item.getMainStory(), keyword))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
if ("gxmu_sjtbzbsj".equals(module)) {
|
||||
return finishTopicSearchResults(sjtbzbsjFormService.list(new LambdaQueryWrapper<SjtbzbsjForm>()
|
||||
.select(SjtbzbsjForm::getId, SjtbzbsjForm::getName, SjtbzbsjForm::getBranch,
|
||||
SjtbzbsjForm::getMainStory, SjtbzbsjForm::getCreateTime, SjtbzbsjForm::getUpdateTime)
|
||||
.eq(SjtbzbsjForm::getTenantId, getTenantId())
|
||||
.like(SjtbzbsjForm::getName, keyword)
|
||||
.orderByDesc(SjtbzbsjForm::getUpdateTime)
|
||||
.orderByDesc(SjtbzbsjForm::getCreateTime))
|
||||
.stream()
|
||||
.map(item -> toTopicSearchResult(module, item.getId(), item.getName(), item.getBranch(),
|
||||
item.getMainStory(), keyword))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
if ("gxmu_wshqtw".equals(module)) {
|
||||
return finishTopicSearchResults(wshqtwFormService.list(new LambdaQueryWrapper<WshqtwForm>()
|
||||
.select(WshqtwForm::getId, WshqtwForm::getOrgName, WshqtwForm::getLeader,
|
||||
WshqtwForm::getWorkSummaryThreeYears, WshqtwForm::getCreateTime, WshqtwForm::getUpdateTime)
|
||||
.eq(WshqtwForm::getTenantId, getTenantId())
|
||||
.like(WshqtwForm::getOrgName, keyword)
|
||||
.orderByDesc(WshqtwForm::getUpdateTime)
|
||||
.orderByDesc(WshqtwForm::getCreateTime))
|
||||
.stream()
|
||||
.map(item -> toTopicSearchResult(module, item.getId(), item.getOrgName(), item.getLeader(),
|
||||
item.getWorkSummaryThreeYears(), keyword))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
if ("gxmu_wshqtzb".equals(module)) {
|
||||
return finishTopicSearchResults(wshqtzbFormService.list(new LambdaQueryWrapper<WshqtzbForm>()
|
||||
.select(WshqtzbForm::getId, WshqtzbForm::getBranchName, WshqtzbForm::getSecondOrg,
|
||||
WshqtzbForm::getWorkSummaryThreeYears, WshqtzbForm::getCreateTime, WshqtzbForm::getUpdateTime)
|
||||
.eq(WshqtzbForm::getTenantId, getTenantId())
|
||||
.like(WshqtzbForm::getBranchName, keyword)
|
||||
.orderByDesc(WshqtzbForm::getUpdateTime)
|
||||
.orderByDesc(WshqtzbForm::getCreateTime))
|
||||
.stream()
|
||||
.map(item -> toTopicSearchResult(module, item.getId(), item.getBranchName(), item.getSecondOrg(),
|
||||
item.getWorkSummaryThreeYears(), keyword))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
if ("gxmu_yxgqtdgb".equals(module)) {
|
||||
return finishTopicSearchResults(yxgqtdgbFormService.list(new LambdaQueryWrapper<YxgqtdgbForm>()
|
||||
.select(YxgqtdgbForm::getId, YxgqtdgbForm::getName, YxgqtdgbForm::getOrganization,
|
||||
YxgqtdgbForm::getMainStory, YxgqtdgbForm::getCreateTime, YxgqtdgbForm::getUpdateTime)
|
||||
.eq(YxgqtdgbForm::getTenantId, getTenantId())
|
||||
.like(YxgqtdgbForm::getName, keyword)
|
||||
.orderByDesc(YxgqtdgbForm::getUpdateTime)
|
||||
.orderByDesc(YxgqtdgbForm::getCreateTime))
|
||||
.stream()
|
||||
.map(item -> toTopicSearchResult(module, item.getId(), item.getName(), item.getOrganization(),
|
||||
item.getMainStory(), keyword))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
if ("gxmu_yxgqty".equals(module)) {
|
||||
return finishTopicSearchResults(yxgqtyFormService.list(new LambdaQueryWrapper<YxgqtyForm>()
|
||||
.select(YxgqtyForm::getId, YxgqtyForm::getName, YxgqtyForm::getCollegeMajorClass,
|
||||
YxgqtyForm::getMainStory, YxgqtyForm::getCreateTime, YxgqtyForm::getUpdateTime)
|
||||
.eq(YxgqtyForm::getTenantId, getTenantId())
|
||||
.like(YxgqtyForm::getName, keyword)
|
||||
.orderByDesc(YxgqtyForm::getUpdateTime)
|
||||
.orderByDesc(YxgqtyForm::getCreateTime))
|
||||
.stream()
|
||||
.map(item -> toTopicSearchResult(module, item.getId(), item.getName(), item.getCollegeMajorClass(),
|
||||
item.getMainStory(), keyword))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
if ("gxmu_tzbcy_form".equals(module)) {
|
||||
return finishTopicSearchResults(tzbcyFormService.list(new LambdaQueryWrapper<TzbcyForm>()
|
||||
.select(TzbcyForm::getId, TzbcyForm::getProjectName, TzbcyForm::getProjectType,
|
||||
TzbcyForm::getProjectBrief, TzbcyForm::getCreateTime, TzbcyForm::getUpdateTime)
|
||||
.eq(TzbcyForm::getTenantId, getTenantId())
|
||||
.like(TzbcyForm::getProjectName, keyword)
|
||||
.orderByDesc(TzbcyForm::getUpdateTime)
|
||||
.orderByDesc(TzbcyForm::getCreateTime))
|
||||
.stream()
|
||||
.map(item -> toTopicSearchResult(module, item.getId(), item.getProjectName(), item.getProjectType(),
|
||||
item.getProjectBrief(), keyword))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
if ("gxmu_qmgc_form".equals(module)) {
|
||||
return finishTopicSearchResults(qmgcFormService.list(new LambdaQueryWrapper<QmgcForm>()
|
||||
.select(QmgcForm::getId, QmgcForm::getName, QmgcForm::getSchoolInfo,
|
||||
QmgcForm::getResume, QmgcForm::getCreateTime, QmgcForm::getUpdateTime)
|
||||
.eq(QmgcForm::getTenantId, getTenantId())
|
||||
.like(QmgcForm::getName, keyword)
|
||||
.orderByDesc(QmgcForm::getUpdateTime)
|
||||
.orderByDesc(QmgcForm::getCreateTime))
|
||||
.stream()
|
||||
.map(item -> toTopicSearchResult(module, item.getId(), item.getName(), item.getSchoolInfo(),
|
||||
item.getResume(), keyword))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
return finishTopicSearchResults(wxxzxFormService.list(new LambdaQueryWrapper<WxxzxForm>()
|
||||
.select(WxxzxForm::getId, WxxzxForm::getTopicName, WxxzxForm::getTopicType,
|
||||
WxxzxForm::getRationale, WxxzxForm::getCreateTime, WxxzxForm::getUpdateTime)
|
||||
.eq(WxxzxForm::getTenantId, getTenantId())
|
||||
.like(WxxzxForm::getTopicName, keyword)
|
||||
.orderByDesc(WxxzxForm::getUpdateTime)
|
||||
.orderByDesc(WxxzxForm::getCreateTime))
|
||||
.stream()
|
||||
.map(item -> toTopicSearchResult(item, keyword))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
private WxxzxTopicSemanticSearchResult toTopicSearchResult(
|
||||
String module, Integer id, String title, String type, String content, String keyword) {
|
||||
WxxzxTopicSemanticSearchResult result = new WxxzxTopicSemanticSearchResult();
|
||||
result.setId(id);
|
||||
result.setModule(module);
|
||||
result.setModuleName(TOPIC_SEARCH_MODULE_NAME_MAP.get(module));
|
||||
result.setTopicName(title);
|
||||
result.setTopicType(type);
|
||||
result.setRationale(content);
|
||||
result.setSnippet(buildSnippet(content, keyword));
|
||||
result.setScore(calculateTitleScore(title, keyword));
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<WxxzxTopicSemanticSearchResult> finishTopicSearchResults(List<WxxzxTopicSemanticSearchResult> results) {
|
||||
return results.stream()
|
||||
.filter(item -> item.getScore() != null && item.getScore() > 0)
|
||||
.sorted(Comparator.comparing(WxxzxTopicSemanticSearchResult::getScore,
|
||||
Comparator.nullsLast(Comparator.reverseOrder())))
|
||||
.limit(MAX_TOPIC_SEARCH_RESULTS)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private int calculateSemanticScore(WxxzxForm form, String keyword) {
|
||||
List<String> terms = extractSearchTerms(keyword);
|
||||
int score = 0;
|
||||
score += calculateFieldScore(form.getTopicName(), keyword, terms, 140, 28, true);
|
||||
score += calculateFieldScore(form.getTopicType(), keyword, terms, 90, 20, false);
|
||||
score += calculateFieldScore(form.getRationale(), keyword, terms, 60, 12, false);
|
||||
return score;
|
||||
}
|
||||
|
||||
private int calculateTitleScore(String title, String keyword) {
|
||||
return calculateFieldScore(title, keyword, extractSearchTerms(keyword), 140, 28, true);
|
||||
}
|
||||
|
||||
private int calculateFieldScore(String fieldValue, String keyword, List<String> terms,
|
||||
int exactScore, int termScore, boolean titleField) {
|
||||
String normalizedField = normalizeCheckText(fieldValue);
|
||||
if (StrUtil.isBlank(normalizedField)) {
|
||||
return 0;
|
||||
}
|
||||
String normalizedKeyword = normalizeCheckText(keyword);
|
||||
int score = 0;
|
||||
if (normalizedField.contains(normalizedKeyword)) {
|
||||
score += exactScore;
|
||||
if (normalizedField.startsWith(normalizedKeyword)) {
|
||||
score += exactScore / 2;
|
||||
}
|
||||
score += Math.min(countOccurrences(normalizedField, normalizedKeyword) * 10, 30);
|
||||
}
|
||||
int matchedTerms = 0;
|
||||
for (String term : terms) {
|
||||
String normalizedTerm = normalizeCheckText(term);
|
||||
if (StrUtil.isBlank(normalizedTerm) || normalizedTerm.length() < 2) {
|
||||
continue;
|
||||
}
|
||||
if (normalizedField.contains(normalizedTerm)) {
|
||||
matchedTerms++;
|
||||
score += termScore;
|
||||
}
|
||||
}
|
||||
if (titleField && matchedTerms == terms.size() && !terms.isEmpty()) {
|
||||
score += 30;
|
||||
}
|
||||
return score;
|
||||
}
|
||||
|
||||
private List<String> extractSearchTerms(String keyword) {
|
||||
String[] splits = normalizeDisplayText(keyword).split("[\\s,,;;。、】【()()]+");
|
||||
List<String> terms = new ArrayList<>();
|
||||
for (String split : splits) {
|
||||
if (StrUtil.isNotBlank(split)) {
|
||||
terms.add(split.trim());
|
||||
}
|
||||
}
|
||||
if (terms.isEmpty() && StrUtil.isNotBlank(keyword)) {
|
||||
terms.add(keyword.trim());
|
||||
}
|
||||
return terms;
|
||||
}
|
||||
|
||||
private int countOccurrences(String text, String pattern) {
|
||||
if (StrUtil.isBlank(text) || StrUtil.isBlank(pattern)) {
|
||||
return 0;
|
||||
}
|
||||
int count = 0;
|
||||
int index = 0;
|
||||
while ((index = text.indexOf(pattern, index)) >= 0) {
|
||||
count++;
|
||||
index += pattern.length();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
private String buildSnippet(String rationale, String keyword) {
|
||||
String content = normalizeDisplayText(rationale);
|
||||
if (StrUtil.isBlank(content)) {
|
||||
return "暂无立论依据";
|
||||
}
|
||||
String normalizedKeyword = normalizeDisplayText(keyword);
|
||||
int index = content.indexOf(normalizedKeyword);
|
||||
if (index < 0) {
|
||||
for (String term : extractSearchTerms(keyword)) {
|
||||
index = content.indexOf(term);
|
||||
if (index >= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (index < 0) {
|
||||
return abbreviate(content, 120);
|
||||
}
|
||||
int start = Math.max(index - 28, 0);
|
||||
int end = Math.min(index + normalizedKeyword.length() + 68, content.length());
|
||||
String snippet = content.substring(start, end);
|
||||
if (start > 0) {
|
||||
snippet = "..." + snippet;
|
||||
}
|
||||
if (end < content.length()) {
|
||||
snippet = snippet + "...";
|
||||
}
|
||||
return snippet;
|
||||
}
|
||||
|
||||
private void buildValidationResult(XWPFDocument document, WxxzxDocxValidationResult result) {
|
||||
List<XWPFParagraph> paragraphs = document.getParagraphs();
|
||||
List<WxxzxDocxValidationResult.Item> detailItems = new ArrayList<>();
|
||||
boolean titleFound = false;
|
||||
boolean titlePassed = true;
|
||||
boolean bodyPassed = true;
|
||||
int bodyCount = 0;
|
||||
int issueCount = 0;
|
||||
|
||||
for (int i = 0; i < paragraphs.size(); i++) {
|
||||
XWPFParagraph paragraph = paragraphs.get(i);
|
||||
String displayText = normalizeDisplayText(paragraph.getText());
|
||||
if (StrUtil.isBlank(displayText)) {
|
||||
continue;
|
||||
}
|
||||
boolean isTitleParagraph = normalizeCheckText(displayText).contains(PROJECT_BOOK_KEYWORD);
|
||||
ValidationIssue issue = isTitleParagraph
|
||||
? validateParagraph(paragraph, i + 1, TITLE_FONT_CN, TITLE_FONT_EN, TITLE_FONT_SIZE)
|
||||
: validateParagraph(paragraph, i + 1, BODY_FONT_CN, BODY_FONT_EN, BODY_FONT_SIZE);
|
||||
|
||||
if (isTitleParagraph) {
|
||||
titleFound = true;
|
||||
if (issue != null) {
|
||||
titlePassed = false;
|
||||
issueCount++;
|
||||
addDetailItem(detailItems, "标题格式", false, issue.getDetail(), issue.getSuggestion(),
|
||||
issue.getParagraphIndex(), abbreviate(issue.getParagraphText()));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
bodyCount++;
|
||||
if (issue != null) {
|
||||
bodyPassed = false;
|
||||
issueCount++;
|
||||
addDetailItem(detailItems, "正文格式", false, issue.getDetail(), issue.getSuggestion(),
|
||||
issue.getParagraphIndex(), abbreviate(issue.getParagraphText()));
|
||||
}
|
||||
}
|
||||
|
||||
if (!titleFound) {
|
||||
titlePassed = false;
|
||||
issueCount++;
|
||||
addDetailItem(detailItems, "标题格式", false, "未检测到含“项目申报书”字样的标题段落",
|
||||
"请新增或修改标题段落,并设置为黑体一号,且标题中包含“项目申报书”字样", null, null);
|
||||
}
|
||||
if (bodyCount == 0) {
|
||||
bodyPassed = false;
|
||||
issueCount++;
|
||||
addDetailItem(detailItems, "正文格式", false, "未检测到可校验的正文段落",
|
||||
"请补充正文内容,并统一设置为宋体五号", null, null);
|
||||
}
|
||||
|
||||
List<WxxzxDocxValidationResult.Item> finalItems = new ArrayList<>();
|
||||
if (titlePassed) {
|
||||
addDetailItem(finalItems, "标题格式", true,
|
||||
"已检测到含“项目申报书”字样的标题,格式为黑体一号",
|
||||
"无需修改", null, null);
|
||||
}
|
||||
if (bodyPassed && bodyCount > 0) {
|
||||
addDetailItem(finalItems, "正文格式", true,
|
||||
String.format(Locale.ROOT, "已检测 %d 个正文段落,格式均为宋体五号", bodyCount),
|
||||
"无需修改", null, null);
|
||||
}
|
||||
finalItems.addAll(detailItems);
|
||||
|
||||
if (issueCount > MAX_DETAIL_ITEMS) {
|
||||
addDetailItem(finalItems, "结果说明", false,
|
||||
String.format(Locale.ROOT, "问题较多,当前仅展示前 %d 处明细", MAX_DETAIL_ITEMS),
|
||||
"请优先按已展示的修改意见逐项调整后重新上传校验",
|
||||
null, null);
|
||||
}
|
||||
|
||||
result.setPassed(titlePassed && bodyPassed);
|
||||
result.setTotalIssues(issueCount);
|
||||
result.setSummary(result.getPassed()
|
||||
? "校验通过:标题和正文格式均符合要求"
|
||||
: String.format(Locale.ROOT, "校验不通过:共发现 %d 处问题", issueCount));
|
||||
result.setItems(finalItems);
|
||||
}
|
||||
|
||||
private ValidationIssue validateParagraph(XWPFParagraph paragraph, int paragraphIndex,
|
||||
String expectedFontCn, String expectedFontEn, double expectedSize) {
|
||||
List<XWPFRun> runs = paragraph.getRuns();
|
||||
if (runs == null || runs.isEmpty()) {
|
||||
return new ValidationIssue(paragraphIndex, paragraph.getText(),
|
||||
String.format(Locale.ROOT, "未检测到文本样式信息,应为%s %s",
|
||||
expectedFontCn, formatExpectedSize(expectedSize)),
|
||||
buildSuggestion(expectedFontCn, expectedSize));
|
||||
}
|
||||
|
||||
for (XWPFRun run : runs) {
|
||||
String runText = normalizeDisplayText(run.text());
|
||||
if (StrUtil.isBlank(runText)) {
|
||||
continue;
|
||||
}
|
||||
String actualFont = resolveFontFamily(run);
|
||||
Double actualSize = resolveFontSize(run);
|
||||
boolean fontMatched = matchesFont(actualFont, expectedFontCn, expectedFontEn);
|
||||
boolean sizeMatched = matchesSize(actualSize, expectedSize);
|
||||
if (fontMatched && sizeMatched) {
|
||||
continue;
|
||||
}
|
||||
String detail = String.format(Locale.ROOT,
|
||||
"应为%s %s,当前检测到字体“%s”、字号“%s”",
|
||||
expectedFontCn,
|
||||
formatExpectedSize(expectedSize),
|
||||
StrUtil.blankToDefault(actualFont, "未设置"),
|
||||
formatActualSize(actualSize));
|
||||
return new ValidationIssue(paragraphIndex, paragraph.getText(), detail,
|
||||
buildSuggestion(expectedFontCn, expectedSize));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void addDetailItem(List<WxxzxDocxValidationResult.Item> items, String rule, boolean passed,
|
||||
String detail, String suggestion, Integer paragraphIndex, String paragraphText) {
|
||||
if (!passed && "结果说明".equals(rule)) {
|
||||
WxxzxDocxValidationResult.Item item = new WxxzxDocxValidationResult.Item();
|
||||
item.setRule(rule);
|
||||
item.setPassed(false);
|
||||
item.setDetail(detail);
|
||||
item.setSuggestion(suggestion);
|
||||
items.add(item);
|
||||
return;
|
||||
}
|
||||
if (!passed) {
|
||||
long failedCount = items.stream().filter(item -> Boolean.FALSE.equals(item.getPassed())).count();
|
||||
if (failedCount >= MAX_DETAIL_ITEMS) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
WxxzxDocxValidationResult.Item item = new WxxzxDocxValidationResult.Item();
|
||||
item.setRule(rule);
|
||||
item.setPassed(passed);
|
||||
item.setDetail(detail);
|
||||
item.setSuggestion(suggestion);
|
||||
item.setParagraphIndex(paragraphIndex);
|
||||
item.setParagraphText(paragraphText);
|
||||
items.add(item);
|
||||
}
|
||||
|
||||
private String resolveFontFamily(XWPFRun run) {
|
||||
String[] candidates = new String[]{
|
||||
run.getFontFamily(XWPFRun.FontCharRange.eastAsia),
|
||||
run.getFontFamily(XWPFRun.FontCharRange.ascii),
|
||||
run.getFontFamily(XWPFRun.FontCharRange.hAnsi),
|
||||
run.getFontFamily(),
|
||||
run.getFontName()
|
||||
};
|
||||
for (String candidate : candidates) {
|
||||
if (StrUtil.isNotBlank(candidate)) {
|
||||
return candidate.trim();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Double resolveFontSize(XWPFRun run) {
|
||||
Double fontSize = run.getFontSizeAsDouble();
|
||||
if (fontSize != null && fontSize > 0) {
|
||||
return fontSize;
|
||||
}
|
||||
int fontSizeInt = run.getFontSize();
|
||||
return fontSizeInt > 0 ? (double) fontSizeInt : null;
|
||||
}
|
||||
|
||||
private boolean matchesFont(String actualFont, String expectedCn, String expectedEn) {
|
||||
if (StrUtil.isBlank(actualFont)) {
|
||||
return false;
|
||||
}
|
||||
String normalized = actualFont.replace(" ", "").trim().toLowerCase(Locale.ROOT);
|
||||
return normalized.equals(expectedCn.toLowerCase(Locale.ROOT))
|
||||
|| normalized.equals(expectedEn.toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
private boolean matchesSize(Double actualSize, double expectedSize) {
|
||||
return actualSize != null && Math.abs(actualSize - expectedSize) < 0.11D;
|
||||
}
|
||||
|
||||
private String normalizeCheckText(String text) {
|
||||
return text == null ? "" : text.replace("\u3000", "").replaceAll("\\s+", "");
|
||||
}
|
||||
|
||||
private String normalizeDisplayText(String text) {
|
||||
return text == null ? "" : text.replace('\u00A0', ' ').replaceAll("\\s+", " ").trim();
|
||||
}
|
||||
|
||||
private String abbreviate(String text) {
|
||||
String displayText = normalizeDisplayText(text);
|
||||
return abbreviate(displayText, 80);
|
||||
}
|
||||
|
||||
private String abbreviate(String text, int maxLength) {
|
||||
String displayText = normalizeDisplayText(text);
|
||||
if (displayText.length() <= maxLength) {
|
||||
return displayText;
|
||||
}
|
||||
return displayText.substring(0, maxLength) + "...";
|
||||
}
|
||||
|
||||
private String formatExpectedSize(double size) {
|
||||
if (Math.abs(size - TITLE_FONT_SIZE) < 0.01D) {
|
||||
return "一号";
|
||||
}
|
||||
if (Math.abs(size - BODY_FONT_SIZE) < 0.01D) {
|
||||
return "五号";
|
||||
}
|
||||
return formatActualSize(size);
|
||||
}
|
||||
|
||||
private String formatActualSize(Double size) {
|
||||
if (size == null) {
|
||||
return "未设置";
|
||||
}
|
||||
if (Math.abs(size - Math.rint(size)) < 0.01D) {
|
||||
return String.format(Locale.ROOT, "%.0fpt", size);
|
||||
}
|
||||
return String.format(Locale.ROOT, "%.1fpt", size);
|
||||
}
|
||||
|
||||
private String buildSuggestion(String expectedFontCn, double expectedSize) {
|
||||
return String.format(Locale.ROOT, "请将该段调整为%s%s", expectedFontCn, formatExpectedSize(expectedSize));
|
||||
}
|
||||
|
||||
private static class ValidationIssue {
|
||||
private final Integer paragraphIndex;
|
||||
private final String paragraphText;
|
||||
private final String detail;
|
||||
private final String suggestion;
|
||||
|
||||
private ValidationIssue(Integer paragraphIndex, String paragraphText, String detail, String suggestion) {
|
||||
this.paragraphIndex = paragraphIndex;
|
||||
this.paragraphText = paragraphText;
|
||||
this.detail = detail;
|
||||
this.suggestion = suggestion;
|
||||
}
|
||||
|
||||
public Integer getParagraphIndex() {
|
||||
return paragraphIndex;
|
||||
}
|
||||
|
||||
public String getParagraphText() {
|
||||
return paragraphText;
|
||||
}
|
||||
|
||||
public String getDetail() {
|
||||
return detail;
|
||||
}
|
||||
|
||||
public String getSuggestion() {
|
||||
return suggestion;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
import com.gxwebsoft.common.system.entity.Organization;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.common.system.service.OrganizationService;
|
||||
import com.gxwebsoft.gxmu.entity.YxgqtdgbForm;
|
||||
import com.gxwebsoft.gxmu.param.YxgqtdgbFormParam;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowStarterService;
|
||||
import com.gxwebsoft.gxmu.service.YxgqtdgbFormService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
import com.gxwebsoft.gxmu.util.YxgqtdgbDocxExportUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* 优秀共青团干部申报表控制器
|
||||
*/
|
||||
@Api(tags = "优秀共青团干部申报表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/yxgqtdgb-form")
|
||||
public class YxgqtdgbFormController extends BaseController {
|
||||
@Resource
|
||||
private YxgqtdgbFormService yxgqtdgbFormService;
|
||||
@Resource
|
||||
private ReviewFlowStarterService reviewFlowStarterService;
|
||||
@Resource
|
||||
private FileRecordService fileRecordService;
|
||||
@Resource
|
||||
private OrganizationService organizationService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
@ApiOperation("分页查询优秀共青团干部申报表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<YxgqtdgbForm>> page(YxgqtdgbFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<YxgqtdgbForm, YxgqtdgbFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(yxgqtdgbFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "organization", "contact")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户优秀共青团干部申报表")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<YxgqtdgbForm>> userPage(YxgqtdgbFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<YxgqtdgbForm, YxgqtdgbFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(yxgqtdgbFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "organization", "contact")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部优秀共青团干部申报表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<YxgqtdgbForm>> list(YxgqtdgbFormParam param) {
|
||||
PageParam<YxgqtdgbForm, YxgqtdgbFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(yxgqtdgbFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "organization", "contact"))));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("导出优秀共青团干部申报材料")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export(@RequestBody YxgqtdgbFormParam param, HttpServletRequest request) throws IOException {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<YxgqtdgbForm, YxgqtdgbFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
List<YxgqtdgbForm> records = yxgqtdgbFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "organization", "contact")));
|
||||
if (records == null || records.isEmpty()) {
|
||||
return fail("暂无可导出的数据");
|
||||
}
|
||||
|
||||
User loginUser = getLoginUser();
|
||||
YxgqtdgbDocxExportUtil.SummaryMeta summaryMeta = new YxgqtdgbDocxExportUtil.SummaryMeta();
|
||||
summaryMeta.setYearText(resolveYearText(param, records));
|
||||
summaryMeta.setReporter(loginUser == null ? "" : resolveReporter(loginUser));
|
||||
summaryMeta.setContact(loginUser == null ? "" : valueOf(loginUser.getPhone()));
|
||||
summaryMeta.setOrganizationPartyOpinion(resolveOrganizationPartyOpinion(loginUser));
|
||||
|
||||
String relativePath = "file/docx/优秀共青团干部申报材料_" + System.currentTimeMillis() + ".zip";
|
||||
File targetFile = new File(uploadPath + relativePath);
|
||||
File parentFile = targetFile.getParentFile();
|
||||
if (parentFile != null && !parentFile.exists()) {
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(targetFile);
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) {
|
||||
YxgqtdgbDocxExportUtil.writeExportZip(zipOutputStream, records, summaryMeta);
|
||||
zipOutputStream.finish();
|
||||
}
|
||||
|
||||
FileRecord result = new FileRecord();
|
||||
result.setCreateUserId(getLoginUserId());
|
||||
result.setName(targetFile.getName());
|
||||
result.setPath(targetFile.getAbsolutePath());
|
||||
result.setContentType("application/zip");
|
||||
result.setUrl(requestURL + "/" + relativePath);
|
||||
fileRecordService.save(result);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询优秀共青团干部申报表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<YxgqtdgbForm> get(@PathVariable("id") Integer id) {
|
||||
return success(yxgqtdgbFormService.getById(id));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加优秀共青团干部申报表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody YxgqtdgbForm yxgqtdgbForm) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
yxgqtdgbForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (yxgqtdgbFormService.save(yxgqtdgbForm)) {
|
||||
reviewFlowStarterService.startReview("gxmu_yxgqtdgb", yxgqtdgbForm.getId());
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改优秀共青团干部申报表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody YxgqtdgbForm yxgqtdgbForm) {
|
||||
if (yxgqtdgbFormService.updateById(yxgqtdgbForm)) {
|
||||
reviewFlowStarterService.restartReviewWhenLastRejected("gxmu_yxgqtdgb", yxgqtdgbForm.getId());
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除优秀共青团干部申报表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return yxgqtdgbFormService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改优秀共青团干部申报表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<YxgqtdgbForm> batchParam) {
|
||||
return batchParam.update(yxgqtdgbFormService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除优秀共青团干部申报表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return yxgqtdgbFormService.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private String resolveYearText(YxgqtdgbFormParam param, List<YxgqtdgbForm> records) {
|
||||
if (param.getYear() != null) {
|
||||
return String.valueOf(param.getYear());
|
||||
}
|
||||
if (records != null && !records.isEmpty() && records.get(0).getYear() != null) {
|
||||
return String.valueOf(records.get(0).getYear());
|
||||
}
|
||||
return String.valueOf(java.time.LocalDate.now().getYear());
|
||||
}
|
||||
|
||||
private String resolveReporter(User loginUser) {
|
||||
if (loginUser == null) {
|
||||
return "";
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getRealName())) {
|
||||
return loginUser.getRealName().trim();
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getNickname())) {
|
||||
return loginUser.getNickname().trim();
|
||||
}
|
||||
return valueOf(loginUser.getUsername());
|
||||
}
|
||||
|
||||
private String resolveOrganizationPartyOpinion(User loginUser) {
|
||||
if (loginUser == null || loginUser.getOrganizationId() == null) {
|
||||
return "(盖章)";
|
||||
}
|
||||
Organization organization = organizationService.getByIdRel(loginUser.getOrganizationId());
|
||||
String organizationName = organization == null ? "" : valueOf(organization.getOrganizationName());
|
||||
return organizationName.isEmpty() ? "(盖章)" : organizationName + "(盖章)";
|
||||
}
|
||||
|
||||
private String valueOf(String value) {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
package com.gxwebsoft.gxmu.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.FileRecord;
|
||||
import com.gxwebsoft.common.system.entity.Organization;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.FileRecordService;
|
||||
import com.gxwebsoft.common.system.service.OrganizationService;
|
||||
import com.gxwebsoft.gxmu.entity.YxgqtyForm;
|
||||
import com.gxwebsoft.gxmu.param.YxgqtyFormParam;
|
||||
import com.gxwebsoft.gxmu.service.ReviewFlowStarterService;
|
||||
import com.gxwebsoft.gxmu.service.YxgqtyFormService;
|
||||
import com.gxwebsoft.gxmu.util.GxmuQueryHelper;
|
||||
import com.gxwebsoft.gxmu.util.YxgqtyDocxExportUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* 优秀共青团员申报表控制器
|
||||
*/
|
||||
@Api(tags = "优秀共青团员申报表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gxmu/yxgqty-form")
|
||||
public class YxgqtyFormController extends BaseController {
|
||||
@Resource
|
||||
private YxgqtyFormService yxgqtyFormService;
|
||||
@Resource
|
||||
private ReviewFlowStarterService reviewFlowStarterService;
|
||||
@Resource
|
||||
private FileRecordService fileRecordService;
|
||||
@Resource
|
||||
private OrganizationService organizationService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
@ApiOperation("分页查询优秀共青团员申报表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<YxgqtyForm>> page(YxgqtyFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
PageParam<YxgqtyForm, YxgqtyFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(yxgqtyFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "college_major_class", "contact")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询当前用户优秀共青团员申报表")
|
||||
@GetMapping("/userPage")
|
||||
public ApiResult<PageResult<YxgqtyForm>> userPage(YxgqtyFormParam param) {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<YxgqtyForm, YxgqtyFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(new PageResult<>(yxgqtyFormService.page(page,
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "college_major_class", "contact")).getRecords(), page.getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部优秀共青团员申报表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<YxgqtyForm>> list(YxgqtyFormParam param) {
|
||||
PageParam<YxgqtyForm, YxgqtyFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
return success(yxgqtyFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "college_major_class", "contact"))));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("导出优秀共青团员申报材料")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export(@RequestBody YxgqtyFormParam param, HttpServletRequest request) throws IOException {
|
||||
applyBackendUserScope(param, param::setUserId, param::setUserIds, true);
|
||||
if (param.getUserId() == null && (param.getUserIds() == null || param.getUserIds().isEmpty())) {
|
||||
param.setUserId(getLoginUserId());
|
||||
}
|
||||
PageParam<YxgqtyForm, YxgqtyFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("id desc");
|
||||
List<YxgqtyForm> records = yxgqtyFormService.list(page.getOrderWrapper(
|
||||
GxmuQueryHelper.applyKeywords(page.getWrapper("keywords"), param.getKeywords(),
|
||||
"name", "college_major_class", "contact")));
|
||||
if (records == null || records.isEmpty()) {
|
||||
return fail("暂无可导出的数据");
|
||||
}
|
||||
|
||||
User loginUser = getLoginUser();
|
||||
YxgqtyDocxExportUtil.SummaryMeta summaryMeta = new YxgqtyDocxExportUtil.SummaryMeta();
|
||||
summaryMeta.setYearText(resolveYearText(param, records));
|
||||
summaryMeta.setReporter(loginUser == null ? "" : resolveReporter(loginUser));
|
||||
summaryMeta.setContact(loginUser == null ? "" : valueOf(loginUser.getPhone()));
|
||||
summaryMeta.setOrganizationPartyOpinion(resolveOrganizationPartyOpinion(loginUser));
|
||||
|
||||
String relativePath = "file/docx/优秀共青团员申报材料_" + System.currentTimeMillis() + ".zip";
|
||||
File targetFile = new File(uploadPath + relativePath);
|
||||
File parentFile = targetFile.getParentFile();
|
||||
if (parentFile != null && !parentFile.exists()) {
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(targetFile);
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) {
|
||||
YxgqtyDocxExportUtil.writeExportZip(zipOutputStream, records, summaryMeta);
|
||||
zipOutputStream.finish();
|
||||
}
|
||||
|
||||
FileRecord result = new FileRecord();
|
||||
result.setCreateUserId(getLoginUserId());
|
||||
result.setName(targetFile.getName());
|
||||
result.setPath(targetFile.getAbsolutePath());
|
||||
result.setContentType("application/zip");
|
||||
result.setUrl(requestURL + "/" + relativePath);
|
||||
fileRecordService.save(result);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询优秀共青团员申报表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<YxgqtyForm> get(@PathVariable("id") Integer id) {
|
||||
return success(yxgqtyFormService.getById(id));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("添加优秀共青团员申报表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody YxgqtyForm yxgqtyForm) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
yxgqtyForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (yxgqtyFormService.save(yxgqtyForm)) {
|
||||
reviewFlowStarterService.startReview("gxmu_yxgqty", yxgqtyForm.getId());
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改优秀共青团员申报表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody YxgqtyForm yxgqtyForm) {
|
||||
if (yxgqtyFormService.updateById(yxgqtyForm)) {
|
||||
reviewFlowStarterService.restartReviewWhenLastRejected("gxmu_yxgqty", yxgqtyForm.getId());
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("删除优秀共青团员申报表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
return yxgqtyFormService.removeById(id) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改优秀共青团员申报表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<YxgqtyForm> batchParam) {
|
||||
return batchParam.update(yxgqtyFormService, "id") ? success("修改成功") : fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除优秀共青团员申报表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
return yxgqtyFormService.removeByIds(ids) ? success("删除成功") : fail("删除失败");
|
||||
}
|
||||
|
||||
private String resolveYearText(YxgqtyFormParam param, List<YxgqtyForm> records) {
|
||||
if (param.getYear() != null) {
|
||||
return String.valueOf(param.getYear());
|
||||
}
|
||||
if (records != null && !records.isEmpty() && records.get(0).getYear() != null) {
|
||||
return String.valueOf(records.get(0).getYear());
|
||||
}
|
||||
return String.valueOf(java.time.LocalDate.now().getYear());
|
||||
}
|
||||
|
||||
private String resolveReporter(User loginUser) {
|
||||
if (loginUser == null) {
|
||||
return "";
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getRealName())) {
|
||||
return loginUser.getRealName().trim();
|
||||
}
|
||||
if (StrUtil.isNotBlank(loginUser.getNickname())) {
|
||||
return loginUser.getNickname().trim();
|
||||
}
|
||||
return valueOf(loginUser.getUsername());
|
||||
}
|
||||
|
||||
private String resolveOrganizationPartyOpinion(User loginUser) {
|
||||
if (loginUser == null || loginUser.getOrganizationId() == null) {
|
||||
return "(盖章)";
|
||||
}
|
||||
Organization organization = organizationService.getByIdRel(loginUser.getOrganizationId());
|
||||
String organizationName = organization == null ? "" : valueOf(organization.getOrganizationName());
|
||||
return organizationName.isEmpty() ? "(盖章)" : organizationName + "(盖章)";
|
||||
}
|
||||
|
||||
private String valueOf(String value) {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
}
|
||||
75
src/main/java/com/gxwebsoft/gxmu/entity/ClassInfo.java
Normal file
75
src/main/java/com/gxwebsoft/gxmu/entity/ClassInfo.java
Normal file
@@ -0,0 +1,75 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级管理
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "ClassInfo对象", description = "班级管理")
|
||||
@TableName("gxmu_class")
|
||||
public class ClassInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("学院ID")
|
||||
private Integer collegeId;
|
||||
|
||||
@ApiModelProperty("班级编码")
|
||||
private String classCode;
|
||||
|
||||
@ApiModelProperty("班级名称")
|
||||
private String className;
|
||||
|
||||
@ApiModelProperty("年级")
|
||||
private Integer gradeYear;
|
||||
|
||||
@ApiModelProperty("辅导员")
|
||||
private String counselorName;
|
||||
|
||||
@ApiModelProperty("辅导员电话")
|
||||
private String counselorPhone;
|
||||
|
||||
@ApiModelProperty("学生人数")
|
||||
private Integer studentCount;
|
||||
|
||||
@ApiModelProperty("排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty("状态:1启用 0停用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("删除标记:0未删 1已删")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("学院名称")
|
||||
private String collegeName;
|
||||
}
|
||||
69
src/main/java/com/gxwebsoft/gxmu/entity/College.java
Normal file
69
src/main/java/com/gxwebsoft/gxmu/entity/College.java
Normal file
@@ -0,0 +1,69 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学院管理
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "College对象", description = "学院管理")
|
||||
@TableName("gxmu_college")
|
||||
public class College implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("学院编码")
|
||||
private String collegeCode;
|
||||
|
||||
@ApiModelProperty("学院名称")
|
||||
private String collegeName;
|
||||
|
||||
@ApiModelProperty("学院简称")
|
||||
private String shortName;
|
||||
|
||||
@ApiModelProperty("负责人")
|
||||
private String leaderName;
|
||||
|
||||
@ApiModelProperty("负责人电话")
|
||||
private String leaderPhone;
|
||||
|
||||
@ApiModelProperty("排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty("状态:1启用 0停用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("删除标记:0未删 1已删")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("班级数量")
|
||||
private Integer classCount;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 跨校活动情报文章
|
||||
*
|
||||
* @author Codex
|
||||
* @since 2026-07-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "CrossSchoolActivityArticle对象", description = "跨校活动情报文章")
|
||||
@TableName("gxmu_cross_school_activity_article")
|
||||
public class CrossSchoolActivityArticle implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "来源唯一键")
|
||||
private String sourceKey;
|
||||
|
||||
@ApiModelProperty(value = "文章标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "高校名称")
|
||||
private String schoolName;
|
||||
|
||||
@ApiModelProperty(value = "活动类型")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "热度等级")
|
||||
private String heatLevel;
|
||||
|
||||
@ApiModelProperty(value = "来源名称")
|
||||
private String sourceName;
|
||||
|
||||
@ApiModelProperty(value = "发布时间")
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
@ApiModelProperty(value = "摘要")
|
||||
private String summary;
|
||||
|
||||
@ApiModelProperty(value = "标签JSON")
|
||||
private String tags;
|
||||
|
||||
@ApiModelProperty(value = "封面图")
|
||||
private String coverImage;
|
||||
|
||||
@ApiModelProperty(value = "详情链接")
|
||||
private String detailUrl;
|
||||
|
||||
@ApiModelProperty(value = "来源列表页")
|
||||
private String sourceUrl;
|
||||
|
||||
@ApiModelProperty(value = "可借鉴动作")
|
||||
private String highlight;
|
||||
|
||||
@ApiModelProperty(value = "正文文本")
|
||||
private String contentText;
|
||||
|
||||
@ApiModelProperty(value = "最近同步时间")
|
||||
private LocalDateTime lastSyncTime;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "删除标记:0未删 1已删")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
}
|
||||
74
src/main/java/com/gxwebsoft/gxmu/entity/Declare.java
Normal file
74
src/main/java/com/gxwebsoft/gxmu/entity/Declare.java
Normal file
@@ -0,0 +1,74 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 申报管理
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-28 15:06:52
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "Declare对象", description = "申报管理")
|
||||
@TableName("gxmu_declare")
|
||||
public class Declare implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
|
||||
private Integer year;
|
||||
|
||||
private String module;
|
||||
|
||||
@ApiModelProperty(value = "挑战杯项目类型")
|
||||
private String projectType;
|
||||
|
||||
@ApiModelProperty(value = "挑战杯项目分组")
|
||||
private String projectGroup;
|
||||
|
||||
@ApiModelProperty(value = "挑战杯项目申报表项目类型")
|
||||
private String formProjectType;
|
||||
|
||||
@ApiModelProperty(value = "挑战杯项目申报表项目分组")
|
||||
private String formProjectGroup;
|
||||
|
||||
@ApiModelProperty(value = "挑战杯公开展示信息表项目类型")
|
||||
private String publicProjectType;
|
||||
|
||||
@ApiModelProperty(value = "挑战杯公开展示信息表项目分组")
|
||||
private String publicProjectGroup;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "删除标记:0未删 1已删")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
126
src/main/java/com/gxwebsoft/gxmu/entity/QmgcForm.java
Normal file
126
src/main/java/com/gxwebsoft/gxmu/entity/QmgcForm.java
Normal file
@@ -0,0 +1,126 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 青年马克思主义者培养工程培训班学员登记表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "QmgcForm对象", description = "青年马克思主义者培养工程培训班学员登记表")
|
||||
@TableName("gxmu_qmgc_form")
|
||||
public class QmgcForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String gender;
|
||||
|
||||
@ApiModelProperty("民族")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty("电子版照片")
|
||||
private String photo;
|
||||
|
||||
@ApiModelProperty("出生年月")
|
||||
private String birthMonth;
|
||||
|
||||
@ApiModelProperty("政治面貌")
|
||||
private String politics;
|
||||
|
||||
@ApiModelProperty("籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@ApiModelProperty("手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("微信号")
|
||||
private String wechat;
|
||||
|
||||
@ApiModelProperty("电子邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty("QQ号")
|
||||
private String qq;
|
||||
|
||||
@ApiModelProperty("身份证号")
|
||||
private String idCardNo;
|
||||
|
||||
@ApiModelProperty("爱好特长")
|
||||
private String hobby;
|
||||
|
||||
@ApiModelProperty("是否有志到基层一线和艰苦边远地区工作")
|
||||
private String willingToWorkInGuangxi;
|
||||
|
||||
@ApiModelProperty("学校、院系、年级、专业")
|
||||
private String schoolInfo;
|
||||
|
||||
@ApiModelProperty("担任团学职务情况")
|
||||
private String leaguePosition;
|
||||
|
||||
@ApiModelProperty("个人简历")
|
||||
private String resume;
|
||||
|
||||
@ApiModelProperty("奖惩情况")
|
||||
private String awards;
|
||||
|
||||
@ApiModelProperty("综合成绩情况")
|
||||
private String academicPerformance;
|
||||
|
||||
@ApiModelProperty("二级团组织意见")
|
||||
private String secondaryLeagueOpinion;
|
||||
|
||||
@ApiModelProperty("二级团组织意见日期")
|
||||
private String secondaryLeagueOpinionDate;
|
||||
|
||||
@ApiModelProperty("二级党组织意见")
|
||||
private String secondaryPartyOpinion;
|
||||
|
||||
@ApiModelProperty("二级党组织意见日期")
|
||||
private String secondaryPartyOpinionDate;
|
||||
|
||||
@ApiModelProperty("学校团委意见")
|
||||
private String schoolLeagueOpinion;
|
||||
|
||||
@ApiModelProperty("学校团委意见日期")
|
||||
private String schoolLeagueOpinionDate;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewList> reviewList;
|
||||
}
|
||||
62
src/main/java/com/gxwebsoft/gxmu/entity/ReviewFlow.java
Normal file
62
src/main/java/com/gxwebsoft/gxmu/entity/ReviewFlow.java
Normal file
@@ -0,0 +1,62 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 审核流
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 10:37:18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "ReviewFlow对象", description = "审核流")
|
||||
@TableName("gxmu_review_flow")
|
||||
public class ReviewFlow implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
|
||||
private Integer organizationId;
|
||||
|
||||
private Integer level;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private Integer reviewUserId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewFlow> flows;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String organizationName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private User reviewUser;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 10:37:18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "ReviewFlowConfig对象", description = "")
|
||||
@TableName("gxmu_review_flow_config")
|
||||
public class ReviewFlowConfig implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "流id")
|
||||
private Integer flowId;
|
||||
|
||||
private Integer organizationId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty(value = "模块")
|
||||
private String module;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String flowName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String moduleName;
|
||||
}
|
||||
67
src/main/java/com/gxwebsoft/gxmu/entity/ReviewList.java
Normal file
67
src/main/java/com/gxwebsoft/gxmu/entity/ReviewList.java
Normal file
@@ -0,0 +1,67 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 审核列表
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 15:50:51
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "ReviewList对象", description = "审核列表")
|
||||
@TableName("gxmu_review_list")
|
||||
public class ReviewList implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "模块")
|
||||
private String module;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Integer pk;
|
||||
|
||||
@ApiModelProperty(value = "状态(0待审核 1通过 2不通过)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "审核意见")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private Integer sortNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
private User user;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String moduleName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String businessName;
|
||||
}
|
||||
101
src/main/java/com/gxwebsoft/gxmu/entity/SjqnForm.java
Normal file
101
src/main/java/com/gxwebsoft/gxmu/entity/SjqnForm.java
Normal file
@@ -0,0 +1,101 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 十佳青年申报表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "SjqnForm对象", description = "十佳青年申报表")
|
||||
@TableName("gxmu_sjqn")
|
||||
public class SjqnForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("申报类别")
|
||||
private String applyType;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String gender;
|
||||
|
||||
@ApiModelProperty("出生年月")
|
||||
private String birthMonth;
|
||||
|
||||
@ApiModelProperty("民族")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty("政治面貌")
|
||||
private String politics;
|
||||
|
||||
@ApiModelProperty("学历")
|
||||
private String education;
|
||||
|
||||
@ApiModelProperty("职务")
|
||||
private String position;
|
||||
|
||||
@ApiModelProperty("职称")
|
||||
@TableField("job_title")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("所在单位")
|
||||
@TableField("unit_name")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("获奖情况")
|
||||
private String awards;
|
||||
|
||||
@ApiModelProperty("工作经历")
|
||||
private String experience;
|
||||
|
||||
@ApiModelProperty("主要事迹")
|
||||
private String mainStory;
|
||||
|
||||
@ApiModelProperty("团组织意见")
|
||||
private String leagueOpinion;
|
||||
|
||||
@ApiModelProperty("党组织意见")
|
||||
private String partyOpinion;
|
||||
|
||||
@ApiModelProperty("校团委意见")
|
||||
private String schoolOpinion;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewList> reviewList;
|
||||
}
|
||||
94
src/main/java/com/gxwebsoft/gxmu/entity/SjtbzbsjForm.java
Normal file
94
src/main/java/com/gxwebsoft/gxmu/entity/SjtbzbsjForm.java
Normal file
@@ -0,0 +1,94 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 十佳团支部书记申报表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "SjtbzbsjForm对象", description = "十佳团支部书记申报表")
|
||||
@TableName("gxmu_sjtbzbsj")
|
||||
public class SjtbzbsjForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String gender;
|
||||
|
||||
@ApiModelProperty("出生年月")
|
||||
private String birthMonth;
|
||||
|
||||
@ApiModelProperty("民族")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty("政治面貌")
|
||||
private String politics;
|
||||
|
||||
@ApiModelProperty("学院班级")
|
||||
private String collegeClass;
|
||||
|
||||
@ApiModelProperty("团支部")
|
||||
@TableField("branch_name")
|
||||
private String branch;
|
||||
|
||||
@ApiModelProperty("团员教育评议等次")
|
||||
private String eduEval;
|
||||
|
||||
@ApiModelProperty("获奖情况")
|
||||
private String awards;
|
||||
|
||||
@ApiModelProperty("工作经历")
|
||||
private String experience;
|
||||
|
||||
@ApiModelProperty("主要事迹")
|
||||
private String mainStory;
|
||||
|
||||
@ApiModelProperty("团组织意见")
|
||||
private String leagueOpinion;
|
||||
|
||||
@ApiModelProperty("党组织意见")
|
||||
private String partyOpinion;
|
||||
|
||||
@ApiModelProperty("校团委意见")
|
||||
private String schoolOpinion;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewList> reviewList;
|
||||
}
|
||||
117
src/main/java/com/gxwebsoft/gxmu/entity/TyglForm.java
Normal file
117
src/main/java/com/gxwebsoft/gxmu/entity/TyglForm.java
Normal file
@@ -0,0 +1,117 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 团员管理
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "TyglForm对象", description = "团员管理")
|
||||
@TableName(value = "gxmu_tygl_form", autoResultMap = true)
|
||||
public class TyglForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("序号")
|
||||
private Integer serialNo;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String gender;
|
||||
|
||||
@ApiModelProperty("民族")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty("学院")
|
||||
private String college;
|
||||
|
||||
@ApiModelProperty("班级")
|
||||
private String className;
|
||||
|
||||
@ApiModelProperty("政治面貌")
|
||||
private String politics;
|
||||
|
||||
@ApiModelProperty("手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("团内职务")
|
||||
private String leaguePosition;
|
||||
|
||||
@ApiModelProperty("所属团支部ID")
|
||||
private Integer branchOrganizationId;
|
||||
|
||||
@ApiModelProperty("所属团支部")
|
||||
private String branchOrganizationName;
|
||||
|
||||
@ApiModelProperty("身份证号")
|
||||
private String idCardNo;
|
||||
|
||||
@ApiModelProperty("出生日期")
|
||||
private String birthDate;
|
||||
|
||||
@ApiModelProperty("团籍是否在本组织")
|
||||
private String archiveInCurrentOrg;
|
||||
|
||||
@ApiModelProperty("入团年月")
|
||||
private String joinMonth;
|
||||
|
||||
@ApiModelProperty("团员记录")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<MemberRecord> memberRecords;
|
||||
|
||||
@ApiModelProperty("成长档案")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<GrowthArchive> growthArchives;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewList> reviewList;
|
||||
|
||||
@Data
|
||||
public static class MemberRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String type;
|
||||
private String content;
|
||||
private String recordTime;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class GrowthArchive implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String content;
|
||||
private String archiveTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 挑战杯项目库列表记录
|
||||
*
|
||||
* @author Codex
|
||||
* @since 2026-04-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "TzbProjectListRecord对象", description = "挑战杯项目库列表记录")
|
||||
@TableName("gxmu_tzb_project_list")
|
||||
public class TzbProjectListRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "挑战杯详情ID")
|
||||
private Long sourceId;
|
||||
|
||||
@ApiModelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "高校名称")
|
||||
private String schoolName;
|
||||
|
||||
@ApiModelProperty(value = "获奖情况")
|
||||
private String awardName;
|
||||
|
||||
@ApiModelProperty(value = "参赛年份")
|
||||
private Integer matchYear;
|
||||
|
||||
@ApiModelProperty(value = "参赛届次")
|
||||
private String matchTerm;
|
||||
|
||||
@ApiModelProperty(value = "比赛级别")
|
||||
private String matchLevel;
|
||||
|
||||
@ApiModelProperty(value = "封面图")
|
||||
private String coverImage;
|
||||
|
||||
@ApiModelProperty(value = "详情链接")
|
||||
private String detailUrl;
|
||||
|
||||
@ApiModelProperty(value = "来源列表页")
|
||||
private String sourceUrl;
|
||||
|
||||
@ApiModelProperty(value = "来源页码")
|
||||
private Integer pageNo;
|
||||
|
||||
@ApiModelProperty(value = "最近同步时间")
|
||||
private LocalDateTime lastSyncTime;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "删除标记:0未删 1已删")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 挑战杯人才库列表记录
|
||||
*
|
||||
* @author Codex
|
||||
* @since 2026-04-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "TzbTalentListRecord对象", description = "挑战杯人才库列表记录")
|
||||
@TableName("gxmu_tzb_talent_list")
|
||||
public class TzbTalentListRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "挑战杯详情ID")
|
||||
private Long sourceId;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String personName;
|
||||
|
||||
@ApiModelProperty(value = "参赛学校")
|
||||
private String schoolName;
|
||||
|
||||
@ApiModelProperty(value = "人才类型")
|
||||
private String talentType;
|
||||
|
||||
@ApiModelProperty(value = "参赛项目")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "获奖情况")
|
||||
private String awardName;
|
||||
|
||||
@ApiModelProperty(value = "参赛届次")
|
||||
private String matchTerm;
|
||||
|
||||
@ApiModelProperty(value = "比赛级别")
|
||||
private String matchLevel;
|
||||
|
||||
@ApiModelProperty(value = "头像/封面图")
|
||||
private String coverImage;
|
||||
|
||||
@ApiModelProperty(value = "详情链接")
|
||||
private String detailUrl;
|
||||
|
||||
@ApiModelProperty(value = "来源列表页")
|
||||
private String sourceUrl;
|
||||
|
||||
@ApiModelProperty(value = "来源页码")
|
||||
private Integer pageNo;
|
||||
|
||||
@ApiModelProperty(value = "最近同步时间")
|
||||
private LocalDateTime lastSyncTime;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "删除标记:0未删 1已删")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
}
|
||||
145
src/main/java/com/gxwebsoft/gxmu/entity/TzbcyForm.java
Normal file
145
src/main/java/com/gxwebsoft/gxmu/entity/TzbcyForm.java
Normal file
@@ -0,0 +1,145 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挑战杯创业计划竞赛申报表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "TzbcyForm对象", description = "挑战杯创业计划竞赛申报表")
|
||||
@TableName(value = "gxmu_tzbcy_form", autoResultMap = true)
|
||||
public class TzbcyForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("所在省市")
|
||||
private String provinceCity;
|
||||
|
||||
@ApiModelProperty("学校名称")
|
||||
private String schoolName;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("项目类型")
|
||||
private String projectType;
|
||||
|
||||
@ApiModelProperty("项目分组")
|
||||
private String projectGroup;
|
||||
|
||||
@ApiModelProperty("公开展示项目类型")
|
||||
private String publicProjectType;
|
||||
|
||||
@ApiModelProperty("公开展示项目分组")
|
||||
private String publicProjectGroup;
|
||||
|
||||
@ApiModelProperty("负责人")
|
||||
private String leader;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("团队成员")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<TeamMember> teamMembers;
|
||||
|
||||
@ApiModelProperty("指导教师")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<Advisor> advisors;
|
||||
|
||||
@ApiModelProperty("项目简介")
|
||||
private String projectBrief;
|
||||
|
||||
@ApiModelProperty("社会价值")
|
||||
private String socialValue;
|
||||
|
||||
@ApiModelProperty("实践过程")
|
||||
private String practiceProcess;
|
||||
|
||||
@ApiModelProperty("创新意义")
|
||||
private String innovationMeaning;
|
||||
|
||||
@ApiModelProperty("发展前景")
|
||||
private String developmentProspect;
|
||||
|
||||
@ApiModelProperty("团队协作")
|
||||
private String teamCooperation;
|
||||
|
||||
@ApiModelProperty("项目介绍材料")
|
||||
private String projectMaterials;
|
||||
|
||||
@ApiModelProperty("其他证明材料")
|
||||
private String otherProofs;
|
||||
|
||||
@ApiModelProperty("项目摘要")
|
||||
private String projectSummary;
|
||||
|
||||
@ApiModelProperty("团队介绍")
|
||||
private String teamIntro;
|
||||
|
||||
@ApiModelProperty("团队口号")
|
||||
private String teamSlogan;
|
||||
|
||||
@ApiModelProperty("实践日志")
|
||||
private String practiceLog;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewList> reviewList;
|
||||
|
||||
@Data
|
||||
public static class TeamMember implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String college;
|
||||
private String gradeMajor;
|
||||
private String phone;
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Advisor implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String college;
|
||||
private String title;
|
||||
private String duty;
|
||||
private String phone;
|
||||
}
|
||||
}
|
||||
89
src/main/java/com/gxwebsoft/gxmu/entity/TzbcyMaterial.java
Normal file
89
src/main/java/com/gxwebsoft/gxmu/entity/TzbcyMaterial.java
Normal file
@@ -0,0 +1,89 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 挑战杯申报材料
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "TzbcyMaterial对象", description = "挑战杯申报材料")
|
||||
@TableName("gxmu_tzbcy_material")
|
||||
public class TzbcyMaterial implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("挑战杯申报ID")
|
||||
private Integer formId;
|
||||
|
||||
@ApiModelProperty("材料类型")
|
||||
private String materialType;
|
||||
|
||||
@ApiModelProperty("文件记录ID")
|
||||
private Integer fileId;
|
||||
|
||||
@ApiModelProperty("文件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("文件路径")
|
||||
private String filePath;
|
||||
|
||||
@ApiModelProperty("文件访问地址")
|
||||
private String fileUrl;
|
||||
|
||||
@ApiModelProperty("文件下载地址")
|
||||
private String downloadUrl;
|
||||
|
||||
@ApiModelProperty("文件大小")
|
||||
private Long fileSize;
|
||||
|
||||
@ApiModelProperty("文件类型")
|
||||
private String contentType;
|
||||
|
||||
@ApiModelProperty("审核状态:0待审核 1通过 2驳回")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("驳回原因")
|
||||
private String rejectReason;
|
||||
|
||||
@ApiModelProperty("审核人ID")
|
||||
private Integer auditUserId;
|
||||
|
||||
@ApiModelProperty("审核时间")
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String projectName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String leader;
|
||||
}
|
||||
418
src/main/java/com/gxwebsoft/gxmu/entity/WorkLedger.java
Normal file
418
src/main/java/com/gxwebsoft/gxmu/entity/WorkLedger.java
Normal file
@@ -0,0 +1,418 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 基层团组织工作台账
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "WorkLedger对象", description = "基层团组织工作台账")
|
||||
@TableName(value = "gxmu_work_ledger", autoResultMap = true)
|
||||
public class WorkLedger implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("台账类型")
|
||||
private String ledgerType;
|
||||
|
||||
@ApiModelProperty("单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("负责人")
|
||||
private String responsiblePerson;
|
||||
|
||||
@ApiModelProperty("使用开始月份")
|
||||
private String useStartMonth;
|
||||
|
||||
@ApiModelProperty("使用结束月份")
|
||||
private String useEndMonth;
|
||||
|
||||
@ApiModelProperty("团委书记姓名")
|
||||
private String secretaryName;
|
||||
|
||||
@ApiModelProperty("所辖团(总)支部数")
|
||||
private String branchCount;
|
||||
|
||||
@ApiModelProperty("团员总数")
|
||||
private String memberTotal;
|
||||
|
||||
@ApiModelProperty("教职工团员数")
|
||||
private String facultyMemberCount;
|
||||
|
||||
@ApiModelProperty("学生团员数")
|
||||
private String studentMemberCount;
|
||||
|
||||
@ApiModelProperty("少数民族团员数")
|
||||
private String minorityMemberCount;
|
||||
|
||||
@ApiModelProperty("女团员数")
|
||||
private String femaleMemberCount;
|
||||
|
||||
@ApiModelProperty("14-28岁青年数")
|
||||
private String youth14To28Count;
|
||||
|
||||
@ApiModelProperty("29-35岁青年数")
|
||||
private String youth29To35Count;
|
||||
|
||||
@ApiModelProperty("团干总数")
|
||||
private String cadreTotal;
|
||||
|
||||
@ApiModelProperty("职工团干数")
|
||||
private String facultyCadreCount;
|
||||
|
||||
@ApiModelProperty("学生团干数")
|
||||
private String studentCadreCount;
|
||||
|
||||
@ApiModelProperty("最近一次换届时间")
|
||||
private String lastElectionTime;
|
||||
|
||||
@ApiModelProperty("团费余额")
|
||||
private String feeBalance;
|
||||
|
||||
@ApiModelProperty("上半年应缴团费")
|
||||
private String firstHalfFeeDue;
|
||||
|
||||
@ApiModelProperty("上半年实缴团费")
|
||||
private String firstHalfFeePaid;
|
||||
|
||||
@ApiModelProperty("下半年应缴团费")
|
||||
private String secondHalfFeeDue;
|
||||
|
||||
@ApiModelProperty("下半年实缴团费")
|
||||
private String secondHalfFeePaid;
|
||||
|
||||
@ApiModelProperty("学社衔接率")
|
||||
private String schoolSocietyConnectionRate;
|
||||
|
||||
@ApiModelProperty("编号发展团员智慧团建录入率")
|
||||
private String smartLeagueEntryRate;
|
||||
|
||||
@ApiModelProperty("团支部书记姓名")
|
||||
private String branchSecretaryName;
|
||||
|
||||
@ApiModelProperty("团支部书记手机号")
|
||||
private String branchSecretaryPhone;
|
||||
|
||||
@ApiModelProperty("总人数")
|
||||
private String totalPeopleCount;
|
||||
|
||||
@ApiModelProperty("党员数")
|
||||
private String partyMemberCount;
|
||||
|
||||
@ApiModelProperty("青年数")
|
||||
private String youthCount;
|
||||
|
||||
@ApiModelProperty("团青比例")
|
||||
private String leagueYouthRatio;
|
||||
|
||||
@ApiModelProperty("团支部年度工作总结")
|
||||
private String branchAnnualSummary;
|
||||
|
||||
@ApiModelProperty("对标定级等次")
|
||||
private String standardLevel;
|
||||
|
||||
@ApiModelProperty("团委年度工作总结")
|
||||
private String annualSummary;
|
||||
|
||||
@ApiModelProperty("团委班子成员名单")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<CommitteeMember> committeeMembers;
|
||||
|
||||
@ApiModelProperty("团费收支记录")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<FeeRecord> feeRecords;
|
||||
|
||||
@ApiModelProperty("下属团组织情况")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<SubordinateOrg> subordinateOrgs;
|
||||
|
||||
@ApiModelProperty("荣誉登记")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<HonorRecord> honorRecords;
|
||||
|
||||
@ApiModelProperty("推荐入党积极分子")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<ActivistRecommendation> activistRecommendations;
|
||||
|
||||
@ApiModelProperty("团员团纪处理记录")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<DisciplineRecord> disciplineRecords;
|
||||
|
||||
@ApiModelProperty("团委会议记录")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<MeetingRecord> meetingRecords;
|
||||
|
||||
@ApiModelProperty("团委活动记录")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<ActivityRecord> activityRecords;
|
||||
|
||||
@ApiModelProperty("年度团员教育评议结果")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<EducationEvaluation> educationEvaluations;
|
||||
|
||||
@ApiModelProperty("团支部班子成员名单")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<BranchCommitteeMember> branchCommitteeMembers;
|
||||
|
||||
@ApiModelProperty("团员登记")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<LeagueMemberRegister> leagueMemberRegisters;
|
||||
|
||||
@ApiModelProperty("青年登记")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<YouthRegister> youthRegisters;
|
||||
|
||||
@ApiModelProperty("团支部荣誉登记")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<BranchHonorRecord> branchHonorRecords;
|
||||
|
||||
@ApiModelProperty("团员团费收缴登记")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<MemberFeeRecord> memberFeeRecords;
|
||||
|
||||
@ApiModelProperty("团支部会议记录")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<BranchMeetingRecord> branchMeetingRecords;
|
||||
|
||||
@ApiModelProperty("团支部活动记录")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<BranchActivityRecord> branchActivityRecords;
|
||||
|
||||
@ApiModelProperty("团支部教育评议结果")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<BranchEducationEvaluation> branchEducationEvaluations;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Data
|
||||
public static class CommitteeMember implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String birthMonth;
|
||||
private String politics;
|
||||
private String leagueDuty;
|
||||
private String partTimeWork;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class FeeRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String date;
|
||||
private String purpose;
|
||||
private String income;
|
||||
private String expense;
|
||||
private String balance;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class SubordinateOrg implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String branchName;
|
||||
private String leaderName;
|
||||
private String phone;
|
||||
private String memberCount;
|
||||
private String youthCount;
|
||||
private String feeCount;
|
||||
private String paidCount;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class HonorRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String honorName;
|
||||
private String awardTime;
|
||||
private String winner;
|
||||
private String rewardSituation;
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ActivistRecommendation implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String nation;
|
||||
private String birthMonth;
|
||||
private String classMajor;
|
||||
private String currentDuty;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class DisciplineRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String time;
|
||||
private String handlingType;
|
||||
private String reason;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class MeetingRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String meetingName;
|
||||
private String meetingTheme;
|
||||
private String time;
|
||||
private String location;
|
||||
private String host;
|
||||
private String attendees;
|
||||
private String absentees;
|
||||
private String content;
|
||||
private String recorder;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ActivityRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String activityName;
|
||||
private String activityTheme;
|
||||
private String activityTime;
|
||||
private String location;
|
||||
private String participants;
|
||||
private String content;
|
||||
private String recorder;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class EducationEvaluation implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String branchName;
|
||||
private String name;
|
||||
private String result;
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class BranchCommitteeMember implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String birthMonth;
|
||||
private String politics;
|
||||
private String leagueDuty;
|
||||
private String partTimeWork;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class LeagueMemberRegister implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String birthMonth;
|
||||
private String nation;
|
||||
private String joinMonth;
|
||||
private String leagueDuty;
|
||||
private String workDuty;
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class YouthRegister implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String birthMonth;
|
||||
private String nation;
|
||||
private String workDuty;
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class BranchHonorRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String honorName;
|
||||
private String awardTime;
|
||||
private String winner;
|
||||
private String rewardSituation;
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class MemberFeeRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String januaryAmount;
|
||||
private String februaryAmount;
|
||||
private String marchAmount;
|
||||
private String aprilAmount;
|
||||
private String mayAmount;
|
||||
private String juneAmount;
|
||||
private String julyAmount;
|
||||
private String augustAmount;
|
||||
private String septemberAmount;
|
||||
private String octoberAmount;
|
||||
private String novemberAmount;
|
||||
private String decemberAmount;
|
||||
private String totalAmount;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class BranchMeetingRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String meetingName;
|
||||
private String meetingTheme;
|
||||
private String time;
|
||||
private String location;
|
||||
private String host;
|
||||
private String attendees;
|
||||
private String absentees;
|
||||
private String content;
|
||||
private String recorder;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class BranchActivityRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String activityName;
|
||||
private String activityTheme;
|
||||
private String activityTime;
|
||||
private String location;
|
||||
private String participants;
|
||||
private String content;
|
||||
private String recorder;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class BranchEducationEvaluation implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String excellent;
|
||||
private String qualified;
|
||||
private String basicallyQualified;
|
||||
private String unqualified;
|
||||
private String remark;
|
||||
}
|
||||
}
|
||||
131
src/main/java/com/gxwebsoft/gxmu/entity/WshqtwForm.java
Normal file
131
src/main/java/com/gxwebsoft/gxmu/entity/WshqtwForm.java
Normal file
@@ -0,0 +1,131 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 五四红旗团委申报表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "WshqtwForm对象", description = "五四红旗团委申报表")
|
||||
@TableName("gxmu_wshqtw")
|
||||
public class WshqtwForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("团委名称")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty("负责人")
|
||||
private String leader;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("团员总数")
|
||||
private String memberTotal;
|
||||
|
||||
@ApiModelProperty("2024年发展团员数")
|
||||
@TableField(value = "member_developed_2024")
|
||||
private String memberDeveloped2024;
|
||||
|
||||
@ApiModelProperty("智慧团建登录情况")
|
||||
private String smartSystemLogin;
|
||||
|
||||
@ApiModelProperty("委员会数量")
|
||||
private String committeeCount;
|
||||
|
||||
@ApiModelProperty("专职团干数量")
|
||||
private String fulltimeCadreCount;
|
||||
|
||||
@ApiModelProperty("兼职团干数量")
|
||||
private String parttimeCadreCount;
|
||||
|
||||
@ApiModelProperty("最近一次换届时间")
|
||||
private String lastElectionTime;
|
||||
|
||||
@ApiModelProperty("2024年应收团费")
|
||||
@TableField(value = "fee_receivable_2024")
|
||||
private String feeReceivable2024;
|
||||
|
||||
@ApiModelProperty("2024年实收团费")
|
||||
@TableField(value = "fee_received_2024")
|
||||
private String feeReceived2024;
|
||||
|
||||
@ApiModelProperty("2024年应缴团费")
|
||||
@TableField(value = "fee_payable_2024")
|
||||
private String feePayable2024;
|
||||
|
||||
@ApiModelProperty("2024年实缴团费")
|
||||
@TableField(value = "fee_paid_2024")
|
||||
private String feePaid2024;
|
||||
|
||||
@ApiModelProperty("下设团支部数量")
|
||||
private String branchCount;
|
||||
|
||||
@ApiModelProperty("2024年规范化建设情况")
|
||||
@TableField(value = "standardized_work_2024")
|
||||
private String standardizedWork2024;
|
||||
|
||||
@ApiModelProperty("2024年推荐入党积极分子数")
|
||||
@TableField(value = "recommend_activist_2024")
|
||||
private String recommendActivist2024;
|
||||
|
||||
@ApiModelProperty("已确定入党积极分子数")
|
||||
private String activistConfirmed;
|
||||
|
||||
@ApiModelProperty("2024年推荐发展对象数")
|
||||
@TableField(value = "recommend_dev_target_2024")
|
||||
private String recommendDevTarget2024;
|
||||
|
||||
@ApiModelProperty("已确定发展对象数")
|
||||
private String devTargetConfirmed;
|
||||
|
||||
@ApiModelProperty("近五年荣誉情况")
|
||||
private String honorsFiveYears;
|
||||
|
||||
@ApiModelProperty("近三年工作总结")
|
||||
private String workSummaryThreeYears;
|
||||
|
||||
@ApiModelProperty("党组织意见")
|
||||
private String partyOpinion;
|
||||
|
||||
@ApiModelProperty("校团委意见")
|
||||
private String schoolOpinion;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewList> reviewList;
|
||||
}
|
||||
142
src/main/java/com/gxwebsoft/gxmu/entity/WshqtzbForm.java
Normal file
142
src/main/java/com/gxwebsoft/gxmu/entity/WshqtzbForm.java
Normal file
@@ -0,0 +1,142 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 五四红旗团支部申报表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "WshqtzbForm对象", description = "五四红旗团支部申报表")
|
||||
@TableName("gxmu_wshqtzb")
|
||||
public class WshqtzbForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("团支部名称")
|
||||
private String branchName;
|
||||
|
||||
@ApiModelProperty("二级团组织")
|
||||
private String secondOrg;
|
||||
|
||||
@ApiModelProperty("团支部书记")
|
||||
private String secretary;
|
||||
|
||||
@ApiModelProperty("政治面貌")
|
||||
private String politics;
|
||||
|
||||
@ApiModelProperty("联系方式")
|
||||
private String contact;
|
||||
|
||||
@ApiModelProperty("建立时间")
|
||||
private String establishTime;
|
||||
|
||||
@ApiModelProperty("最近一次换届时间")
|
||||
private String lastElectionTime;
|
||||
|
||||
@ApiModelProperty("智慧团建登录情况")
|
||||
private String smartSystemLogin;
|
||||
|
||||
@ApiModelProperty("团员总数")
|
||||
private String memberTotal;
|
||||
|
||||
@ApiModelProperty("2024年发展团员数")
|
||||
@TableField(value = "member_developed_2024")
|
||||
private String memberDeveloped2024;
|
||||
|
||||
@ApiModelProperty("2024年应收团费")
|
||||
@TableField(value = "fee_receivable_2024")
|
||||
private String feeReceivable2024;
|
||||
|
||||
@ApiModelProperty("2024年实收团费")
|
||||
@TableField(value = "fee_received_2024")
|
||||
private String feeReceived2024;
|
||||
|
||||
@ApiModelProperty("2024年应缴团费")
|
||||
@TableField(value = "fee_payable_2024")
|
||||
private String feePayable2024;
|
||||
|
||||
@ApiModelProperty("2024年实缴团费")
|
||||
@TableField(value = "fee_paid_2024")
|
||||
private String feePaid2024;
|
||||
|
||||
@ApiModelProperty("2024年推荐入党积极分子数")
|
||||
@TableField(value = "recommend_activist_2024")
|
||||
private String recommendActivist2024;
|
||||
|
||||
@ApiModelProperty("已确定入党积极分子数")
|
||||
private String activistConfirmed;
|
||||
|
||||
@ApiModelProperty("2024年推荐发展对象数")
|
||||
@TableField(value = "recommend_dev_target_2024")
|
||||
private String recommendDevTarget2024;
|
||||
|
||||
@ApiModelProperty("已确定发展对象数")
|
||||
private String devTargetConfirmed;
|
||||
|
||||
@ApiModelProperty("支委会召开次数")
|
||||
private String branchCommitteeMeetingCount;
|
||||
|
||||
@ApiModelProperty("支部大会召开次数")
|
||||
private String branchMemberMeetingCount;
|
||||
|
||||
@ApiModelProperty("教育评议完成情况")
|
||||
private String eduEvalDone;
|
||||
|
||||
@ApiModelProperty("年度团籍注册完成情况")
|
||||
private String annualRegDone;
|
||||
|
||||
@ApiModelProperty("联系班级数")
|
||||
private String classCount;
|
||||
|
||||
@ApiModelProperty("智慧团建录入率100%")
|
||||
@TableField(value = "smart_system_100")
|
||||
private String smartSystem100;
|
||||
|
||||
@ApiModelProperty("近五年荣誉情况")
|
||||
private String honorsFiveYears;
|
||||
|
||||
@ApiModelProperty("近三年工作总结")
|
||||
private String workSummaryThreeYears;
|
||||
|
||||
@ApiModelProperty("团组织意见")
|
||||
private String leagueOpinion;
|
||||
|
||||
@ApiModelProperty("党组织意见")
|
||||
private String partyOpinion;
|
||||
|
||||
@ApiModelProperty("校团委意见")
|
||||
private String schoolOpinion;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewList> reviewList;
|
||||
}
|
||||
32
src/main/java/com/gxwebsoft/gxmu/entity/WxxzxApplicant.java
Normal file
32
src/main/java/com/gxwebsoft/gxmu/entity/WxxzxApplicant.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@TableName("gxmu_wxxzx_applicant")
|
||||
public class WxxzxApplicant implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
private Integer projectId;
|
||||
private Integer applicantOrder;
|
||||
private String name;
|
||||
private String grade;
|
||||
private String className;
|
||||
private String gender;
|
||||
private String major;
|
||||
private String roleDesc;
|
||||
private Integer year;
|
||||
private Long userId;
|
||||
private Long tenantId;
|
||||
private Integer deleted;
|
||||
private LocalDateTime createTime;
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@TableName("gxmu_wxxzx_archive_record")
|
||||
public class WxxzxArchiveRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
private Integer projectId;
|
||||
private Integer archiveOrder;
|
||||
private String awardName;
|
||||
private String awardTime;
|
||||
private String remark;
|
||||
private String proofFile;
|
||||
private Integer year;
|
||||
private Long userId;
|
||||
private Long tenantId;
|
||||
private Integer deleted;
|
||||
private LocalDateTime createTime;
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
29
src/main/java/com/gxwebsoft/gxmu/entity/WxxzxBudgetItem.java
Normal file
29
src/main/java/com/gxwebsoft/gxmu/entity/WxxzxBudgetItem.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@TableName("gxmu_wxxzx_budget")
|
||||
public class WxxzxBudgetItem implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
private Integer projectId;
|
||||
private Integer budgetOrder;
|
||||
private String expenseItem;
|
||||
private String amount;
|
||||
private String reason;
|
||||
private Integer year;
|
||||
private Long userId;
|
||||
private Long tenantId;
|
||||
private Integer deleted;
|
||||
private LocalDateTime createTime;
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
205
src/main/java/com/gxwebsoft/gxmu/entity/WxxzxForm.java
Normal file
205
src/main/java/com/gxwebsoft/gxmu/entity/WxxzxForm.java
Normal file
@@ -0,0 +1,205 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 未来学术之星课题申报表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "WxxzxForm对象", description = "未来学术之星课题申报表")
|
||||
@TableName("gxmu_wxxzx_project")
|
||||
public class WxxzxForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("课题名称")
|
||||
private String topicName;
|
||||
|
||||
@ApiModelProperty("负责人")
|
||||
private String leader;
|
||||
|
||||
@ApiModelProperty("学院年级班别")
|
||||
private String collegeGradeClass;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("指导老师")
|
||||
private String advisor;
|
||||
|
||||
@ApiModelProperty("课题类型")
|
||||
private String topicType;
|
||||
|
||||
@ApiModelProperty("指导教师列表")
|
||||
@TableField(exist = false)
|
||||
private List<GuidanceTeacher> guidanceTeachers;
|
||||
|
||||
@ApiModelProperty("课题申请人列表")
|
||||
@TableField(exist = false)
|
||||
private List<Applicant> applicants;
|
||||
|
||||
@ApiModelProperty("经费预算列表")
|
||||
@TableField(exist = false)
|
||||
private List<Budget> budgets;
|
||||
|
||||
@ApiModelProperty("立论依据")
|
||||
private String rationale;
|
||||
|
||||
@ApiModelProperty("指导老师意见")
|
||||
private String teacherOpinion;
|
||||
|
||||
@ApiModelProperty("指导老师签字")
|
||||
private String teacherSign;
|
||||
|
||||
@ApiModelProperty("评审小组意见")
|
||||
private String reviewOpinion;
|
||||
|
||||
@ApiModelProperty("评审分数")
|
||||
private String reviewScore;
|
||||
|
||||
@ApiModelProperty("评审组长签字")
|
||||
private String reviewLeaderSign;
|
||||
|
||||
@ApiModelProperty("学院意见")
|
||||
private String collegeOpinion;
|
||||
|
||||
@ApiModelProperty("校团委意见")
|
||||
private String schoolOpinion;
|
||||
|
||||
@ApiModelProperty("承诺书签名")
|
||||
private String promiseSigner;
|
||||
|
||||
@ApiModelProperty("承诺书签名图片")
|
||||
private String promiseSignature;
|
||||
|
||||
@ApiModelProperty("评审学院")
|
||||
private String reviewCollege;
|
||||
|
||||
@ApiModelProperty("填报人")
|
||||
private String reviewReporter;
|
||||
|
||||
@ApiModelProperty("填报时间")
|
||||
private String reviewDate;
|
||||
|
||||
@ApiModelProperty("评审成员")
|
||||
@TableField(exist = false)
|
||||
private List<ReviewMember> reviewMembers;
|
||||
|
||||
@ApiModelProperty("成果归档")
|
||||
@TableField(exist = false)
|
||||
private List<ArchiveRecord> archiveRecords;
|
||||
|
||||
@ApiModelProperty("经费预算表")
|
||||
private String fundingBudgetFile;
|
||||
|
||||
@ApiModelProperty("经费划拨明细表")
|
||||
private String fundingAllocationFile;
|
||||
|
||||
@ApiModelProperty("中期检查说明")
|
||||
private String midtermRemark;
|
||||
|
||||
@ApiModelProperty("中期检查材料")
|
||||
private String midtermMaterials;
|
||||
|
||||
@ApiModelProperty("结题说明")
|
||||
private String finalRemark;
|
||||
|
||||
@ApiModelProperty("结题材料")
|
||||
private String finalMaterials;
|
||||
|
||||
@ApiModelProperty("获奖情况")
|
||||
private String archiveAwards;
|
||||
|
||||
@ApiModelProperty("佐证材料")
|
||||
private String archiveProofs;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewList> reviewList;
|
||||
|
||||
@Data
|
||||
public static class GuidanceTeacher implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String title;
|
||||
private String dept;
|
||||
private String sign;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Applicant implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String grade;
|
||||
private String className;
|
||||
private String gender;
|
||||
private String major;
|
||||
private String role;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Budget implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String item;
|
||||
private String amount;
|
||||
private String reason;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ReviewMember implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String nation;
|
||||
private String politics;
|
||||
private String birthMonth;
|
||||
private String title;
|
||||
private String duty;
|
||||
private String department;
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ArchiveRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Long id;
|
||||
private String awardName;
|
||||
private String awardTime;
|
||||
private String remark;
|
||||
private String proofFile;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@TableName("gxmu_wxxzx_guidance_teacher")
|
||||
public class WxxzxGuidanceTeacher implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
private Integer projectId;
|
||||
private Integer teacherOrder;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String jobTitle;
|
||||
private String departmentName;
|
||||
private String signName;
|
||||
private Integer year;
|
||||
private Long userId;
|
||||
private Long tenantId;
|
||||
private Integer deleted;
|
||||
private LocalDateTime createTime;
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@TableName("gxmu_wxxzx_review_member")
|
||||
public class WxxzxReviewMemberEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
private Integer projectId;
|
||||
private Integer memberOrder;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String nation;
|
||||
private String politics;
|
||||
private String birthMonth;
|
||||
private String jobTitle;
|
||||
private String duty;
|
||||
private String departmentName;
|
||||
private String remark;
|
||||
private Integer year;
|
||||
private Long userId;
|
||||
private Long tenantId;
|
||||
private Integer deleted;
|
||||
private LocalDateTime createTime;
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
110
src/main/java/com/gxwebsoft/gxmu/entity/YxgqtdgbForm.java
Normal file
110
src/main/java/com/gxwebsoft/gxmu/entity/YxgqtdgbForm.java
Normal file
@@ -0,0 +1,110 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优秀共青团干部申报表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "YxgqtdgbForm对象", description = "优秀共青团干部申报表")
|
||||
@TableName("gxmu_yxgqtdgb")
|
||||
public class YxgqtdgbForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String gender;
|
||||
|
||||
@ApiModelProperty("民族")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty("出生年月")
|
||||
private String birthMonth;
|
||||
|
||||
@ApiModelProperty("政治面貌")
|
||||
private String politics;
|
||||
|
||||
@ApiModelProperty("职务")
|
||||
private String position;
|
||||
|
||||
@ApiModelProperty("身份类别")
|
||||
@TableField(value = "identity_type")
|
||||
private String identity;
|
||||
|
||||
@ApiModelProperty("所在团组织")
|
||||
private String organization;
|
||||
|
||||
@ApiModelProperty("联系方式")
|
||||
private String contact;
|
||||
|
||||
@ApiModelProperty("发展团员编号")
|
||||
private String memberNo;
|
||||
|
||||
@ApiModelProperty("现任职务时间")
|
||||
private String currentDutyTime;
|
||||
|
||||
@ApiModelProperty("从事团的工作年限")
|
||||
private String cadreYears;
|
||||
|
||||
@ApiModelProperty("2024年度考核等次")
|
||||
@TableField(value = "assessment_2024")
|
||||
private String assessment2024;
|
||||
|
||||
@ApiModelProperty("成为注册志愿者时间")
|
||||
private String volunteerRegTime;
|
||||
|
||||
@ApiModelProperty("团干部经历")
|
||||
private String cadreExperience;
|
||||
|
||||
@ApiModelProperty("近五年获得荣誉情况")
|
||||
private String honorsFiveYears;
|
||||
|
||||
@ApiModelProperty("主要事迹")
|
||||
private String mainStory;
|
||||
|
||||
@ApiModelProperty("所在单位团组织意见")
|
||||
private String leagueOpinion;
|
||||
|
||||
@ApiModelProperty("所在单位党组织意见")
|
||||
private String partyOpinion;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewList> reviewList;
|
||||
}
|
||||
113
src/main/java/com/gxwebsoft/gxmu/entity/YxgqtyForm.java
Normal file
113
src/main/java/com/gxwebsoft/gxmu/entity/YxgqtyForm.java
Normal file
@@ -0,0 +1,113 @@
|
||||
package com.gxwebsoft.gxmu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优秀共青团员申报表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "YxgqtyForm对象", description = "优秀共青团员申报表")
|
||||
@TableName("gxmu_yxgqty")
|
||||
public class YxgqtyForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String gender;
|
||||
|
||||
@ApiModelProperty("民族")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty("政治面貌")
|
||||
private String politics;
|
||||
|
||||
@ApiModelProperty("出生年月")
|
||||
private String birthMonth;
|
||||
|
||||
@ApiModelProperty("入团时间")
|
||||
private String joinTime;
|
||||
|
||||
@ApiModelProperty("所在学院专业班级")
|
||||
private String collegeMajorClass;
|
||||
|
||||
@ApiModelProperty("职务")
|
||||
private String position;
|
||||
|
||||
@ApiModelProperty("注册志愿者时间")
|
||||
private String volunteerRegTime;
|
||||
|
||||
@ApiModelProperty("2024年团员教育评议等次")
|
||||
@TableField(value = "edu_eval_2024")
|
||||
private String eduEval2024;
|
||||
|
||||
@ApiModelProperty("是否已登录智慧团建系统")
|
||||
private String smartSystem;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String contact;
|
||||
|
||||
@ApiModelProperty("累计志愿服务时长")
|
||||
private String totalVolunteerHours;
|
||||
|
||||
@ApiModelProperty("2024年志愿服务时长")
|
||||
@TableField(value = "volunteer_hours_2024")
|
||||
private String volunteerHours2024;
|
||||
|
||||
@ApiModelProperty("发展团员编号")
|
||||
private String memberNo;
|
||||
|
||||
@ApiModelProperty("近五年获得荣誉情况")
|
||||
private String honorsFiveYears;
|
||||
|
||||
@ApiModelProperty("主要事迹")
|
||||
private String mainStory;
|
||||
|
||||
@ApiModelProperty("学生社团指导教师意见/所在单位团委")
|
||||
private String leagueOpinion;
|
||||
|
||||
@ApiModelProperty("业务指导单位意见/所在单位党组织")
|
||||
private String partyOpinion;
|
||||
|
||||
@ApiModelProperty("校团委意见")
|
||||
private String schoolOpinion;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("租户ID")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ReviewList> reviewList;
|
||||
}
|
||||
10
src/main/java/com/gxwebsoft/gxmu/mapper/ClassInfoMapper.java
Normal file
10
src/main/java/com/gxwebsoft/gxmu/mapper/ClassInfoMapper.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.ClassInfo;
|
||||
|
||||
/**
|
||||
* 班级管理Mapper
|
||||
*/
|
||||
public interface ClassInfoMapper extends BaseMapper<ClassInfo> {
|
||||
}
|
||||
10
src/main/java/com/gxwebsoft/gxmu/mapper/CollegeMapper.java
Normal file
10
src/main/java/com/gxwebsoft/gxmu/mapper/CollegeMapper.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.College;
|
||||
|
||||
/**
|
||||
* 学院管理Mapper
|
||||
*/
|
||||
public interface CollegeMapper extends BaseMapper<College> {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.CrossSchoolActivityArticle;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 跨校活动情报文章Mapper
|
||||
*
|
||||
* @author Codex
|
||||
* @since 2026-07-04
|
||||
*/
|
||||
public interface CrossSchoolActivityArticleMapper extends BaseMapper<CrossSchoolActivityArticle> {
|
||||
|
||||
/**
|
||||
* 批量新增或更新
|
||||
*
|
||||
* @param list 文章列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int batchUpsert(@Param("list") List<CrossSchoolActivityArticle> list);
|
||||
}
|
||||
37
src/main/java/com/gxwebsoft/gxmu/mapper/DeclareMapper.java
Normal file
37
src/main/java/com/gxwebsoft/gxmu/mapper/DeclareMapper.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gxmu.entity.Declare;
|
||||
import com.gxwebsoft.gxmu.param.DeclareParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 申报管理Mapper
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-28 15:06:52
|
||||
*/
|
||||
public interface DeclareMapper extends BaseMapper<Declare> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<Declare>
|
||||
*/
|
||||
List<Declare> selectPageRel(@Param("page") IPage<Declare> page,
|
||||
@Param("param") DeclareParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<Declare> selectListRel(@Param("param") DeclareParam param);
|
||||
|
||||
}
|
||||
10
src/main/java/com/gxwebsoft/gxmu/mapper/QmgcFormMapper.java
Normal file
10
src/main/java/com/gxwebsoft/gxmu/mapper/QmgcFormMapper.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.QmgcForm;
|
||||
|
||||
/**
|
||||
* 青马工程培训班学员登记表Mapper
|
||||
*/
|
||||
public interface QmgcFormMapper extends BaseMapper<QmgcForm> {
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gxmu.entity.ReviewFlowConfig;
|
||||
import com.gxwebsoft.gxmu.param.ReviewFlowConfigParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Mapper
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 10:37:18
|
||||
*/
|
||||
public interface ReviewFlowConfigMapper extends BaseMapper<ReviewFlowConfig> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ReviewFlowConfig>
|
||||
*/
|
||||
List<ReviewFlowConfig> selectPageRel(@Param("page") IPage<ReviewFlowConfig> page,
|
||||
@Param("param") ReviewFlowConfigParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<ReviewFlowConfig> selectListRel(@Param("param") ReviewFlowConfigParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gxmu.entity.ReviewFlow;
|
||||
import com.gxwebsoft.gxmu.param.ReviewFlowParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审核流Mapper
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 10:37:18
|
||||
*/
|
||||
public interface ReviewFlowMapper extends BaseMapper<ReviewFlow> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ReviewFlow>
|
||||
*/
|
||||
List<ReviewFlow> selectPageRel(@Param("page") IPage<ReviewFlow> page,
|
||||
@Param("param") ReviewFlowParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<ReviewFlow> selectListRel(@Param("param") ReviewFlowParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gxmu.entity.ReviewList;
|
||||
import com.gxwebsoft.gxmu.param.ReviewListParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审核列表Mapper
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 15:50:51
|
||||
*/
|
||||
public interface ReviewListMapper extends BaseMapper<ReviewList> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ReviewList>
|
||||
*/
|
||||
List<ReviewList> selectPageRel(@Param("page") IPage<ReviewList> page,
|
||||
@Param("param") ReviewListParam param);
|
||||
|
||||
/**
|
||||
* 分页查询聚合后的审核列表
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ReviewList>
|
||||
*/
|
||||
List<ReviewList> selectPageGroupRel(@Param("page") IPage<ReviewList> page,
|
||||
@Param("param") ReviewListParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<ReviewList> selectListRel(@Param("param") ReviewListParam param);
|
||||
|
||||
}
|
||||
10
src/main/java/com/gxwebsoft/gxmu/mapper/SjqnFormMapper.java
Normal file
10
src/main/java/com/gxwebsoft/gxmu/mapper/SjqnFormMapper.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.SjqnForm;
|
||||
|
||||
/**
|
||||
* 十佳青年申报表Mapper
|
||||
*/
|
||||
public interface SjqnFormMapper extends BaseMapper<SjqnForm> {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.SjtbzbsjForm;
|
||||
|
||||
/**
|
||||
* 十佳团支部书记申报表Mapper
|
||||
*/
|
||||
public interface SjtbzbsjFormMapper extends BaseMapper<SjtbzbsjForm> {
|
||||
}
|
||||
10
src/main/java/com/gxwebsoft/gxmu/mapper/TyglFormMapper.java
Normal file
10
src/main/java/com/gxwebsoft/gxmu/mapper/TyglFormMapper.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.TyglForm;
|
||||
|
||||
/**
|
||||
* 团员管理Mapper
|
||||
*/
|
||||
public interface TyglFormMapper extends BaseMapper<TyglForm> {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.TzbProjectListRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挑战杯项目库列表记录Mapper
|
||||
*
|
||||
* @author Codex
|
||||
* @since 2026-04-14
|
||||
*/
|
||||
public interface TzbProjectListRecordMapper extends BaseMapper<TzbProjectListRecord> {
|
||||
|
||||
/**
|
||||
* 批量新增或更新
|
||||
*
|
||||
* @param list 列表记录
|
||||
* @return 影响行数
|
||||
*/
|
||||
int batchUpsert(@Param("list") List<TzbProjectListRecord> list);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.TzbTalentListRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挑战杯人才库列表记录Mapper
|
||||
*
|
||||
* @author Codex
|
||||
* @since 2026-04-14
|
||||
*/
|
||||
public interface TzbTalentListRecordMapper extends BaseMapper<TzbTalentListRecord> {
|
||||
|
||||
/**
|
||||
* 批量新增或更新
|
||||
*
|
||||
* @param list 列表记录
|
||||
* @return 影响行数
|
||||
*/
|
||||
int batchUpsert(@Param("list") List<TzbTalentListRecord> list);
|
||||
}
|
||||
10
src/main/java/com/gxwebsoft/gxmu/mapper/TzbcyFormMapper.java
Normal file
10
src/main/java/com/gxwebsoft/gxmu/mapper/TzbcyFormMapper.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.TzbcyForm;
|
||||
|
||||
/**
|
||||
* 挑战杯创业计划竞赛申报表Mapper
|
||||
*/
|
||||
public interface TzbcyFormMapper extends BaseMapper<TzbcyForm> {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gxmu.entity.TzbcyMaterial;
|
||||
import com.gxwebsoft.gxmu.param.TzbcyMaterialParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挑战杯申报材料Mapper
|
||||
*/
|
||||
public interface TzbcyMaterialMapper extends BaseMapper<TzbcyMaterial> {
|
||||
List<TzbcyMaterial> selectPageRel(@Param("page") IPage<TzbcyMaterial> page,
|
||||
@Param("param") TzbcyMaterialParam param);
|
||||
|
||||
List<TzbcyMaterial> selectListRel(@Param("param") TzbcyMaterialParam param);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.WorkLedger;
|
||||
|
||||
public interface WorkLedgerMapper extends BaseMapper<WorkLedger> {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.WshqtwForm;
|
||||
|
||||
/**
|
||||
* 五四红旗团委申报表Mapper
|
||||
*/
|
||||
public interface WshqtwFormMapper extends BaseMapper<WshqtwForm> {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.WshqtzbForm;
|
||||
|
||||
/**
|
||||
* 五四红旗团支部申报表Mapper
|
||||
*/
|
||||
public interface WshqtzbFormMapper extends BaseMapper<WshqtzbForm> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.WxxzxApplicant;
|
||||
|
||||
public interface WxxzxApplicantMapper extends BaseMapper<WxxzxApplicant> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.WxxzxArchiveRecord;
|
||||
|
||||
public interface WxxzxArchiveRecordMapper extends BaseMapper<WxxzxArchiveRecord> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.WxxzxBudgetItem;
|
||||
|
||||
public interface WxxzxBudgetItemMapper extends BaseMapper<WxxzxBudgetItem> {
|
||||
}
|
||||
10
src/main/java/com/gxwebsoft/gxmu/mapper/WxxzxFormMapper.java
Normal file
10
src/main/java/com/gxwebsoft/gxmu/mapper/WxxzxFormMapper.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.WxxzxForm;
|
||||
|
||||
/**
|
||||
* 未来学术之星课题申报表Mapper
|
||||
*/
|
||||
public interface WxxzxFormMapper extends BaseMapper<WxxzxForm> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.WxxzxGuidanceTeacher;
|
||||
|
||||
public interface WxxzxGuidanceTeacherMapper extends BaseMapper<WxxzxGuidanceTeacher> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.WxxzxReviewMemberEntity;
|
||||
|
||||
public interface WxxzxReviewMemberEntityMapper extends BaseMapper<WxxzxReviewMemberEntity> {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.YxgqtdgbForm;
|
||||
|
||||
/**
|
||||
* 优秀共青团干部申报表Mapper
|
||||
*/
|
||||
public interface YxgqtdgbFormMapper extends BaseMapper<YxgqtdgbForm> {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.gxwebsoft.gxmu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gxwebsoft.gxmu.entity.YxgqtyForm;
|
||||
|
||||
/**
|
||||
* 优秀共青团员申报表Mapper
|
||||
*/
|
||||
public interface YxgqtyFormMapper extends BaseMapper<YxgqtyForm> {
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.gxmu.mapper.CrossSchoolActivityArticleMapper">
|
||||
|
||||
<insert id="batchUpsert">
|
||||
INSERT INTO gxmu_cross_school_activity_article (
|
||||
source_key,
|
||||
title,
|
||||
school_name,
|
||||
category,
|
||||
heat_level,
|
||||
source_name,
|
||||
publish_time,
|
||||
summary,
|
||||
tags,
|
||||
cover_image,
|
||||
detail_url,
|
||||
source_url,
|
||||
highlight,
|
||||
content_text,
|
||||
last_sync_time,
|
||||
create_time,
|
||||
update_time,
|
||||
deleted
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.sourceKey},
|
||||
#{item.title},
|
||||
#{item.schoolName},
|
||||
#{item.category},
|
||||
#{item.heatLevel},
|
||||
#{item.sourceName},
|
||||
#{item.publishTime},
|
||||
#{item.summary},
|
||||
#{item.tags},
|
||||
#{item.coverImage},
|
||||
#{item.detailUrl},
|
||||
#{item.sourceUrl},
|
||||
#{item.highlight},
|
||||
#{item.contentText},
|
||||
#{item.lastSyncTime},
|
||||
#{item.createTime},
|
||||
#{item.updateTime},
|
||||
#{item.deleted}
|
||||
)
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
title = VALUES(title),
|
||||
school_name = VALUES(school_name),
|
||||
category = VALUES(category),
|
||||
heat_level = VALUES(heat_level),
|
||||
source_name = VALUES(source_name),
|
||||
publish_time = VALUES(publish_time),
|
||||
summary = VALUES(summary),
|
||||
tags = VALUES(tags),
|
||||
cover_image = VALUES(cover_image),
|
||||
detail_url = VALUES(detail_url),
|
||||
source_url = VALUES(source_url),
|
||||
highlight = VALUES(highlight),
|
||||
content_text = VALUES(content_text),
|
||||
last_sync_time = VALUES(last_sync_time),
|
||||
update_time = VALUES(update_time),
|
||||
deleted = VALUES(deleted)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.gxmu.mapper.DeclareMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM gxmu_declare a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.year != null">
|
||||
AND a.year = #{param.year}
|
||||
</if>
|
||||
<if test="param.module != null">
|
||||
AND a.module LIKE CONCAT('%', #{param.module}, '%')
|
||||
</if>
|
||||
<if test="param.projectType != null">
|
||||
AND a.project_type LIKE CONCAT('%', #{param.projectType}, '%')
|
||||
</if>
|
||||
<if test="param.projectGroup != null">
|
||||
AND a.project_group LIKE CONCAT('%', #{param.projectGroup}, '%')
|
||||
</if>
|
||||
<if test="param.formProjectType != null">
|
||||
AND a.form_project_type LIKE CONCAT('%', #{param.formProjectType}, '%')
|
||||
</if>
|
||||
<if test="param.formProjectGroup != null">
|
||||
AND a.form_project_group LIKE CONCAT('%', #{param.formProjectGroup}, '%')
|
||||
</if>
|
||||
<if test="param.publicProjectType != null">
|
||||
AND a.public_project_type LIKE CONCAT('%', #{param.publicProjectType}, '%')
|
||||
</if>
|
||||
<if test="param.publicProjectGroup != null">
|
||||
AND a.public_project_group LIKE CONCAT('%', #{param.publicProjectGroup}, '%')
|
||||
</if>
|
||||
<if test="param.startTime != null">
|
||||
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
AND a.end_time LIKE CONCAT('%', #{param.endTime}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id LIKE CONCAT('%', #{param.userId}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.usable != null">
|
||||
AND a.start_time <= now() AND a.end_time >= now()
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.title LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.project_type LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.project_group LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.form_project_type LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.form_project_group LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.public_project_type LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.public_project_group LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gxmu.entity.Declare">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gxmu.entity.Declare">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.gxmu.mapper.ReviewFlowConfigMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM gxmu_review_flow_config a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.flowId != null">
|
||||
AND a.flow_id = #{param.flowId}
|
||||
</if>
|
||||
<if test="param.module != null">
|
||||
AND a.module LIKE CONCAT('%', #{param.module}, '%')
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gxmu.entity.ReviewFlowConfig">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gxmu.entity.ReviewFlowConfig">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.gxmu.mapper.ReviewFlowMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM gxmu_review_flow a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.organizationId != null">
|
||||
AND a.organization_id = #{param.organizationId}
|
||||
</if>
|
||||
<if test="param.level != null">
|
||||
AND a.level = #{param.level}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.title LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
<if test="param.withGroup != null">
|
||||
GROUP BY a.title
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gxmu.entity.ReviewFlow">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gxmu.entity.ReviewFlow">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
484
src/main/java/com/gxwebsoft/gxmu/mapper/xml/ReviewListMapper.xml
Normal file
484
src/main/java/com/gxwebsoft/gxmu/mapper/xml/ReviewListMapper.xml
Normal file
@@ -0,0 +1,484 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.gxmu.mapper.ReviewListMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM gxmu_review_list a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.module != null">
|
||||
AND a.module LIKE CONCAT('%', #{param.module}, '%')
|
||||
</if>
|
||||
<if test="param.pk != null">
|
||||
AND a.pk = #{param.pk}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.organizationIds != null and param.organizationIds.size() > 0">
|
||||
AND (
|
||||
(a.module = 'gxmu_tzbcy_form' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_tzbcy_form f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_sjqn' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_sjqn f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_sjtbzbsj' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_sjtbzbsj f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_wshqtw' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_wshqtw f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_wshqtzb' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_wshqtzb f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_yxgqtdgb' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_yxgqtdgb f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_yxgqty' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_yxgqty f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_qmgc_form' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_qmgc_form f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_wxxzx_project' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_wxxzx_project f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_tygl_form' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_tygl_form f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
)
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gxmu.entity.ReviewList">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询聚合后的审核列表 -->
|
||||
<select id="selectPageGroupRel" resultType="com.gxwebsoft.gxmu.entity.ReviewList">
|
||||
SELECT latest.id,
|
||||
latest.module,
|
||||
latest.pk,
|
||||
CASE
|
||||
WHEN latest.module = 'gxmu_tzbcy_form' THEN (
|
||||
SELECT IFNULL(f.project_name, '')
|
||||
FROM gxmu_tzbcy_form f
|
||||
WHERE f.id = latest.pk AND f.deleted = 0
|
||||
)
|
||||
WHEN latest.module = 'gxmu_sjqn' THEN (
|
||||
SELECT IFNULL(f.name, '')
|
||||
FROM gxmu_sjqn f
|
||||
WHERE f.id = latest.pk AND f.deleted = 0
|
||||
)
|
||||
WHEN latest.module = 'gxmu_sjtbzbsj' THEN (
|
||||
SELECT IFNULL(f.name, '')
|
||||
FROM gxmu_sjtbzbsj f
|
||||
WHERE f.id = latest.pk AND f.deleted = 0
|
||||
)
|
||||
WHEN latest.module = 'gxmu_qmgc_form' THEN (
|
||||
SELECT IFNULL(f.name, '')
|
||||
FROM gxmu_qmgc_form f
|
||||
WHERE f.id = latest.pk AND f.deleted = 0
|
||||
)
|
||||
WHEN latest.module = 'gxmu_yxgqtdgb' THEN (
|
||||
SELECT IFNULL(f.name, '')
|
||||
FROM gxmu_yxgqtdgb f
|
||||
WHERE f.id = latest.pk AND f.deleted = 0
|
||||
)
|
||||
WHEN latest.module = 'gxmu_yxgqty' THEN (
|
||||
SELECT IFNULL(f.name, '')
|
||||
FROM gxmu_yxgqty f
|
||||
WHERE f.id = latest.pk AND f.deleted = 0
|
||||
)
|
||||
WHEN latest.module = 'gxmu_wshqtw' THEN (
|
||||
SELECT IFNULL(f.org_name, '')
|
||||
FROM gxmu_wshqtw f
|
||||
WHERE f.id = latest.pk AND f.deleted = 0
|
||||
)
|
||||
WHEN latest.module = 'gxmu_wshqtzb' THEN (
|
||||
SELECT IFNULL(f.branch_name, '')
|
||||
FROM gxmu_wshqtzb f
|
||||
WHERE f.id = latest.pk AND f.deleted = 0
|
||||
)
|
||||
WHEN latest.module = 'gxmu_wxxzx_project' THEN (
|
||||
SELECT IFNULL(f.topic_name, '')
|
||||
FROM gxmu_wxxzx_project f
|
||||
WHERE f.id = latest.pk AND f.deleted = 0
|
||||
)
|
||||
ELSE ''
|
||||
END AS business_name,
|
||||
latest.status,
|
||||
latest.content,
|
||||
latest.deleted,
|
||||
latest.tenant_id,
|
||||
grouped.first_create_time AS create_time,
|
||||
latest.update_time,
|
||||
latest.user_id,
|
||||
latest.sort_number
|
||||
FROM (
|
||||
SELECT a.module,
|
||||
a.pk,
|
||||
MIN(a.create_time) AS first_create_time
|
||||
FROM gxmu_review_list a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.module != null">
|
||||
AND a.module LIKE CONCAT('%', #{param.module}, '%')
|
||||
</if>
|
||||
<if test="param.pk != null">
|
||||
AND a.pk = #{param.pk}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.organizationIds != null and param.organizationIds.size() > 0">
|
||||
AND (
|
||||
(a.module = 'gxmu_tzbcy_form' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_tzbcy_form f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_sjqn' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_sjqn f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_sjtbzbsj' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_sjtbzbsj f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_wshqtw' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_wshqtw f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_wshqtzb' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_wshqtzb f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_yxgqtdgb' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_yxgqtdgb f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_yxgqty' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_yxgqty f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_qmgc_form' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_qmgc_form f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_wxxzx_project' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_wxxzx_project f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
OR (a.module = 'gxmu_tygl_form' AND EXISTS (
|
||||
SELECT 1
|
||||
FROM gxmu_tygl_form f
|
||||
LEFT JOIN sys_user su ON su.user_id = f.user_id
|
||||
WHERE f.id = a.pk
|
||||
AND f.deleted = 0
|
||||
AND su.deleted = 0
|
||||
AND su.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
))
|
||||
)
|
||||
</if>
|
||||
<if test="param.keywords != null and param.keywords != ''">
|
||||
AND (
|
||||
a.content LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR (a.module = 'gxmu_tzbcy_form' AND EXISTS (
|
||||
SELECT 1 FROM gxmu_tzbcy_form f
|
||||
WHERE f.id = a.pk AND f.deleted = 0
|
||||
AND f.project_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
))
|
||||
OR (a.module IN ('gxmu_sjqn', 'gxmu_sjtbzbsj', 'gxmu_qmgc_form', 'gxmu_yxgqtdgb', 'gxmu_yxgqty') AND (
|
||||
(a.module = 'gxmu_sjqn' AND EXISTS (
|
||||
SELECT 1 FROM gxmu_sjqn f
|
||||
WHERE f.id = a.pk AND f.deleted = 0
|
||||
AND f.name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
))
|
||||
OR (a.module = 'gxmu_sjtbzbsj' AND EXISTS (
|
||||
SELECT 1 FROM gxmu_sjtbzbsj f
|
||||
WHERE f.id = a.pk AND f.deleted = 0
|
||||
AND f.name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
))
|
||||
OR (a.module = 'gxmu_qmgc_form' AND EXISTS (
|
||||
SELECT 1 FROM gxmu_qmgc_form f
|
||||
WHERE f.id = a.pk AND f.deleted = 0
|
||||
AND f.name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
))
|
||||
OR (a.module = 'gxmu_yxgqtdgb' AND EXISTS (
|
||||
SELECT 1 FROM gxmu_yxgqtdgb f
|
||||
WHERE f.id = a.pk AND f.deleted = 0
|
||||
AND f.name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
))
|
||||
OR (a.module = 'gxmu_yxgqty' AND EXISTS (
|
||||
SELECT 1 FROM gxmu_yxgqty f
|
||||
WHERE f.id = a.pk AND f.deleted = 0
|
||||
AND f.name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
))
|
||||
))
|
||||
OR (a.module = 'gxmu_wshqtw' AND EXISTS (
|
||||
SELECT 1 FROM gxmu_wshqtw f
|
||||
WHERE f.id = a.pk AND f.deleted = 0
|
||||
AND f.org_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
))
|
||||
OR (a.module = 'gxmu_wshqtzb' AND EXISTS (
|
||||
SELECT 1 FROM gxmu_wshqtzb f
|
||||
WHERE f.id = a.pk AND f.deleted = 0
|
||||
AND f.branch_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
))
|
||||
OR (a.module = 'gxmu_wxxzx_project' AND EXISTS (
|
||||
SELECT 1 FROM gxmu_wxxzx_project f
|
||||
WHERE f.id = a.pk AND f.deleted = 0
|
||||
AND f.topic_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
))
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY a.module, a.pk
|
||||
) grouped
|
||||
INNER JOIN (
|
||||
SELECT b.module,
|
||||
b.pk,
|
||||
MAX(b.id) AS latest_id
|
||||
FROM gxmu_review_list b
|
||||
<where>
|
||||
<if test="param.deleted != null">
|
||||
AND b.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND b.deleted = 0
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY b.module, b.pk
|
||||
) latest_group ON latest_group.module = grouped.module
|
||||
AND latest_group.pk = grouped.pk
|
||||
INNER JOIN gxmu_review_list latest ON latest.id = latest_group.latest_id
|
||||
<where>
|
||||
<if test="param.status != null">
|
||||
AND latest.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND latest.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gxmu.entity.ReviewList">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.gxmu.mapper.TzbProjectListRecordMapper">
|
||||
|
||||
<insert id="batchUpsert">
|
||||
INSERT INTO gxmu_tzb_project_list (
|
||||
source_id,
|
||||
project_name,
|
||||
school_name,
|
||||
award_name,
|
||||
match_year,
|
||||
match_term,
|
||||
match_level,
|
||||
cover_image,
|
||||
detail_url,
|
||||
source_url,
|
||||
page_no,
|
||||
last_sync_time,
|
||||
create_time,
|
||||
update_time,
|
||||
deleted
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.sourceId},
|
||||
#{item.projectName},
|
||||
#{item.schoolName},
|
||||
#{item.awardName},
|
||||
#{item.matchYear},
|
||||
#{item.matchTerm},
|
||||
#{item.matchLevel},
|
||||
#{item.coverImage},
|
||||
#{item.detailUrl},
|
||||
#{item.sourceUrl},
|
||||
#{item.pageNo},
|
||||
#{item.lastSyncTime},
|
||||
#{item.createTime},
|
||||
#{item.updateTime},
|
||||
#{item.deleted}
|
||||
)
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
project_name = VALUES(project_name),
|
||||
school_name = VALUES(school_name),
|
||||
award_name = VALUES(award_name),
|
||||
match_year = VALUES(match_year),
|
||||
match_term = VALUES(match_term),
|
||||
match_level = VALUES(match_level),
|
||||
cover_image = VALUES(cover_image),
|
||||
detail_url = VALUES(detail_url),
|
||||
source_url = VALUES(source_url),
|
||||
page_no = VALUES(page_no),
|
||||
last_sync_time = VALUES(last_sync_time),
|
||||
update_time = VALUES(update_time),
|
||||
deleted = VALUES(deleted)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.gxmu.mapper.TzbTalentListRecordMapper">
|
||||
|
||||
<insert id="batchUpsert">
|
||||
INSERT INTO gxmu_tzb_talent_list (
|
||||
source_id,
|
||||
person_name,
|
||||
school_name,
|
||||
talent_type,
|
||||
project_name,
|
||||
award_name,
|
||||
match_term,
|
||||
match_level,
|
||||
cover_image,
|
||||
detail_url,
|
||||
source_url,
|
||||
page_no,
|
||||
last_sync_time,
|
||||
create_time,
|
||||
update_time,
|
||||
deleted
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.sourceId},
|
||||
#{item.personName},
|
||||
#{item.schoolName},
|
||||
#{item.talentType},
|
||||
#{item.projectName},
|
||||
#{item.awardName},
|
||||
#{item.matchTerm},
|
||||
#{item.matchLevel},
|
||||
#{item.coverImage},
|
||||
#{item.detailUrl},
|
||||
#{item.sourceUrl},
|
||||
#{item.pageNo},
|
||||
#{item.lastSyncTime},
|
||||
#{item.createTime},
|
||||
#{item.updateTime},
|
||||
#{item.deleted}
|
||||
)
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
person_name = VALUES(person_name),
|
||||
school_name = VALUES(school_name),
|
||||
talent_type = VALUES(talent_type),
|
||||
project_name = VALUES(project_name),
|
||||
award_name = VALUES(award_name),
|
||||
match_term = VALUES(match_term),
|
||||
match_level = VALUES(match_level),
|
||||
cover_image = VALUES(cover_image),
|
||||
detail_url = VALUES(detail_url),
|
||||
source_url = VALUES(source_url),
|
||||
page_no = VALUES(page_no),
|
||||
last_sync_time = VALUES(last_sync_time),
|
||||
update_time = VALUES(update_time),
|
||||
deleted = VALUES(deleted)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.gxmu.mapper.TzbcyMaterialMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
m.id,
|
||||
m.form_id,
|
||||
m.material_type,
|
||||
m.file_id,
|
||||
m.file_name,
|
||||
m.file_path,
|
||||
m.file_url,
|
||||
m.download_url,
|
||||
m.file_size,
|
||||
m.content_type,
|
||||
m.status,
|
||||
m.reject_reason,
|
||||
m.audit_user_id,
|
||||
m.audit_time,
|
||||
m.user_id,
|
||||
m.deleted,
|
||||
m.tenant_id,
|
||||
m.create_time,
|
||||
m.update_time,
|
||||
f.project_name AS project_name,
|
||||
f.leader AS leader
|
||||
</sql>
|
||||
|
||||
<sql id="Where_Clause">
|
||||
WHERE m.deleted = 0
|
||||
<if test="param != null">
|
||||
<if test="param.id != null">
|
||||
AND m.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.formId != null">
|
||||
AND m.form_id = #{param.formId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND m.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND m.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.userIds != null and param.userIds.size() > 0">
|
||||
AND m.user_id IN
|
||||
<foreach collection="param.userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.materialType != null and param.materialType != ''">
|
||||
AND m.material_type LIKE CONCAT('%', #{param.materialType}, '%')
|
||||
</if>
|
||||
<if test="param.keywords != null and param.keywords != ''">
|
||||
AND (
|
||||
m.material_type LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR m.file_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR f.project_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR f.leader LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gxmu.entity.TzbcyMaterial">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM gxmu_tzbcy_material m
|
||||
LEFT JOIN gxmu_tzbcy_form f ON f.id = m.form_id AND f.deleted = 0
|
||||
<include refid="Where_Clause"/>
|
||||
ORDER BY m.id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gxmu.entity.TzbcyMaterial">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM gxmu_tzbcy_material m
|
||||
LEFT JOIN gxmu_tzbcy_form f ON f.id = m.form_id AND f.deleted = 0
|
||||
<include refid="Where_Clause"/>
|
||||
ORDER BY m.id DESC
|
||||
</select>
|
||||
</mapper>
|
||||
43
src/main/java/com/gxwebsoft/gxmu/model/ClassImportItem.java
Normal file
43
src/main/java/com/gxwebsoft/gxmu/model/ClassImportItem.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.gxwebsoft.gxmu.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "ClassImportItem对象", description = "班级导入数据")
|
||||
public class ClassImportItem implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("所属学院")
|
||||
private String collegeName;
|
||||
|
||||
@ApiModelProperty("班级编码")
|
||||
private String classCode;
|
||||
|
||||
@ApiModelProperty("班级名称")
|
||||
private String className;
|
||||
|
||||
@ApiModelProperty("年级")
|
||||
private Integer gradeYear;
|
||||
|
||||
@ApiModelProperty("辅导员")
|
||||
private String counselorName;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String counselorPhone;
|
||||
|
||||
@ApiModelProperty("学生人数")
|
||||
private Integer studentCount;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.gxwebsoft.gxmu.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 团员青年数据分析中心明细
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "TyglDataCenterRecord对象", description = "团员青年数据分析中心明细")
|
||||
public class TyglDataCenterRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("序号")
|
||||
private Integer serialNo;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String gender;
|
||||
|
||||
@ApiModelProperty("民族")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty("手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("团内职务")
|
||||
private String leaguePosition;
|
||||
|
||||
@ApiModelProperty("团籍是否在本组织")
|
||||
private String archiveInCurrentOrg;
|
||||
|
||||
@ApiModelProperty("入团年月")
|
||||
private String joinMonth;
|
||||
|
||||
@ApiModelProperty("入团年份")
|
||||
private String joinYear;
|
||||
|
||||
@ApiModelProperty("团员记录数")
|
||||
private Integer memberRecordCount;
|
||||
|
||||
@ApiModelProperty("成长档案数")
|
||||
private Integer growthArchiveCount;
|
||||
|
||||
@ApiModelProperty("档案完善状态")
|
||||
private String profileStatus;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.gxwebsoft.gxmu.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "TyglDataCenterResult对象", description = "团员青年数据分析中心结果")
|
||||
public class TyglDataCenterResult implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("明细列表")
|
||||
private List<TyglDataCenterRecord> records;
|
||||
|
||||
@ApiModelProperty("汇总数据")
|
||||
private TyglDataCenterSummary summary;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gxmu.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "TyglDataCenterSummary对象", description = "团员青年数据分析中心汇总")
|
||||
public class TyglDataCenterSummary implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("团员人数")
|
||||
private Integer memberCount;
|
||||
|
||||
@ApiModelProperty("28岁及以下青年数")
|
||||
private Integer youthUnder28Count;
|
||||
|
||||
@ApiModelProperty("团青比")
|
||||
private String memberYouthRatio;
|
||||
|
||||
@ApiModelProperty("男性人数")
|
||||
private Integer maleCount;
|
||||
|
||||
@ApiModelProperty("女性人数")
|
||||
private Integer femaleCount;
|
||||
|
||||
@ApiModelProperty("男女比例")
|
||||
private String genderRatio;
|
||||
|
||||
@ApiModelProperty("团籍在本组织人数")
|
||||
private Integer archiveInOrgCount;
|
||||
|
||||
@ApiModelProperty("已完善档案人数")
|
||||
private Integer completedProfileCount;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.gxwebsoft.gxmu.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挑战杯数据统计结果
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "TzbcyStatisticsResult对象", description = "挑战杯数据统计结果")
|
||||
public class TzbcyStatisticsResult implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("筛选年份")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("可选年份")
|
||||
private List<Integer> availableYears = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty("统计总览")
|
||||
private Summary summary = new Summary();
|
||||
|
||||
@ApiModelProperty("获奖数量口径说明")
|
||||
private String awardCountDescription;
|
||||
|
||||
@ApiModelProperty("年度申报趋势")
|
||||
private List<StatisticItem> yearDistribution = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty("项目类型分布")
|
||||
private List<StatisticItem> typeDistribution = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty("项目分组分布")
|
||||
private List<StatisticItem> groupDistribution = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty("学校申报排行")
|
||||
private List<StatisticItem> schoolDistribution = new ArrayList<>();
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "TzbcyStatisticsSummary对象", description = "挑战杯数据统计总览")
|
||||
public static class Summary implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("申报作品数量")
|
||||
private Integer declarationCount = 0;
|
||||
|
||||
@ApiModelProperty("参与申报人数")
|
||||
private Integer participantCount = 0;
|
||||
|
||||
@ApiModelProperty("指导老师数量")
|
||||
private Integer advisorCount = 0;
|
||||
|
||||
@ApiModelProperty("获奖数量")
|
||||
private Integer awardCount = 0;
|
||||
|
||||
@ApiModelProperty("申报学校数量")
|
||||
private Integer schoolCount = 0;
|
||||
}
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "TzbcyStatisticItem对象", description = "挑战杯统计项")
|
||||
public static class StatisticItem implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
private String label;
|
||||
|
||||
@ApiModelProperty("数量")
|
||||
private Integer value;
|
||||
|
||||
public StatisticItem() {
|
||||
}
|
||||
|
||||
public StatisticItem(String label, Integer value) {
|
||||
this.label = label;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.gxwebsoft.gxmu.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 未来学术之星项目申报书 docx 校验结果
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "WxxzxDocxValidationResult对象", description = "未来学术之星项目申报书docx校验结果")
|
||||
public class WxxzxDocxValidationResult implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("文件名")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("是否通过校验")
|
||||
private Boolean passed = false;
|
||||
|
||||
@ApiModelProperty("结果摘要")
|
||||
private String summary;
|
||||
|
||||
@ApiModelProperty("问题数量")
|
||||
private Integer totalIssues = 0;
|
||||
|
||||
@ApiModelProperty("校验明细")
|
||||
private List<Item> items = new ArrayList<>();
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "WxxzxDocxValidationItem对象", description = "未来学术之星项目申报书docx校验明细")
|
||||
public static class Item implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("校验规则")
|
||||
private String rule;
|
||||
|
||||
@ApiModelProperty("是否通过")
|
||||
private Boolean passed;
|
||||
|
||||
@ApiModelProperty("说明")
|
||||
private String detail;
|
||||
|
||||
@ApiModelProperty("修改意见")
|
||||
private String suggestion;
|
||||
|
||||
@ApiModelProperty("段落序号,从1开始")
|
||||
private Integer paragraphIndex;
|
||||
|
||||
@ApiModelProperty("段落内容")
|
||||
private String paragraphText;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.gxwebsoft.gxmu.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 未来学术之星项目主题语义检索结果
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "WxxzxTopicSemanticSearchResult对象", description = "未来学术之星项目主题语义检索结果")
|
||||
public class WxxzxTopicSemanticSearchResult implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("模块编码")
|
||||
private String module;
|
||||
|
||||
@ApiModelProperty("模块名称")
|
||||
private String moduleName;
|
||||
|
||||
@ApiModelProperty("课题名称")
|
||||
private String topicName;
|
||||
|
||||
@ApiModelProperty("课题类型")
|
||||
private String topicType;
|
||||
|
||||
@ApiModelProperty("立论依据")
|
||||
private String rationale;
|
||||
|
||||
@ApiModelProperty("摘要片段")
|
||||
private String snippet;
|
||||
|
||||
@ApiModelProperty("相关度分数")
|
||||
private Integer score;
|
||||
}
|
||||
43
src/main/java/com/gxwebsoft/gxmu/param/ClassInfoParam.java
Normal file
43
src/main/java/com/gxwebsoft/gxmu/param/ClassInfoParam.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.gxwebsoft.gxmu.param;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 班级查询参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "ClassInfoParam对象", description = "班级查询参数")
|
||||
public class ClassInfoParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer collegeId;
|
||||
|
||||
private String classCode;
|
||||
|
||||
private String className;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer gradeYear;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer tenantId;
|
||||
}
|
||||
37
src/main/java/com/gxwebsoft/gxmu/param/CollegeParam.java
Normal file
37
src/main/java/com/gxwebsoft/gxmu/param/CollegeParam.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gxmu.param;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 学院查询参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "CollegeParam对象", description = "学院查询参数")
|
||||
public class CollegeParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
private String collegeCode;
|
||||
|
||||
private String collegeName;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer tenantId;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.gxwebsoft.gxmu.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 跨校活动情报文章查询参数
|
||||
*
|
||||
* @author Codex
|
||||
* @since 2026-07-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "CrossSchoolActivityArticleParam对象", description = "跨校活动情报文章查询参数")
|
||||
public class CrossSchoolActivityArticleParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private String schoolName;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private String category;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private String heatLevel;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
}
|
||||
64
src/main/java/com/gxwebsoft/gxmu/param/DeclareParam.java
Normal file
64
src/main/java/com/gxwebsoft/gxmu/param/DeclareParam.java
Normal file
@@ -0,0 +1,64 @@
|
||||
package com.gxwebsoft.gxmu.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 申报管理查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-28 15:06:52
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "DeclareParam对象", description = "申报管理查询参数")
|
||||
public class DeclareParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer year;
|
||||
|
||||
private String module;
|
||||
|
||||
private String projectType;
|
||||
|
||||
private String projectGroup;
|
||||
|
||||
private String formProjectType;
|
||||
|
||||
private String formProjectGroup;
|
||||
|
||||
private String publicProjectType;
|
||||
|
||||
private String publicProjectGroup;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "删除标记:0未删 1已删")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Boolean usable;
|
||||
|
||||
}
|
||||
48
src/main/java/com/gxwebsoft/gxmu/param/QmgcFormParam.java
Normal file
48
src/main/java/com/gxwebsoft/gxmu/param/QmgcFormParam.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.gxwebsoft.gxmu.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 青马工程培训班学员登记表查询参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "QmgcFormParam对象", description = "青马工程培训班学员登记表查询参数")
|
||||
public class QmgcFormParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("学校信息")
|
||||
private String schoolInfo;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer year;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("用户ID集合")
|
||||
@QueryField(value = "user_id", type = QueryType.IN)
|
||||
@TableField(exist = false)
|
||||
private Set<Integer> userIds;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.gxwebsoft.gxmu.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 10:37:18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "ReviewFlowConfigParam对象", description = "查询参数")
|
||||
public class ReviewFlowConfigParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "流id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer flowId;
|
||||
|
||||
@ApiModelProperty(value = "模块")
|
||||
private String module;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
}
|
||||
50
src/main/java/com/gxwebsoft/gxmu/param/ReviewFlowParam.java
Normal file
50
src/main/java/com/gxwebsoft/gxmu/param/ReviewFlowParam.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package com.gxwebsoft.gxmu.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.gxmu.entity.ReviewFlow;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 审核流查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 10:37:18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "ReviewFlowParam对象", description = "审核流查询参数")
|
||||
public class ReviewFlowParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer organizationId;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer level;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Boolean withGroup;
|
||||
}
|
||||
58
src/main/java/com/gxwebsoft/gxmu/param/ReviewListParam.java
Normal file
58
src/main/java/com/gxwebsoft/gxmu/param/ReviewListParam.java
Normal file
@@ -0,0 +1,58 @@
|
||||
package com.gxwebsoft.gxmu.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 审核列表查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2026-03-18 15:50:51
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "ReviewListParam对象", description = "审核列表查询参数")
|
||||
public class ReviewListParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "模块")
|
||||
private String module;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer pk;
|
||||
|
||||
@ApiModelProperty(value = "状态(0不通过 1通过)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "审核意见")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty("机构ID集合")
|
||||
@TableField(exist = false)
|
||||
private Set<Integer> organizationIds;
|
||||
}
|
||||
48
src/main/java/com/gxwebsoft/gxmu/param/SjqnFormParam.java
Normal file
48
src/main/java/com/gxwebsoft/gxmu/param/SjqnFormParam.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.gxwebsoft.gxmu.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 十佳青年申报表查询参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "SjqnFormParam对象", description = "十佳青年申报表查询参数")
|
||||
public class SjqnFormParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("所在单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("申报类别")
|
||||
private String applyType;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer year;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("用户ID集合")
|
||||
@QueryField(value = "user_id", type = QueryType.IN)
|
||||
@TableField(exist = false)
|
||||
private Set<Integer> userIds;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.gxwebsoft.gxmu.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 十佳团支部书记申报表查询参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "SjtbzbsjFormParam对象", description = "十佳团支部书记申报表查询参数")
|
||||
public class SjtbzbsjFormParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("学院班级")
|
||||
private String collegeClass;
|
||||
|
||||
@ApiModelProperty("团支部")
|
||||
private String branch;
|
||||
|
||||
@ApiModelProperty("年度")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer year;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("用户ID集合")
|
||||
@QueryField(value = "user_id", type = QueryType.IN)
|
||||
@TableField(exist = false)
|
||||
private Set<Integer> userIds;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user