|
@@ -43,6 +43,9 @@ public class AgreementLogic {
|
|
|
@Autowired
|
|
|
MailboxSendRecordService mailboxSendRecordService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ MailboxReceiveService mailboxReceiveService;
|
|
|
+
|
|
|
|
|
|
|
|
|
public IPage<AgreementVo> list(Page page, ZfireParamBean zfireParam) {
|
|
@@ -107,17 +110,24 @@ public class AgreementLogic {
|
|
|
agreementPolicyService.saveBatch(agreementAddUp.getAgreementPolicies());
|
|
|
}
|
|
|
|
|
|
- public Mailbox detailMailbox() {
|
|
|
+ public MailboxAdd detailMailbox() {
|
|
|
|
|
|
if (mailboxService.lambdaQuery().eq(Mailbox::getId,"1").count() < 1)
|
|
|
- return new Mailbox();
|
|
|
+ return new MailboxAdd();
|
|
|
+
|
|
|
+ Mailbox mailbox = mailboxService.getById("1");
|
|
|
+
|
|
|
+ MailboxAdd mailboxAdd = BeanUtil.toBean(mailbox, MailboxAdd.class);
|
|
|
+
|
|
|
+ List<MailboxReceive> list = mailboxReceiveService.lambdaQuery().eq(MailboxReceive::getMailboxId, "1").list();
|
|
|
|
|
|
+ mailboxAdd.setMailboxReceives(list);
|
|
|
|
|
|
- return mailboxService.getById("1");
|
|
|
+ return mailboxAdd;
|
|
|
|
|
|
}
|
|
|
|
|
|
- public void addDetail(Mailbox mailbox) {
|
|
|
+ public void addDetail(MailboxAdd mailbox) {
|
|
|
if (mailboxService.lambdaQuery().eq(Mailbox::getId,"1").count() < 1){
|
|
|
mailbox.setId("1");
|
|
|
mailbox.insert();
|
|
@@ -126,6 +136,15 @@ public class AgreementLogic {
|
|
|
mailbox.setId("1");
|
|
|
mailbox.updateById();
|
|
|
|
|
|
+ mailboxReceiveService.lambdaUpdate().eq(MailboxReceive::getMailboxId,"1").remove();
|
|
|
+
|
|
|
+ for (MailboxReceive mailboxReceive : mailbox.getMailboxReceives()) {
|
|
|
+
|
|
|
+ mailboxReceive.setMailboxId("id");
|
|
|
+ }
|
|
|
+
|
|
|
+ mailboxReceiveService.saveBatch(mailbox.getMailboxReceives());
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public IPage<MailBoxSendRecordVo> listMailBoxRecord(Page page, ZfireParamBean zfireParam) {
|