commit
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright [2022] [https://www.xiaonuo.vip]
|
||||
*
|
||||
* Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||
*
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改Snowy源码头部的版权声明。
|
||||
* 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
|
||||
* 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
|
||||
* 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
|
||||
* 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
|
||||
*/
|
||||
package io.v.nutz.base.utils;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.URLUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 文件下载工具类,使用本类前,对参数校验的异常使用CommonResponseUtil.renderError()方法进行渲染
|
||||
*
|
||||
* @author xuyuxiang
|
||||
* @date 2020/8/5 21:45
|
||||
*/
|
||||
@Slf4j
|
||||
public class CommonDownloadUtil {
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*
|
||||
* @param file 要下载的文件
|
||||
* @param response 响应
|
||||
* @author xuyuxiang
|
||||
* @date 2020/8/5 21:46
|
||||
*/
|
||||
public static void download(File file, HttpServletResponse response) {
|
||||
download(file.getName(), FileUtil.readBytes(file), response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*
|
||||
* @param fileName
|
||||
* @param workbook
|
||||
* @param response
|
||||
*/
|
||||
public static void download(String fileName, Workbook workbook, HttpServletResponse response) {
|
||||
ByteArrayOutputStream byteOs = new ByteArrayOutputStream();
|
||||
try {
|
||||
workbook.write(byteOs);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(">>> 文件下载异常:", e);
|
||||
} finally {
|
||||
try {
|
||||
workbook.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
IoUtil.close(byteOs);
|
||||
}
|
||||
download(fileName, byteOs.toByteArray(), response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*
|
||||
* @author xuyuxiang
|
||||
* @date 2022/7/31 10:57
|
||||
*/
|
||||
public static void download(String fileName, byte[] fileBytes, HttpServletResponse response) {
|
||||
try {
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + URLUtil.encode(fileName));
|
||||
response.addHeader("Content-Length", "" + fileBytes.length);
|
||||
response.setHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||
IoUtil.write(response.getOutputStream(), true, fileBytes);
|
||||
} catch (IOException e) {
|
||||
log.error(">>> 文件下载异常:", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import lombok.experimental.Accessors;
|
||||
import org.nutz.dao.entity.annotation.Column;
|
||||
import org.nutz.dao.entity.annotation.View;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 视图中的user
|
||||
*
|
||||
@@ -127,13 +129,22 @@ public class User {
|
||||
|
||||
@Column
|
||||
private String campusName;
|
||||
|
||||
@Column
|
||||
private String activityUnionId;
|
||||
|
||||
@Column
|
||||
private String activityUnitId;
|
||||
|
||||
@Column
|
||||
private String weAppOpenid;
|
||||
|
||||
@Column
|
||||
private String threeUnitId;
|
||||
|
||||
@Column
|
||||
private String schoolTime;
|
||||
|
||||
@Column
|
||||
private Date retireDate;
|
||||
}
|
||||
|
||||
+5
-5
@@ -235,11 +235,11 @@ public class ActivityBasicScopeController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,H06,H10")) {
|
||||
if (ShiroUtil.hasAnyRoles(new String[]{"H04", "club01"})) {
|
||||
cnd.and("creator", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
}
|
||||
}
|
||||
// if (!ShiroUtil.hasAnyRoles("sysadmin,H06,H10")) {
|
||||
// if (ShiroUtil.hasAnyRoles(new String[]{"H04", "club01"})) {
|
||||
// cnd.and("creator", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
// }
|
||||
// }
|
||||
cnd.and("groupId", "IS NOT", null);
|
||||
cnd.and("groupName", "IS NOT", null);
|
||||
cnd.groupBy("groupId");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.v.nutz.zhgh.activity.controller.union;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.sys.models.Sys_home_activity;
|
||||
import io.v.nutz.zhgh.activity.models.ActivityTissue;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
@@ -102,6 +103,12 @@ public class ActivityAuditController {
|
||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||
baseService.insert(audit);
|
||||
baseService.dao().update(ActivityTissue.class, Chain.make("state", flag ? 3 : 2).add("auditId", audit.getId()), Cnd.where("id", "=", id));
|
||||
// 审核通过,修改活动为启动状态,并且还要将这个活动设置成首界面可见
|
||||
if (flag) {
|
||||
baseService.dao().update(ActivityTissue.class, Chain.make("isDisabled", true), Cnd.where("id", "=", id));
|
||||
baseService.dao().update(Sys_home_activity.class, Chain.make("enable", true), Cnd.where("id", "=", id));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+8
-4
@@ -88,8 +88,9 @@ public class ActivityUnionApplyUserController {
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code`=tissue.projectTypeCode
|
||||
$condition
|
||||
""");
|
||||
|
||||
cnd.andEx("YEAR(tissue.startTime)", "=", year);
|
||||
if (StrUtil.isNotBlank(year)) {
|
||||
cnd.andEx("YEAR(tissue.startTime)", "=", year);
|
||||
}
|
||||
cnd.andEx("tissue.isDisabled", "=", true);
|
||||
cnd.andEx("tissue.type", "=", type);
|
||||
cnd.andEx("tissue.state", "=", 3);
|
||||
@@ -116,6 +117,10 @@ public class ActivityUnionApplyUserController {
|
||||
List<NutMap> list = pagination.getList();
|
||||
list.forEach(v -> {
|
||||
String activityId = v.getString("id");
|
||||
// 当前活动已报名人数
|
||||
int totalApplyNum = baseService.dao().count(ActivityTissuePerson.class, Cnd.where("tissueId", "=", activityId));
|
||||
v.put("totalApplyNum", totalApplyNum);
|
||||
|
||||
int signUpMethod = v.getInt("signUpMethod");
|
||||
if (signUpMethod == 1||signUpMethod == 3) {
|
||||
int count = baseService.dao().count(ActivityTissuePerson.class,
|
||||
@@ -179,8 +184,7 @@ public class ActivityUnionApplyUserController {
|
||||
activity_tissue_person atp
|
||||
LEFT JOIN `user` u ON atp.userId = u.id
|
||||
WHERE
|
||||
atp.tissueId = @tissueId
|
||||
AND u.unionid = @unionId
|
||||
atp.tissueId = @tissueId AND u.unionid = @unionId
|
||||
""");
|
||||
sql.setParam("tissueId", tissueId);
|
||||
sql.setParam("unionId", Vi.getUnionId());
|
||||
|
||||
+5
@@ -231,6 +231,11 @@ public class ActivityUnionManageController {
|
||||
} else {
|
||||
mobileHomeService.delete(tissue.getId());
|
||||
}
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
tissue.setState(1);
|
||||
} else {
|
||||
tissue.setState(3);
|
||||
}
|
||||
activityTissueService.doEdit(tissue);
|
||||
return null;
|
||||
}
|
||||
|
||||
+24
-10
@@ -70,6 +70,20 @@ public class ActivityUnionUserStatisticsController {
|
||||
if (Lang.isEmpty(tissue)){
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (type == 40002) {
|
||||
if (!Vi.getUnionId().equals(tissue.getUnionId())) {
|
||||
return null;
|
||||
}
|
||||
} else if (type == 40003) {
|
||||
if (!vi.getClubId().equals(tissue.getClubId())) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id,
|
||||
@@ -89,16 +103,16 @@ public class ActivityUnionUserStatisticsController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("atp.tissueId", "=", activityId);
|
||||
cnd.andEX("u.unionId", "=", unionId);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!tissue.getUserId().equals(ShiroUtil.getUserId())) {
|
||||
if (type == 40002) {
|
||||
cnd.and("unionId", "=", Vi.getUnionId());
|
||||
} else if (type == 40003) {
|
||||
cnd.and("u.id", "in", " SELECT userid FROM sys_club_user WHERE clubid = '%s' ".formatted(vi.getClubId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
// cnd.andEX("u.unionId", "=", unionId);
|
||||
// if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
// if (!tissue.getUserId().equals(ShiroUtil.getUserId())) {
|
||||
// if (type == 40002) {
|
||||
// cnd.and("unionId", "=", Vi.getUnionId());
|
||||
// } else if (type == 40003) {
|
||||
// cnd.and("u.id", "in", " SELECT userid FROM sys_club_user WHERE clubid = '%s' ".formatted(vi.getClubId()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (Strings.isNotBlank(page.getSearchName()) && Strings.isNotBlank(page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
}
|
||||
|
||||
@@ -239,6 +239,17 @@ public class ActivityTissue extends BaseModel implements Serializable, SysHomeCo
|
||||
@Comment("是否推送移动端首页")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer isPushHome;
|
||||
|
||||
@Column
|
||||
@Comment("签到开始时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String signStartTime;
|
||||
|
||||
@Column
|
||||
@Comment("签到结束时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String signEndTime;
|
||||
|
||||
@Override
|
||||
public Sys_home_activity covertToSysHomeActivity() {
|
||||
Sys_home_activity sysHomeActivity = new Sys_home_activity();
|
||||
@@ -252,7 +263,7 @@ public class ActivityTissue extends BaseModel implements Serializable, SysHomeCo
|
||||
} else if (this.getType() == 40003) {
|
||||
sysHomeActivity.setUrl("/platform/activity/applyUser/club");
|
||||
}
|
||||
sysHomeActivity.setH5Url("/mobile/activity/unionActivity");
|
||||
sysHomeActivity.setH5Url("/mobile/activity/unionActivity/goReg?id=" + this.getId() + "&signUpMethod=" + this.getSignUpMethod());
|
||||
if (StrUtil.isNotBlank(this.getApplyStartTime())) {
|
||||
sysHomeActivity.setStartDate(DateUtil.parseDate(this.getApplyStartTime()));
|
||||
sysHomeActivity.setEndDate(DateUtil.parseDate(this.getApplyEndTime()));
|
||||
|
||||
@@ -67,8 +67,9 @@ public class ActivityTissueServiceImpl extends ViServiceImpl<ActivityTissue> imp
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code`=tissue.projectTypeCode
|
||||
$condition
|
||||
""");
|
||||
|
||||
cnd.andEx("YEAR(tissue.applyTime)", "=", year);
|
||||
if (StrUtil.isNotBlank(year)) {
|
||||
cnd.and("YEAR(tissue.applyTime)", "=", year);
|
||||
}
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or("tissue.projectTypeCode", "!=", "50004");
|
||||
seg.or("tissue.projectTypeCode", "is", null);
|
||||
@@ -81,8 +82,15 @@ public class ActivityTissueServiceImpl extends ViServiceImpl<ActivityTissue> imp
|
||||
cnd.where().andLike("tissue.name", name);
|
||||
}
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,H10,A06")) {
|
||||
cnd.and("tissue.userId", "=", ShiroUtil.getUserId());
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
// cnd.and("tissue.userId", "=", ShiroUtil.getUserId());
|
||||
if (ShiroUtil.hasAnyRoles("H04")) {
|
||||
cnd.and("tissue.unionId", "=", Vi.getUnionId());
|
||||
} else if (ShiroUtil.hasAnyRoles("club01")) {
|
||||
cnd.and("tissue.clubId", "=", vi.getClubId());
|
||||
} else {
|
||||
cnd.and("tissue.userId", "=", ShiroUtil.getUserId());
|
||||
}
|
||||
/* if (ShiroUtil.hasRole("H04")) {
|
||||
cnd.and("tissue.unionId", "in", vi.getMangeUnionStr());
|
||||
} else if (ShiroUtil.hasRole("club01")) {
|
||||
|
||||
@@ -39,23 +39,6 @@ public interface SourceData {
|
||||
// Assert.isTrue(jsonResult.getBoolean("success"), jsonResult.getString("data"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 不进系统人员类型
|
||||
*/
|
||||
List<String> NOT_ENTERING_PERSON_TYPE = List.of("退休人员", "兼职教师", "非全日用工(项目临聘)", "服务外包和其他人员",
|
||||
"教学编制2", "教学教师(附属医院)", "教学编制", "离休人员", "临时人员", "非全日制工", "博士后(在职)");
|
||||
/**
|
||||
* 不进系统在职状态
|
||||
* 01 退休
|
||||
* 05 调出
|
||||
* 06 辞职
|
||||
* 07 离职
|
||||
* @see io.v.nutz.zhgh.data.constant.HMCFieldCode#USER_STATE_CODE
|
||||
*/
|
||||
List<String> NOT_ENTERING_USER_STATE = List.of("01", "05", "06", "07");
|
||||
|
||||
List<String> NOT_ENTERING_USER_LOGIN_NAME = List.of("2020000410", "2008000010");
|
||||
|
||||
/**
|
||||
* 接口中的数据跟SourceUser的对应关系
|
||||
* <p>
|
||||
@@ -83,6 +66,7 @@ public interface SourceData {
|
||||
put("ZYJSZWDJ", new String[]{"professionalTechnicalLevel"}); // 专业技术等级
|
||||
put("JZGLBM", new String[]{"userCategory"}); // 教职工类别
|
||||
put("GWLBM", new String[]{"jobCategory"}); // 岗位类别
|
||||
put("LXRQ", new String[]{"schoolTime"}); // 岗位类别
|
||||
}};
|
||||
|
||||
/**
|
||||
@@ -119,11 +103,6 @@ public interface SourceData {
|
||||
// checkSuccess(map);
|
||||
List<NutMap> data = map.getAsList("data", NutMap.class);
|
||||
for (NutMap row : data) {
|
||||
if (NOT_ENTERING_PERSON_TYPE.contains(row.getString("RYFLMC"))
|
||||
|| NOT_ENTERING_USER_LOGIN_NAME.contains(row.getString("GH"))
|
||||
|| NOT_ENTERING_USER_STATE.contains(row.getString("DQZTM"))) {
|
||||
continue;
|
||||
}
|
||||
Map entity = new HashMap(500);
|
||||
|
||||
row.forEach((k, v) -> {
|
||||
|
||||
@@ -4,23 +4,18 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import io.v.nutz.base.utils.ManyAddOrRenewUtil;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.sys.models.Sys_dict;
|
||||
import io.v.nutz.sys.models.Sys_user_role;
|
||||
import io.v.nutz.sys.services.SysDictService;
|
||||
import io.v.nutz.sys.services.SysUserRoleService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.activity.models.ActivityUserScope;
|
||||
import io.v.nutz.zhgh.data.constant.SourceData;
|
||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||
import io.v.nutz.zhgh.data.model.UserHistory;
|
||||
import io.v.nutz.zhgh.data.model.UserSource;
|
||||
import io.v.nutz.zhgh.data.service.HistoryUserService;
|
||||
import io.v.nutz.zhgh.data.service.SourceUserService;
|
||||
import io.v.nutz.zhgh.data.vo.SourceUserCommonVo;
|
||||
import io.v.nutz.zhgh.staffmanage.member.UserMode;
|
||||
import io.v.nutz.base.service.AsyncService;
|
||||
import io.v.nutz.base.service.impl.ViServiceImpl;
|
||||
@@ -51,14 +46,12 @@ import org.nutz.lang.random.R;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.plugins.wkcache.annotation.CacheDefaults;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -72,6 +65,18 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
||||
super(dao);
|
||||
}
|
||||
|
||||
/**
|
||||
* 不进系统人员类型
|
||||
*/
|
||||
private final List<String> NOT_ENTERING_PERSON_TYPE = List.of("退休人员", "兼职教师", "非全日用工(项目临聘)", "服务外包和其他人员",
|
||||
"教学编制2", "教学教师(附属医院)", "教学编制", "离休人员", "临时人员", "非全日制工", "博士后(在职)");
|
||||
/**
|
||||
* 不进系统在职状态
|
||||
* @see io.v.nutz.zhgh.data.constant.HMCFieldCode#USER_STATE_CODE
|
||||
*/
|
||||
private final List<String> NOT_ENTERING_USER_STATE = List.of("退休", "调出", "辞职", "离职");
|
||||
|
||||
private final List<String> NOT_ENTERING_USER_LOGIN_NAME = List.of("2020000410", "2008000010");
|
||||
|
||||
@Inject
|
||||
private AsyncService asyncService;
|
||||
@@ -179,6 +184,10 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
||||
source.setWelfareMember(null);
|
||||
Sys_user user = userMap.get(source.getLoginname().toLowerCase());
|
||||
|
||||
boolean isNotEnterUser = NOT_ENTERING_PERSON_TYPE.contains(source.getPersonType())
|
||||
|| NOT_ENTERING_USER_LOGIN_NAME.contains(source.getLoginname())
|
||||
|| NOT_ENTERING_USER_STATE.contains(source.getUserState());
|
||||
|
||||
if (isAuto) {
|
||||
checkMemberOrWelfareMember(changeConfig, source, user, addMemberUserIds, deleteMemberUserIds,
|
||||
addWelfareMemberUserIds, deleteWelfareMemberUserIds);
|
||||
@@ -220,18 +229,24 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
||||
if (Lang.isEmpty(history)) {
|
||||
continue;
|
||||
}
|
||||
histories.add(history);
|
||||
if (history.getChangeTypes().contains(MemberChangeType.NEW.getType())) {
|
||||
if (user != null) {
|
||||
histories.add(history);
|
||||
}
|
||||
if (!isNotEnterUser && history.getChangeTypes().contains(MemberChangeType.NEW.getType())) {
|
||||
needInitUserList.add(u);
|
||||
histories.add(history);
|
||||
}
|
||||
} else {
|
||||
SourceChangeMiddleTable table = createSourceChangeMiddleTable(source, user, dictMap, allowChangeFieldNames);
|
||||
if (Lang.isEmpty(table)) {
|
||||
continue;
|
||||
}
|
||||
middleTables.add(table);
|
||||
if (table.getChangeTypes().contains(MemberChangeType.NEW.getType())) {
|
||||
if (user != null) {
|
||||
middleTables.add(table);
|
||||
}
|
||||
if (!isNotEnterUser && table.getChangeTypes().contains(MemberChangeType.NEW.getType())) {
|
||||
needInitUserList.add(u);
|
||||
middleTables.add(table);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+35
-4
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.zhgh.activity.models.ActivityTissue;
|
||||
import io.v.nutz.zhgh.jf.handle.reimbursement.ReimbursementToHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
@@ -11,10 +12,14 @@ import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
@@ -37,6 +42,8 @@ import java.util.List;
|
||||
@At("/platform/jf/reimbursement/apply")
|
||||
public class ActivityReimbursementApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@@ -118,6 +125,17 @@ public class ActivityReimbursementApplyController {
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.apply")
|
||||
public Object getActivityReimbursementByUser() {
|
||||
// 查询可以报销的活动
|
||||
Cnd queryTissueCnd = Cnd.NEW();
|
||||
// 这里要判断是不是管理员,不是就只能看自己创建的或者联系人是自己的
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
SqlExpressionGroup queryTissueGroup = new SqlExpressionGroup();
|
||||
queryTissueGroup.or("userId", "=", ShiroUtil.getUserId());
|
||||
queryTissueGroup.or("opBy", "=", ShiroUtil.getUserId());
|
||||
queryTissueCnd.and(queryTissueGroup);
|
||||
}
|
||||
|
||||
// 还要去排除报销表里边已经报销过了的,审核拒绝的报销不能过滤,要查出来重新报销走报销流程,直接查活动的id
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("state_id", "=", 1060);
|
||||
cnd.andEX("`year`", "=", DateUtil.thisYear());
|
||||
@@ -125,14 +143,27 @@ public class ActivityReimbursementApplyController {
|
||||
seg.or("reimbursement_state_id", "in", List.of(1005, 1015, 1025, 1045));
|
||||
seg.or("reimbursement_union_audit_id", "is", null);
|
||||
cnd.and(seg);
|
||||
Sql sql = Sqls.create("select activity_id from activity_bx $condition");
|
||||
sql.setCondition(cnd);
|
||||
sql.setCallback(Sqls.callback.strList());
|
||||
dao.execute(sql);
|
||||
List<String> activityIds = sql.getList(String.class);
|
||||
// 查出来的这玩意activityIds,要从活动里边过滤掉
|
||||
if (Lang.isNotEmpty(activityIds)) {
|
||||
queryTissueCnd.and("id", "not in", activityIds);
|
||||
}
|
||||
// 上述条件过滤完之后,可以查询可报销的活动了,可以看看断点打印
|
||||
List<ActivityTissue> list = dao.query(ActivityTissue.class, queryTissueCnd);
|
||||
return list;
|
||||
|
||||
// cnd.and("reimbursement_unit_secretary_audit_id", "is", null);
|
||||
// cnd.and("reimbursement_finance_audit_id", "is", null);
|
||||
// cnd.and("reimbursement_school_director_id", "is", null);
|
||||
// cnd.and("reimbursement_school_chairman_id", "is", null);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
cnd.and("user_id", "=", ShiroUtil.getUserId());
|
||||
}
|
||||
return activityBxService.query(cnd);
|
||||
// if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
// cnd.and("user_id", "=", ShiroUtil.getUserId());
|
||||
// }
|
||||
// return ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+15
-11
@@ -60,7 +60,7 @@ public class UnionActivityRegisterController {
|
||||
@Ok("re")
|
||||
@RequiresAuthentication
|
||||
public String goReg(String signUpMethod) {
|
||||
if (signUpMethod.equals("1")) {
|
||||
if ("1".equals(signUpMethod)) {
|
||||
return "beetl:/mobile/activity/unionActivity/singleReg.html";
|
||||
}
|
||||
return "beetl:/mobile/activity/unionActivity/unionReg.html";
|
||||
@@ -88,6 +88,9 @@ public class UnionActivityRegisterController {
|
||||
act.needSign,
|
||||
act.projectTypeCode,
|
||||
act.teamNum,
|
||||
act.groupId,
|
||||
act.signStartTime,
|
||||
act.signEndTime,
|
||||
abs.`name` AS projectTypeName,
|
||||
creater.username AS createUserName,
|
||||
creater.mobile as createUserMobile
|
||||
@@ -300,10 +303,7 @@ public class UnionActivityRegisterController {
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object searchNoRegisterUser(String searchKey, String activityId) {
|
||||
|
||||
|
||||
ActivityTissue tissue = simpleService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", activityId));
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
id,
|
||||
@@ -315,11 +315,10 @@ public class UnionActivityRegisterController {
|
||||
`user`
|
||||
$condition
|
||||
""");
|
||||
String unionId = Vi.getUnionId();
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (tissue.getSignUpMethod() != 3) {
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
}
|
||||
// if (tissue.getSignUpMethod() != 3) {
|
||||
cnd.andEX("unionId", "=", Vi.getUnionId());
|
||||
// }
|
||||
cnd.and(Cnd.exps(Cnd.likeEX("username", searchKey.trim())).or(Cnd.likeEX("loginname", searchKey.trim())));
|
||||
if (tissue.getGroupId() != null) {
|
||||
cnd.and(new Static("""
|
||||
@@ -352,10 +351,15 @@ public class UnionActivityRegisterController {
|
||||
}
|
||||
if (Lang.isNotEmpty(activityTissue.getUserNumberLimit())) {
|
||||
if (activityTissue.getUserNumberLimit() == 1) {
|
||||
int hasRegisterCount = simpleService.dao().count(ActivityTissuePerson.class, Cnd.where("tissueId", "=", activityId));
|
||||
if (hasRegisterCount + personIds.length > activityTissue.getTotalUserNumberLimit()) {
|
||||
// 判断当前人有没有组队报过名,如果报过名本次提交就算修改,可以放行这个判断
|
||||
int count = simpleService.dao().count(ActivityTissuePerson.class, Cnd.where("tissueId", "=", activityId).and("applyUserId", "=", ShiroUtil.getUserId()));
|
||||
|
||||
if (count <= 0) {
|
||||
int hasRegisterCount = simpleService.dao().count(ActivityTissuePerson.class, Cnd.where("tissueId", "=", activityId));
|
||||
if (hasRegisterCount + personIds.length > activityTissue.getTotalUserNumberLimit()) {
|
||||
// return Result.error().addMsg("当前最多只能报名%s人!".formatted(Math.max(activityTissue.getTotalUserNumberLimit() - hasRegisterCount, 0)));
|
||||
return Result.error().addMsg("该活动限制人数为%s人".formatted(activityTissue.getTotalUserNumberLimit()));
|
||||
return Result.error().addMsg("该活动限制人数为%s人".formatted(activityTissue.getTotalUserNumberLimit()));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (activityTissue.getUserNumberLimit() == 2) {
|
||||
|
||||
@@ -55,7 +55,7 @@ public class QsvQuizRankController {
|
||||
@At
|
||||
@Ok("void")
|
||||
@RequiresPermissions("qsv.quiz.rank")
|
||||
public void exportXlsx(@Valid QsvQuizRankPageForm pageForm, HttpServletResponse response) {
|
||||
public void exportXlsx(QsvQuizRankPageForm pageForm, HttpServletResponse response) {
|
||||
qsvQuizRankService.exportXlsx(pageForm, response);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.activity.models.ActivityUserScope;
|
||||
import io.v.nutz.zhgh.qsv.dto.QsvCheckAnswerResult;
|
||||
import io.v.nutz.zhgh.qsv.models.QsvActivity;
|
||||
import io.v.nutz.zhgh.qsv.models.QsvSubject;
|
||||
@@ -60,6 +61,12 @@ public class H5QsvQuizController {
|
||||
@RequiresAuthentication
|
||||
public Result subjects(@Valid String activityId) {
|
||||
QsvActivity activity = dao.fetch(QsvActivity.class, activityId);
|
||||
|
||||
int count = dao.count(ActivityUserScope.class, Cnd.where("groupId", "=", activity.getGroupId()).and("userId", "=", ShiroUtil.getUserId()));
|
||||
if (count != 1) {
|
||||
return Result.error("您无需参加此次知识竞赛,感谢您的关注!");
|
||||
}
|
||||
|
||||
String mode = activity.getMode();
|
||||
//能否重复答题
|
||||
Boolean repeatable = activity.getRepeatable();
|
||||
@@ -78,7 +85,7 @@ public class H5QsvQuizController {
|
||||
List<QsvUserAnswerRecord> answerRecords = dao.query(QsvUserAnswerRecord.class, Cnd.where("activityId", "=", activityId)
|
||||
.and("userId", "=", ShiroUtil.getUserId()));
|
||||
|
||||
if (activity.getEndTime().after(new Date())) {
|
||||
if (activity.getEndTime().before(new Date())) {
|
||||
//已结束 查询最新一次的答题记录
|
||||
Optional<QsvUserAnswerRecord> lastRecordOptional = answerRecords.stream().max(Comparator.comparing(QsvUserAnswerRecord::getAnswerTime));
|
||||
if (lastRecordOptional.isPresent()) {
|
||||
@@ -102,13 +109,13 @@ public class H5QsvQuizController {
|
||||
}
|
||||
} else {
|
||||
|
||||
if (mode.equals("REGULAR")) {
|
||||
if ("REGULAR".equals(mode)) {
|
||||
if (ObjectUtil.isEmpty(answerRecords)) {
|
||||
//首次进来生成答题记录
|
||||
if (displayMode.equals("ALL")) {
|
||||
resultSubjects = dao.query(QsvSubject.class, Cnd.where("activityId", "=", activityId));
|
||||
if ("ALL".equals(displayMode)) {
|
||||
resultSubjects = dao.query(QsvSubject.class, Cnd.where("activityId", "=", activityId).asc("sortNum"));
|
||||
answerRecordId = qsvUserAnswerRecordService.insertRecord(activityId, resultSubjects.stream().map(QsvSubject::getId).collect(Collectors.toList())).getId();
|
||||
} else if (displayMode.equals("RANDOM")) {
|
||||
} else if ("RANDOM".equals(displayMode)) {
|
||||
//单次随机抽取题目数量
|
||||
Integer randomCount = activity.getRandomCount();
|
||||
|
||||
@@ -130,17 +137,26 @@ public class H5QsvQuizController {
|
||||
resultSubjects = dao.query(QsvSubject.class, cnd);
|
||||
}
|
||||
} else {
|
||||
if (displayMode.equals("ALL")) {
|
||||
if ("ALL".equals(displayMode)) {
|
||||
//判断能否重复答题 如果可重复要根据次数判断是否再次生成记录 不能重复直接返回最新的一次记录
|
||||
if (repeatable) {
|
||||
//已回答次数
|
||||
if (answerRecords.size() < maxAttempts) {
|
||||
//生成答题记录
|
||||
List<QsvSubject> subjects = dao.query(QsvSubject.class, Cnd.where("activityId", "=", activityId));
|
||||
answerRecordId = qsvUserAnswerRecordService.insertRecord(activityId, subjects.stream().map(QsvSubject::getId).collect(Collectors.toList())).getId();
|
||||
QsvUserAnswerRecord answerRecord = dao.fetch(QsvUserAnswerRecord.class, answerRecordId);
|
||||
QsvUserAnswerRecord fetch = dao.fetch(QsvUserAnswerRecord.class, Cnd.where("activityId", "=", activityId)
|
||||
.and("userId", "=", ShiroUtil.getUserId()).and("isFinish", "=", false)
|
||||
.desc("randomNumber"));
|
||||
List<String> subjectIds = new ArrayList<>();
|
||||
if (fetch == null) {
|
||||
List<QsvSubject> subjects = dao.query(QsvSubject.class, Cnd.where("activityId", "=", activityId).asc("sortNum"));
|
||||
answerRecordId = qsvUserAnswerRecordService.insertRecord(activityId, subjects.stream().map(QsvSubject::getId).collect(Collectors.toList())).getId();
|
||||
QsvUserAnswerRecord answerRecord = dao.fetch(QsvUserAnswerRecord.class, answerRecordId);
|
||||
subjectIds = answerRecord.getSubjectIds();
|
||||
|
||||
List<String> subjectIds = answerRecord.getSubjectIds();
|
||||
} else {
|
||||
subjectIds = fetch.getSubjectIds();
|
||||
answerRecordId = fetch.getId();
|
||||
}
|
||||
Cnd cnd = Cnd.where("id", "in", subjectIds);
|
||||
String dynamic = subjectIds.stream().map(id -> "'" + id + "'").collect(Collectors.joining(","));
|
||||
cnd.and(new Static("1=1 ORDER BY FIELD (id," + dynamic + ")"));
|
||||
@@ -172,7 +188,7 @@ public class H5QsvQuizController {
|
||||
throw new RuntimeException("业务异常");
|
||||
}
|
||||
}
|
||||
} else if (displayMode.equals("RANDOM")) {
|
||||
} else if ("RANDOM".equals(displayMode)) {
|
||||
//判断是否有未答完的记录
|
||||
Optional<QsvUserAnswerRecord> notFinishRecordOptional = answerRecords.stream().filter(r -> !r.getIsFinish()).findFirst();
|
||||
if (notFinishRecordOptional.isPresent()) {
|
||||
@@ -200,7 +216,7 @@ public class H5QsvQuizController {
|
||||
//进行下一次抽取
|
||||
List<String> subjectIds = answerRecords.stream().map(QsvUserAnswerRecord::getSubjectIds).flatMap(Collection::stream).toList();
|
||||
List<QsvSubject> subjects = dao.query(QsvSubject.class, Cnd.where("activityId", "=", activityId)
|
||||
.and("id", "not in", subjectIds));
|
||||
.and("id", "not in", subjectIds).asc("sortNum"));
|
||||
|
||||
if (subjects.size() < randomCount) {
|
||||
throw new RuntimeException("题目数不够,无法生成题目");
|
||||
@@ -230,7 +246,7 @@ public class H5QsvQuizController {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (mode.equals("SCHEDULED")) {
|
||||
} else if ("SCHEDULED".equals(mode)) {
|
||||
//定时定题
|
||||
//查询今天的题目
|
||||
|
||||
@@ -246,7 +262,7 @@ public class H5QsvQuizController {
|
||||
if (todayAllFinish && todayRecords.size() < maxAttempts) {
|
||||
//生成今天的记录
|
||||
List<QsvSubject> subjects = dao.query(QsvSubject.class, Cnd.where("activityId", "=", activityId)
|
||||
.and("displayDate", "=", DateUtil.today()));
|
||||
.and("displayDate", "=", DateUtil.today()).asc("sortNum"));
|
||||
QsvUserAnswerRecord answerRecord = qsvUserAnswerRecordService.insertRecord(activityId, subjects.stream().map(QsvSubject::getId).collect(Collectors.toList()));
|
||||
answerRecordId = answerRecord.getId();
|
||||
|
||||
@@ -273,7 +289,7 @@ public class H5QsvQuizController {
|
||||
} else {
|
||||
//生成今天的记录
|
||||
List<QsvSubject> subjects = dao.query(QsvSubject.class, Cnd.where("activityId", "=", activityId)
|
||||
.and("displayDate", "=", DateUtil.today()));
|
||||
.and("displayDate", "=", DateUtil.today()).asc("sortNum"));
|
||||
QsvUserAnswerRecord answerRecord = qsvUserAnswerRecordService.insertRecord(activityId, subjects.stream().map(QsvSubject::getId).collect(Collectors.toList()));
|
||||
answerRecordId = answerRecord.getId();
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.page.Pagination;
|
||||
import io.v.nutz.base.service.impl.BaseServiceImpl;
|
||||
import io.v.nutz.base.utils.CommonDownloadUtil;
|
||||
import io.v.nutz.zhgh.qsv.models.QsvActivity;
|
||||
import io.v.nutz.zhgh.qsv.models.QsvUserAnswerRecord;
|
||||
import io.v.nutz.zhgh.qsv.param.QsvQuizRankPageForm;
|
||||
@@ -83,7 +84,7 @@ public class QsvQuizRankServiceImpl extends BaseServiceImpl<QsvUserAnswerRecord>
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||
// CommonDownloadUtil.download(activity.getTitle() + "得分名单" + ".xlsx", workbook, response);
|
||||
CommonDownloadUtil.download(activity.getTitle() + "得分名单" + ".xlsx", workbook, response);
|
||||
}
|
||||
|
||||
private Sql buildQuerySql(String activityId, String mode, String scoreStatisticsMode, QsvQuizRankPageForm pageForm) {
|
||||
|
||||
@@ -8,6 +8,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import io.v.nutz.base.service.impl.BaseServiceImpl;
|
||||
import io.v.nutz.base.utils.CommonDownloadUtil;
|
||||
import io.v.nutz.zhgh.qsv.models.QsvActivity;
|
||||
import io.v.nutz.zhgh.qsv.models.QsvOption;
|
||||
import io.v.nutz.zhgh.qsv.models.QsvSubject;
|
||||
@@ -45,7 +46,8 @@ public class QsvSurveyServiceImpl extends BaseServiceImpl<QsvUserAnswerRecord> i
|
||||
|
||||
try {
|
||||
// 查询用户答题记录
|
||||
List<QsvUserAnswerRecord> answerRecords = dao().query(QsvUserAnswerRecord.class, Cnd.where("activityId", "=", activityId));
|
||||
List<QsvUserAnswerRecord> answerRecords = dao().query(QsvUserAnswerRecord.class, Cnd.where("activityId", "=", activityId)
|
||||
.and("isFinish", "=", true));
|
||||
// 将答题记录的扩展JSON转换为JSONObject列表
|
||||
List<JSONObject> answerExtList = answerRecords.stream().map(QsvUserAnswerRecord::getExtJson).toList();
|
||||
|
||||
@@ -122,7 +124,8 @@ public class QsvSurveyServiceImpl extends BaseServiceImpl<QsvUserAnswerRecord> i
|
||||
}
|
||||
|
||||
// 查询用户答题记录
|
||||
List<QsvUserAnswerRecord> answerRecords = dao().query(QsvUserAnswerRecord.class, Cnd.where("activityId", "=", activityId));
|
||||
List<QsvUserAnswerRecord> answerRecords = dao().query(QsvUserAnswerRecord.class, Cnd.where("activityId", "=", activityId)
|
||||
.and("isFinish", "=", true));
|
||||
// 将答题记录的扩展JSON转换为JSONObject列表
|
||||
List<JSONObject> answerExtList = answerRecords.stream().map(QsvUserAnswerRecord::getExtJson).toList();
|
||||
|
||||
@@ -148,7 +151,7 @@ public class QsvSurveyServiceImpl extends BaseServiceImpl<QsvUserAnswerRecord> i
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
// 导出Excel并下载
|
||||
try (Workbook workbook = ExcelExportUtil.exportExcel(exportParams, excelExportEntities, list)) {
|
||||
// CommonDownloadUtil.download(activity.getTitle() + "答题记录" + ".xlsx", workbook, response);
|
||||
CommonDownloadUtil.download(activity.getTitle() + "答题记录" + ".xlsx", workbook, response);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("导出Excel失败", e);
|
||||
@@ -165,9 +168,10 @@ public class QsvSurveyServiceImpl extends BaseServiceImpl<QsvUserAnswerRecord> i
|
||||
|
||||
try {
|
||||
// 查询用户答题记录
|
||||
List<QsvUserAnswerRecord> answerRecords = dao().query(QsvUserAnswerRecord.class, Cnd.where("activityId", "=", activityId));
|
||||
List<QsvUserAnswerRecord> answerRecords = dao().query(QsvUserAnswerRecord.class, Cnd.where("activityId", "=", activityId)
|
||||
.and("isFinish", "=", true));
|
||||
// 将答题记录的扩展JSON转换为JSONObject列表
|
||||
List<JSONObject> answerExtList = answerRecords.stream().map(QsvUserAnswerRecord::getExtJson).toList();
|
||||
// List<JSONObject> answerExtList = answerRecords.stream().map(QsvUserAnswerRecord::getExtJson).toList();
|
||||
|
||||
// 查询活动题目列表
|
||||
List<QsvSubject> subjects = dao().query(QsvSubject.class, Cnd.where("activityId", "=", activityId));
|
||||
|
||||
@@ -36,7 +36,7 @@ public class QsvUserAnswerRecordServiceImpl extends BaseServiceImpl<QsvUserAnswe
|
||||
Boolean shuffleSubject = activity.getShuffleSubject();
|
||||
|
||||
//打乱题目顺序
|
||||
if (category.equals("QUIZ") && shuffleSubject) {
|
||||
if ("QUIZ".equals(category) && shuffleSubject) {
|
||||
Collections.shuffle(subjectIds);
|
||||
}
|
||||
|
||||
@@ -64,13 +64,13 @@ public class QsvUserAnswerRecordServiceImpl extends BaseServiceImpl<QsvUserAnswe
|
||||
record.setUnionName(user.getUnionname());
|
||||
|
||||
//问卷模式
|
||||
if (category.equals("QUIZ")) {
|
||||
if (mode.equals("REGULAR")) {
|
||||
if ("QUIZ".equals(category)) {
|
||||
if ("REGULAR".equals(mode)) {
|
||||
//常规模式 抽取随机题目
|
||||
int count = dao().count(QsvUserAnswerRecord.class, Cnd.where("activityId", "=", activityId)
|
||||
.and("userId", "=", ShiroUtil.getUserId()));
|
||||
record.setRandomNumber(count + 1);
|
||||
} else if (mode.equals("SCHEDULED")) {
|
||||
} else if ("SCHEDULED".equals(mode)) {
|
||||
//定时定题模式
|
||||
int count = dao().count(QsvUserAnswerRecord.class, Cnd.where("activityId", "=", activityId)
|
||||
.and("userId", "=", ShiroUtil.getUserId())
|
||||
|
||||
+2
-2
@@ -88,8 +88,8 @@ public class SourceChangeManageController {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if(StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("username",pageForm.getSearchKeyword());
|
||||
seg.orLike("loginname",pageForm.getSearchKeyword());
|
||||
seg.orLike("u.username",pageForm.getSearchKeyword());
|
||||
seg.orLike("u.loginname",pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
|
||||
+3
-1
@@ -233,7 +233,9 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
||||
history.setChangeTypes(changeTypes);
|
||||
dao().insert(history);
|
||||
|
||||
dao().update(SourceChangeMiddleTable.class, Chain.make("isOperate", 2), Cnd.where("id", "=", middleTable.getId()));
|
||||
dao().update(SourceChangeMiddleTable.class, Chain.make("isOperate", 2)
|
||||
.add("retireDate", middleTable.getRetireDate()),
|
||||
Cnd.where("id", "=", middleTable.getId()));
|
||||
|
||||
sysUserService.deleteCacheAndUpdate(userId);
|
||||
sysUserService.clearCache();
|
||||
|
||||
Reference in New Issue
Block a user