Browse Source

BUG修复

master
wxc 2 years ago
parent
commit
e131d054b7
  1. 6
      mailbox-lan/src/main/java/com/biutag/lan/controller/MailController.java
  2. 20
      mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailCategoryInfo.java
  3. 4
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/QueryMailVo.java
  4. 2
      mailbox-lan/src/main/java/com/biutag/lan/service/MailFlowService.java
  5. 10
      mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java
  6. 5
      mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java

6
mailbox-lan/src/main/java/com/biutag/lan/controller/MailController.java

@ -90,4 +90,10 @@ public class MailController {
return AjaxResult.success(mailService.updateContactInfo(mailContactInfo));
}
@SaCheckPermission("mail:updateMailCategory")
@PutMapping("mailCategory")
public AjaxResult<Boolean> updateMailCategory(@RequestBody @Valid MailCategoryInfo mailCategoryInfo) {
return AjaxResult.success(mailService.updateMailCategory(mailCategoryInfo));
}
}

20
mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailCategoryInfo.java

@ -0,0 +1,20 @@
package com.biutag.lan.domain.bo;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class MailCategoryInfo {
private String mailId;
private String mailCategory;
private String mailFirstCategory;
private String mailSecondCategory;
private String mailThreeCategory;
}

4
mailbox-lan/src/main/java/com/biutag/lan/domain/vo/QueryMailVo.java

@ -145,8 +145,4 @@ public class QueryMailVo {
*/
private Integer extensionDays;
/**
* 办结时间
*/
private LocalDateTime completionTime;
}

2
mailbox-lan/src/main/java/com/biutag/lan/service/MailFlowService.java

@ -20,7 +20,7 @@ public class MailFlowService extends ServiceImpl<MailFlowMapper, MailFlow> {
public List<MailFlow> list(String mailId, List<String> flowKeys) {
LambdaQueryWrapper<MailFlow> queryWrapper = new LambdaQueryWrapper<MailFlow>().eq(MailFlow::getMailId, mailId)
.eq(MailFlow::getFlowKey, flowKeys)
.in(MailFlow::getFlowKey, flowKeys)
.orderByAsc(MailFlow::getCreateTime);
return list(queryWrapper);
}

10
mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java

@ -493,6 +493,16 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
return update(mailUpdateWrapper);
}
public boolean updateMailCategory(MailCategoryInfo mailCategoryInfo) {
LambdaUpdateWrapper<Mail> updateWrapper = new LambdaUpdateWrapper<Mail>()
.eq(Mail::getId, mailCategoryInfo.getMailId())
.set(Mail::getMailCategory, mailCategoryInfo.getMailCategory())
.set(Mail::getMailFirstCategory, mailCategoryInfo.getMailFirstCategory())
.set(Mail::getMailSecondCategory, mailCategoryInfo.getMailSecondCategory())
.set(Mail::getMailThreeCategory, mailCategoryInfo.getMailThreeCategory());
return update(updateWrapper);
}
public boolean delete(MailIdValidate mailId) {
Mail mail = baseMapper.selectById(mailId.getId());
if (mail == null){

5
mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java

@ -77,6 +77,8 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
private final MailFlowService mailFlowService;
private final MailMarkService mailMarkService;
public boolean saveBatch(List<MailSource> mailSources) {
LocalDateTime now = LocalDateTime.now();
@ -700,6 +702,7 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
List<MailAppeal> appealList = mailAppealMapper.selectList(null);
List<DictData> dictData = dictDataMapper.selectList(null);
List<LedgerExcel> list = new ArrayList<>();
int i = 1;
for (QueryMailVo q : data) {
Mail m = mailList.stream().filter(item -> item.getId().equals(q.getId())).findFirst().orElse(new Mail());
@ -712,7 +715,7 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
ledgerExcel.setMailTime(m.getMailTime());
ledgerExcel.setCreateTime(m.getCreateTime());
// 办结时间
ledgerExcel.setCompletionTime(q.getCompletionTime());
ledgerExcel.setCompletionTime(Optional.ofNullable(mailMarkService.getById(m.getId())).map(MailMark::getCompletionTime).orElse(null));
ledgerExcel.setContactName(nullToEmpty(q.getContactName()));
ledgerExcel.setContactPhone(nullToEmpty(q.getContactPhone()));
ledgerExcel.setSecondDeptName(nullToEmpty(m.getSecondDeptName()));

Loading…
Cancel
Save