|
|
@@ -1758,11 +1758,18 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
iSysTaskService.updateById(task);
|
|
|
String zhiyuan = System.getProperty("user.dir");
|
|
|
String toPath = zhiyuan + "/zhongzheng-admin/src/main/resources/dangan"+DateUtils.getNowTime();
|
|
|
+ List<UserDataExcelBo> userList = new ArrayList<>();
|
|
|
for (Long userId : bo.getUserIds()) {
|
|
|
User user = getById(userId);
|
|
|
if (ObjectUtil.isNull(user)){
|
|
|
continue;
|
|
|
}
|
|
|
+ UserDataExcelBo userBo = BeanUtil.toBean(user, UserDataExcelBo.class);
|
|
|
+ userBo.setRegisterTime(DateUtils.timestampToDateFormat(user.getCreateTime(),"yyyy/MM/dd HH:mm:ss"));
|
|
|
+ userBo.setSex(ObjectUtil.isNotNull(user.getSex()) && user.getSex() == 1?"男":"女");
|
|
|
+ userBo.setUserPhone(EncryptHandler.decrypt(user.getTelphone()));
|
|
|
+ userBo.setUserCard(EncryptHandler.decrypt(user.getIdCard()));
|
|
|
+ userList.add(userBo);
|
|
|
String userPath = toPath + "/" +user.getRealname()+EncryptHandler.decrypt(user.getIdCard());
|
|
|
File file = new File(userPath);
|
|
|
if (!file.exists()) {
|
|
|
@@ -1989,6 +1996,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
if (!CollectionUtils.isEmpty(recordVos)){
|
|
|
List<String> paths = new ArrayList<>();
|
|
|
recordVos.forEach(item -> {
|
|
|
+ item.setRealname(user.getRealname());
|
|
|
+ item.setIdCard(EncryptHandler.decrypt(user.getIdCard()));
|
|
|
+ item.setUploadTimeStr(DateUtils.timestampToDateFormat(item.getUploadTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
+ item.setSignStatusStr(ObjectUtils.isNotNull(item.getSignStatus()) && item.getSignStatus() == 1 ? "已签名":"未签名");
|
|
|
+ item.setStampStatusStr(ObjectUtils.isNotNull(item.getStampStatus()) && item.getStampStatus() == 1 ? "已盖章":"未盖章");
|
|
|
item.setStampStatus(0);
|
|
|
if (ObjectUtils.isNotNull(item.getKeyValue())){
|
|
|
JSONObject jsonObject = JSONObject.parseObject(item.getKeyValue());
|
|
|
@@ -2009,12 +2021,15 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ ExcelUtil<UserPromiseRecordVo> util5 = new ExcelUtil<>(UserPromiseRecordVo.class);
|
|
|
+ String commitmentPath = userPath + "/承诺书" ;
|
|
|
+ File file2 = new File(commitmentPath);
|
|
|
+ if (!file2.exists()) {
|
|
|
+ file2.mkdirs();
|
|
|
+ }
|
|
|
+ String path5 = commitmentPath + "/"+"承诺书.xlsx";
|
|
|
+ util5.exportEasyExcelUtil(recordVos, UserPromiseRecordVo.class,path5);
|
|
|
if (!CollectionUtils.isEmpty(paths)){
|
|
|
- String commitmentPath = userPath + "/承诺书" ;
|
|
|
- File file2 = new File(commitmentPath);
|
|
|
- if (!file2.exists()) {
|
|
|
- file2.mkdirs();
|
|
|
- }
|
|
|
for (String path : paths) {
|
|
|
try {
|
|
|
InputStream inputStream = ossService.getStreamByObject(path);
|
|
|
@@ -2039,8 +2054,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(userList) && userList.size() > 1){
|
|
|
+ ExcelUtil<UserDataExcelBo> list = new ExcelUtil<>(UserDataExcelBo.class);
|
|
|
+ String path = toPath + "/"+"学员列表.xlsx";
|
|
|
+ list.exportEasyExcelUtil(userList, UserDataExcelBo.class,path);
|
|
|
+ }
|
|
|
+
|
|
|
//压缩上传oss
|
|
|
- String zipPath = zhiyuan + "/zhongzheng-admin/src/main/resources/danganzip" + "/" + DateUtils.getNowTime() + ".zip";
|
|
|
+ String zipPath = zhiyuan + "/zhongzheng-admin/src/main/resources/danganzip" + "/" + "档案下载"+DateUtils.getNowTime() + ".zip";
|
|
|
File desc = new File(zipPath);
|
|
|
if (!desc.getParentFile().exists()) {
|
|
|
desc.getParentFile().mkdirs();
|
|
|
@@ -2056,7 +2077,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
OssRequest ossRequest = new OssRequest();
|
|
|
ossRequest.setGradeId(0L);
|
|
|
ossRequest.setUserId(0L);
|
|
|
- ossRequest.setImageStatus(7);
|
|
|
+ ossRequest.setImageStatus(12);
|
|
|
File file1 = new File(zipPath);
|
|
|
ossRequest.setFile(FileUtils.getMultipartFile(file1));
|
|
|
String upload = ossService.upload(ossRequest);
|