|
@@ -97,7 +97,7 @@ module.exports = app => {
|
|
|
// 添加工料时同步生成
|
|
|
async add(transaction, id, remark = null) {
|
|
|
for (const sid of this.ctx.material.stage_id.split(',')) {
|
|
|
- const msInfo = await transaction.get(this.ctx.service.materialStage.tableName, { tid: this.ctx.tender.id, sid });
|
|
|
+ const msInfo = await transaction.get(this.ctx.service.materialStage.tableName, { tid: this.ctx.tender.id, mid: this.ctx.material.id, sid });
|
|
|
const insertData = {
|
|
|
tid: this.ctx.tender.id,
|
|
|
mid: this.ctx.material.id,
|
|
@@ -113,7 +113,7 @@ module.exports = app => {
|
|
|
async adds(transaction, billsList, remark = null, ms_id = null) {
|
|
|
// 这里有坑!必须按独立期分开入库才行,不然会出现第二期之后msg_tp的数据无法入库的情况,奇怪的bug
|
|
|
for (const sid of this.ctx.material.stage_id.split(',')) {
|
|
|
- const msInfo = await transaction.get(this.ctx.service.materialStage.tableName, { tid: this.ctx.tender.id, sid });
|
|
|
+ const msInfo = await transaction.get(this.ctx.service.materialStage.tableName, { tid: this.ctx.tender.id, mid: this.ctx.material.id, sid });
|
|
|
const insertList = [];
|
|
|
for (const b of billsList) {
|
|
|
const insertData = {
|