|
@@ -9,9 +9,15 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.bean.copier.CopyOptions;
|
|
|
import com.ruoyi.business.domain.*;
|
|
|
import com.ruoyi.business.mapper.*;
|
|
|
+import com.ruoyi.common.core.constant.SecurityConstants;
|
|
|
+import com.ruoyi.common.core.context.SecurityContextHolder;
|
|
|
+import com.ruoyi.common.core.domain.R;
|
|
|
import com.ruoyi.common.core.exception.ServiceException;
|
|
|
import com.ruoyi.common.core.utils.DateUtils;
|
|
|
+import com.ruoyi.common.core.utils.ServletUtils;
|
|
|
import com.ruoyi.ext.api.enums.*;
|
|
|
+import com.ruoyi.system.api.RemoteUserService;
|
|
|
+import com.ruoyi.system.api.model.LoginUser;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
@@ -60,6 +66,9 @@ public class ZwywLhcjSbServiceImpl implements IZwywLhcjSbService
|
|
|
@Autowired
|
|
|
private ZwywLhcjGzsMapper zwywLhcjGzsMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RemoteUserService userService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询联合惩戒申辩信息
|
|
|
*
|
|
@@ -271,6 +280,10 @@ public class ZwywLhcjSbServiceImpl implements IZwywLhcjSbService
|
|
|
List<ZwywCyrySxxx> rySxxx = zwywCyrySxxxMapper.selectList(rySxxxLqw);
|
|
|
for (ZwywYljgSxxx jg: jgSxxx) {
|
|
|
try {
|
|
|
+ LoginUser user = userService.getUserInfo(jg.getCreateBy(), SecurityConstants.INNER).getData();
|
|
|
+ SecurityContextHolder.setUserId(String.valueOf(user.getUserid()));
|
|
|
+ SecurityContextHolder.setUserName(user.getUsername());
|
|
|
+ SecurityContextHolder.set(SecurityConstants.LOGIN_USER, user);
|
|
|
LambdaQueryWrapper<ZwywLhcjSxgs> lqw = new LambdaQueryWrapper<ZwywLhcjSxgs>()
|
|
|
.eq(ZwywLhcjSxgs::getSxxxId, jg.getId())
|
|
|
.eq(ZwywLhcjSxgs::getState, StateStatus.NORMAL.getCode());
|
|
@@ -308,6 +321,10 @@ public class ZwywLhcjSbServiceImpl implements IZwywLhcjSbService
|
|
|
}
|
|
|
for (ZwywCyrySxxx ry: rySxxx) {
|
|
|
try {
|
|
|
+ LoginUser user = userService.getUserInfo(ry.getCreateBy(), SecurityConstants.INNER).getData();
|
|
|
+ SecurityContextHolder.setUserId(String.valueOf(user.getUserid()));
|
|
|
+ SecurityContextHolder.setUserName(user.getUsername());
|
|
|
+ SecurityContextHolder.set(SecurityConstants.LOGIN_USER, user);
|
|
|
LambdaQueryWrapper<ZwywLhcjSxgs> lqw = new LambdaQueryWrapper<ZwywLhcjSxgs>()
|
|
|
.eq(ZwywLhcjSxgs::getSxxxId, ry.getId())
|
|
|
.eq(ZwywLhcjSxgs::getState, StateStatus.NORMAL.getCode());
|
|
@@ -353,6 +370,12 @@ public class ZwywLhcjSbServiceImpl implements IZwywLhcjSbService
|
|
|
List<ZwywCyryLhcjmd> ryMdList = zwywCyryLhcjmdMapper.selectList(ryMdLqw);
|
|
|
Date now = new Date();
|
|
|
jgMdList.forEach(j -> {
|
|
|
+ LoginUser user = userService.getUserInfo(j.getCreateBy(), SecurityConstants.INNER).getData();
|
|
|
+ if (ObjectUtils.isNotEmpty(user)) {
|
|
|
+ SecurityContextHolder.setUserId(String.valueOf(user.getUserid()));
|
|
|
+ SecurityContextHolder.setUserName(user.getUsername());
|
|
|
+ SecurityContextHolder.set(SecurityConstants.LOGIN_USER, user);
|
|
|
+ }
|
|
|
LocalDate end = LocalDate.parse(j.getNrrq(), DateTimeFormatter.ofPattern("yyyyMMdd"));
|
|
|
end = end.plusYears(2);
|
|
|
Date endDate = DateUtils.toDate(end);
|
|
@@ -362,6 +385,12 @@ public class ZwywLhcjSbServiceImpl implements IZwywLhcjSbService
|
|
|
}
|
|
|
});
|
|
|
ryMdList.forEach(r -> {
|
|
|
+ LoginUser user = userService.getUserInfo(r.getCreateBy(), SecurityConstants.INNER).getData();
|
|
|
+ if (ObjectUtils.isNotEmpty(user)) {
|
|
|
+ SecurityContextHolder.setUserId(String.valueOf(user.getUserid()));
|
|
|
+ SecurityContextHolder.setUserName(user.getUsername());
|
|
|
+ SecurityContextHolder.set(SecurityConstants.LOGIN_USER, user);
|
|
|
+ }
|
|
|
LocalDate end = LocalDate.parse(r.getNrrq(), DateTimeFormatter.ofPattern("yyyyMMdd"));
|
|
|
end = end.plusYears(2);
|
|
|
Date endDate = DateUtils.toDate(end);
|