|
|
|
|
@ -26,6 +26,7 @@ import com.biutag.lan.enums.WorkType;
|
|
|
|
|
import com.biutag.lan.flow.*; |
|
|
|
|
import com.biutag.lan.flow.node.FirstSignFlow; |
|
|
|
|
import com.biutag.lan.mapper.MailMapper; |
|
|
|
|
import com.biutag.lan.mapper.WorkMapper; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
@ -53,6 +54,8 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
|
|
|
|
|
|
|
|
|
|
private final WorkService workService; |
|
|
|
|
|
|
|
|
|
private final WorkMapper workMapper; |
|
|
|
|
|
|
|
|
|
private final MailCountersignService mailCountersignService; |
|
|
|
|
|
|
|
|
|
private final IDeptService deptService; |
|
|
|
|
@ -365,4 +368,21 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
|
|
|
|
|
return exists(new LambdaQueryWrapper<Mail>().eq(Mail::getId, mailId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 信件转为待办 |
|
|
|
|
* |
|
|
|
|
* @param mailId |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public boolean change(String mailId) { |
|
|
|
|
Mail mail = getById(mailId); |
|
|
|
|
mail.setFlowKey(FlowNodeEnum.FIRST_SIGN.getKey()) |
|
|
|
|
.setMailState(MailState.processing.getValue()) |
|
|
|
|
.setFlowName(FlowNodeEnum.FIRST_SIGN.getFullName()) |
|
|
|
|
.setMailCategory("").setMailFirstCategory(""); |
|
|
|
|
Work work = workMapper.selectOne(new LambdaQueryWrapper<Work>().eq(Work::getMailId, mailId)); |
|
|
|
|
work.setWorkState(Work.State.todo.name()); |
|
|
|
|
workMapper.updateById(work); |
|
|
|
|
return updateById(mail); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|