Browse Source

冲突解决

master
wxc 2 years ago
parent
commit
631bb51d5a
  1. 28
      mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java

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

@ -5,19 +5,17 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.constants.AppConstants;
import com.biutag.entity.setting.DictData;
import com.biutag.entity.system.Dept;
import com.biutag.enums.RoleEnum;
import com.biutag.exception.BusinessException;
import com.biutag.lan.config.AdminThreadLocal;
import com.biutag.lan.domain.*;
import com.biutag.lan.domain.bo.CoHandlingReq;
import com.biutag.lan.domain.bo.FlowAction;
import com.biutag.lan.domain.bo.InvalidCompletion;
import com.biutag.lan.domain.bo.MailOuter;
import com.biutag.lan.domain.bo.*;
import com.biutag.lan.domain.vo.MailApprovalVo;
import com.biutag.lan.domain.vo.MailExtensionApprovalVo;
import com.biutag.lan.domain.vo.MailFlowDetail;
@ -45,8 +43,6 @@ import java.time.ZoneId;
import java.util.*;
import java.util.stream.Collectors;
import static org.bouncycastle.asn1.iana.IANAObjectIdentifiers.mail;
@RequiredArgsConstructor
@Service
public class MailService extends ServiceImpl<MailMapper, Mail> {
@ -81,9 +77,6 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
private final MailCoHandlingService mailCoHandlingService;
@Resource
private MailSourceMapper mailSourceMapper;
@Lazy
@Autowired
private List<Flow> flowNodes;
@ -461,4 +454,19 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
return updateById(mail);
}
public boolean delete(MailIdValidate mailId) {
if (mailId.getId()==null || mailId.getId().equals("")){
return false;
}
Mail mail = baseMapper.selectById(mailId.getId());
if (mailId.getId()!=null||!mailId.getId().equals("")){
if (mail.getFlowKey().equals(FlowNodeEnum.FIRST_SIGN.getKey())||mail.getFlowKey().equals(FlowNodeEnum.FIRST_DISTRIBUTE.getKey())){
baseMapper.deleteById(mailId.getId());
mailSourceService.removeById(mailId.getId());
workMapper.delete(new LambdaQueryWrapper<Work>().eq(Work::getMailId, mailId.getId()));
}
}
return true;
}
}

Loading…
Cancel
Save