diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 3db7fd5a..bef3b70d 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -3088,6 +3088,7 @@ export class CommandController extends Controller { posMaster.current_holderId = item.profileId; posMaster.conditionReason = _null; + posMaster.isCondition = false; if (posMasterOld != null) await this.posMasterRepository.save(posMasterOld); await this.posMasterRepository.save(posMaster); @@ -3492,6 +3493,7 @@ export class CommandController extends Controller { } posMaster.current_holderId = profile.id; posMaster.conditionReason = _null; + posMaster.isCondition = false; await this.posMasterRepository.save(posMaster); const positionNew = await this.positionRepository.findOne({ where: { @@ -5911,6 +5913,7 @@ export class CommandController extends Controller { posMaster.current_holderId = profile.id; posMaster.conditionReason = _null; + posMaster.isCondition = false; if (posMasterOld != null) await this.posMasterRepository.save(posMasterOld); await this.posMasterRepository.save(posMaster); diff --git a/src/controllers/PositionController.ts b/src/controllers/PositionController.ts index 7ea9c45b..d203fdd2 100644 --- a/src/controllers/PositionController.ts +++ b/src/controllers/PositionController.ts @@ -3520,6 +3520,7 @@ export class PositionController extends Controller { dataMaster.next_holderId = requestBody.profileId; //add on dataMaster.conditionReason = _null; + dataMaster.isCondition = false; await this.posMasterRepository.save(dataMaster, { data: request }); setLogDataDiff(request, { before, after: dataMaster }); @@ -4692,6 +4693,7 @@ export class PositionController extends Controller { posMaster.current_holderId = body.profileId; const _null: any = null; posMaster.conditionReason = _null; + posMaster.isCondition = false; if (posMasterOld != null) await this.posMasterRepository.save(posMasterOld); await this.posMasterRepository.save(posMaster); diff --git a/src/services/rabbitmq.ts b/src/services/rabbitmq.ts index 5305ad43..968c3052 100644 --- a/src/services/rabbitmq.ts +++ b/src/services/rabbitmq.ts @@ -462,6 +462,7 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise { item.conditionReason = _null; if (item.current_holderId) { item.conditionReason = _null; + item.isCondition = false; } item.next_holderId = null; item.lastUpdateUserId = lastUpdateUserId; @@ -1615,6 +1616,7 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise { posMaster.next_holderId = item.current_holderId; if (posMaster.next_holderId) { posMaster.conditionReason = _null; + posMaster.isCondition = false; } } else { posMaster.next_holderId = null; @@ -1710,6 +1712,7 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise { posMaster.next_holderId = item.current_holderId; if (posMaster.next_holderId) { posMaster.conditionReason = _null; + posMaster.isCondition = false; } } else { posMaster.next_holderId = null; @@ -1807,6 +1810,7 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise { posMaster.next_holderId = item.current_holderId; if (posMaster.next_holderId) { posMaster.conditionReason = _null; + posMaster.isCondition = false; } } else { posMaster.next_holderId = null; @@ -1906,6 +1910,7 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise { posMaster.next_holderId = item.current_holderId; if (posMaster.next_holderId) { posMaster.conditionReason = _null; + posMaster.isCondition = false; } } else { posMaster.next_holderId = null; @@ -2008,6 +2013,7 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise { posMaster.next_holderId = item.current_holderId; if (posMaster.next_holderId) { posMaster.conditionReason = _null; + posMaster.isCondition = false; } } else { posMaster.next_holderId = null;