资料维护调整
This commit is contained in:
+18
@@ -144,6 +144,24 @@ public class PayDataDirectoryController extends JeroController<PayDataDirectory,
|
||||
payDataDirectoryService.save(payDataDirectory);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
/**
|
||||
* 添加
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
@AutoLog(value = "资料目录管理-新增定时父根会议目录")
|
||||
@ApiOperation(value = "资料目录管理-新增定时父根会议目录", notes = "资料目录管理-新增定时父根会议目录")
|
||||
@PostMapping(value = "/addMeetingDataDirectory")
|
||||
public Result<?> addMeetingDataDirectory() {
|
||||
PayDataDirectory payDataDirectory = new PayDataDirectory();
|
||||
payDataDirectory.setType(2);
|
||||
payDataDirectory.setParentId("0");
|
||||
payDataDirectory.setCreateBy("admin");
|
||||
payDataDirectory.setSort("0");
|
||||
|
||||
payDataDirectoryService.save(payDataDirectory);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
|
||||
+21
-8
@@ -264,10 +264,12 @@ public class PayDataFileController extends JeroController<PayDataFile, IPayDataF
|
||||
@RequestParam(name="fileIds") String fileIds,
|
||||
@RequestParam(name="dataType") int dataType,
|
||||
@RequestParam(name="oldFileId") String oldFileId) {
|
||||
iossFileService.removeById(oldFileId);
|
||||
payDataFileService.removeById(keyId);
|
||||
ArrayList<String> fileIdList = new ArrayList<>(Arrays.asList(fileIds.split(",")));
|
||||
fileIdList.remove(oldFileId);
|
||||
if(fileIdList.contains(oldFileId)&&fileIdList.size()>1){
|
||||
fileIdList.remove(oldFileId);
|
||||
iossFileService.removeById(oldFileId);
|
||||
}
|
||||
ArrayList<PayDataFile> list = new ArrayList<>();
|
||||
stringBuffer = new StringBuffer();
|
||||
findToTree(dataId, dataType);
|
||||
@@ -393,17 +395,19 @@ public class PayDataFileController extends JeroController<PayDataFile, IPayDataF
|
||||
@AutoLog(value = "分发")
|
||||
@ApiOperation(value="分发", notes="分发")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "FileName",value = "文件名"),
|
||||
@ApiImplicitParam(name = "fileId",value = "文件id"),
|
||||
@ApiImplicitParam(name = "mails", value = "邮箱地址,多个以逗号隔开")
|
||||
})
|
||||
@GetMapping(value = "/distribute")
|
||||
public Result<?> distribute(
|
||||
@RequestParam(name="FileName",required = true) String FileName,
|
||||
@RequestParam(name="fileId",required = true) String fileId,
|
||||
@RequestParam(name="mails",required = true) String mails
|
||||
) {
|
||||
StringBuilder stringBuilder = new StringBuilder("会议邮件注意查收");
|
||||
OSSFile byId = iossFileService.getById(fileId);
|
||||
String fileName = byId.getFileName();
|
||||
EmailSendMsgHandle emailHandle = new EmailSendMsgHandle();
|
||||
emailHandle.SendMsgAndFile(mails, stringBuilder.toString(), stringBuilder.toString(), FileName);
|
||||
emailHandle.SendMsgAndFile(mails, stringBuilder.toString(), stringBuilder.toString(), fileName);
|
||||
return Result.OK("分发成功!");
|
||||
}
|
||||
|
||||
@@ -416,17 +420,26 @@ public class PayDataFileController extends JeroController<PayDataFile, IPayDataF
|
||||
@AutoLog(value = "批量分发")
|
||||
@ApiOperation(value="批量分发", notes="批量分发")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "FileNameS",value = "文件名,多个以逗号隔开"),
|
||||
@ApiImplicitParam(name = "fileIds",value = "文件id,多个以逗号隔开"),
|
||||
@ApiImplicitParam(name = "mails", value = "邮箱地址,多个以逗号隔开")
|
||||
})
|
||||
@GetMapping(value = "/distributes")
|
||||
public Result<?> distributes(
|
||||
@RequestParam(name="FileNameS",required = true) String FileNameS,
|
||||
@RequestParam(name="fileIds",required = true) String fileIds,
|
||||
@RequestParam(name="mails",required = true) String mails
|
||||
) {
|
||||
StringBuilder stringBuilder = new StringBuilder("会议邮件注意查收");
|
||||
EmailSendMsgHandle emailHandle = new EmailSendMsgHandle();
|
||||
emailHandle.SendMsgAndFile(mails, stringBuilder.toString(), stringBuilder.toString(), FileNameS);
|
||||
ArrayList<String> fileList = new ArrayList<>(Arrays.asList(fileIds.split(",")));
|
||||
StringBuilder stringBuilder1 = new StringBuilder();
|
||||
for(String id:fileList){
|
||||
OSSFile byId = iossFileService.getById(id);
|
||||
String fileName = byId.getFileName();
|
||||
stringBuilder1.append(fileName+",");
|
||||
}
|
||||
int i = stringBuilder1.lastIndexOf(",");
|
||||
stringBuilder1.deleteCharAt(i);
|
||||
emailHandle.SendMsgAndFile(mails, stringBuilder.toString(), stringBuilder.toString(), stringBuilder1.toString());
|
||||
return Result.OK("分发成功!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user