commit
This commit is contained in:
@@ -0,0 +1,236 @@
|
||||
package com.budwk.app.zhgh.thirtyTeach.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.EasyExcelUtil;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.integral.controller.IntegralManageController;
|
||||
import com.budwk.app.zhgh.thirtyTeach.param.ThirtyTeachPageForm;
|
||||
import com.budwk.app.zhgh.thirtyTeach.service.ThirtyTeachService;
|
||||
import com.budwk.app.zhgh.thirtyTeach.template.ThirtyTeachTemp;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
import org.nutz.mvc.upload.UploadAdaptor;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/7/25 18:27
|
||||
* @description 教职工管理
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "三十龄教工-教职工管理")
|
||||
@At("/platform/thirtyTeach/manage")
|
||||
public class ThirtyTeachController {
|
||||
|
||||
|
||||
@Inject
|
||||
private ThirtyTeachService thirtyTeachService;
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/thirtyTeach/manage/index.html")
|
||||
@SaCheckPermission("thirtyTeach.manage")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("thirtyTeach.manage")
|
||||
public Result pageData(ThirtyTeachPageForm pageForm) {
|
||||
Sql sql = thirtyTeachService.getSql(pageForm);
|
||||
Pagination pagination = thirtyTeachService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("一键设置三十龄教工")
|
||||
@SaCheckPermission("thirtyTeach.manage")
|
||||
@SLog(type = "30龄教工-教职工管理", tag = "设置三十龄教工",msg = "设置三十龄教工设置教龄${args[0]}")
|
||||
public Result setThirtyTeach(Integer setNum, boolean isFlag){
|
||||
if (isFlag) {
|
||||
sysUserService.update(Chain.make("isThirtyTeach", 0), Cnd.NEW());
|
||||
}
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("arrivalAtSchoolDate", "is not", null);
|
||||
cnd.and("arrivalAtSchoolDate", "!=", "");
|
||||
cnd.and("TIMESTAMPDIFF(YEAR, CONCAT(arrivalAtSchoolDate, '-01'), CURDATE())", ">", setNum);
|
||||
sysUserService.update(Chain.make("isThirtyTeach", 1), cnd);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("批量删除三十龄教工")
|
||||
@SaCheckPermission("thirtyTeach.manage")
|
||||
@SLog(type = "30龄教工-教职工管理", tag = "批量删除三十龄教工",msg = "批量删除三十龄教工${args[0]}")
|
||||
public Result doBatchDelete(@Param("userIds") String[] userIds) {
|
||||
List<String> userIdList = Arrays.asList(userIds);
|
||||
if (Lang.isNotEmpty(userIdList)) {
|
||||
sysUserService.update(Chain.make("isThirtyTeach", 0), Cnd.where("id", "in", userIdList));
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("thirtyTeach.manage")
|
||||
@Ok("void")
|
||||
@ApiOperation("导出30教龄教职工名单")
|
||||
public void doExport(ThirtyTeachPageForm pageForm, HttpServletResponse response){
|
||||
|
||||
Sql sql = thirtyTeachService.getSql(pageForm);
|
||||
List<NutMap> list = thirtyTeachService.listMap(sql);
|
||||
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||
ExcelExportEntity no = new ExcelExportEntity("序号", "no", 10);
|
||||
no.setFormat("isAddIndex");
|
||||
entityList.add(no);
|
||||
entityList.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||
entityList.add(new ExcelExportEntity("姓名", "username", 20));
|
||||
entityList.add(new ExcelExportEntity("性别", "sex", 20));
|
||||
entityList.add(new ExcelExportEntity("教龄(年)", "teachNum", 20));
|
||||
entityList.add(new ExcelExportEntity("电话", "mobile", 20));
|
||||
entityList.add(new ExcelExportEntity("工会", "unionName", 20));
|
||||
entityList.add(new ExcelExportEntity("单位", "unitName", 20));
|
||||
entityList.add(new ExcelExportEntity("在职状态", "userState", 20));
|
||||
entityList.add(new ExcelExportEntity("人员类型", "personType", 20));
|
||||
entityList.add(new ExcelExportEntity("荣誉证办理年月", "thirtyCertificateProcessingTime", 20));
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, list);
|
||||
CommonDownloadUtil.download("30教龄教职工名单.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("下载导入30教龄教职工模版")
|
||||
@SaCheckPermission("thirtyTeach.manage")
|
||||
public void downloadImportTemp(HttpServletResponse response) {
|
||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||
EasyExcel.write(byteArrayOutputStream, ThirtyTeachTemp.class)
|
||||
.sheet("30教龄教职工模版")
|
||||
.doWrite(ArrayList::new);
|
||||
CommonDownloadUtil.download("30教龄教职工模版.xlsx", byteArrayOutputStream.toByteArray(), response);
|
||||
} catch (Exception e) {
|
||||
log.error("下载导入模版失败", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("thirtyTeach.manage")
|
||||
@ApiOperation("导入30教龄教职工名单")
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
public Result doImport(TempFile file, Boolean isFlag) {
|
||||
try {
|
||||
List<T> ts = EasyExcelUtil.syncReadModel(file.getFile(), ThirtyTeachTemp.class, 0, 1);
|
||||
List<ThirtyTeachTemp> teachTempList = JSONUtil.parseArray(JSONUtil.toJsonStr(ts)).toList(ThirtyTeachTemp.class);
|
||||
|
||||
List<Sys_user> users = sysUserService.query();
|
||||
|
||||
List<ThirtyTeachTemp> errorInfos = new ArrayList<>();
|
||||
List<Sys_user> insertUserList = new ArrayList<>();
|
||||
|
||||
for (ThirtyTeachTemp temp : teachTempList) {
|
||||
if (StrUtil.isBlank(temp.getUserName())) {
|
||||
temp.setResult("获取不到该用户的姓名!");
|
||||
errorInfos.add(temp);
|
||||
break;
|
||||
} else if (StrUtil.isBlank(temp.getLoginName())) {
|
||||
temp.setResult("获取不到该用户的出生日期!");
|
||||
errorInfos.add(temp);
|
||||
break;
|
||||
}else if (StrUtil.isBlank(temp.getThirtyCertificateProcessingTime())) {
|
||||
temp.setResult("获取不到该用户的荣誉证办理时间!");
|
||||
errorInfos.add(temp);
|
||||
break;
|
||||
}
|
||||
|
||||
List<Sys_user> matchUsers = users.stream().filter(u -> u.getLoginname().equals(temp.getLoginName())).map(u -> {
|
||||
Sys_user user = new Sys_user();
|
||||
user.setId(u.getId());
|
||||
user.setLoginname(temp.getLoginName());
|
||||
user.setIsThirtyTeach(true);
|
||||
user.setThirtyCertificateProcessingTime(temp.getThirtyCertificateProcessingTime());
|
||||
return user;
|
||||
}).collect(Collectors.toList());
|
||||
insertUserList.addAll(matchUsers);
|
||||
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
if (Lang.isNotEmpty(insertUserList)) {
|
||||
if (isFlag) {
|
||||
sysUserService.update(Chain.make("isThirtyTeach", 0), Cnd.NEW());
|
||||
}
|
||||
i = sysUserService.updateIgnoreNull(insertUserList);
|
||||
}
|
||||
if (Lang.isNotEmpty(errorInfos)) {
|
||||
NutMap nutMap = new NutMap();
|
||||
nutMap.setv("totalCount", teachTempList.size());
|
||||
nutMap.setv("successCount", i);
|
||||
nutMap.setv("errorCount", errorInfos.size());
|
||||
nutMap.setv("errorList", errorInfos.stream().map(v -> {
|
||||
return NutMap.NEW().addv("工号", v.getLoginName()).addv("姓名", v.getUserName()).addv("错误原因", v.getResult());
|
||||
}).collect(Collectors.toList()));
|
||||
return Result.success(nutMap);
|
||||
}
|
||||
return Result.success();
|
||||
|
||||
}catch (Exception e){
|
||||
log.error("导入30教龄教职工名单失败", e);
|
||||
e.printStackTrace();
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
package com.budwk.app.zhgh.thirtyTeach.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.thirtyTeach.param.ThirtyTeachPageForm;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/7/25 18:28
|
||||
* @description 教职工汇总
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "三十龄教工-教职工汇总")
|
||||
@At("/platform/thirtyTeach/summary")
|
||||
public class ThirtyTeachSummaryController {
|
||||
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/thirtyTeach/summary/index.html")
|
||||
@SaCheckPermission("thirtyTeach.summary")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("thirtyTeach.summary")
|
||||
public Result pageData(String unionId,String unitId){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
su.*,
|
||||
COUNT( u.id ) AS userNum
|
||||
FROM
|
||||
sys_union su
|
||||
LEFT JOIN `vw_user` u ON u.unionid = su.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("u.isThirtyTeach", "=", 1);
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
cnd.andEX("u.unionId", "=", unionId);
|
||||
cnd.andEX("u.unitId", "=", unitId);
|
||||
cnd.groupBy("su.unionCode");
|
||||
cnd.asc("su.unionCode");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(sysUserService.listMap(sql));
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("thirtyTeach.summary")
|
||||
@Ok("void")
|
||||
@ApiOperation("导出工会汇总名单")
|
||||
public void doExportSummary(String unionId,String unitId, HttpServletResponse response){
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
su.*,
|
||||
COUNT( u.id ) AS userNum
|
||||
FROM
|
||||
sys_union su
|
||||
LEFT JOIN `vw_user` u ON u.unionid = su.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("u.isThirtyTeach", "=", 1);
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
cnd.andEX("u.unionId", "=", unionId);
|
||||
cnd.andEX("u.unitId", "=", unitId);
|
||||
cnd.groupBy("su.unionCode");
|
||||
cnd.asc("su.unionCode");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> thirtyTeachList = sysUserService.listMap(sql);
|
||||
|
||||
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||
ExcelExportEntity no = new ExcelExportEntity("序号", "no", 10);
|
||||
no.setFormat("isAddIndex");
|
||||
entityList.add(no);
|
||||
entityList.add(new ExcelExportEntity("分工会", "name", 20));
|
||||
ExcelExportEntity entity = new ExcelExportEntity("在职人数", "userNum", 20);
|
||||
entity.setType(10);
|
||||
entityList.add(entity);
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, thirtyTeachList);
|
||||
CommonDownloadUtil.download("30教龄教职工在职人员汇总表.xlsx", workbook, response);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.budwk.app.zhgh.thirtyTeach.param;
|
||||
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/7/28 10:09
|
||||
* @description 30龄教工
|
||||
*/
|
||||
@Data
|
||||
public class ThirtyTeachPageForm extends PageForm {
|
||||
|
||||
private String unionId;
|
||||
private String unitId;
|
||||
//进校时长
|
||||
private String teachNum;
|
||||
//办证年月
|
||||
private String thirtyCertificateProcessingTime;
|
||||
private String userState;
|
||||
private String personType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.budwk.app.zhgh.thirtyTeach.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.thirtyTeach.param.ThirtyTeachPageForm;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/7/28 11:52
|
||||
* @description
|
||||
*/
|
||||
public interface ThirtyTeachService extends BaseService {
|
||||
|
||||
Sql getSql(ThirtyTeachPageForm pageForm);
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.budwk.app.zhgh.thirtyTeach.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.thirtyTeach.param.ThirtyTeachPageForm;
|
||||
import com.budwk.app.zhgh.thirtyTeach.service.ThirtyTeachService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/7/28 11:53
|
||||
* @description
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class ThirtyTeachServiceImpl extends BaseServiceImpl implements ThirtyTeachService {
|
||||
public ThirtyTeachServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Sql getSql(ThirtyTeachPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
id,
|
||||
loginname,
|
||||
username,
|
||||
sex,
|
||||
member,
|
||||
personType,
|
||||
userState,
|
||||
unionName,
|
||||
unitName,
|
||||
mobile,
|
||||
birthday,
|
||||
thirtyCertificateProcessingTime,
|
||||
TIMESTAMPDIFF(YEAR, CONCAT(arrivalAtSchoolDate, '-01'), CURDATE()) AS teachNum
|
||||
FROM
|
||||
`vw_user`
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("isThirtyTeach", "=", 1);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("loginname", pageForm.getSearchKeyword());
|
||||
seg.orLike("username", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
cnd.and("unionId", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
cnd.andEX("TIMESTAMPDIFF(YEAR, CONCAT(arrivalAtSchoolDate, '-01'), CURDATE())", "=", pageForm.getTeachNum());
|
||||
cnd.andEX("unionId", "=", pageForm.getUnionId());
|
||||
cnd.andEX("unitId", "=", pageForm.getUnitId());
|
||||
cnd.andEX("personType", "=", pageForm.getPersonType());
|
||||
cnd.andEX("userState", "=", pageForm.getUserState());
|
||||
cnd.and(Cnd.likeEX("thirtyCertificateProcessingTime",pageForm.getThirtyCertificateProcessingTime()));
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.asc("unionCode").asc("unitCode");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
|
||||
sql.setCondition(cnd);
|
||||
return sql;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.budwk.app.zhgh.thirtyTeach.template;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
|
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode
|
||||
@ContentRowHeight(20) // 内容行高
|
||||
@HeadRowHeight(20) // 表头行高
|
||||
@ColumnWidth(25)
|
||||
public class ThirtyTeachTemp {
|
||||
|
||||
@ExcelProperty("工号")
|
||||
private String loginName;
|
||||
|
||||
@ExcelProperty("姓名")
|
||||
private String userName;
|
||||
|
||||
@ExcelProperty("《30年教龄荣誉证》办理年月")
|
||||
private String thirtyCertificateProcessingTime;
|
||||
|
||||
@ExcelIgnore
|
||||
private String result;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user