Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -109,6 +109,8 @@ public interface FlowConst {
|
||||
// 流程实例名称
|
||||
String PROCESS_INSTANCE_NAME = "instanceName";
|
||||
|
||||
|
||||
//============================================扩展==================================================
|
||||
// 开启之后不会校验任务执行所属权
|
||||
String EXT_ENABLE_OPERATOR = "";
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ public class FlowCommonService {
|
||||
public void executeTask(Dict args){
|
||||
Long processTaskId = args.getLong(FlowConst.PROCESS_TASK_ID_KEY);
|
||||
String operator = SecurityUtil.getUserId();
|
||||
if (args.containsKey(FlowConst.EXT_ENABLE_OPERATOR)&&args.getBool(FlowConst.EXT_ENABLE_OPERATOR)){
|
||||
operator = FlowConst.ADMIN_ID;
|
||||
}
|
||||
args.remove(FlowConst.PROCESS_TASK_ID_KEY);
|
||||
Integer submitType = args.getInt(FlowConst.SUBMIT_TYPE);
|
||||
if (submitType == null) {
|
||||
|
||||
@@ -354,7 +354,17 @@ public class SysUnionController {
|
||||
@ApiOperation("分工会组成单位分页")
|
||||
@SaCheckPermission("sys.manager.union")
|
||||
public Result branchUnionPartUnitPageData(PageForm pageForm, String unionId) {
|
||||
List<Sys_unit> list = dao.query(Sys_unit.class, Cnd.where("unionId", "=", unionId).asc("unitcode"));
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("unionId", "=", unionId);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("`name`", pageForm.getSearchKeyword());
|
||||
seg.orLike("unitcode", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.desc("unitcode");
|
||||
|
||||
List<Sys_unit> list = dao.query(Sys_unit.class, cnd);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
;
|
||||
|
||||
@@ -75,12 +76,13 @@ public class SysUnitController {
|
||||
@At("/pageData")
|
||||
@Ok("json")
|
||||
@SaCheckLogin
|
||||
public Object pageData(PageForm pageForm, String unitName, Integer unitLevel) {
|
||||
public Object pageData(PageForm pageForm, String unitName, String unitId) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
// cnd.and("parentId", "is not", null).andEX("unitLevel", "=", unitLevel).asc("unitLevel").asc("unitcode");
|
||||
cnd.and("parentId", "is not", null)
|
||||
.and("unitTypeCode", "=", "1")
|
||||
.asc("unitcode");
|
||||
cnd.and("parentId", "is not", null);
|
||||
cnd.andEX("parentId", "=", unitId);
|
||||
// cnd.and("unitTypeCode", "=", "1");
|
||||
cnd.asc("unitcode");
|
||||
cnd.and(Cnd.likeEX("name", unitName));
|
||||
|
||||
Pagination<Sys_unit> listPage = sysUnitService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), Sys_unit.class, cnd);
|
||||
@@ -92,14 +94,14 @@ public class SysUnitController {
|
||||
@SaCheckLogin
|
||||
public Object userPageData(PageForm pageForm, String unitId) {
|
||||
Sql sql = Sqls.create("""
|
||||
select username,loginname,sex,mobile,if(member = 1, '是', '否') as member from vw_user $condition
|
||||
select username,loginname,sex,mobile,member from vw_user $condition
|
||||
""").setParam("unitId", unitId);
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("unitid", "=", unitId);
|
||||
if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(pageForm.getSearchName(), "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
}
|
||||
cnd.asc("member");
|
||||
cnd.desc("member");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(sysUnitService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql));
|
||||
}
|
||||
@@ -290,7 +292,13 @@ public class SysUnitController {
|
||||
|
||||
List<TreeNode<String>> nodeList = CollUtil.newArrayList();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
nodeList.add(new TreeNode<>(list.get(i).getId(), list.get(i).getParentId(), list.get(i).getName(), i));
|
||||
nodeList.add(new TreeNode<>(list.get(i).getId(), list.get(i).getParentId(), list.get(i).getName(), i)
|
||||
.setExtra(
|
||||
Map.of(
|
||||
"unitType", list.get(i).getUnitType(),
|
||||
"unitTypeCode", list.get(i).getUnitTypeCode()
|
||||
)
|
||||
));
|
||||
}
|
||||
List<Tree<String>> treeList = TreeUtil.build(nodeList, StrUtil.blankToDefault(pid, "0000"));
|
||||
|
||||
|
||||
@@ -43,7 +43,10 @@ public class SysUnionGroupServiceImpl extends BaseServiceImpl<Sys_union_group> i
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void insert(Sys_union_group group) {
|
||||
int count = dao().count(Sys_union_group.class, Cnd.where(Sys_union_group::getCode, "=", group.getCode()));
|
||||
int count = dao().count(Sys_union_group.class,
|
||||
Cnd.where(Sys_union_group::getCode, "=", group.getCode())
|
||||
.and(Sys_union_group::getUnionId, "=", group.getUnionId())
|
||||
);
|
||||
if (count > 0) {
|
||||
throw new BaseException("小组编码已存在");
|
||||
}
|
||||
@@ -54,8 +57,11 @@ public class SysUnionGroupServiceImpl extends BaseServiceImpl<Sys_union_group> i
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void update(Sys_union_group group) {
|
||||
int count = dao().count(Sys_union_group.class, Cnd.where(Sys_union_group::getCode, "=", group.getCode())
|
||||
.and(Sys_union_group::getId, "!=", group.getId()));
|
||||
int count = dao().count(Sys_union_group.class,
|
||||
Cnd.where(Sys_union_group::getCode, "=", group.getCode())
|
||||
.and(Sys_union_group::getId, "!=", group.getId())
|
||||
.and(Sys_union_group::getUnionId, "=", group.getUnionId())
|
||||
);
|
||||
if (count > 0) {
|
||||
throw new BaseException("小组编码已存在");
|
||||
}
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@ package com.budwk.app.zhgh.activity.basic.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.stp.StpUtil;
|
||||
@@ -312,10 +313,10 @@ public class ActivityBasicScopeController {
|
||||
propMap.forEach((k, v) -> {
|
||||
entityList.add(new ExcelExportEntity(v, k, 40));
|
||||
});
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + new String(("人员名单.xls").getBytes("utf-8"), "ISO8859-1"));
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), entityList, map);
|
||||
workbook.write(response.getOutputStream());
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, map);
|
||||
CommonDownloadUtil.download("人员名单.xlsx", workbook, response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
+59
-2
@@ -1,5 +1,9 @@
|
||||
package com.budwk.app.zhgh.activity.basic.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.stp.StpUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
@@ -11,16 +15,19 @@ import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.EasyExcelUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
|
||||
import com.budwk.app.zhgh.activity.basic.template.UserTemp;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.integration.jedis.RedisService;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
@@ -35,6 +42,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
import org.nutz.mvc.upload.UploadAdaptor;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -94,8 +102,11 @@ public class ActivityBasicScopeUserDataController {
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchName()) && StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(Cnd.likeEX(pageForm.getSearchName(), pageForm.getSearchKeyword()));
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("u.username", pageForm.getSearchKeyword());
|
||||
group.orLike("u.loginname", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy().equalsIgnoreCase("ascending") ? "ASC" : "DESC");
|
||||
@@ -229,4 +240,50 @@ public class ActivityBasicScopeUserDataController {
|
||||
return Result.success(nutMap);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("导出人员名单")
|
||||
@SaCheckPermission("activity.basic.user")
|
||||
public void doExportUser(Integer groupId, HttpServletResponse response) {
|
||||
|
||||
|
||||
try {
|
||||
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.username AS userName,
|
||||
u.loginname AS loginName,
|
||||
u.sex,
|
||||
u.mobile,
|
||||
u.unitname AS unitName,
|
||||
u.unionName AS unionName
|
||||
FROM
|
||||
activity_user_scope aus
|
||||
LEFT JOIN `vw_user` u ON u.id = aus.userId
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("aus.groupId", "=", groupId);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> listMap = baseService.listMap(sql);
|
||||
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("工会", "unionName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("单位", "unitName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("手机号码", "mobile", 20));
|
||||
|
||||
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, listMap);
|
||||
CommonDownloadUtil.download("人员名单.xlsx", workbook, response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+10
-5
@@ -89,7 +89,7 @@ public class ActivityCultureApplyUserController {
|
||||
int count = dao.count(ActivityUserScope.class,
|
||||
Cnd.where(ActivityUserScope::getUserId, "=", SecurityUtil.getUserId())
|
||||
.and(ActivityUserScope::getGroupId, "=", tissue.getGroupId()));
|
||||
if (count == 0){
|
||||
if (count == 0) {
|
||||
return Result.error("您没有权限报名!");
|
||||
}
|
||||
JSONObject dynamicFormParam = null;
|
||||
@@ -120,14 +120,20 @@ public class ActivityCultureApplyUserController {
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation(value = "队友搜索")
|
||||
public Result queryTeammate(@Valid String keyword,Integer signUpMethod) {
|
||||
public Result queryTeammate(@Valid String keyword, Integer signUpMethod, String tissueId) {
|
||||
Sql sql = Sqls.create("select id userId,username userName,loginname loginName,sex,mobile,unitName from vw_user $condition limit 0,10");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.or(Cnd.likeEX("username", keyword));
|
||||
cnd.or(Cnd.likeEX("loginname", keyword));
|
||||
if (signUpMethod == 3){
|
||||
if (signUpMethod == 3) {
|
||||
cnd.and("unionid", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(tissueId) && signUpMethod == 2) {
|
||||
List<ActivityTissuePerson> personList = activityCultureApplyUserService.query(Cnd.where(ActivityTissuePerson::getTissueId, "=", tissueId)
|
||||
.and(ActivityTissuePerson::getApplyUserId, "!=", SecurityUtil.getUserId()));
|
||||
List<String> userIds = personList.stream().map(ActivityTissuePerson::getUserId).toList();
|
||||
cnd.andEX("id", "not in", userIds);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = activityCultureApplyUserService.listMap(sql);
|
||||
return Result.success(list);
|
||||
@@ -163,10 +169,9 @@ public class ActivityCultureApplyUserController {
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation(value = "是否报名")
|
||||
public Result isSignUp(@Valid String activityId){
|
||||
public Result isSignUp(@Valid String activityId) {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+6
-5
@@ -110,10 +110,10 @@ public class ActivityCultureUserStatisticsController {
|
||||
}
|
||||
}
|
||||
if (Strings.isNotBlank(page.getSearchKeyword())) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("atp.username", page.getSearchKeyword());
|
||||
group.orLike("atp.loginanme", page.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("atp.userName", page.getSearchKeyword());
|
||||
group.orLike("atp.loginName", page.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
if (StrUtil.isNotBlank(page.getPageOrderName()) && StrUtil.isNotBlank(page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy().equalsIgnoreCase("ascending") ? "ASC" : "DESC");
|
||||
@@ -155,7 +155,7 @@ public class ActivityCultureUserStatisticsController {
|
||||
$condition
|
||||
""").setParam("userId", SecurityUtil.getUserId());
|
||||
|
||||
Cnd cnd =Cnd.where("tissue.activity_type", "=", activity_type);
|
||||
Cnd cnd = Cnd.where("tissue.activity_type", "=", activity_type);
|
||||
cnd.and("tissue.projectTypeCode", "!=", 50004);
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
cnd.and("tissue.signUpMethod", "in", List.of(1, 2, 3));
|
||||
@@ -168,6 +168,7 @@ public class ActivityCultureUserStatisticsController {
|
||||
cnd.and("ins.state", "=", 20);
|
||||
}
|
||||
cnd.andEX("YEAR(tissue.startTime)", "=", year).desc("tissue.startTime");
|
||||
cnd.groupBy("tissue.id");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(activityCultureApplyUserService.list(sql));
|
||||
}
|
||||
|
||||
+8
-4
@@ -27,6 +27,7 @@ import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
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;
|
||||
@@ -78,7 +79,7 @@ public class CadreTrainingCollectController {
|
||||
String activityId,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String userName,
|
||||
String searchKeyword,
|
||||
String sex) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -125,9 +126,12 @@ public class CadreTrainingCollectController {
|
||||
// 性别查询条件
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
|
||||
// 姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
// 姓名和工号查询条件
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
// 只查询流程实例状态为20的数据(已完成状态)
|
||||
|
||||
+8
-4
@@ -18,6 +18,7 @@ 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.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
@@ -64,7 +65,7 @@ public class CadreTrainingSchoolAuditController {
|
||||
String activityId,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String userName,
|
||||
String searchKeyword,
|
||||
String sex) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -121,9 +122,12 @@ public class CadreTrainingSchoolAuditController {
|
||||
// 性别查询条件
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
|
||||
// 姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
// 姓名和工号查询条件
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
|
||||
+9
-1
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
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;
|
||||
@@ -61,7 +62,7 @@ public class EnrollmentRegistrationSchoolAuditController {
|
||||
String unionId,
|
||||
String unitId,
|
||||
String registrationType,
|
||||
Boolean approval) {
|
||||
Boolean approval,String searchKeyword) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
@@ -97,6 +98,13 @@ public class EnrollmentRegistrationSchoolAuditController {
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
cnd.andEX("info.registrationType", "=", registrationType);
|
||||
// 姓名和工号查询条件
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
|
||||
+4
-4
@@ -76,8 +76,8 @@ public class EnrollmentRegistrationSummaryController {
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("enrollmentRegistration.summary")
|
||||
public Result pageData(EnrollmentRegistrationPageForm pageForm) {
|
||||
Sql sql = enrollmentRegistrationSummaryService.getSql(pageForm);
|
||||
public Result pageData(EnrollmentRegistrationPageForm pageForm ,String searchKeyword) {
|
||||
Sql sql = enrollmentRegistrationSummaryService.getSql(pageForm, searchKeyword);
|
||||
Pagination pagination = enrollmentRegistrationSummaryService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public class EnrollmentRegistrationSummaryController {
|
||||
@SaCheckPermission("enrollmentRegistration.summary")
|
||||
public void doExportExcel(@Param("data") EnrollmentRegistrationPageForm pageForm, HttpServletResponse response) {
|
||||
try {
|
||||
Sql sql = enrollmentRegistrationSummaryService.getSql(pageForm);
|
||||
Sql sql = enrollmentRegistrationSummaryService.getSql(pageForm, null);
|
||||
List<NutMap> map = enrollmentRegistrationSummaryService.listMap(sql);
|
||||
|
||||
List<Sys_dict> dictList = sysDictService.getSubListByCode("ENROLLMENT_REGISTRATION_TYPE");
|
||||
@@ -146,7 +146,7 @@ public class EnrollmentRegistrationSummaryController {
|
||||
try {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + URLUtil.encode("子女入学.zip"));
|
||||
Sql sql = enrollmentRegistrationSummaryService.getSql(pageForm);
|
||||
Sql sql = enrollmentRegistrationSummaryService.getSql(pageForm, null);
|
||||
List<NutMap> map = enrollmentRegistrationSummaryService.listMap(sql);
|
||||
List<Sys_dict> dictList = sysDictService.getSubListByCode("ENROLLMENT_REGISTRATION_TYPE");
|
||||
|
||||
|
||||
+10
-1
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
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;
|
||||
@@ -59,7 +60,7 @@ public class EnrollmentRegistrationUnionAuditController {
|
||||
public Result pageData(PageForm pageForm,
|
||||
Integer year,
|
||||
String registrationType,
|
||||
Boolean approval) {
|
||||
Boolean approval,String searchKeyword) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
@@ -94,6 +95,14 @@ public class EnrollmentRegistrationUnionAuditController {
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
cnd.andEX("info.registrationType","=",registrationType);
|
||||
|
||||
// 姓名和工号查询条件
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ public interface EnrollmentRegistrationSummaryService extends BaseService {
|
||||
|
||||
|
||||
|
||||
Sql getSql(EnrollmentRegistrationPageForm pageForm);
|
||||
Sql getSql(EnrollmentRegistrationPageForm pageForm,String searchKeyword);
|
||||
}
|
||||
|
||||
+10
-1
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.dayofficework.enrollmentRegistration.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.zhgh.dayofficework.enrollmentRegistration.service.EnrollmentRegistrationSummaryService;
|
||||
@@ -8,6 +9,7 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -22,7 +24,7 @@ public class EnrollmentRegistrationSummaryServiceImpl extends BaseServiceImpl im
|
||||
}
|
||||
|
||||
@Override
|
||||
public Sql getSql(EnrollmentRegistrationPageForm pageForm) {
|
||||
public Sql getSql(EnrollmentRegistrationPageForm pageForm ,String searchKeyword) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
@@ -51,6 +53,13 @@ public class EnrollmentRegistrationSummaryServiceImpl extends BaseServiceImpl im
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
// 姓名和工号查询条件
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("YEAR(info.applyTime)", "=", pageForm.getYear());
|
||||
cnd.and("ins.state", "=", ProcessTaskStateEnum.FINISHED.getCode());
|
||||
cnd.andEX("info.unionId","=",pageForm.getUnionId());
|
||||
|
||||
+8
@@ -13,6 +13,7 @@ import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.evaluation.models.EvaluateActivity;
|
||||
import com.budwk.app.zhgh.dayofficework.evaluation.models.EvaluateApply;
|
||||
import com.budwk.app.zhgh.dayofficework.evaluation.service.EvaluateActivityService;
|
||||
import com.budwk.app.zhgh.dayofficework.evaluation.service.EvaluateService;
|
||||
@@ -91,6 +92,13 @@ public class EvaluateApplyController {
|
||||
@SaCheckPermission("evaluation.apply")
|
||||
@ApiOperation("验证能否申请")
|
||||
public Result valid(@Valid String id) {
|
||||
EvaluateActivity activity = evaluateActivityService.fetch(id);
|
||||
if (activity.getStartTime().after(new Date())){
|
||||
return Result.success().addData(false).addMsg("活动未开始");
|
||||
}
|
||||
if (activity.getEndTime().before(new Date())){
|
||||
return Result.success().addData(false).addMsg("活动已结束");
|
||||
}
|
||||
return Result.success().addData(true);
|
||||
}
|
||||
|
||||
|
||||
-3
@@ -101,9 +101,6 @@ public class ExerciseCardServiceImpl extends BaseServiceImpl<ExerciseCard> imple
|
||||
errorInfos.add(v);
|
||||
continue;
|
||||
}
|
||||
if (StrUtil.isNotBlank(v.getUsername())) {
|
||||
user.setUsername(v.getUsername());
|
||||
}
|
||||
|
||||
insertOrUpdateUserList.add(user);
|
||||
|
||||
|
||||
+7
-2
@@ -33,6 +33,7 @@ import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -100,6 +101,7 @@ public class HealthCheckupListController {
|
||||
hcus.selectTime,
|
||||
hcus.campus,
|
||||
hcus.subjectId,
|
||||
hcus.bz,
|
||||
ca.campusName
|
||||
FROM
|
||||
health_checkup_user hcu
|
||||
@@ -117,8 +119,11 @@ public class HealthCheckupListController {
|
||||
cnd.andEX("hcu.unionId", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchName()) && StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(Cnd.likeEX(pageForm.getSearchName(), pageForm.getSearchKeyword()));
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("hcu.userName", pageForm.getSearchKeyword());
|
||||
group.orLike("hcu.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
cnd.groupBy("hcu.userId");
|
||||
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && Strings.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
|
||||
+13
-1
@@ -34,6 +34,7 @@ import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
@@ -348,7 +349,7 @@ public class HealthCheckupSingleController {
|
||||
}
|
||||
}
|
||||
//如果有符合的就添加
|
||||
if (subjectMoneyId != null){
|
||||
if (subjectMoneyId != null) {
|
||||
HealthCheckupUserSelection selection = new HealthCheckupUserSelection();
|
||||
selection.setProjectId(projectId);
|
||||
selection.setSelectUserId(v);
|
||||
@@ -363,4 +364,15 @@ public class HealthCheckupSingleController {
|
||||
});
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("给未选的人发送提醒")
|
||||
@Ok("json:full")
|
||||
@SaCheckPermission("healthCheckup.statisticsSingle")
|
||||
@SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员给未选的人发送提醒")
|
||||
public Result msgNotSelect(@Valid String projectId) {
|
||||
List<NutMap> userList = healthCheckupSingleService.receivePageData(projectId, null, "1");
|
||||
return Result.success("暂未开启消息!");
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -7,7 +7,6 @@ import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.db.Page;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -24,6 +23,7 @@ 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.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
@@ -32,11 +32,8 @@ import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.Mvcs;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -83,9 +80,12 @@ public class HonorManageController {
|
||||
cnd.andEX("h.honorType", "=", pageForm.getHonorType());
|
||||
cnd.andEX("h.prize", "=", pageForm.getPrize());
|
||||
cnd.andEX("h.honorLevel", "=", pageForm.getHonorLevel());
|
||||
if (Strings.isNotBlank(pageForm.getUserName())) {
|
||||
cnd.andEX("h.userName", "like", "%" + pageForm.getUserName() + "%");
|
||||
|
||||
cnd.andEX("h.unionId", "=", pageForm.getUnionId());
|
||||
if (Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("u.loginname", "%" + pageForm.getSearchKeyword() + "%");
|
||||
group.orLike("u.username", "%" + pageForm.getSearchKeyword() + "%");
|
||||
cnd.and(group);
|
||||
}
|
||||
if (Strings.isNotBlank(pageForm.getUnitName())) {
|
||||
cnd.andEX("h.unitName", "like", "%" + pageForm.getUnitName() + "%");
|
||||
@@ -105,7 +105,7 @@ public class HonorManageController {
|
||||
Pagination pagination = honorViService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
List<NutMap> list = pagination.getList();
|
||||
list.forEach(v -> {
|
||||
if(StrUtil.isNotBlank(v.getString("awardMaterials"))){
|
||||
if (StrUtil.isNotBlank(v.getString("awardMaterials"))) {
|
||||
v.setv("awardMaterialsExcel", getBasicNameById(v.getString("awardMaterials")).toString());
|
||||
}
|
||||
});
|
||||
@@ -195,11 +195,11 @@ public class HonorManageController {
|
||||
v.setPrize(null);
|
||||
}
|
||||
}
|
||||
if(v.getAwardMaterials() != null && !v.getAwardMaterials().isEmpty()) {
|
||||
if (v.getAwardMaterials() != null && !v.getAwardMaterials().isEmpty()) {
|
||||
v.setAwardMaterialsExcel(getBasicNameById(Json.toJson(v.getAwardMaterials())).toString());
|
||||
}
|
||||
v.setHonorType(singleHonor.get().getName());
|
||||
if(StrUtil.isNotBlank(v.getUserId())) {
|
||||
if (StrUtil.isNotBlank(v.getUserId())) {
|
||||
Sys_user user = dao.fetch(Sys_user.class, v.getUserId());
|
||||
v.setLoginname(user != null ? user.getLoginname() : "");
|
||||
}
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class ActivityBudgetQueryStatisticsServiceImpl extends BaseServiceImpl im
|
||||
} else if (outlayManageSource.equals("ACTIVITY_BUDGET_TYPE_THREE")) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@YEAR `year`,
|
||||
@year `year`,
|
||||
sc.clubCode,
|
||||
sc.clubName,
|
||||
ab.clubId,
|
||||
|
||||
+3
@@ -104,6 +104,9 @@ public class OutlayReimburseApplyController {
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, outlayReimburse);
|
||||
if (outlayReimburse.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_THREE")){
|
||||
args.set("clubId", outlayReimburse.getClubId());
|
||||
}
|
||||
args.set("outlayManageSource", outlayReimburse.getOutlayManageSource());
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("FYBXSQ", outlayReimburse.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
|
||||
+30
@@ -2,15 +2,22 @@ package com.budwk.app.zhgh.dayofficework.outlay.outlayReimburse.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.sys.services.SysDictService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.outlay.outlayReimburse.model.OutlayReimburse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -22,6 +29,7 @@ import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -42,12 +50,17 @@ public class OutlayReimburseClubAuditController {
|
||||
@Inject
|
||||
private SysDictService sysDictService;
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/outlay/outlayReimburse/clubAudit/index.html")
|
||||
@SaCheckPermission("outlay.reimburse.clubAudit")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/dayofficework/outlayReimburse/clubAudit/index.html")
|
||||
@SaCheckPermission("h5.outlay.reimburse.clubAudit")
|
||||
@@ -118,7 +131,24 @@ public class OutlayReimburseClubAuditController {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("协会审核")
|
||||
@SaCheckPermission(value = {"outlay.reimburse.clubAudit", "h5.outlay.reimburse.clubAudit"}, mode = SaMode.OR)
|
||||
public Result submit(@Param("data") OutlayReimburse outlayReimburse) {
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, outlayReimburse);
|
||||
args.set("clubId", outlayReimburse.getClubId());
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("FYBXSQ", outlayReimburse.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -65,6 +65,7 @@ public class OutlayReimburseUnionAuditController {
|
||||
String outlayManageSource) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
ta.actorId,
|
||||
info.*,
|
||||
YEAR(info.applyTime) year,
|
||||
ins.id AS instanceId,
|
||||
|
||||
+2
-2
@@ -140,7 +140,7 @@ public class ExecutiveCommitteePushController {
|
||||
|
||||
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||
if (ObjectUtil.isEmpty(config)) {
|
||||
/* if (ObjectUtil.isEmpty(config)) {
|
||||
return Result.error("请先配置基础信息");
|
||||
}
|
||||
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
|
||||
@@ -148,7 +148,7 @@ public class ExecutiveCommitteePushController {
|
||||
}
|
||||
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
|
||||
return Result.error("一次预选已结束");
|
||||
}
|
||||
}*/
|
||||
|
||||
int dbCount = dao.count(ExecutiveCommitteeOnePush.class,
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId)
|
||||
|
||||
+6
-5
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.democratic.executiveCommittee.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.democratic.executiveCommittee.param.ExecutiveCommitteePageForm;
|
||||
import com.budwk.app.zhgh.democratic.executiveCommittee.service.ExecutiveCommitteeMemberService;
|
||||
@@ -51,11 +52,11 @@ public class ExecutiveCommitteeMemberServiceImpl extends BaseServiceImpl impleme
|
||||
cnd.andEX("op.unitId", "=", pageForm.getUnitId());
|
||||
cnd.andEX("it.unionid", "=", pageForm.getUnionId());
|
||||
cnd.andEX("op.delegationId", "=", pageForm.getDelegationId());
|
||||
if (Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("op.userName", pageForm.getSearchKeyword());
|
||||
group.orLike("op.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("op.userName", pageForm.getSearchKeyword());
|
||||
group.orLike("op.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
cnd.desc("pushCount");
|
||||
cnd.asc("op.firstLetter");
|
||||
|
||||
+33
-33
@@ -170,6 +170,7 @@ public class TeacherCongressDelegatePushController {
|
||||
sql.setParam("sessionId", sessionId);
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("u.member", "=", 1);
|
||||
cnd.and("u.username", "is not", null);
|
||||
cnd.andEX("u.id", "not in", userIds);
|
||||
cnd.and("tcd.userId", "is", null);
|
||||
cnd.and("tcdp.id", "is", null);
|
||||
@@ -249,6 +250,7 @@ public class TeacherCongressDelegatePushController {
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
args.put(FlowConst.NEXT_NODE_OPERATOR, teacherCongressDelegatePush.getUserId());
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
}
|
||||
});
|
||||
@@ -287,35 +289,23 @@ public class TeacherCongressDelegatePushController {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
t.displayName taskName
|
||||
FROM
|
||||
teacher_congress_delegate_push info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("info.sessionId", "=", sessionId);
|
||||
cnd.andEX("info.unionId", "=", SecurityUtil.getUnionId());
|
||||
cnd.andEX("t.taskName", "=", "53ff0c2a-ba93-45e9-a9fd-db51cdab3080");
|
||||
cnd.andEX("t.taskName", "=", "0cacd1e7-7bb2-47dd-818b-6a73062e0c62");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> writeList = baseService.listMap(sql);
|
||||
|
||||
|
||||
// 已上报总人数
|
||||
int total = writeList.size();
|
||||
// 已上报女代表人数
|
||||
@@ -338,21 +328,28 @@ public class TeacherCongressDelegatePushController {
|
||||
if (total > allocation.getAllocationNum()) {
|
||||
tips.append("上报总人数超出分配名额!");
|
||||
}
|
||||
/* if (female < allocation.getFemaleNum()) {
|
||||
tips.append("女教师代表数不满足分配名额数!");
|
||||
}
|
||||
|
||||
if (seniorTeacher < allocation.getSeniorTeaNum()) {
|
||||
tips.append("高级职称专任教师数不满足分配名额数!");
|
||||
}
|
||||
if (intermediateBelow < allocation.getIntermediateBelowNum()) {
|
||||
tips.append("中级职称及以下代表数不满足分配名额数!");
|
||||
}
|
||||
|
||||
if (ordinaryTeacher < allocation.getOrdinaryTeaNum()) {
|
||||
tips.append("专任教师数不满足分配名额数!");
|
||||
if (cadre < allocation.getCadreNum()) {
|
||||
tips.append("干部代表数不满足分配名额数!");
|
||||
}
|
||||
|
||||
if (worker < allocation.getWorkerNum()) {
|
||||
tips.append("工人代表数不满足分配名额数!");
|
||||
}
|
||||
if (female < allocation.getFemaleNum()) {
|
||||
tips.append("女教师代表数不满足分配名额数!");
|
||||
}
|
||||
|
||||
if (under45 < allocation.getLess45Num()) {
|
||||
tips.append("45岁以下教师代表数不满足分配名额数!");
|
||||
}*/
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(tips)) {
|
||||
return Result.error(tips.toString());
|
||||
@@ -366,11 +363,14 @@ public class TeacherCongressDelegatePushController {
|
||||
@ApiOperation("本单位代表上报情况")
|
||||
@SaCheckPermission("tc.delegate.push")
|
||||
public Result selfUnionPushMetric(String sessionId, String unionId) {
|
||||
if (StrUtil.isBlank(unionId)) {
|
||||
unionId = SecurityUtil.getUnionId();
|
||||
}
|
||||
|
||||
Teacher_congress_quota_allocation allocation = dao.fetch(Teacher_congress_quota_allocation.class,
|
||||
Cnd.where(Teacher_congress_quota_allocation::getSessionId, "=", sessionId)
|
||||
.and(Teacher_congress_quota_allocation::getUnionId, "=", SecurityUtil.getUnionId()));
|
||||
if(allocation == null){
|
||||
.and(Teacher_congress_quota_allocation::getUnionId, "=", unionId));
|
||||
if (allocation == null) {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ public class TeacherCongressDelegatePushController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("info.sessionId", "=", sessionId);
|
||||
cnd.andEX("info.unionId", "=", SecurityUtil.getUnionId());
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.representativeType", "=", "正式代表");
|
||||
cnd.and("ins.state", "=", ProcessTaskStateEnum.FINISHED.getCode());
|
||||
sql.setCondition(cnd);
|
||||
@@ -414,23 +414,23 @@ public class TeacherCongressDelegatePushController {
|
||||
// 女代表人数
|
||||
int female = (int) writeList.stream().filter(v -> List.of("女", "女性").contains(v.getString("sex"))).count();
|
||||
// 高级职称专任教师人数
|
||||
int seniorTeacher = (int) writeList.stream().filter(v->v.getBoolean("seniorTeacher")).count();
|
||||
int seniorTeacher = (int) writeList.stream().filter(v -> v.getBoolean("seniorTeacher")).count();
|
||||
// 中级职称及以下
|
||||
int intermediateBelow = (int) writeList.stream().filter(v->v.getBoolean("intermediateBelow")).count();
|
||||
int intermediateBelow = (int) writeList.stream().filter(v -> v.getBoolean("intermediateBelow")).count();
|
||||
// 干部
|
||||
int cadre = (int) writeList.stream().filter(v->v.getBoolean("cadre")).count();
|
||||
int cadre = (int) writeList.stream().filter(v -> v.getBoolean("cadre")).count();
|
||||
// 工人
|
||||
int worker = (int) writeList.stream().filter(v->v.getBoolean("worker")).count();
|
||||
int worker = (int) writeList.stream().filter(v -> v.getBoolean("worker")).count();
|
||||
// 专任教师人数
|
||||
int ordinaryTeacher = (int) writeList.stream().filter(v->v.getBoolean("ordinaryTeacher")).count();
|
||||
int ordinaryTeacher = (int) writeList.stream().filter(v -> v.getBoolean("ordinaryTeacher")).count();
|
||||
// 45岁以下代表
|
||||
int under45 = (int) writeList.stream().filter(v -> Convert.toInt(v.getInt("age"), 0) <= 45).count();
|
||||
// 少数民族代表
|
||||
long ethnicMinority = writeList.stream().filter(v -> StrUtil.isNotBlank(v.getString("nation")) && !"汉族".equals(v.getString("nation"))).count();
|
||||
// 校领导数
|
||||
long schoolLeader = writeList.stream().filter(v->v.getBoolean("schoolLeader")).count();
|
||||
long schoolLeader = writeList.stream().filter(v -> v.getBoolean("schoolLeader")).count();
|
||||
// 中层领导数
|
||||
long middleLevelLeader = writeList.stream().filter(v->v.getBoolean("middleLevelLeader")).count();
|
||||
long middleLevelLeader = writeList.stream().filter(v -> v.getBoolean("middleLevelLeader")).count();
|
||||
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
|
||||
|
||||
+3
-2
@@ -103,7 +103,7 @@ public class TeacherCongressDelegatePushWriteController {
|
||||
|
||||
@At
|
||||
@ApiOperation("代表信息填写保存")
|
||||
@SaCheckPermission("tc.delegate.push.write")
|
||||
@SaCheckLogin
|
||||
public Result save(TeacherCongressDelegatePush teacherCongressDelegatePush){
|
||||
dao.updateIgnoreNull(teacherCongressDelegatePush);
|
||||
return Result.success();
|
||||
@@ -111,13 +111,14 @@ public class TeacherCongressDelegatePushWriteController {
|
||||
|
||||
@At
|
||||
@ApiOperation("代表信息填写提交")
|
||||
@SaCheckPermission("tc.delegate.push.write")
|
||||
@SaCheckLogin
|
||||
public Result submit(TeacherCongressDelegatePush teacherCongressDelegatePush,String taskId){
|
||||
dao.updateIgnoreNull(teacherCongressDelegatePush);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.AGREE.getCode());
|
||||
dict.set(FlowConst.EXT_ENABLE_OPERATOR,true);
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
+7
-6
@@ -24,6 +24,7 @@ import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.TeacherCongressDelegatePush;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegation.models.Teacher_congress_delegation_union;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegation.models.Teacher_congress_delegation_unit;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
@@ -227,15 +228,15 @@ public class TeacherCongressDelegatePushZgAuditController {
|
||||
|
||||
delegate.setSessionId(delegatePush.getSessionId());
|
||||
|
||||
Teacher_congress_delegation_union delegation_union = baseService.dao().fetch(Teacher_congress_delegation_union.class,
|
||||
Cnd.where(Teacher_congress_delegation_union::getUnionId, "=", user.getUnionId())
|
||||
Teacher_congress_delegation_unit delegation_unit = baseService.dao().fetch(Teacher_congress_delegation_unit.class,
|
||||
Cnd.where(Teacher_congress_delegation_unit::getUnitId, "=", user.getUnitId())
|
||||
.and(Teacher_congress_delegation_union::getSessionId, "=", delegatePush.getSessionId()));
|
||||
|
||||
if (ObjectUtil.isNotEmpty(delegation_union)) {
|
||||
delegate.setDelegationId(delegation_union.getId());
|
||||
userRole.setTcDelegationId(delegation_union.getId());
|
||||
if (ObjectUtil.isNotEmpty(delegation_unit)) {
|
||||
delegate.setDelegationId(delegation_unit.getId());
|
||||
userRole.setTcDelegationId(delegation_unit.getId());
|
||||
} else {
|
||||
return Result.error(user.getUnionName() + "没有设置到代表团,请先在代表团管理里设置。");
|
||||
return Result.error(user.getUnitName() + "没有设置到代表团,请先在代表团管理里设置。");
|
||||
}
|
||||
if ("正式代表".equals(delegatePush.getRepresentativeType())) {
|
||||
Sys_role sys_role = baseService.dao().fetch(Sys_role.class, Cnd.where(Sys_role::getCode, "=", RoleConstant.TEACHER_CONGRESS_DELEGATE_FORMAL.name()));
|
||||
|
||||
+1
@@ -67,6 +67,7 @@ public class TeacherCongressDelegatePushServiceImpl extends BaseServiceImpl<Teac
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, push.getString("taskId"));
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.AGREE.getCode());
|
||||
dict.set(FlowConst.EXT_ENABLE_OPERATOR,true);
|
||||
flowCommonService.executeTask(dict);
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ public class DifficultHelpApplyController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
cnd.and("id", "<>", SecurityUtil.getUserId());
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_OPERATOR.name())) {
|
||||
cnd.and("unionid", "=", SecurityUtil.getUnionId());
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ public class DifficultHelpReadingController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageParam.buildSearch(cnd, "info.");
|
||||
cnd.groupBy("t.id");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = difficultHelpCommonService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
|
||||
+8
@@ -18,6 +18,7 @@ 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.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
@@ -106,6 +107,13 @@ public class ExcellentRecuperationSchoolAuditController {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("info.userName", pageForm.getSearchKeyword());
|
||||
group.orLike("info.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchName())&& StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||
}
|
||||
|
||||
+6
-2
@@ -10,6 +10,7 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -61,8 +62,11 @@ public class ExcellentRecuperationSummaryServiceImpl extends BaseServiceImpl imp
|
||||
cnd.andEX("info.unionId", "=", pageForm.getUnionId());
|
||||
cnd.andEX("info.unitId", "=", pageForm.getUnitId());
|
||||
cnd.and("ins.state", "=", ProcessTaskStateEnum.FINISHED.getCode());
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchName())&& StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("info.userName", pageForm.getSearchKeyword());
|
||||
group.orLike("info.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return sql;
|
||||
|
||||
+3
-3
@@ -181,11 +181,11 @@ public class ThirtyTeachController {
|
||||
|
||||
for (ThirtyTeachTemp temp : teachTempList) {
|
||||
if (StrUtil.isBlank(temp.getUserName())) {
|
||||
temp.setResult("获取不到该用户的姓名!");
|
||||
/* temp.setResult("获取不到该用户的姓名!");
|
||||
errorInfos.add(temp);
|
||||
break;
|
||||
break;*/
|
||||
} else if (StrUtil.isBlank(temp.getLoginName())) {
|
||||
temp.setResult("获取不到该用户的出生日期!");
|
||||
temp.setResult("获取不到该用户的工号!");
|
||||
errorInfos.add(temp);
|
||||
break;
|
||||
}else if (StrUtil.isBlank(temp.getThirtyCertificateProcessingTime())) {
|
||||
|
||||
Reference in New Issue
Block a user