Browse Source

甲供材料,缓存所属标段

MaiXinRong 4 years ago
parent
commit
51f4d9cde0
2 changed files with 7 additions and 0 deletions
  1. 1 0
      app/service/stage_jgcl.js
  2. 6 0
      sql/update.sql

+ 1 - 0
app/service/stage_jgcl.js

@@ -83,6 +83,7 @@ module.exports = app => {
                     uuid: this.uuid.v4(),
                     uuid: this.uuid.v4(),
                     add_sid: this.ctx.stage.id,
                     add_sid: this.ctx.stage.id,
                     add_uid: this.ctx.session.sessionUser.accountId,
                     add_uid: this.ctx.session.sessionUser.accountId,
+                    tid: this.ctx.tender.id,
                     sid: this.ctx.stage.id,
                     sid: this.ctx.stage.id,
                 };
                 };
                 nd.name = d.name;
                 nd.name = d.name;

+ 6 - 0
sql/update.sql

@@ -24,3 +24,9 @@ ALTER TABLE `zh_deal_bills`
 MODIFY COLUMN `id`  varchar(50) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT '主键(uuid)' FIRST ,
 MODIFY COLUMN `id`  varchar(50) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT '主键(uuid)' FIRST ,
 CHANGE COLUMN `deal_id` `order`  int(11) NOT NULL AFTER `tender_id`;
 CHANGE COLUMN `deal_id` `order`  int(11) NOT NULL AFTER `tender_id`;
 
 
+-- 2020-9-21
+ALTER TABLE `zh_stage_jgcl`
+ADD COLUMN `tid`  int(11) NULL COMMENT '标段id' AFTER `add_sid`;
+
+Update zh_stage_jgcl LEFT JOIN zh_stage ON zh_stage_jgcl.sid = zh_stage.id Set zh_stage_jgcl.tid = zh_stage.tid
+