提交 ef1eb20f 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码,后台体系[Spring Boot]

上级 9f05ad0a
......@@ -194,6 +194,42 @@ public class Account_accountServiceImpl extends EBSServiceImpl<Account_accountMa
@Override
@Transactional
public boolean remove(Long key) {
accountAbstractPaymentService.resetByWriteoffAccountId(key);
if(!ObjectUtils.isEmpty(accountAnalyticLineService.selectByGeneralAccountId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_analytic_line]数据,无法删除!","","");
accountBankStatementLineService.resetByAccountId(key);
accountCashRoundingService.resetByAccountId(key);
accountFiscalPositionAccountService.resetByAccountDestId(key);
accountFiscalPositionAccountService.resetByAccountSrcId(key);
accountInvoiceLineService.resetByAccountId(key);
accountInvoiceReportService.resetByAccountId(key);
accountInvoiceReportService.resetByAccountLineId(key);
accountInvoiceTaxService.resetByAccountId(key);
accountInvoiceService.resetByAccountId(key);
accountJournalService.resetByDefaultCreditAccountId(key);
accountJournalService.resetByDefaultDebitAccountId(key);
accountJournalService.resetByLossAccountId(key);
accountJournalService.resetByProfitAccountId(key);
accountMoveLineService.removeByAccountId(key);
accountPaymentService.resetByWriteoffAccountId(key);
accountReconcileModelService.removeByAccountId(key);
accountReconcileModelService.removeBySecondAccountId(key);
accountRegisterPaymentsService.resetByWriteoffAccountId(key);
if(!ObjectUtils.isEmpty(accountTaxService.selectByAccountId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_tax]数据,无法删除!","","");
accountTaxService.resetByCashBasisAccountId(key);
accountTaxService.resetByCashBasisBaseAccountId(key);
if(!ObjectUtils.isEmpty(accountTaxService.selectByRefundAccountId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_tax]数据,无法删除!","","");
hrExpenseService.resetByAccountId(key);
resCompanyService.resetByPropertyStockAccountInputCategId(key);
resCompanyService.resetByPropertyStockAccountOutputCategId(key);
resCompanyService.resetByPropertyStockValuationAccountId(key);
resCompanyService.resetByTransferAccountId(key);
saleAdvancePaymentInvService.resetByDepositAccountId(key);
stockChangeStandardPriceService.resetByCounterpartAccountId(key);
stockLocationService.resetByValuationInAccountId(key);
stockLocationService.resetByValuationOutAccountId(key);
boolean result=removeById(key);
return result ;
}
......@@ -201,6 +237,42 @@ public class Account_accountServiceImpl extends EBSServiceImpl<Account_accountMa
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAbstractPaymentService.resetByWriteoffAccountId(idList);
if(!ObjectUtils.isEmpty(accountAnalyticLineService.selectByGeneralAccountId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_analytic_line]数据,无法删除!","","");
accountBankStatementLineService.resetByAccountId(idList);
accountCashRoundingService.resetByAccountId(idList);
accountFiscalPositionAccountService.resetByAccountDestId(idList);
accountFiscalPositionAccountService.resetByAccountSrcId(idList);
accountInvoiceLineService.resetByAccountId(idList);
accountInvoiceReportService.resetByAccountId(idList);
accountInvoiceReportService.resetByAccountLineId(idList);
accountInvoiceTaxService.resetByAccountId(idList);
accountInvoiceService.resetByAccountId(idList);
accountJournalService.resetByDefaultCreditAccountId(idList);
accountJournalService.resetByDefaultDebitAccountId(idList);
accountJournalService.resetByLossAccountId(idList);
accountJournalService.resetByProfitAccountId(idList);
accountMoveLineService.removeByAccountId(idList);
accountPaymentService.resetByWriteoffAccountId(idList);
accountReconcileModelService.removeByAccountId(idList);
accountReconcileModelService.removeBySecondAccountId(idList);
accountRegisterPaymentsService.resetByWriteoffAccountId(idList);
if(!ObjectUtils.isEmpty(accountTaxService.selectByAccountId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_tax]数据,无法删除!","","");
accountTaxService.resetByCashBasisAccountId(idList);
accountTaxService.resetByCashBasisBaseAccountId(idList);
if(!ObjectUtils.isEmpty(accountTaxService.selectByRefundAccountId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_tax]数据,无法删除!","","");
hrExpenseService.resetByAccountId(idList);
resCompanyService.resetByPropertyStockAccountInputCategId(idList);
resCompanyService.resetByPropertyStockAccountOutputCategId(idList);
resCompanyService.resetByPropertyStockValuationAccountId(idList);
resCompanyService.resetByTransferAccountId(idList);
saleAdvancePaymentInvService.resetByDepositAccountId(idList);
stockChangeStandardPriceService.resetByCounterpartAccountId(idList);
stockLocationService.resetByValuationInAccountId(idList);
stockLocationService.resetByValuationOutAccountId(idList);
removeByIds(idList);
}
......
......@@ -146,6 +146,27 @@ public class Account_account_templateServiceImpl extends EBSServiceImpl<Account_
@Override
@Transactional
public boolean remove(Long key) {
accountChartTemplateService.resetByExpenseCurrencyExchangeAccountId(key);
accountChartTemplateService.resetByIncomeCurrencyExchangeAccountId(key);
accountChartTemplateService.resetByPropertyAccountExpenseCategId(key);
accountChartTemplateService.resetByPropertyAccountExpenseId(key);
accountChartTemplateService.resetByPropertyAccountIncomeCategId(key);
accountChartTemplateService.resetByPropertyAccountIncomeId(key);
accountChartTemplateService.resetByPropertyAccountPayableId(key);
accountChartTemplateService.resetByPropertyAccountReceivableId(key);
accountChartTemplateService.resetByPropertyStockAccountInputCategId(key);
accountChartTemplateService.resetByPropertyStockAccountOutputCategId(key);
accountChartTemplateService.resetByPropertyStockValuationAccountId(key);
accountFiscalPositionAccountTemplateService.resetByAccountDestId(key);
accountFiscalPositionAccountTemplateService.resetByAccountSrcId(key);
accountReconcileModelTemplateService.removeByAccountId(key);
accountReconcileModelTemplateService.removeBySecondAccountId(key);
if(!ObjectUtils.isEmpty(accountTaxTemplateService.selectByAccountId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_tax_template]数据,无法删除!","","");
accountTaxTemplateService.resetByCashBasisAccountId(key);
accountTaxTemplateService.resetByCashBasisBaseAccountId(key);
if(!ObjectUtils.isEmpty(accountTaxTemplateService.selectByRefundAccountId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_tax_template]数据,无法删除!","","");
boolean result=removeById(key);
return result ;
}
......@@ -153,6 +174,27 @@ public class Account_account_templateServiceImpl extends EBSServiceImpl<Account_
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountChartTemplateService.resetByExpenseCurrencyExchangeAccountId(idList);
accountChartTemplateService.resetByIncomeCurrencyExchangeAccountId(idList);
accountChartTemplateService.resetByPropertyAccountExpenseCategId(idList);
accountChartTemplateService.resetByPropertyAccountExpenseId(idList);
accountChartTemplateService.resetByPropertyAccountIncomeCategId(idList);
accountChartTemplateService.resetByPropertyAccountIncomeId(idList);
accountChartTemplateService.resetByPropertyAccountPayableId(idList);
accountChartTemplateService.resetByPropertyAccountReceivableId(idList);
accountChartTemplateService.resetByPropertyStockAccountInputCategId(idList);
accountChartTemplateService.resetByPropertyStockAccountOutputCategId(idList);
accountChartTemplateService.resetByPropertyStockValuationAccountId(idList);
accountFiscalPositionAccountTemplateService.resetByAccountDestId(idList);
accountFiscalPositionAccountTemplateService.resetByAccountSrcId(idList);
accountReconcileModelTemplateService.removeByAccountId(idList);
accountReconcileModelTemplateService.removeBySecondAccountId(idList);
if(!ObjectUtils.isEmpty(accountTaxTemplateService.selectByAccountId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_tax_template]数据,无法删除!","","");
accountTaxTemplateService.resetByCashBasisAccountId(idList);
accountTaxTemplateService.resetByCashBasisBaseAccountId(idList);
if(!ObjectUtils.isEmpty(accountTaxTemplateService.selectByRefundAccountId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_tax_template]数据,无法删除!","","");
removeByIds(idList);
}
......
......@@ -134,6 +134,9 @@ public class Account_account_typeServiceImpl extends EBSServiceImpl<Account_acco
@Override
@Transactional
public boolean remove(Long key) {
accountAccountTemplateService.resetByUserTypeId(key);
accountAccountService.resetByUserTypeId(key);
accountMoveLineService.resetByUserTypeId(key);
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +144,9 @@ public class Account_account_typeServiceImpl extends EBSServiceImpl<Account_acco
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAccountTemplateService.resetByUserTypeId(idList);
accountAccountService.resetByUserTypeId(idList);
accountMoveLineService.resetByUserTypeId(idList);
removeByIds(idList);
}
......
......@@ -173,6 +173,20 @@ public class Account_analytic_accountServiceImpl extends EBSServiceImpl<Account_
@Override
@Transactional
public boolean remove(Long key) {
accountAnalyticDistributionService.resetByAccountId(key);
if(!ObjectUtils.isEmpty(accountAnalyticLineService.selectByAccountId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_analytic_line]数据,无法删除!","","");
accountInvoiceLineService.resetByAccountAnalyticId(key);
accountInvoiceReportService.resetByAccountAnalyticId(key);
accountInvoiceTaxService.resetByAccountAnalyticId(key);
accountMoveLineService.resetByAnalyticAccountId(key);
accountReconcileModelService.resetByAnalyticAccountId(key);
accountReconcileModelService.resetBySecondAnalyticAccountId(key);
hrExpenseService.resetByAnalyticAccountId(key);
purchaseOrderLineService.resetByAccountAnalyticId(key);
purchaseReportService.resetByAccountAnalyticId(key);
saleOrderService.resetByAnalyticAccountId(key);
saleReportService.resetByAnalyticAccountId(key);
boolean result=removeById(key);
return result ;
}
......@@ -180,6 +194,20 @@ public class Account_analytic_accountServiceImpl extends EBSServiceImpl<Account_
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAnalyticDistributionService.resetByAccountId(idList);
if(!ObjectUtils.isEmpty(accountAnalyticLineService.selectByAccountId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_analytic_line]数据,无法删除!","","");
accountInvoiceLineService.resetByAccountAnalyticId(idList);
accountInvoiceReportService.resetByAccountAnalyticId(idList);
accountInvoiceTaxService.resetByAccountAnalyticId(idList);
accountMoveLineService.resetByAnalyticAccountId(idList);
accountReconcileModelService.resetByAnalyticAccountId(idList);
accountReconcileModelService.resetBySecondAnalyticAccountId(idList);
hrExpenseService.resetByAnalyticAccountId(idList);
purchaseOrderLineService.resetByAccountAnalyticId(idList);
purchaseReportService.resetByAccountAnalyticId(idList);
saleOrderService.resetByAnalyticAccountId(idList);
saleReportService.resetByAnalyticAccountId(idList);
removeByIds(idList);
}
......
......@@ -136,6 +136,9 @@ public class Account_analytic_groupServiceImpl extends EBSServiceImpl<Account_an
@Override
@Transactional
public boolean remove(Long key) {
accountAnalyticAccountService.resetByGroupId(key);
accountAnalyticGroupService.removeByParentId(key);
accountAnalyticLineService.resetByGroupId(key);
boolean result=removeById(key);
return result ;
}
......@@ -143,6 +146,9 @@ public class Account_analytic_groupServiceImpl extends EBSServiceImpl<Account_an
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAnalyticAccountService.resetByGroupId(idList);
accountAnalyticGroupService.removeByParentId(idList);
accountAnalyticLineService.resetByGroupId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,7 @@ public class Account_analytic_tagServiceImpl extends EBSServiceImpl<Account_anal
@Override
@Transactional
public boolean remove(Long key) {
accountAnalyticDistributionService.resetByTagId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +139,7 @@ public class Account_analytic_tagServiceImpl extends EBSServiceImpl<Account_anal
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAnalyticDistributionService.resetByTagId(idList);
removeByIds(idList);
}
......
......@@ -140,6 +140,8 @@ public class Account_bank_statementServiceImpl extends EBSServiceImpl<Account_ba
@Override
@Transactional
public boolean remove(Long key) {
accountBankStatementLineService.removeByStatementId(key);
accountMoveLineService.resetByStatementId(key);
boolean result=removeById(key);
return result ;
}
......@@ -147,6 +149,8 @@ public class Account_bank_statementServiceImpl extends EBSServiceImpl<Account_ba
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountBankStatementLineService.removeByStatementId(idList);
accountMoveLineService.resetByStatementId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,9 @@ public class Account_bank_statement_cashboxServiceImpl extends EBSServiceImpl<Ac
@Override
@Transactional
public boolean remove(Long key) {
accountBankStatementService.resetByCashboxEndId(key);
accountBankStatementService.resetByCashboxStartId(key);
accountCashboxLineService.resetByCashboxId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +141,9 @@ public class Account_bank_statement_cashboxServiceImpl extends EBSServiceImpl<Ac
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountBankStatementService.resetByCashboxEndId(idList);
accountBankStatementService.resetByCashboxStartId(idList);
accountCashboxLineService.resetByCashboxId(idList);
removeByIds(idList);
}
......
......@@ -149,6 +149,7 @@ public class Account_bank_statement_lineServiceImpl extends EBSServiceImpl<Accou
@Override
@Transactional
public boolean remove(Long key) {
accountMoveLineService.resetByStatementLineId(key);
boolean result=removeById(key);
return result ;
}
......@@ -156,6 +157,7 @@ public class Account_bank_statement_lineServiceImpl extends EBSServiceImpl<Accou
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountMoveLineService.resetByStatementLineId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,7 @@ public class Account_cash_roundingServiceImpl extends EBSServiceImpl<Account_cas
@Override
@Transactional
public boolean remove(Long key) {
accountInvoiceService.resetByCashRoundingId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +139,7 @@ public class Account_cash_roundingServiceImpl extends EBSServiceImpl<Account_cas
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountInvoiceService.resetByCashRoundingId(idList);
removeByIds(idList);
}
......
......@@ -148,6 +148,13 @@ public class Account_chart_templateServiceImpl extends EBSServiceImpl<Account_ch
@Override
@Transactional
public boolean remove(Long key) {
accountAccountTemplateService.resetByChartTemplateId(key);
accountChartTemplateService.resetByParentId(key);
accountFiscalPositionTemplateService.resetByChartTemplateId(key);
accountReconcileModelTemplateService.resetByChartTemplateId(key);
accountTaxTemplateService.resetByChartTemplateId(key);
resCompanyService.resetByChartTemplateId(key);
resConfigSettingsService.resetByChartTemplateId(key);
boolean result=removeById(key);
return result ;
}
......@@ -155,6 +162,13 @@ public class Account_chart_templateServiceImpl extends EBSServiceImpl<Account_ch
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAccountTemplateService.resetByChartTemplateId(idList);
accountChartTemplateService.resetByParentId(idList);
accountFiscalPositionTemplateService.resetByChartTemplateId(idList);
accountReconcileModelTemplateService.resetByChartTemplateId(idList);
accountTaxTemplateService.resetByChartTemplateId(idList);
resCompanyService.resetByChartTemplateId(idList);
resConfigSettingsService.resetByChartTemplateId(idList);
removeByIds(idList);
}
......
......@@ -155,6 +155,13 @@ public class Account_fiscal_positionServiceImpl extends EBSServiceImpl<Account_f
@Override
@Transactional
public boolean remove(Long key) {
accountFiscalPositionAccountService.removeByPositionId(key);
accountFiscalPositionTaxService.removeByPositionId(key);
accountInvoiceReportService.resetByFiscalPositionId(key);
accountInvoiceService.resetByFiscalPositionId(key);
purchaseOrderService.resetByFiscalPositionId(key);
purchaseReportService.resetByFiscalPositionId(key);
saleOrderService.resetByFiscalPositionId(key);
boolean result=removeById(key);
return result ;
}
......@@ -162,6 +169,13 @@ public class Account_fiscal_positionServiceImpl extends EBSServiceImpl<Account_f
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountFiscalPositionAccountService.removeByPositionId(idList);
accountFiscalPositionTaxService.removeByPositionId(idList);
accountInvoiceReportService.resetByFiscalPositionId(idList);
accountInvoiceService.resetByFiscalPositionId(idList);
purchaseOrderService.resetByFiscalPositionId(idList);
purchaseReportService.resetByFiscalPositionId(idList);
saleOrderService.resetByFiscalPositionId(idList);
removeByIds(idList);
}
......@@ -226,6 +240,15 @@ public class Account_fiscal_positionServiceImpl extends EBSServiceImpl<Account_f
public List<Account_fiscal_position> selectByCompanyId(Long id) {
return baseMapper.selectByCompanyId(id);
}
@Override
public void resetByCompanyId(Long id) {
this.update(new UpdateWrapper<Account_fiscal_position>().set("company_id",null).eq("company_id",id));
}
@Override
public void resetByCompanyId(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_fiscal_position>().set("company_id",null).in("company_id",ids));
}
@Override
public void removeByCompanyId(Long id) {
......@@ -236,6 +259,15 @@ public class Account_fiscal_positionServiceImpl extends EBSServiceImpl<Account_f
public List<Account_fiscal_position> selectByCountryGroupId(Long id) {
return baseMapper.selectByCountryGroupId(id);
}
@Override
public void resetByCountryGroupId(Long id) {
this.update(new UpdateWrapper<Account_fiscal_position>().set("country_group_id",null).eq("country_group_id",id));
}
@Override
public void resetByCountryGroupId(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_fiscal_position>().set("country_group_id",null).in("country_group_id",ids));
}
@Override
public void removeByCountryGroupId(Long id) {
......@@ -246,6 +278,15 @@ public class Account_fiscal_positionServiceImpl extends EBSServiceImpl<Account_f
public List<Account_fiscal_position> selectByCountryId(Long id) {
return baseMapper.selectByCountryId(id);
}
@Override
public void resetByCountryId(Long id) {
this.update(new UpdateWrapper<Account_fiscal_position>().set("country_id",null).eq("country_id",id));
}
@Override
public void resetByCountryId(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_fiscal_position>().set("country_id",null).in("country_id",ids));
}
@Override
public void removeByCountryId(Long id) {
......@@ -256,6 +297,15 @@ public class Account_fiscal_positionServiceImpl extends EBSServiceImpl<Account_f
public List<Account_fiscal_position> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void resetByCreateUid(Long id) {
this.update(new UpdateWrapper<Account_fiscal_position>().set("create_uid",null).eq("create_uid",id));
}
@Override
public void resetByCreateUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_fiscal_position>().set("create_uid",null).in("create_uid",ids));
}
@Override
public void removeByCreateUid(Long id) {
......@@ -266,6 +316,15 @@ public class Account_fiscal_positionServiceImpl extends EBSServiceImpl<Account_f
public List<Account_fiscal_position> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void resetByWriteUid(Long id) {
this.update(new UpdateWrapper<Account_fiscal_position>().set("write_uid",null).eq("write_uid",id));
}
@Override
public void resetByWriteUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_fiscal_position>().set("write_uid",null).in("write_uid",ids));
}
@Override
public void removeByWriteUid(Long id) {
......
......@@ -140,6 +140,8 @@ public class Account_fiscal_position_templateServiceImpl extends EBSServiceImpl<
@Override
@Transactional
public boolean remove(Long key) {
accountFiscalPositionAccountTemplateService.removeByPositionId(key);
accountFiscalPositionTaxTemplateService.removeByPositionId(key);
boolean result=removeById(key);
return result ;
}
......@@ -147,6 +149,8 @@ public class Account_fiscal_position_templateServiceImpl extends EBSServiceImpl<
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountFiscalPositionAccountTemplateService.removeByPositionId(idList);
accountFiscalPositionTaxTemplateService.removeByPositionId(idList);
removeByIds(idList);
}
......
......@@ -134,6 +134,8 @@ public class Account_full_reconcileServiceImpl extends EBSServiceImpl<Account_fu
@Override
@Transactional
public boolean remove(Long key) {
accountMoveLineService.resetByFullReconcileId(key);
accountPartialReconcileService.resetByFullReconcileId(key);
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +143,8 @@ public class Account_full_reconcileServiceImpl extends EBSServiceImpl<Account_fu
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountMoveLineService.resetByFullReconcileId(idList);
accountPartialReconcileService.resetByFullReconcileId(idList);
removeByIds(idList);
}
......
......@@ -133,6 +133,9 @@ public class Account_groupServiceImpl extends EBSServiceImpl<Account_groupMapper
@Override
@Transactional
public boolean remove(Long key) {
accountAccountTemplateService.resetByGroupId(key);
accountAccountService.resetByGroupId(key);
accountGroupService.removeByParentId(key);
boolean result=removeById(key);
return result ;
}
......@@ -140,6 +143,9 @@ public class Account_groupServiceImpl extends EBSServiceImpl<Account_groupMapper
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAccountTemplateService.resetByGroupId(idList);
accountAccountService.resetByGroupId(idList);
accountGroupService.removeByParentId(idList);
removeByIds(idList);
}
......
......@@ -137,6 +137,11 @@ public class Account_incotermsServiceImpl extends EBSServiceImpl<Account_incoter
@Override
@Transactional
public boolean remove(Long key) {
accountInvoiceService.resetByIncotermsId(key);
accountInvoiceService.resetByIncotermId(key);
purchaseOrderService.resetByIncotermId(key);
resCompanyService.resetByIncotermId(key);
saleOrderService.resetByIncoterm(key);
boolean result=removeById(key);
return result ;
}
......@@ -144,6 +149,11 @@ public class Account_incotermsServiceImpl extends EBSServiceImpl<Account_incoter
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountInvoiceService.resetByIncotermsId(idList);
accountInvoiceService.resetByIncotermId(idList);
purchaseOrderService.resetByIncotermId(idList);
resCompanyService.resetByIncotermId(idList);
saleOrderService.resetByIncoterm(idList);
removeByIds(idList);
}
......@@ -208,6 +218,15 @@ public class Account_incotermsServiceImpl extends EBSServiceImpl<Account_incoter
public List<Account_incoterms> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void resetByCreateUid(Long id) {
this.update(new UpdateWrapper<Account_incoterms>().set("create_uid",null).eq("create_uid",id));
}
@Override
public void resetByCreateUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_incoterms>().set("create_uid",null).in("create_uid",ids));
}
@Override
public void removeByCreateUid(Long id) {
......@@ -218,6 +237,15 @@ public class Account_incotermsServiceImpl extends EBSServiceImpl<Account_incoter
public List<Account_incoterms> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void resetByWriteUid(Long id) {
this.update(new UpdateWrapper<Account_incoterms>().set("write_uid",null).eq("write_uid",id));
}
@Override
public void resetByWriteUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_incoterms>().set("write_uid",null).in("write_uid",ids));
}
@Override
public void removeByWriteUid(Long id) {
......
......@@ -193,6 +193,14 @@ public class Account_invoiceServiceImpl extends EBSServiceImpl<Account_invoiceMa
@Override
@Transactional
public boolean remove(Long key) {
accountInvoiceLineService.removeByInvoiceId(key);
accountInvoiceReportService.resetByInvoiceId(key);
accountInvoiceTaxService.removeByInvoiceId(key);
accountInvoiceService.resetByRefundInvoiceId(key);
accountInvoiceService.resetByVendorBillId(key);
accountMoveLineService.resetByInvoiceId(key);
purchaseBillUnionService.resetByVendorBillId(key);
repairOrderService.resetByInvoiceId(key);
boolean result=removeById(key);
return result ;
}
......@@ -200,6 +208,14 @@ public class Account_invoiceServiceImpl extends EBSServiceImpl<Account_invoiceMa
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountInvoiceLineService.removeByInvoiceId(idList);
accountInvoiceReportService.resetByInvoiceId(idList);
accountInvoiceTaxService.removeByInvoiceId(idList);
accountInvoiceService.resetByRefundInvoiceId(idList);
accountInvoiceService.resetByVendorBillId(idList);
accountMoveLineService.resetByInvoiceId(idList);
purchaseBillUnionService.resetByVendorBillId(idList);
repairOrderService.resetByInvoiceId(idList);
removeByIds(idList);
}
......
......@@ -158,6 +158,8 @@ public class Account_invoice_lineServiceImpl extends EBSServiceImpl<Account_invo
@Override
@Transactional
public boolean remove(Long key) {
repairFeeService.resetByInvoiceLineId(key);
repairLineService.resetByInvoiceLineId(key);
boolean result=removeById(key);
return result ;
}
......@@ -165,6 +167,8 @@ public class Account_invoice_lineServiceImpl extends EBSServiceImpl<Account_invo
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
repairFeeService.resetByInvoiceLineId(idList);
repairLineService.resetByInvoiceLineId(idList);
removeByIds(idList);
}
......
......@@ -188,6 +188,27 @@ public class Account_journalServiceImpl extends EBSServiceImpl<Account_journalMa
@Override
@Transactional
public boolean remove(Long key) {
accountAbstractPaymentService.resetByJournalId(key);
accountBankStatementImportJournalCreationService.removeByJournalId(key);
accountBankStatementLineService.resetByJournalId(key);
accountBankStatementService.resetByJournalId(key);
accountInvoiceImportWizardService.resetByJournalId(key);
accountInvoiceReportService.resetByJournalId(key);
accountInvoiceService.resetByJournalId(key);
accountMoveLineService.resetByJournalId(key);
accountMoveReversalService.resetByJournalId(key);
accountMoveService.resetByJournalId(key);
accountPaymentService.resetByDestinationJournalId(key);
accountPaymentService.resetByJournalId(key);
accountReconcileModelService.removeByJournalId(key);
accountReconcileModelService.removeBySecondJournalId(key);
accountRegisterPaymentsService.resetByJournalId(key);
hrExpenseSheetRegisterPaymentWizardService.resetByJournalId(key);
hrExpenseSheetService.resetByBankJournalId(key);
hrExpenseSheetService.resetByJournalId(key);
paymentAcquirerService.resetByJournalId(key);
resCompanyService.resetByCurrencyExchangeJournalId(key);
resCompanyService.resetByTaxCashBasisJournalId(key);
boolean result=removeById(key);
return result ;
}
......@@ -195,6 +216,27 @@ public class Account_journalServiceImpl extends EBSServiceImpl<Account_journalMa
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAbstractPaymentService.resetByJournalId(idList);
accountBankStatementImportJournalCreationService.removeByJournalId(idList);
accountBankStatementLineService.resetByJournalId(idList);
accountBankStatementService.resetByJournalId(idList);
accountInvoiceImportWizardService.resetByJournalId(idList);
accountInvoiceReportService.resetByJournalId(idList);
accountInvoiceService.resetByJournalId(idList);
accountMoveLineService.resetByJournalId(idList);
accountMoveReversalService.resetByJournalId(idList);
accountMoveService.resetByJournalId(idList);
accountPaymentService.resetByDestinationJournalId(idList);
accountPaymentService.resetByJournalId(idList);
accountReconcileModelService.removeByJournalId(idList);
accountReconcileModelService.removeBySecondJournalId(idList);
accountRegisterPaymentsService.resetByJournalId(idList);
hrExpenseSheetRegisterPaymentWizardService.resetByJournalId(idList);
hrExpenseSheetService.resetByBankJournalId(idList);
hrExpenseSheetService.resetByJournalId(idList);
paymentAcquirerService.resetByJournalId(idList);
resCompanyService.resetByCurrencyExchangeJournalId(idList);
resCompanyService.resetByTaxCashBasisJournalId(idList);
removeByIds(idList);
}
......
......@@ -160,6 +160,14 @@ public class Account_moveServiceImpl extends EBSServiceImpl<Account_moveMapper,
@Override
@Transactional
public boolean remove(Long key) {
accountFullReconcileService.resetByExchangeMoveId(key);
if(!ObjectUtils.isEmpty(accountInvoiceService.selectByMoveId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_invoice]数据,无法删除!","","");
accountMoveLineService.removeByMoveId(key);
accountMoveService.resetByReverseEntryId(key);
if(!ObjectUtils.isEmpty(hrExpenseSheetService.selectByAccountMoveId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Hr_expense_sheet]数据,无法删除!","","");
resCompanyService.resetByAccountOpeningMoveId(key);
boolean result=removeById(key);
return result ;
}
......@@ -167,6 +175,14 @@ public class Account_moveServiceImpl extends EBSServiceImpl<Account_moveMapper,
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountFullReconcileService.resetByExchangeMoveId(idList);
if(!ObjectUtils.isEmpty(accountInvoiceService.selectByMoveId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_invoice]数据,无法删除!","","");
accountMoveLineService.removeByMoveId(idList);
accountMoveService.resetByReverseEntryId(idList);
if(!ObjectUtils.isEmpty(hrExpenseSheetService.selectByAccountMoveId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Hr_expense_sheet]数据,无法删除!","","");
resCompanyService.resetByAccountOpeningMoveId(idList);
removeByIds(idList);
}
......
......@@ -182,6 +182,9 @@ public class Account_move_lineServiceImpl extends EBSServiceImpl<Account_move_li
@Override
@Transactional
public boolean remove(Long key) {
accountAnalyticLineService.removeByMoveId(key);
accountPartialReconcileService.resetByCreditMoveId(key);
accountPartialReconcileService.resetByDebitMoveId(key);
boolean result=removeById(key);
return result ;
}
......@@ -189,6 +192,9 @@ public class Account_move_lineServiceImpl extends EBSServiceImpl<Account_move_li
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAnalyticLineService.removeByMoveId(idList);
accountPartialReconcileService.resetByCreditMoveId(idList);
accountPartialReconcileService.resetByDebitMoveId(idList);
removeByIds(idList);
}
......
......@@ -140,6 +140,7 @@ public class Account_partial_reconcileServiceImpl extends EBSServiceImpl<Account
@Override
@Transactional
public boolean remove(Long key) {
accountMoveService.resetByTaxCashBasisRecId(key);
boolean result=removeById(key);
return result ;
}
......@@ -147,6 +148,7 @@ public class Account_partial_reconcileServiceImpl extends EBSServiceImpl<Account
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountMoveService.resetByTaxCashBasisRecId(idList);
removeByIds(idList);
}
......
......@@ -152,6 +152,8 @@ public class Account_paymentServiceImpl extends EBSServiceImpl<Account_paymentMa
@Override
@Transactional
public boolean remove(Long key) {
accountMoveLineService.resetByPaymentId(key);
paymentTransactionService.resetByPaymentId(key);
boolean result=removeById(key);
return result ;
}
......@@ -159,6 +161,8 @@ public class Account_paymentServiceImpl extends EBSServiceImpl<Account_paymentMa
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountMoveLineService.resetByPaymentId(idList);
paymentTransactionService.resetByPaymentId(idList);
removeByIds(idList);
}
......
......@@ -137,6 +137,10 @@ public class Account_payment_methodServiceImpl extends EBSServiceImpl<Account_pa
@Override
@Transactional
public boolean remove(Long key) {
accountAbstractPaymentService.resetByPaymentMethodId(key);
accountPaymentService.resetByPaymentMethodId(key);
accountRegisterPaymentsService.resetByPaymentMethodId(key);
hrExpenseSheetRegisterPaymentWizardService.resetByPaymentMethodId(key);
boolean result=removeById(key);
return result ;
}
......@@ -144,6 +148,10 @@ public class Account_payment_methodServiceImpl extends EBSServiceImpl<Account_pa
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAbstractPaymentService.resetByPaymentMethodId(idList);
accountPaymentService.resetByPaymentMethodId(idList);
accountRegisterPaymentsService.resetByPaymentMethodId(idList);
hrExpenseSheetRegisterPaymentWizardService.resetByPaymentMethodId(idList);
removeByIds(idList);
}
......
......@@ -143,6 +143,11 @@ public class Account_payment_termServiceImpl extends EBSServiceImpl<Account_paym
@Override
@Transactional
public boolean remove(Long key) {
accountInvoiceReportService.resetByPaymentTermId(key);
accountInvoiceService.resetByPaymentTermId(key);
accountPaymentTermLineService.removeByPaymentId(key);
purchaseOrderService.resetByPaymentTermId(key);
saleOrderService.resetByPaymentTermId(key);
boolean result=removeById(key);
return result ;
}
......@@ -150,6 +155,11 @@ public class Account_payment_termServiceImpl extends EBSServiceImpl<Account_paym
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountInvoiceReportService.resetByPaymentTermId(idList);
accountInvoiceService.resetByPaymentTermId(idList);
accountPaymentTermLineService.removeByPaymentId(idList);
purchaseOrderService.resetByPaymentTermId(idList);
saleOrderService.resetByPaymentTermId(idList);
removeByIds(idList);
}
......
......@@ -149,6 +149,18 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
@Override
@Transactional
public boolean remove(Long key) {
accountFiscalPositionTaxService.resetByTaxDestId(key);
accountFiscalPositionTaxService.resetByTaxSrcId(key);
if(!ObjectUtils.isEmpty(accountInvoiceTaxService.selectByTaxId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_invoice_tax]数据,无法删除!","","");
if(!ObjectUtils.isEmpty(accountMoveLineService.selectByTaxLineId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_move_line]数据,无法删除!","","");
if(!ObjectUtils.isEmpty(accountReconcileModelService.selectBySecondTaxId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_reconcile_model]数据,无法删除!","","");
if(!ObjectUtils.isEmpty(accountReconcileModelService.selectByTaxId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_reconcile_model]数据,无法删除!","","");
resCompanyService.resetByAccountPurchaseTaxId(key);
resCompanyService.resetByAccountSaleTaxId(key);
boolean result=removeById(key);
return result ;
}
......@@ -156,6 +168,18 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountFiscalPositionTaxService.resetByTaxDestId(idList);
accountFiscalPositionTaxService.resetByTaxSrcId(idList);
if(!ObjectUtils.isEmpty(accountInvoiceTaxService.selectByTaxId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_invoice_tax]数据,无法删除!","","");
if(!ObjectUtils.isEmpty(accountMoveLineService.selectByTaxLineId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_move_line]数据,无法删除!","","");
if(!ObjectUtils.isEmpty(accountReconcileModelService.selectBySecondTaxId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_reconcile_model]数据,无法删除!","","");
if(!ObjectUtils.isEmpty(accountReconcileModelService.selectByTaxId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_reconcile_model]数据,无法删除!","","");
resCompanyService.resetByAccountPurchaseTaxId(idList);
resCompanyService.resetByAccountSaleTaxId(idList);
removeByIds(idList);
}
......@@ -220,6 +244,10 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
public List<Account_tax> selectByAccountId(Long id) {
return baseMapper.selectByAccountId(id);
}
@Override
public List<Account_tax> selectByAccountId(Collection<Long> ids) {
return this.list(new QueryWrapper<Account_tax>().in("id",ids));
}
@Override
public void removeByAccountId(Long id) {
......@@ -230,6 +258,15 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
public List<Account_tax> selectByCashBasisAccountId(Long id) {
return baseMapper.selectByCashBasisAccountId(id);
}
@Override
public void resetByCashBasisAccountId(Long id) {
this.update(new UpdateWrapper<Account_tax>().set("cash_basis_account_id",null).eq("cash_basis_account_id",id));
}
@Override
public void resetByCashBasisAccountId(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_tax>().set("cash_basis_account_id",null).in("cash_basis_account_id",ids));
}
@Override
public void removeByCashBasisAccountId(Long id) {
......@@ -240,6 +277,15 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
public List<Account_tax> selectByCashBasisBaseAccountId(Long id) {
return baseMapper.selectByCashBasisBaseAccountId(id);
}
@Override
public void resetByCashBasisBaseAccountId(Long id) {
this.update(new UpdateWrapper<Account_tax>().set("cash_basis_base_account_id",null).eq("cash_basis_base_account_id",id));
}
@Override
public void resetByCashBasisBaseAccountId(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_tax>().set("cash_basis_base_account_id",null).in("cash_basis_base_account_id",ids));
}
@Override
public void removeByCashBasisBaseAccountId(Long id) {
......@@ -250,6 +296,10 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
public List<Account_tax> selectByRefundAccountId(Long id) {
return baseMapper.selectByRefundAccountId(id);
}
@Override
public List<Account_tax> selectByRefundAccountId(Collection<Long> ids) {
return this.list(new QueryWrapper<Account_tax>().in("id",ids));
}
@Override
public void removeByRefundAccountId(Long id) {
......@@ -260,6 +310,15 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
public List<Account_tax> selectByTaxGroupId(Long id) {
return baseMapper.selectByTaxGroupId(id);
}
@Override
public void resetByTaxGroupId(Long id) {
this.update(new UpdateWrapper<Account_tax>().set("tax_group_id",null).eq("tax_group_id",id));
}
@Override
public void resetByTaxGroupId(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_tax>().set("tax_group_id",null).in("tax_group_id",ids));
}
@Override
public void removeByTaxGroupId(Long id) {
......@@ -270,6 +329,15 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
public List<Account_tax> selectByCompanyId(Long id) {
return baseMapper.selectByCompanyId(id);
}
@Override
public void resetByCompanyId(Long id) {
this.update(new UpdateWrapper<Account_tax>().set("company_id",null).eq("company_id",id));
}
@Override
public void resetByCompanyId(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_tax>().set("company_id",null).in("company_id",ids));
}
@Override
public void removeByCompanyId(Long id) {
......@@ -280,6 +348,15 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
public List<Account_tax> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void resetByCreateUid(Long id) {
this.update(new UpdateWrapper<Account_tax>().set("create_uid",null).eq("create_uid",id));
}
@Override
public void resetByCreateUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_tax>().set("create_uid",null).in("create_uid",ids));
}
@Override
public void removeByCreateUid(Long id) {
......@@ -290,6 +367,15 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
public List<Account_tax> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void resetByWriteUid(Long id) {
this.update(new UpdateWrapper<Account_tax>().set("write_uid",null).eq("write_uid",id));
}
@Override
public void resetByWriteUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Account_tax>().set("write_uid",null).in("write_uid",ids));
}
@Override
public void removeByWriteUid(Long id) {
......
......@@ -131,6 +131,8 @@ public class Account_tax_groupServiceImpl extends EBSServiceImpl<Account_tax_gro
@Override
@Transactional
public boolean remove(Long key) {
accountTaxTemplateService.resetByTaxGroupId(key);
accountTaxService.resetByTaxGroupId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +140,8 @@ public class Account_tax_groupServiceImpl extends EBSServiceImpl<Account_tax_gro
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountTaxTemplateService.resetByTaxGroupId(idList);
accountTaxService.resetByTaxGroupId(idList);
removeByIds(idList);
}
......
......@@ -140,6 +140,12 @@ public class Account_tax_templateServiceImpl extends EBSServiceImpl<Account_tax_
@Override
@Transactional
public boolean remove(Long key) {
accountFiscalPositionTaxTemplateService.resetByTaxDestId(key);
accountFiscalPositionTaxTemplateService.resetByTaxSrcId(key);
if(!ObjectUtils.isEmpty(accountReconcileModelTemplateService.selectBySecondTaxId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_reconcile_model_template]数据,无法删除!","","");
if(!ObjectUtils.isEmpty(accountReconcileModelTemplateService.selectByTaxId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_reconcile_model_template]数据,无法删除!","","");
boolean result=removeById(key);
return result ;
}
......@@ -147,6 +153,12 @@ public class Account_tax_templateServiceImpl extends EBSServiceImpl<Account_tax_
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountFiscalPositionTaxTemplateService.resetByTaxDestId(idList);
accountFiscalPositionTaxTemplateService.resetByTaxSrcId(idList);
if(!ObjectUtils.isEmpty(accountReconcileModelTemplateService.selectBySecondTaxId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_reconcile_model_template]数据,无法删除!","","");
if(!ObjectUtils.isEmpty(accountReconcileModelTemplateService.selectByTaxId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_reconcile_model_template]数据,无法删除!","","");
removeByIds(idList);
}
......
......@@ -140,6 +140,10 @@ public class Asset_assetServiceImpl extends EBSServiceImpl<Asset_assetMapper, As
@Override
@Transactional
public boolean remove(Long key) {
mroOrderService.resetByAssetId(key);
if(!ObjectUtils.isEmpty(mroPmMeterService.selectByAssetId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Mro_pm_meter]数据,无法删除!","","");
mroRequestService.resetByAssetId(key);
boolean result=removeById(key);
return result ;
}
......@@ -147,6 +151,10 @@ public class Asset_assetServiceImpl extends EBSServiceImpl<Asset_assetMapper, As
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
mroOrderService.resetByAssetId(idList);
if(!ObjectUtils.isEmpty(mroPmMeterService.selectByAssetId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Mro_pm_meter]数据,无法删除!","","");
mroRequestService.resetByAssetId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,10 @@ public class Asset_categoryServiceImpl extends EBSServiceImpl<Asset_categoryMapp
@Override
@Transactional
public boolean remove(Long key) {
if(!ObjectUtils.isEmpty(mroPmRuleService.selectByCategoryId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Mro_pm_rule]数据,无法删除!","","");
if(!ObjectUtils.isEmpty(mroTaskService.selectByCategoryId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Mro_task]数据,无法删除!","","");
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +142,10 @@ public class Asset_categoryServiceImpl extends EBSServiceImpl<Asset_categoryMapp
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
if(!ObjectUtils.isEmpty(mroPmRuleService.selectByCategoryId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Mro_pm_rule]数据,无法删除!","","");
if(!ObjectUtils.isEmpty(mroTaskService.selectByCategoryId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Mro_task]数据,无法删除!","","");
removeByIds(idList);
}
......
......@@ -128,6 +128,11 @@ public class Asset_stateServiceImpl extends EBSServiceImpl<Asset_stateMapper, As
@Override
@Transactional
public boolean remove(Long key) {
assetAssetService.resetByAccountingStateId(key);
assetAssetService.resetByFinanceStateId(key);
assetAssetService.resetByMaintenanceStateId(key);
assetAssetService.resetByManufactureStateId(key);
assetAssetService.resetByWarehouseStateId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +140,11 @@ public class Asset_stateServiceImpl extends EBSServiceImpl<Asset_stateMapper, As
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
assetAssetService.resetByAccountingStateId(idList);
assetAssetService.resetByFinanceStateId(idList);
assetAssetService.resetByMaintenanceStateId(idList);
assetAssetService.resetByManufactureStateId(idList);
assetAssetService.resetByWarehouseStateId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,7 @@ public class Base_automation_lead_testServiceImpl extends EBSServiceImpl<Base_au
@Override
@Transactional
public boolean remove(Long key) {
baseAutomationLineTestService.removeByLeadId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +139,7 @@ public class Base_automation_lead_testServiceImpl extends EBSServiceImpl<Base_au
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
baseAutomationLineTestService.removeByLeadId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,7 @@ public class Base_partner_merge_automatic_wizardServiceImpl extends EBSServiceIm
@Override
@Transactional
public boolean remove(Long key) {
basePartnerMergeLineService.resetByWizardId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +139,7 @@ public class Base_partner_merge_automatic_wizardServiceImpl extends EBSServiceIm
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
basePartnerMergeLineService.resetByWizardId(idList);
removeByIds(idList);
}
......
......@@ -128,6 +128,7 @@ public class Base_partner_merge_lineServiceImpl extends EBSServiceImpl<Base_part
@Override
@Transactional
public boolean remove(Long key) {
basePartnerMergeAutomaticWizardService.resetByCurrentLineId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Base_partner_merge_lineServiceImpl extends EBSServiceImpl<Base_part
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
basePartnerMergeAutomaticWizardService.resetByCurrentLineId(idList);
removeByIds(idList);
}
......
......@@ -134,6 +134,7 @@ public class Res_bankServiceImpl extends EBSServiceImpl<Res_bankMapper, Res_bank
@Override
@Transactional
public boolean remove(Long key) {
resPartnerBankService.resetByBankId(key);
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +142,7 @@ public class Res_bankServiceImpl extends EBSServiceImpl<Res_bankMapper, Res_bank
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
resPartnerBankService.resetByBankId(idList);
removeByIds(idList);
}
......
......@@ -170,6 +170,22 @@ public class Res_countryServiceImpl extends EBSServiceImpl<Res_countryMapper, Re
@Override
@Transactional
public boolean remove(Long key) {
accountFiscalPositionTemplateService.resetByCountryId(key);
accountFiscalPositionService.resetByCountryId(key);
accountInvoiceReportService.resetByCountryId(key);
crmActivityReportService.resetByCountryId(key);
crmLeadService.resetByCountryId(key);
eventEventService.resetByCountryId(key);
hrEmployeeService.resetByCountryId(key);
hrEmployeeService.resetByCountryOfBirth(key);
mailMassMailingContactService.resetByCountryId(key);
paymentTransactionService.resetByPartnerCountryId(key);
purchaseReportService.resetByCountryId(key);
resBankService.resetByCountry(key);
resCountryStateService.resetByCountryId(key);
if(!ObjectUtils.isEmpty(resPartnerService.selectByCountryId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Res_partner]数据,无法删除!","","");
saleReportService.resetByCountryId(key);
boolean result=removeById(key);
return result ;
}
......@@ -177,6 +193,22 @@ public class Res_countryServiceImpl extends EBSServiceImpl<Res_countryMapper, Re
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountFiscalPositionTemplateService.resetByCountryId(idList);
accountFiscalPositionService.resetByCountryId(idList);
accountInvoiceReportService.resetByCountryId(idList);
crmActivityReportService.resetByCountryId(idList);
crmLeadService.resetByCountryId(idList);
eventEventService.resetByCountryId(idList);
hrEmployeeService.resetByCountryId(idList);
hrEmployeeService.resetByCountryOfBirth(idList);
mailMassMailingContactService.resetByCountryId(idList);
paymentTransactionService.resetByPartnerCountryId(idList);
purchaseReportService.resetByCountryId(idList);
resBankService.resetByCountry(idList);
resCountryStateService.resetByCountryId(idList);
if(!ObjectUtils.isEmpty(resPartnerService.selectByCountryId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Res_partner]数据,无法删除!","","");
saleReportService.resetByCountryId(idList);
removeByIds(idList);
}
......@@ -241,6 +273,15 @@ public class Res_countryServiceImpl extends EBSServiceImpl<Res_countryMapper, Re
public List<Res_country> selectByCurrencyId(Long id) {
return baseMapper.selectByCurrencyId(id);
}
@Override
public void resetByCurrencyId(Long id) {
this.update(new UpdateWrapper<Res_country>().set("currency_id",null).eq("currency_id",id));
}
@Override
public void resetByCurrencyId(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_country>().set("currency_id",null).in("currency_id",ids));
}
@Override
public void removeByCurrencyId(Long id) {
......@@ -251,6 +292,15 @@ public class Res_countryServiceImpl extends EBSServiceImpl<Res_countryMapper, Re
public List<Res_country> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void resetByCreateUid(Long id) {
this.update(new UpdateWrapper<Res_country>().set("create_uid",null).eq("create_uid",id));
}
@Override
public void resetByCreateUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_country>().set("create_uid",null).in("create_uid",ids));
}
@Override
public void removeByCreateUid(Long id) {
......@@ -261,6 +311,15 @@ public class Res_countryServiceImpl extends EBSServiceImpl<Res_countryMapper, Re
public List<Res_country> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void resetByWriteUid(Long id) {
this.update(new UpdateWrapper<Res_country>().set("write_uid",null).eq("write_uid",id));
}
@Override
public void resetByWriteUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_country>().set("write_uid",null).in("write_uid",ids));
}
@Override
public void removeByWriteUid(Long id) {
......
......@@ -131,6 +131,8 @@ public class Res_country_groupServiceImpl extends EBSServiceImpl<Res_country_gro
@Override
@Transactional
public boolean remove(Long key) {
accountFiscalPositionTemplateService.resetByCountryGroupId(key);
accountFiscalPositionService.resetByCountryGroupId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +140,8 @@ public class Res_country_groupServiceImpl extends EBSServiceImpl<Res_country_gro
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountFiscalPositionTemplateService.resetByCountryGroupId(idList);
accountFiscalPositionService.resetByCountryGroupId(idList);
removeByIds(idList);
}
......@@ -202,6 +206,15 @@ public class Res_country_groupServiceImpl extends EBSServiceImpl<Res_country_gro
public List<Res_country_group> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void resetByCreateUid(Long id) {
this.update(new UpdateWrapper<Res_country_group>().set("create_uid",null).eq("create_uid",id));
}
@Override
public void resetByCreateUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_country_group>().set("create_uid",null).in("create_uid",ids));
}
@Override
public void removeByCreateUid(Long id) {
......@@ -212,6 +225,15 @@ public class Res_country_groupServiceImpl extends EBSServiceImpl<Res_country_gro
public List<Res_country_group> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void resetByWriteUid(Long id) {
this.update(new UpdateWrapper<Res_country_group>().set("write_uid",null).eq("write_uid",id));
}
@Override
public void resetByWriteUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_country_group>().set("write_uid",null).in("write_uid",ids));
}
@Override
public void removeByWriteUid(Long id) {
......
......@@ -137,6 +137,10 @@ public class Res_country_stateServiceImpl extends EBSServiceImpl<Res_country_sta
@Override
@Transactional
public boolean remove(Long key) {
crmLeadService.resetByStateId(key);
resBankService.resetByState(key);
if(!ObjectUtils.isEmpty(resPartnerService.selectByStateId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Res_partner]数据,无法删除!","","");
boolean result=removeById(key);
return result ;
}
......@@ -144,6 +148,10 @@ public class Res_country_stateServiceImpl extends EBSServiceImpl<Res_country_sta
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
crmLeadService.resetByStateId(idList);
resBankService.resetByState(idList);
if(!ObjectUtils.isEmpty(resPartnerService.selectByStateId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Res_partner]数据,无法删除!","","");
removeByIds(idList);
}
......@@ -208,6 +216,15 @@ public class Res_country_stateServiceImpl extends EBSServiceImpl<Res_country_sta
public List<Res_country_state> selectByCountryId(Long id) {
return baseMapper.selectByCountryId(id);
}
@Override
public void resetByCountryId(Long id) {
this.update(new UpdateWrapper<Res_country_state>().set("country_id",null).eq("country_id",id));
}
@Override
public void resetByCountryId(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_country_state>().set("country_id",null).in("country_id",ids));
}
@Override
public void removeByCountryId(Long id) {
......@@ -218,6 +235,15 @@ public class Res_country_stateServiceImpl extends EBSServiceImpl<Res_country_sta
public List<Res_country_state> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void resetByCreateUid(Long id) {
this.update(new UpdateWrapper<Res_country_state>().set("create_uid",null).eq("create_uid",id));
}
@Override
public void resetByCreateUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_country_state>().set("create_uid",null).in("create_uid",ids));
}
@Override
public void removeByCreateUid(Long id) {
......@@ -228,6 +254,15 @@ public class Res_country_stateServiceImpl extends EBSServiceImpl<Res_country_sta
public List<Res_country_state> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void resetByWriteUid(Long id) {
this.update(new UpdateWrapper<Res_country_state>().set("write_uid",null).eq("write_uid",id));
}
@Override
public void resetByWriteUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_country_state>().set("write_uid",null).in("write_uid",ids));
}
@Override
public void removeByWriteUid(Long id) {
......
......@@ -233,6 +233,43 @@ public class Res_currencyServiceImpl extends EBSServiceImpl<Res_currencyMapper,
@Override
@Transactional
public boolean remove(Long key) {
accountAbstractPaymentService.resetByCurrencyId(key);
accountAccountTemplateService.resetByCurrencyId(key);
accountAccountService.resetByCurrencyId(key);
accountAnalyticLineService.resetByCurrencyId(key);
accountBankStatementLineService.resetByCurrencyId(key);
accountChartTemplateService.resetByCurrencyId(key);
accountInvoiceLineService.resetByCurrencyId(key);
accountInvoiceReportService.resetByCurrencyId(key);
accountInvoiceTaxService.resetByCurrencyId(key);
accountInvoiceService.resetByCurrencyId(key);
accountJournalService.resetByCurrencyId(key);
accountMoveLineService.resetByCompanyCurrencyId(key);
accountMoveLineService.resetByCurrencyId(key);
accountMoveService.resetByCurrencyId(key);
accountPartialReconcileService.resetByCurrencyId(key);
accountPaymentService.resetByCurrencyId(key);
accountRegisterPaymentsService.resetByCurrencyId(key);
baseImportTestsModelsComplexService.resetByCurrencyId(key);
baseImportTestsModelsFloatService.resetByCurrencyId(key);
hrExpenseSheetRegisterPaymentWizardService.resetByCurrencyId(key);
hrExpenseSheetService.resetByCurrencyId(key);
hrExpenseService.resetByCompanyCurrencyId(key);
hrExpenseService.resetByCurrencyId(key);
lunchOrderService.resetByCurrencyId(key);
paymentTransactionService.resetByCurrencyId(key);
productPricelistItemService.resetByCurrencyId(key);
productPricelistService.resetByCurrencyId(key);
productSupplierinfoService.resetByCurrencyId(key);
purchaseBillUnionService.resetByCurrencyId(key);
purchaseOrderLineService.resetByCurrencyId(key);
purchaseOrderService.resetByCurrencyId(key);
purchaseReportService.resetByCurrencyId(key);
resCompanyService.resetByCurrencyId(key);
resCountryService.resetByCurrencyId(key);
resCurrencyRateService.resetByCurrencyId(key);
resPartnerBankService.resetByCurrencyId(key);
saleOrderLineService.resetByCurrencyId(key);
boolean result=removeById(key);
return result ;
}
......@@ -240,6 +277,43 @@ public class Res_currencyServiceImpl extends EBSServiceImpl<Res_currencyMapper,
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAbstractPaymentService.resetByCurrencyId(idList);
accountAccountTemplateService.resetByCurrencyId(idList);
accountAccountService.resetByCurrencyId(idList);
accountAnalyticLineService.resetByCurrencyId(idList);
accountBankStatementLineService.resetByCurrencyId(idList);
accountChartTemplateService.resetByCurrencyId(idList);
accountInvoiceLineService.resetByCurrencyId(idList);
accountInvoiceReportService.resetByCurrencyId(idList);
accountInvoiceTaxService.resetByCurrencyId(idList);
accountInvoiceService.resetByCurrencyId(idList);
accountJournalService.resetByCurrencyId(idList);
accountMoveLineService.resetByCompanyCurrencyId(idList);
accountMoveLineService.resetByCurrencyId(idList);
accountMoveService.resetByCurrencyId(idList);
accountPartialReconcileService.resetByCurrencyId(idList);
accountPaymentService.resetByCurrencyId(idList);
accountRegisterPaymentsService.resetByCurrencyId(idList);
baseImportTestsModelsComplexService.resetByCurrencyId(idList);
baseImportTestsModelsFloatService.resetByCurrencyId(idList);
hrExpenseSheetRegisterPaymentWizardService.resetByCurrencyId(idList);
hrExpenseSheetService.resetByCurrencyId(idList);
hrExpenseService.resetByCompanyCurrencyId(idList);
hrExpenseService.resetByCurrencyId(idList);
lunchOrderService.resetByCurrencyId(idList);
paymentTransactionService.resetByCurrencyId(idList);
productPricelistItemService.resetByCurrencyId(idList);
productPricelistService.resetByCurrencyId(idList);
productSupplierinfoService.resetByCurrencyId(idList);
purchaseBillUnionService.resetByCurrencyId(idList);
purchaseOrderLineService.resetByCurrencyId(idList);
purchaseOrderService.resetByCurrencyId(idList);
purchaseReportService.resetByCurrencyId(idList);
resCompanyService.resetByCurrencyId(idList);
resCountryService.resetByCurrencyId(idList);
resCurrencyRateService.resetByCurrencyId(idList);
resPartnerBankService.resetByCurrencyId(idList);
saleOrderLineService.resetByCurrencyId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,8 @@ public class Res_groupsServiceImpl extends EBSServiceImpl<Res_groupsMapper, Res_
@Override
@Transactional
public boolean remove(Long key) {
digestTipService.resetByGroupId(key);
mailChannelService.resetByGroupPublicId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +140,8 @@ public class Res_groupsServiceImpl extends EBSServiceImpl<Res_groupsMapper, Res_
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
digestTipService.resetByGroupId(idList);
mailChannelService.resetByGroupPublicId(idList);
removeByIds(idList);
}
......
......@@ -167,6 +167,17 @@ public class Res_partner_bankServiceImpl extends EBSServiceImpl<Res_partner_bank
@Override
@Transactional
public boolean remove(Long key) {
accountAbstractPaymentService.resetByPartnerBankAccountId(key);
accountBankStatementLineService.resetByBankAccountId(key);
accountInvoiceReportService.resetByPartnerBankId(key);
accountInvoiceService.resetByPartnerBankId(key);
if(!ObjectUtils.isEmpty(accountJournalService.selectByBankAccountId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_journal]数据,无法删除!","","");
accountPaymentService.resetByPartnerBankAccountId(key);
accountRegisterPaymentsService.resetByPartnerBankAccountId(key);
accountSetupBankManualConfigService.removeByResPartnerBankId(key);
hrEmployeeService.resetByBankAccountId(key);
hrExpenseSheetRegisterPaymentWizardService.resetByPartnerBankAccountId(key);
boolean result=removeById(key);
return result ;
}
......@@ -174,6 +185,17 @@ public class Res_partner_bankServiceImpl extends EBSServiceImpl<Res_partner_bank
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountAbstractPaymentService.resetByPartnerBankAccountId(idList);
accountBankStatementLineService.resetByBankAccountId(idList);
accountInvoiceReportService.resetByPartnerBankId(idList);
accountInvoiceService.resetByPartnerBankId(idList);
if(!ObjectUtils.isEmpty(accountJournalService.selectByBankAccountId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Account_journal]数据,无法删除!","","");
accountPaymentService.resetByPartnerBankAccountId(idList);
accountRegisterPaymentsService.resetByPartnerBankAccountId(idList);
accountSetupBankManualConfigService.removeByResPartnerBankId(idList);
hrEmployeeService.resetByBankAccountId(idList);
hrExpenseSheetRegisterPaymentWizardService.resetByPartnerBankAccountId(idList);
removeByIds(idList);
}
......
......@@ -133,6 +133,7 @@ public class Res_partner_categoryServiceImpl extends EBSServiceImpl<Res_partner_
@Override
@Transactional
public boolean remove(Long key) {
resPartnerCategoryService.removeByParentId(key);
boolean result=removeById(key);
return result ;
}
......@@ -140,6 +141,7 @@ public class Res_partner_categoryServiceImpl extends EBSServiceImpl<Res_partner_
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
resPartnerCategoryService.removeByParentId(idList);
removeByIds(idList);
}
......@@ -204,6 +206,10 @@ public class Res_partner_categoryServiceImpl extends EBSServiceImpl<Res_partner_
public List<Res_partner_category> selectByParentId(Long id) {
return baseMapper.selectByParentId(id);
}
@Override
public void removeByParentId(Collection<Long> ids) {
this.remove(new QueryWrapper<Res_partner_category>().in("parent_id",ids));
}
@Override
public void removeByParentId(Long id) {
......@@ -214,6 +220,15 @@ public class Res_partner_categoryServiceImpl extends EBSServiceImpl<Res_partner_
public List<Res_partner_category> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void resetByCreateUid(Long id) {
this.update(new UpdateWrapper<Res_partner_category>().set("create_uid",null).eq("create_uid",id));
}
@Override
public void resetByCreateUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_partner_category>().set("create_uid",null).in("create_uid",ids));
}
@Override
public void removeByCreateUid(Long id) {
......@@ -224,6 +239,15 @@ public class Res_partner_categoryServiceImpl extends EBSServiceImpl<Res_partner_
public List<Res_partner_category> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void resetByWriteUid(Long id) {
this.update(new UpdateWrapper<Res_partner_category>().set("write_uid",null).eq("write_uid",id));
}
@Override
public void resetByWriteUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_partner_category>().set("write_uid",null).in("write_uid",ids));
}
@Override
public void removeByWriteUid(Long id) {
......
......@@ -128,6 +128,7 @@ public class Res_partner_industryServiceImpl extends EBSServiceImpl<Res_partner_
@Override
@Transactional
public boolean remove(Long key) {
resPartnerService.resetByIndustryId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Res_partner_industryServiceImpl extends EBSServiceImpl<Res_partner_
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
resPartnerService.resetByIndustryId(idList);
removeByIds(idList);
}
......
......@@ -190,7 +190,6 @@ public class Res_partner_res_partner_category_relServiceImpl extends EBSServiceI
public List<Res_partner_res_partner_category_rel> selectByCategoryId(Long id) {
return baseMapper.selectByCategoryId(id);
}
@Override
public void removeByCategoryId(Long id) {
this.remove(new QueryWrapper<Res_partner_res_partner_category_rel>().eq("category_id",id));
......@@ -200,7 +199,6 @@ public class Res_partner_res_partner_category_relServiceImpl extends EBSServiceI
public List<Res_partner_res_partner_category_rel> selectByPartnerId(Long id) {
return baseMapper.selectByPartnerId(id);
}
@Override
public void removeByPartnerId(Long id) {
this.remove(new QueryWrapper<Res_partner_res_partner_category_rel>().eq("partner_id",id));
......
......@@ -134,6 +134,9 @@ public class Res_partner_titleServiceImpl extends EBSServiceImpl<Res_partner_tit
@Override
@Transactional
public boolean remove(Long key) {
crmLeadService.resetByTitle(key);
mailMassMailingContactService.resetByTitleId(key);
resPartnerService.resetByTitle(key);
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +144,9 @@ public class Res_partner_titleServiceImpl extends EBSServiceImpl<Res_partner_tit
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
crmLeadService.resetByTitle(idList);
mailMassMailingContactService.resetByTitleId(idList);
resPartnerService.resetByTitle(idList);
removeByIds(idList);
}
......@@ -205,6 +211,15 @@ public class Res_partner_titleServiceImpl extends EBSServiceImpl<Res_partner_tit
public List<Res_partner_title> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void resetByCreateUid(Long id) {
this.update(new UpdateWrapper<Res_partner_title>().set("create_uid",null).eq("create_uid",id));
}
@Override
public void resetByCreateUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_partner_title>().set("create_uid",null).in("create_uid",ids));
}
@Override
public void removeByCreateUid(Long id) {
......@@ -215,6 +230,15 @@ public class Res_partner_titleServiceImpl extends EBSServiceImpl<Res_partner_tit
public List<Res_partner_title> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void resetByWriteUid(Long id) {
this.update(new UpdateWrapper<Res_partner_title>().set("write_uid",null).eq("write_uid",id));
}
@Override
public void resetByWriteUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Res_partner_title>().set("write_uid",null).in("write_uid",ids));
}
@Override
public void removeByWriteUid(Long id) {
......
......@@ -197,7 +197,6 @@ public class Res_supplier_res_partner_category_relServiceImpl extends EBSService
public List<Res_supplier_res_partner_category_rel> selectByCategoryId(Long id) {
return baseMapper.selectByCategoryId(id);
}
@Override
public void removeByCategoryId(Long id) {
this.remove(new QueryWrapper<Res_supplier_res_partner_category_rel>().eq("category_id",id));
......@@ -207,7 +206,6 @@ public class Res_supplier_res_partner_category_relServiceImpl extends EBSService
public List<Res_supplier_res_partner_category_rel> selectByPartnerId(Long id) {
return baseMapper.selectByPartnerId(id);
}
@Override
public void removeByPartnerId(Long id) {
this.remove(new QueryWrapper<Res_supplier_res_partner_category_rel>().eq("partner_id",id));
......
......@@ -128,6 +128,7 @@ public class Base_import_tests_models_m2o_relatedServiceImpl extends EBSServiceI
@Override
@Transactional
public boolean remove(Long key) {
baseImportTestsModelsM2oService.resetByValue(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Base_import_tests_models_m2o_relatedServiceImpl extends EBSServiceI
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
baseImportTestsModelsM2oService.resetByValue(idList);
removeByIds(idList);
}
......
......@@ -128,6 +128,7 @@ public class Base_import_tests_models_m2o_required_relatedServiceImpl extends EB
@Override
@Transactional
public boolean remove(Long key) {
baseImportTestsModelsM2oRequiredService.resetByValue(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Base_import_tests_models_m2o_required_relatedServiceImpl extends EB
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
baseImportTestsModelsM2oRequiredService.resetByValue(idList);
removeByIds(idList);
}
......
......@@ -128,6 +128,7 @@ public class Base_import_tests_models_o2mServiceImpl extends EBSServiceImpl<Base
@Override
@Transactional
public boolean remove(Long key) {
baseImportTestsModelsO2mChildService.resetByParentId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Base_import_tests_models_o2mServiceImpl extends EBSServiceImpl<Base
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
baseImportTestsModelsO2mChildService.resetByParentId(idList);
removeByIds(idList);
}
......
......@@ -140,6 +140,9 @@ public class Calendar_eventServiceImpl extends EBSServiceImpl<Calendar_eventMapp
@Override
@Transactional
public boolean remove(Long key) {
calendarAttendeeService.removeByEventId(key);
hrLeaveService.resetByMeetingId(key);
mailActivityService.removeByCalendarEventId(key);
boolean result=removeById(key);
return result ;
}
......@@ -147,6 +150,9 @@ public class Calendar_eventServiceImpl extends EBSServiceImpl<Calendar_eventMapp
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
calendarAttendeeService.removeByEventId(idList);
hrLeaveService.resetByMeetingId(idList);
mailActivityService.removeByCalendarEventId(idList);
removeByIds(idList);
}
......
......@@ -128,6 +128,7 @@ public class Calendar_event_typeServiceImpl extends EBSServiceImpl<Calendar_even
@Override
@Transactional
public boolean remove(Long key) {
hrLeaveTypeService.resetByCategId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Calendar_event_typeServiceImpl extends EBSServiceImpl<Calendar_even
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrLeaveTypeService.resetByCategId(idList);
removeByIds(idList);
}
......
......@@ -167,6 +167,9 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
@Override
@Transactional
public boolean remove(Long key) {
calendarEventService.resetByOpportunityId(key);
crmActivityReportService.resetByLeadId(key);
saleOrderService.resetByOpportunityId(key);
boolean result=removeById(key);
return result ;
}
......@@ -174,6 +177,9 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
calendarEventService.resetByOpportunityId(idList);
crmActivityReportService.resetByLeadId(idList);
saleOrderService.resetByOpportunityId(idList);
removeByIds(idList);
}
......@@ -238,6 +244,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByLostReason(Long id) {
return baseMapper.selectByLostReason(id);
}
@Override
public void resetByLostReason(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("lost_reason",null).eq("lost_reason",id));
}
@Override
public void resetByLostReason(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("lost_reason",null).in("lost_reason",ids));
}
@Override
public void removeByLostReason(Long id) {
......@@ -248,6 +263,10 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByStageId(Long id) {
return baseMapper.selectByStageId(id);
}
@Override
public List<Crm_lead> selectByStageId(Collection<Long> ids) {
return this.list(new QueryWrapper<Crm_lead>().in("id",ids));
}
@Override
public void removeByStageId(Long id) {
......@@ -258,6 +277,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByTeamId(Long id) {
return baseMapper.selectByTeamId(id);
}
@Override
public void resetByTeamId(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("team_id",null).eq("team_id",id));
}
@Override
public void resetByTeamId(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("team_id",null).in("team_id",ids));
}
@Override
public void removeByTeamId(Long id) {
......@@ -268,6 +296,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByCompanyId(Long id) {
return baseMapper.selectByCompanyId(id);
}
@Override
public void resetByCompanyId(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("company_id",null).eq("company_id",id));
}
@Override
public void resetByCompanyId(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("company_id",null).in("company_id",ids));
}
@Override
public void removeByCompanyId(Long id) {
......@@ -278,6 +315,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByStateId(Long id) {
return baseMapper.selectByStateId(id);
}
@Override
public void resetByStateId(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("state_id",null).eq("state_id",id));
}
@Override
public void resetByStateId(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("state_id",null).in("state_id",ids));
}
@Override
public void removeByStateId(Long id) {
......@@ -288,6 +334,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByCountryId(Long id) {
return baseMapper.selectByCountryId(id);
}
@Override
public void resetByCountryId(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("country_id",null).eq("country_id",id));
}
@Override
public void resetByCountryId(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("country_id",null).in("country_id",ids));
}
@Override
public void removeByCountryId(Long id) {
......@@ -298,6 +353,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByTitle(Long id) {
return baseMapper.selectByTitle(id);
}
@Override
public void resetByTitle(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("title",null).eq("title",id));
}
@Override
public void resetByTitle(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("title",null).in("title",ids));
}
@Override
public void removeByTitle(Long id) {
......@@ -308,6 +372,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByPartnerId(Long id) {
return baseMapper.selectByPartnerId(id);
}
@Override
public void resetByPartnerId(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("partner_id",null).eq("partner_id",id));
}
@Override
public void resetByPartnerId(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("partner_id",null).in("partner_id",ids));
}
@Override
public void removeByPartnerId(Long id) {
......@@ -318,6 +391,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void resetByCreateUid(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("create_uid",null).eq("create_uid",id));
}
@Override
public void resetByCreateUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("create_uid",null).in("create_uid",ids));
}
@Override
public void removeByCreateUid(Long id) {
......@@ -328,6 +410,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByUserId(Long id) {
return baseMapper.selectByUserId(id);
}
@Override
public void resetByUserId(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("user_id",null).eq("user_id",id));
}
@Override
public void resetByUserId(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("user_id",null).in("user_id",ids));
}
@Override
public void removeByUserId(Long id) {
......@@ -338,6 +429,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void resetByWriteUid(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("write_uid",null).eq("write_uid",id));
}
@Override
public void resetByWriteUid(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("write_uid",null).in("write_uid",ids));
}
@Override
public void removeByWriteUid(Long id) {
......@@ -348,6 +448,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByCampaignId(Long id) {
return baseMapper.selectByCampaignId(id);
}
@Override
public void resetByCampaignId(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("campaign_id",null).eq("campaign_id",id));
}
@Override
public void resetByCampaignId(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("campaign_id",null).in("campaign_id",ids));
}
@Override
public void removeByCampaignId(Long id) {
......@@ -358,6 +467,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectByMediumId(Long id) {
return baseMapper.selectByMediumId(id);
}
@Override
public void resetByMediumId(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("medium_id",null).eq("medium_id",id));
}
@Override
public void resetByMediumId(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("medium_id",null).in("medium_id",ids));
}
@Override
public void removeByMediumId(Long id) {
......@@ -368,6 +486,15 @@ public class Crm_leadServiceImpl extends EBSServiceImpl<Crm_leadMapper, Crm_lead
public List<Crm_lead> selectBySourceId(Long id) {
return baseMapper.selectBySourceId(id);
}
@Override
public void resetBySourceId(Long id) {
this.update(new UpdateWrapper<Crm_lead>().set("source_id",null).eq("source_id",id));
}
@Override
public void resetBySourceId(Collection<Long> ids) {
this.update(new UpdateWrapper<Crm_lead>().set("source_id",null).in("source_id",ids));
}
@Override
public void removeBySourceId(Long id) {
......
......@@ -131,6 +131,8 @@ public class Crm_lost_reasonServiceImpl extends EBSServiceImpl<Crm_lost_reasonMa
@Override
@Transactional
public boolean remove(Long key) {
crmLeadLostService.resetByLostReasonId(key);
crmLeadService.resetByLostReason(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +140,8 @@ public class Crm_lost_reasonServiceImpl extends EBSServiceImpl<Crm_lost_reasonMa
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
crmLeadLostService.resetByLostReasonId(idList);
crmLeadService.resetByLostReason(idList);
removeByIds(idList);
}
......
......@@ -134,6 +134,9 @@ public class Crm_stageServiceImpl extends EBSServiceImpl<Crm_stageMapper, Crm_st
@Override
@Transactional
public boolean remove(Long key) {
crmActivityReportService.resetByStageId(key);
if(!ObjectUtils.isEmpty(crmLeadService.selectByStageId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Crm_lead]数据,无法删除!","","");
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +144,9 @@ public class Crm_stageServiceImpl extends EBSServiceImpl<Crm_stageMapper, Crm_st
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
crmActivityReportService.resetByStageId(idList);
if(!ObjectUtils.isEmpty(crmLeadService.selectByStageId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Crm_lead]数据,无法删除!","","");
removeByIds(idList);
}
......
......@@ -164,6 +164,18 @@ public class Crm_teamServiceImpl extends EBSServiceImpl<Crm_teamMapper, Crm_team
@Override
@Transactional
public boolean remove(Long key) {
accountInvoiceReportService.resetByTeamId(key);
accountInvoiceService.resetByTeamId(key);
crmActivityReportService.resetByTeamId(key);
crmLead2opportunityPartnerMassService.resetByTeamId(key);
crmLead2opportunityPartnerService.resetByTeamId(key);
crmLeadService.resetByTeamId(key);
crmMergeOpportunityService.resetByTeamId(key);
crmStageService.resetByTeamId(key);
resPartnerService.resetByTeamId(key);
resUsersService.resetBySaleTeamId(key);
saleOrderService.resetByTeamId(key);
saleReportService.resetByTeamId(key);
boolean result=removeById(key);
return result ;
}
......@@ -171,6 +183,18 @@ public class Crm_teamServiceImpl extends EBSServiceImpl<Crm_teamMapper, Crm_team
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountInvoiceReportService.resetByTeamId(idList);
accountInvoiceService.resetByTeamId(idList);
crmActivityReportService.resetByTeamId(idList);
crmLead2opportunityPartnerMassService.resetByTeamId(idList);
crmLead2opportunityPartnerService.resetByTeamId(idList);
crmLeadService.resetByTeamId(idList);
crmMergeOpportunityService.resetByTeamId(idList);
crmStageService.resetByTeamId(idList);
resPartnerService.resetByTeamId(idList);
resUsersService.resetBySaleTeamId(idList);
saleOrderService.resetByTeamId(idList);
saleReportService.resetByTeamId(idList);
removeByIds(idList);
}
......
......@@ -134,6 +134,7 @@ public class Digest_digestServiceImpl extends EBSServiceImpl<Digest_digestMapper
@Override
@Transactional
public boolean remove(Long key) {
resConfigSettingsService.resetByDigestId(key);
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +142,7 @@ public class Digest_digestServiceImpl extends EBSServiceImpl<Digest_digestMapper
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
resConfigSettingsService.resetByDigestId(idList);
removeByIds(idList);
}
......
......@@ -152,6 +152,10 @@ public class Event_eventServiceImpl extends EBSServiceImpl<Event_eventMapper, Ev
@Override
@Transactional
public boolean remove(Long key) {
eventEventTicketService.removeByEventId(key);
eventMailService.removeByEventId(key);
eventRegistrationService.resetByEventId(key);
saleOrderLineService.resetByEventId(key);
boolean result=removeById(key);
return result ;
}
......@@ -159,6 +163,10 @@ public class Event_eventServiceImpl extends EBSServiceImpl<Event_eventMapper, Ev
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
eventEventTicketService.removeByEventId(idList);
eventMailService.removeByEventId(idList);
eventRegistrationService.resetByEventId(idList);
saleOrderLineService.resetByEventId(idList);
removeByIds(idList);
}
......
......@@ -140,6 +140,8 @@ public class Event_event_ticketServiceImpl extends EBSServiceImpl<Event_event_ti
@Override
@Transactional
public boolean remove(Long key) {
eventRegistrationService.resetByEventTicketId(key);
saleOrderLineService.resetByEventTicketId(key);
boolean result=removeById(key);
return result ;
}
......@@ -147,6 +149,8 @@ public class Event_event_ticketServiceImpl extends EBSServiceImpl<Event_event_ti
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
eventRegistrationService.resetByEventTicketId(idList);
saleOrderLineService.resetByEventTicketId(idList);
removeByIds(idList);
}
......
......@@ -134,6 +134,7 @@ public class Event_mailServiceImpl extends EBSServiceImpl<Event_mailMapper, Even
@Override
@Transactional
public boolean remove(Long key) {
eventMailRegistrationService.removeBySchedulerId(key);
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +142,7 @@ public class Event_mailServiceImpl extends EBSServiceImpl<Event_mailMapper, Even
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
eventMailRegistrationService.removeBySchedulerId(idList);
removeByIds(idList);
}
......
......@@ -146,6 +146,7 @@ public class Event_registrationServiceImpl extends EBSServiceImpl<Event_registra
@Override
@Transactional
public boolean remove(Long key) {
eventMailRegistrationService.removeByRegistrationId(key);
boolean result=removeById(key);
return result ;
}
......@@ -153,6 +154,7 @@ public class Event_registrationServiceImpl extends EBSServiceImpl<Event_registra
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
eventMailRegistrationService.removeByRegistrationId(idList);
removeByIds(idList);
}
......
......@@ -134,6 +134,9 @@ public class Event_typeServiceImpl extends EBSServiceImpl<Event_typeMapper, Even
@Override
@Transactional
public boolean remove(Long key) {
eventEventTicketService.removeByEventTypeId(key);
eventEventService.resetByEventTypeId(key);
eventTypeMailService.removeByEventTypeId(key);
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +144,9 @@ public class Event_typeServiceImpl extends EBSServiceImpl<Event_typeMapper, Even
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
eventEventTicketService.removeByEventTypeId(idList);
eventEventService.resetByEventTypeId(idList);
eventTypeMailService.removeByEventTypeId(idList);
removeByIds(idList);
}
......
......@@ -128,6 +128,7 @@ public class Fetchmail_serverServiceImpl extends EBSServiceImpl<Fetchmail_server
@Override
@Transactional
public boolean remove(Long key) {
mailMailService.resetByFetchmailServerId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Fetchmail_serverServiceImpl extends EBSServiceImpl<Fetchmail_server
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
mailMailService.resetByFetchmailServerId(idList);
removeByIds(idList);
}
......
......@@ -128,6 +128,7 @@ public class Fleet_service_typeServiceImpl extends EBSServiceImpl<Fleet_service_
@Override
@Transactional
public boolean remove(Long key) {
fleetVehicleCostService.resetByCostSubtypeId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Fleet_service_typeServiceImpl extends EBSServiceImpl<Fleet_service_
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
fleetVehicleCostService.resetByCostSubtypeId(idList);
removeByIds(idList);
}
......
......@@ -149,6 +149,9 @@ public class Fleet_vehicleServiceImpl extends EBSServiceImpl<Fleet_vehicleMapper
@Override
@Transactional
public boolean remove(Long key) {
fleetVehicleAssignationLogService.resetByVehicleId(key);
fleetVehicleCostService.resetByVehicleId(key);
fleetVehicleOdometerService.resetByVehicleId(key);
boolean result=removeById(key);
return result ;
}
......@@ -156,6 +159,9 @@ public class Fleet_vehicleServiceImpl extends EBSServiceImpl<Fleet_vehicleMapper
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
fleetVehicleAssignationLogService.resetByVehicleId(idList);
fleetVehicleCostService.resetByVehicleId(idList);
fleetVehicleOdometerService.resetByVehicleId(idList);
removeByIds(idList);
}
......
......@@ -145,6 +145,10 @@ public class Fleet_vehicle_costServiceImpl extends EBSServiceImpl<Fleet_vehicle_
@Override
@Transactional
public boolean remove(Long key) {
fleetVehicleCostService.resetByParentId(key);
fleetVehicleLogContractService.removeByCostId(key);
fleetVehicleLogFuelService.removeByCostId(key);
fleetVehicleLogServicesService.removeByCostId(key);
boolean result=removeById(key);
return result ;
}
......@@ -152,6 +156,10 @@ public class Fleet_vehicle_costServiceImpl extends EBSServiceImpl<Fleet_vehicle_
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
fleetVehicleCostService.resetByParentId(idList);
fleetVehicleLogContractService.removeByCostId(idList);
fleetVehicleLogFuelService.removeByCostId(idList);
fleetVehicleLogServicesService.removeByCostId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,7 @@ public class Fleet_vehicle_log_contractServiceImpl extends EBSServiceImpl<Fleet_
@Override
@Transactional
public boolean remove(Long key) {
fleetVehicleCostService.resetByContractId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +139,7 @@ public class Fleet_vehicle_log_contractServiceImpl extends EBSServiceImpl<Fleet_
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
fleetVehicleCostService.resetByContractId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,7 @@ public class Fleet_vehicle_modelServiceImpl extends EBSServiceImpl<Fleet_vehicle
@Override
@Transactional
public boolean remove(Long key) {
fleetVehicleService.resetByModelId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +139,7 @@ public class Fleet_vehicle_modelServiceImpl extends EBSServiceImpl<Fleet_vehicle
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
fleetVehicleService.resetByModelId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,8 @@ public class Fleet_vehicle_model_brandServiceImpl extends EBSServiceImpl<Fleet_v
@Override
@Transactional
public boolean remove(Long key) {
fleetVehicleModelService.resetByBrandId(key);
fleetVehicleService.resetByBrandId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +140,8 @@ public class Fleet_vehicle_model_brandServiceImpl extends EBSServiceImpl<Fleet_v
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
fleetVehicleModelService.resetByBrandId(idList);
fleetVehicleService.resetByBrandId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,7 @@ public class Fleet_vehicle_odometerServiceImpl extends EBSServiceImpl<Fleet_vehi
@Override
@Transactional
public boolean remove(Long key) {
fleetVehicleCostService.resetByOdometerId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +139,7 @@ public class Fleet_vehicle_odometerServiceImpl extends EBSServiceImpl<Fleet_vehi
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
fleetVehicleCostService.resetByOdometerId(idList);
removeByIds(idList);
}
......
......@@ -128,6 +128,7 @@ public class Fleet_vehicle_stateServiceImpl extends EBSServiceImpl<Fleet_vehicle
@Override
@Transactional
public boolean remove(Long key) {
fleetVehicleService.resetByStateId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Fleet_vehicle_stateServiceImpl extends EBSServiceImpl<Fleet_vehicle
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
fleetVehicleService.resetByStateId(idList);
removeByIds(idList);
}
......
......@@ -134,6 +134,12 @@ public class Gamification_badgeServiceImpl extends EBSServiceImpl<Gamification_b
@Override
@Transactional
public boolean remove(Long key) {
gamificationBadgeUserWizardService.resetByBadgeId(key);
gamificationBadgeUserService.removeByBadgeId(key);
gamificationChallengeService.resetByRewardFirstId(key);
gamificationChallengeService.resetByRewardId(key);
gamificationChallengeService.resetByRewardSecondId(key);
gamificationChallengeService.resetByRewardThirdId(key);
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +147,12 @@ public class Gamification_badgeServiceImpl extends EBSServiceImpl<Gamification_b
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
gamificationBadgeUserWizardService.resetByBadgeId(idList);
gamificationBadgeUserService.removeByBadgeId(idList);
gamificationChallengeService.resetByRewardFirstId(idList);
gamificationChallengeService.resetByRewardId(idList);
gamificationChallengeService.resetByRewardSecondId(idList);
gamificationChallengeService.resetByRewardThirdId(idList);
removeByIds(idList);
}
......
......@@ -143,6 +143,9 @@ public class Gamification_challengeServiceImpl extends EBSServiceImpl<Gamificati
@Override
@Transactional
public boolean remove(Long key) {
gamificationBadgeUserService.resetByChallengeId(key);
gamificationChallengeLineService.removeByChallengeId(key);
gamificationGoalService.resetByChallengeId(key);
boolean result=removeById(key);
return result ;
}
......@@ -150,6 +153,9 @@ public class Gamification_challengeServiceImpl extends EBSServiceImpl<Gamificati
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
gamificationBadgeUserService.resetByChallengeId(idList);
gamificationChallengeLineService.removeByChallengeId(idList);
gamificationGoalService.resetByChallengeId(idList);
removeByIds(idList);
}
......
......@@ -134,6 +134,7 @@ public class Gamification_challenge_lineServiceImpl extends EBSServiceImpl<Gamif
@Override
@Transactional
public boolean remove(Long key) {
gamificationGoalService.removeByLineId(key);
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +142,7 @@ public class Gamification_challenge_lineServiceImpl extends EBSServiceImpl<Gamif
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
gamificationGoalService.removeByLineId(idList);
removeByIds(idList);
}
......
......@@ -137,6 +137,7 @@ public class Gamification_goalServiceImpl extends EBSServiceImpl<Gamification_go
@Override
@Transactional
public boolean remove(Long key) {
gamificationGoalWizardService.resetByGoalId(key);
boolean result=removeById(key);
return result ;
}
......@@ -144,6 +145,7 @@ public class Gamification_goalServiceImpl extends EBSServiceImpl<Gamification_go
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
gamificationGoalWizardService.resetByGoalId(idList);
removeByIds(idList);
}
......
......@@ -131,6 +131,8 @@ public class Gamification_goal_definitionServiceImpl extends EBSServiceImpl<Gami
@Override
@Transactional
public boolean remove(Long key) {
gamificationChallengeLineService.removeByDefinitionId(key);
gamificationGoalService.removeByDefinitionId(key);
boolean result=removeById(key);
return result ;
}
......@@ -138,6 +140,8 @@ public class Gamification_goal_definitionServiceImpl extends EBSServiceImpl<Gami
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
gamificationChallengeLineService.removeByDefinitionId(idList);
gamificationGoalService.removeByDefinitionId(idList);
removeByIds(idList);
}
......
......@@ -158,6 +158,7 @@ public class Hr_applicantServiceImpl extends EBSServiceImpl<Hr_applicantMapper,
@Override
@Transactional
public boolean remove(Long key) {
calendarEventService.resetByApplicantId(key);
boolean result=removeById(key);
return result ;
}
......@@ -165,6 +166,7 @@ public class Hr_applicantServiceImpl extends EBSServiceImpl<Hr_applicantMapper,
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
calendarEventService.resetByApplicantId(idList);
removeByIds(idList);
}
......
......@@ -128,6 +128,7 @@ public class Hr_attendanceServiceImpl extends EBSServiceImpl<Hr_attendanceMapper
@Override
@Transactional
public boolean remove(Long key) {
hrEmployeeService.resetByLastAttendanceId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Hr_attendanceServiceImpl extends EBSServiceImpl<Hr_attendanceMapper
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrEmployeeService.resetByLastAttendanceId(idList);
removeByIds(idList);
}
......
......@@ -128,6 +128,7 @@ public class Hr_contract_typeServiceImpl extends EBSServiceImpl<Hr_contract_type
@Override
@Transactional
public boolean remove(Long key) {
hrContractService.resetByTypeId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Hr_contract_typeServiceImpl extends EBSServiceImpl<Hr_contract_type
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrContractService.resetByTypeId(idList);
removeByIds(idList);
}
......
......@@ -160,6 +160,17 @@ public class Hr_departmentServiceImpl extends EBSServiceImpl<Hr_departmentMapper
@Override
@Transactional
public boolean remove(Long key) {
hrApplicantService.resetByDepartmentId(key);
hrContractService.resetByDepartmentId(key);
hrDepartmentService.resetByParentId(key);
hrEmployeeService.resetByDepartmentId(key);
hrExpenseSheetService.resetByDepartmentId(key);
hrJobService.resetByDepartmentId(key);
hrLeaveAllocationService.resetByDepartmentId(key);
hrLeaveReportService.resetByDepartmentId(key);
hrLeaveService.resetByDepartmentId(key);
maintenanceEquipmentService.resetByDepartmentId(key);
maintenanceRequestService.resetByDepartmentId(key);
boolean result=removeById(key);
return result ;
}
......@@ -167,6 +178,17 @@ public class Hr_departmentServiceImpl extends EBSServiceImpl<Hr_departmentMapper
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrApplicantService.resetByDepartmentId(idList);
hrContractService.resetByDepartmentId(idList);
hrDepartmentService.resetByParentId(idList);
hrEmployeeService.resetByDepartmentId(idList);
hrExpenseSheetService.resetByDepartmentId(idList);
hrJobService.resetByDepartmentId(idList);
hrLeaveAllocationService.resetByDepartmentId(idList);
hrLeaveReportService.resetByDepartmentId(idList);
hrLeaveService.resetByDepartmentId(idList);
maintenanceEquipmentService.resetByDepartmentId(idList);
maintenanceRequestService.resetByDepartmentId(idList);
removeByIds(idList);
}
......
......@@ -187,6 +187,27 @@ public class Hr_employeeServiceImpl extends EBSServiceImpl<Hr_employeeMapper, Hr
@Override
@Transactional
public boolean remove(Long key) {
gamificationBadgeUserWizardService.resetByEmployeeId(key);
gamificationBadgeUserService.resetByEmployeeId(key);
hrApplicantService.resetByEmpId(key);
hrAttendanceService.removeByEmployeeId(key);
hrContractService.resetByEmployeeId(key);
hrDepartmentService.resetByManagerId(key);
hrEmployeeService.resetByCoachId(key);
hrEmployeeService.resetByParentId(key);
hrExpenseSheetService.resetByEmployeeId(key);
hrExpenseService.resetByEmployeeId(key);
hrJobService.resetByManagerId(key);
hrLeaveAllocationService.resetByEmployeeId(key);
hrLeaveAllocationService.resetByFirstApproverId(key);
hrLeaveAllocationService.resetBySecondApproverId(key);
hrLeaveReportService.resetByEmployeeId(key);
hrLeaveService.resetByEmployeeId(key);
hrLeaveService.resetByFirstApproverId(key);
hrLeaveService.resetByManagerId(key);
hrLeaveService.resetBySecondApproverId(key);
maintenanceEquipmentService.resetByEmployeeId(key);
maintenanceRequestService.resetByEmployeeId(key);
boolean result=removeById(key);
return result ;
}
......@@ -194,6 +215,27 @@ public class Hr_employeeServiceImpl extends EBSServiceImpl<Hr_employeeMapper, Hr
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
gamificationBadgeUserWizardService.resetByEmployeeId(idList);
gamificationBadgeUserService.resetByEmployeeId(idList);
hrApplicantService.resetByEmpId(idList);
hrAttendanceService.removeByEmployeeId(idList);
hrContractService.resetByEmployeeId(idList);
hrDepartmentService.resetByManagerId(idList);
hrEmployeeService.resetByCoachId(idList);
hrEmployeeService.resetByParentId(idList);
hrExpenseSheetService.resetByEmployeeId(idList);
hrExpenseService.resetByEmployeeId(idList);
hrJobService.resetByManagerId(idList);
hrLeaveAllocationService.resetByEmployeeId(idList);
hrLeaveAllocationService.resetByFirstApproverId(idList);
hrLeaveAllocationService.resetBySecondApproverId(idList);
hrLeaveReportService.resetByEmployeeId(idList);
hrLeaveService.resetByEmployeeId(idList);
hrLeaveService.resetByFirstApproverId(idList);
hrLeaveService.resetByManagerId(idList);
hrLeaveService.resetBySecondApproverId(idList);
maintenanceEquipmentService.resetByEmployeeId(idList);
maintenanceRequestService.resetByEmployeeId(idList);
removeByIds(idList);
}
......
......@@ -134,6 +134,9 @@ public class Hr_employee_categoryServiceImpl extends EBSServiceImpl<Hr_employee_
@Override
@Transactional
public boolean remove(Long key) {
hrLeaveAllocationService.resetByCategoryId(key);
hrLeaveReportService.resetByCategoryId(key);
hrLeaveService.resetByCategoryId(key);
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +144,9 @@ public class Hr_employee_categoryServiceImpl extends EBSServiceImpl<Hr_employee_
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrLeaveAllocationService.resetByCategoryId(idList);
hrLeaveReportService.resetByCategoryId(idList);
hrLeaveService.resetByCategoryId(idList);
removeByIds(idList);
}
......
......@@ -155,6 +155,7 @@ public class Hr_expenseServiceImpl extends EBSServiceImpl<Hr_expenseMapper, Hr_e
@Override
@Transactional
public boolean remove(Long key) {
accountMoveLineService.resetByExpenseId(key);
boolean result=removeById(key);
return result ;
}
......@@ -162,6 +163,7 @@ public class Hr_expenseServiceImpl extends EBSServiceImpl<Hr_expenseMapper, Hr_e
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
accountMoveLineService.resetByExpenseId(idList);
removeByIds(idList);
}
......
......@@ -152,6 +152,8 @@ public class Hr_expense_sheetServiceImpl extends EBSServiceImpl<Hr_expense_sheet
@Override
@Transactional
public boolean remove(Long key) {
hrExpenseRefuseWizardService.resetByHrExpenseSheetId(key);
hrExpenseService.resetBySheetId(key);
boolean result=removeById(key);
return result ;
}
......@@ -159,6 +161,8 @@ public class Hr_expense_sheetServiceImpl extends EBSServiceImpl<Hr_expense_sheet
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrExpenseRefuseWizardService.resetByHrExpenseSheetId(idList);
hrExpenseService.resetBySheetId(idList);
removeByIds(idList);
}
......
......@@ -152,6 +152,11 @@ public class Hr_jobServiceImpl extends EBSServiceImpl<Hr_jobMapper, Hr_job> impl
@Override
@Transactional
public boolean remove(Long key) {
hrApplicantService.resetByJobId(key);
hrContractService.resetByJobId(key);
hrEmployeeService.resetByJobId(key);
hrRecruitmentSourceService.resetByJobId(key);
hrRecruitmentStageService.removeByJobId(key);
boolean result=removeById(key);
return result ;
}
......@@ -159,6 +164,11 @@ public class Hr_jobServiceImpl extends EBSServiceImpl<Hr_jobMapper, Hr_job> impl
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrApplicantService.resetByJobId(idList);
hrContractService.resetByJobId(idList);
hrEmployeeService.resetByJobId(idList);
hrRecruitmentSourceService.resetByJobId(idList);
hrRecruitmentStageService.removeByJobId(idList);
removeByIds(idList);
}
......
......@@ -148,6 +148,8 @@ public class Hr_leaveServiceImpl extends EBSServiceImpl<Hr_leaveMapper, Hr_leave
@Override
@Transactional
public boolean remove(Long key) {
hrLeaveService.resetByParentId(key);
resourceCalendarLeavesService.resetByHolidayId(key);
boolean result=removeById(key);
return result ;
}
......@@ -155,6 +157,8 @@ public class Hr_leaveServiceImpl extends EBSServiceImpl<Hr_leaveMapper, Hr_leave
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrLeaveService.resetByParentId(idList);
resourceCalendarLeavesService.resetByHolidayId(idList);
removeByIds(idList);
}
......
......@@ -142,6 +142,7 @@ public class Hr_leave_allocationServiceImpl extends EBSServiceImpl<Hr_leave_allo
@Override
@Transactional
public boolean remove(Long key) {
hrLeaveAllocationService.resetByParentId(key);
boolean result=removeById(key);
return result ;
}
......@@ -149,6 +150,7 @@ public class Hr_leave_allocationServiceImpl extends EBSServiceImpl<Hr_leave_allo
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrLeaveAllocationService.resetByParentId(idList);
removeByIds(idList);
}
......
......@@ -140,6 +140,9 @@ public class Hr_leave_typeServiceImpl extends EBSServiceImpl<Hr_leave_typeMapper
@Override
@Transactional
public boolean remove(Long key) {
hrLeaveAllocationService.resetByHolidayStatusId(key);
hrLeaveReportService.resetByHolidayStatusId(key);
hrLeaveService.resetByHolidayStatusId(key);
boolean result=removeById(key);
return result ;
}
......@@ -147,6 +150,9 @@ public class Hr_leave_typeServiceImpl extends EBSServiceImpl<Hr_leave_typeMapper
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrLeaveAllocationService.resetByHolidayStatusId(idList);
hrLeaveReportService.resetByHolidayStatusId(idList);
hrLeaveService.resetByHolidayStatusId(idList);
removeByIds(idList);
}
......
......@@ -128,6 +128,7 @@ public class Hr_recruitment_degreeServiceImpl extends EBSServiceImpl<Hr_recruitm
@Override
@Transactional
public boolean remove(Long key) {
hrApplicantService.resetByTypeId(key);
boolean result=removeById(key);
return result ;
}
......@@ -135,6 +136,7 @@ public class Hr_recruitment_degreeServiceImpl extends EBSServiceImpl<Hr_recruitm
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrApplicantService.resetByTypeId(idList);
removeByIds(idList);
}
......
......@@ -134,6 +134,9 @@ public class Hr_recruitment_stageServiceImpl extends EBSServiceImpl<Hr_recruitme
@Override
@Transactional
public boolean remove(Long key) {
hrApplicantService.resetByLastStageId(key);
if(!ObjectUtils.isEmpty(hrApplicantService.selectByStageId(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Hr_applicant]数据,无法删除!","","");
boolean result=removeById(key);
return result ;
}
......@@ -141,6 +144,9 @@ public class Hr_recruitment_stageServiceImpl extends EBSServiceImpl<Hr_recruitme
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
hrApplicantService.resetByLastStageId(idList);
if(!ObjectUtils.isEmpty(hrApplicantService.selectByStageId(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[Hr_applicant]数据,无法删除!","","");
removeByIds(idList);
}
......
......@@ -192,7 +192,6 @@ public class Ir_attachmentServiceImpl extends EBSServiceImpl<Ir_attachmentMapper
public List<Ir_attachment> selectByCompanyId(Long id) {
return baseMapper.selectByCompanyId(id);
}
@Override
public void removeByCompanyId(Long id) {
this.remove(new QueryWrapper<Ir_attachment>().eq("company_id",id));
......
......@@ -189,7 +189,6 @@ public class Ir_model_fieldsServiceImpl extends EBSServiceImpl<Ir_model_fieldsMa
public List<Ir_model_fields> selectByModelId(Long id) {
return baseMapper.selectByModelId(id);
}
@Override
public void removeByModelId(Long id) {
this.remove(new QueryWrapper<Ir_model_fields>().eq("model_id",id));
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册