|
@@ -324,10 +324,17 @@ module.exports = app => {
|
|
|
// 先删除附件文件
|
|
|
const attList = await this.ctx.service.changeAtt.getAllDataByCondition({ where: { tid: id } });
|
|
|
const newAttList = await this.ctx.service.materialFile.getAllMaterialFiles(id);
|
|
|
- attList.concat(newAttList);
|
|
|
+ const changeProjectAttList = await this.ctx.service.changeProjectAtt.getAllDataByCondition({ where: { tid: id } });
|
|
|
+ const changeApplyAttList = await this.ctx.service.changeApplyAtt.getAllDataByCondition({ where: { tid: id } });
|
|
|
+ const changePlanAttList = await this.ctx.service.changePlanAtt.getAllDataByCondition({ where: { tid: id } });
|
|
|
+ const advanceAttList = await this.ctx.service.advanceFile.getAllDataByCondition({ where: { tid: id } });
|
|
|
+ attList.concat(newAttList, changeProjectAttList, changeApplyAttList, changePlanAttList, advanceAttList);
|
|
|
await this.ctx.helper.delFiles(attList);
|
|
|
await transaction.delete(this.tableName, { id });
|
|
|
await transaction.delete(this.ctx.service.tenderInfo.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.tenderTourist.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.tenderMap.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.tenderTag.tableName, { tid: id });
|
|
|
await transaction.delete(this.ctx.service.ledger.departTableName(id), { tender_id: id });
|
|
|
await transaction.delete(this.ctx.service.ledgerAudit.tableName, { tender_id: id });
|
|
|
await transaction.delete(this.ctx.service.pos.departTableName(id), { tid: id });
|
|
@@ -343,6 +350,7 @@ module.exports = app => {
|
|
|
await transaction.delete(this.ctx.service.stageDetail.tableName, { tid: id });
|
|
|
await transaction.delete(this.ctx.service.stagePay.tableName, { tid: id });
|
|
|
await transaction.delete(this.ctx.service.stageChange.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.stageAtt.tableName, { tid: id });
|
|
|
|
|
|
await transaction.delete(this.ctx.service.stageJgcl.tableName, { tid: id });
|
|
|
await transaction.delete(this.ctx.service.stageBonus.tableName, { tid: id });
|
|
@@ -357,6 +365,25 @@ module.exports = app => {
|
|
|
await transaction.delete(this.ctx.service.changeAuditList.tableName, { tid: id });
|
|
|
await transaction.delete(this.ctx.service.changeCompany.tableName, { tid: id });
|
|
|
|
|
|
+ await transaction.delete(this.ctx.service.changeLedger.tableName, { tender_id: id });
|
|
|
+ await transaction.delete(this.ctx.service.changePos.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.changeReviseLog.tableName, { tid: id });
|
|
|
+
|
|
|
+ await transaction.delete(this.ctx.service.changeProject.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.changeProjectAudit.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.changeProjectXsAudit.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.changeProjectAtt.tableName, { tid: id });
|
|
|
+
|
|
|
+ await transaction.delete(this.ctx.service.changeApply.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.changeApplyAudit.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.changeApplyList.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.changeApplyAtt.tableName, { tid: id });
|
|
|
+
|
|
|
+ await transaction.delete(this.ctx.service.changePlan.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.changePlanAudit.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.changePlanList.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.changePlanAtt.tableName, { tid: id });
|
|
|
+
|
|
|
await transaction.delete(this.ctx.service.ledgerRevise.tableName, { tid: id });
|
|
|
await transaction.delete(this.ctx.service.reviseAudit.tableName, { tender_id: id });
|
|
|
await transaction.delete(this.ctx.service.reviseBills.departTableName(id), { tender_id: id });
|
|
@@ -370,6 +397,9 @@ module.exports = app => {
|
|
|
await transaction.delete(this.ctx.service.materialListNotjoin.tableName, { tid: id });
|
|
|
await transaction.delete(this.ctx.service.materialExponent.tableName, { tid: id });
|
|
|
await transaction.delete(this.ctx.service.materialExponentHistory.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.materialListGcl.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.materialListSelf.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.materialChecklist.tableName, { tid: id });
|
|
|
|
|
|
|
|
|
await transaction.delete(this.ctx.service.materialFile.tableName, { tid: id });
|
|
@@ -377,12 +407,23 @@ module.exports = app => {
|
|
|
await transaction.delete(this.ctx.service.signatureRole.tableName, { tender_id: id });
|
|
|
|
|
|
await transaction.delete(this.ctx.service.changeAtt.tableName, { tid: id });
|
|
|
- await transaction.delete(this.ctx.service.materialFile.tableName, { tid: id });
|
|
|
+ // await transaction.delete(this.ctx.service.materialFile.tableName, { tid: id });
|
|
|
|
|
|
await transaction.delete(this.ctx.service.advanceFile.tableName, { tid: id });
|
|
|
|
|
|
await transaction.delete(this.ctx.service.datacollectTender.tableName, { pid: this.ctx.session.sessionProject.id, tid: id });
|
|
|
|
|
|
+ await transaction.delete(this.ctx.service.schedule.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.scheduleAudit.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.scheduleLedger.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.scheduleLedgerHistory.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.scheduleLedgerMonth.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.scheduleMonth.tableName, { tid: id });
|
|
|
+ await transaction.delete(this.ctx.service.scheduleStage.tableName, { tid: id });
|
|
|
+
|
|
|
+
|
|
|
+ await transaction.delete(this.ctx.service.shenpiAudit.tableName, { tid: id });
|
|
|
+
|
|
|
// 记录删除日志
|
|
|
await this.ctx.service.projectLog.addProjectLog(transaction, projectLogConst.type.tender, projectLogConst.status.delete, tenderMsg.name, id);
|
|
|
await transaction.commit();
|