comment clear ตำแหน่งติดเงื่อนไข
This commit is contained in:
parent
45922287ea
commit
e083cd4bce
3 changed files with 35 additions and 35 deletions
|
|
@ -3164,8 +3164,8 @@ export class CommandController extends Controller {
|
||||||
|
|
||||||
posMaster.current_holderId = item.profileId;
|
posMaster.current_holderId = item.profileId;
|
||||||
posMaster.lastUpdatedAt = new Date();
|
posMaster.lastUpdatedAt = new Date();
|
||||||
posMaster.conditionReason = _null;
|
// posMaster.conditionReason = _null;
|
||||||
posMaster.isCondition = false;
|
// posMaster.isCondition = false;
|
||||||
if (posMasterOld != null) {
|
if (posMasterOld != null) {
|
||||||
await this.posMasterRepository.save(posMasterOld);
|
await this.posMasterRepository.save(posMasterOld);
|
||||||
await CreatePosMasterHistoryOfficer(posMasterOld.id, req);
|
await CreatePosMasterHistoryOfficer(posMasterOld.id, req);
|
||||||
|
|
@ -3608,8 +3608,8 @@ export class CommandController extends Controller {
|
||||||
}
|
}
|
||||||
posMaster.current_holderId = profile.id;
|
posMaster.current_holderId = profile.id;
|
||||||
posMaster.lastUpdatedAt = new Date();
|
posMaster.lastUpdatedAt = new Date();
|
||||||
posMaster.conditionReason = _null;
|
// posMaster.conditionReason = _null;
|
||||||
posMaster.isCondition = false;
|
// posMaster.isCondition = false;
|
||||||
await this.posMasterRepository.save(posMaster);
|
await this.posMasterRepository.save(posMaster);
|
||||||
const positionNew = await this.positionRepository.findOne({
|
const positionNew = await this.positionRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
|
|
@ -6067,8 +6067,8 @@ export class CommandController extends Controller {
|
||||||
|
|
||||||
posMaster.current_holderId = profile.id;
|
posMaster.current_holderId = profile.id;
|
||||||
posMaster.lastUpdatedAt = new Date();
|
posMaster.lastUpdatedAt = new Date();
|
||||||
posMaster.conditionReason = _null;
|
// posMaster.conditionReason = _null;
|
||||||
posMaster.isCondition = false;
|
// posMaster.isCondition = false;
|
||||||
if (posMasterOld != null) {
|
if (posMasterOld != null) {
|
||||||
await this.posMasterRepository.save(posMasterOld);
|
await this.posMasterRepository.save(posMasterOld);
|
||||||
await CreatePosMasterHistoryOfficer(posMasterOld.id, req);
|
await CreatePosMasterHistoryOfficer(posMasterOld.id, req);
|
||||||
|
|
|
||||||
|
|
@ -3642,8 +3642,8 @@ export class PositionController extends Controller {
|
||||||
// dataMaster.next_holderId = requestBody.profileId;
|
// dataMaster.next_holderId = requestBody.profileId;
|
||||||
dataMaster.lastUpdatedAt = new Date();
|
dataMaster.lastUpdatedAt = new Date();
|
||||||
//add on
|
//add on
|
||||||
dataMaster.conditionReason = _null;
|
// dataMaster.conditionReason = _null;
|
||||||
dataMaster.isCondition = false;
|
// dataMaster.isCondition = false;
|
||||||
//เช็คถ้า revision ปัจจุบันให้ปั๊มที่ profile
|
//เช็คถ้า revision ปัจจุบันให้ปั๊มที่ profile
|
||||||
const chkRevision = await this.orgRevisionRepository.findOne({
|
const chkRevision = await this.orgRevisionRepository.findOne({
|
||||||
where: { id: dataMaster.orgRevisionId },
|
where: { id: dataMaster.orgRevisionId },
|
||||||
|
|
@ -4937,8 +4937,8 @@ export class PositionController extends Controller {
|
||||||
posMaster.current_holderId = body.profileId;
|
posMaster.current_holderId = body.profileId;
|
||||||
posMaster.lastUpdatedAt = new Date();
|
posMaster.lastUpdatedAt = new Date();
|
||||||
const _null: any = null;
|
const _null: any = null;
|
||||||
posMaster.conditionReason = _null;
|
// posMaster.conditionReason = _null;
|
||||||
posMaster.isCondition = false;
|
// posMaster.isCondition = false;
|
||||||
if (posMasterOld != null) {
|
if (posMasterOld != null) {
|
||||||
await this.posMasterRepository.save(posMasterOld);
|
await this.posMasterRepository.save(posMasterOld);
|
||||||
await CreatePosMasterHistoryOfficer(posMasterOld.id, request);
|
await CreatePosMasterHistoryOfficer(posMasterOld.id, request);
|
||||||
|
|
|
||||||
|
|
@ -571,11 +571,11 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
item.current_holderId = item.next_holderId;
|
item.current_holderId = item.next_holderId;
|
||||||
item.conditionReason = _null;
|
// item.conditionReason = _null;
|
||||||
if (item.current_holderId) {
|
// if (item.current_holderId) {
|
||||||
item.conditionReason = _null;
|
// item.conditionReason = _null;
|
||||||
item.isCondition = false;
|
// item.isCondition = false;
|
||||||
}
|
// }
|
||||||
item.next_holderId = null;
|
item.next_holderId = null;
|
||||||
item.lastUpdateUserId = lastUpdateUserId;
|
item.lastUpdateUserId = lastUpdateUserId;
|
||||||
item.lastUpdateFullName = lastUpdateFullName;
|
item.lastUpdateFullName = lastUpdateFullName;
|
||||||
|
|
@ -1760,10 +1760,10 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
posMaster.next_holderId = item.current_holderId;
|
posMaster.next_holderId = item.current_holderId;
|
||||||
if (posMaster.next_holderId) {
|
// if (posMaster.next_holderId) {
|
||||||
posMaster.conditionReason = _null;
|
// posMaster.conditionReason = _null;
|
||||||
posMaster.isCondition = false;
|
// posMaster.isCondition = false;
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
posMaster.next_holderId = null;
|
posMaster.next_holderId = null;
|
||||||
posMaster.isSit = false;
|
posMaster.isSit = false;
|
||||||
|
|
@ -1856,10 +1856,10 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
posMaster.next_holderId = item.current_holderId;
|
posMaster.next_holderId = item.current_holderId;
|
||||||
if (posMaster.next_holderId) {
|
// if (posMaster.next_holderId) {
|
||||||
posMaster.conditionReason = _null;
|
// posMaster.conditionReason = _null;
|
||||||
posMaster.isCondition = false;
|
// posMaster.isCondition = false;
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
posMaster.next_holderId = null;
|
posMaster.next_holderId = null;
|
||||||
posMaster.isSit = false;
|
posMaster.isSit = false;
|
||||||
|
|
@ -1954,10 +1954,10 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
posMaster.next_holderId = item.current_holderId;
|
posMaster.next_holderId = item.current_holderId;
|
||||||
if (posMaster.next_holderId) {
|
// if (posMaster.next_holderId) {
|
||||||
posMaster.conditionReason = _null;
|
// posMaster.conditionReason = _null;
|
||||||
posMaster.isCondition = false;
|
// posMaster.isCondition = false;
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
posMaster.next_holderId = null;
|
posMaster.next_holderId = null;
|
||||||
posMaster.isSit = false;
|
posMaster.isSit = false;
|
||||||
|
|
@ -2054,10 +2054,10 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
posMaster.next_holderId = item.current_holderId;
|
posMaster.next_holderId = item.current_holderId;
|
||||||
if (posMaster.next_holderId) {
|
// if (posMaster.next_holderId) {
|
||||||
posMaster.conditionReason = _null;
|
// posMaster.conditionReason = _null;
|
||||||
posMaster.isCondition = false;
|
// posMaster.isCondition = false;
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
posMaster.next_holderId = null;
|
posMaster.next_holderId = null;
|
||||||
posMaster.isSit = false;
|
posMaster.isSit = false;
|
||||||
|
|
@ -2157,10 +2157,10 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
posMaster.next_holderId = item.current_holderId;
|
posMaster.next_holderId = item.current_holderId;
|
||||||
if (posMaster.next_holderId) {
|
// if (posMaster.next_holderId) {
|
||||||
posMaster.conditionReason = _null;
|
// posMaster.conditionReason = _null;
|
||||||
posMaster.isCondition = false;
|
// posMaster.isCondition = false;
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
posMaster.next_holderId = null;
|
posMaster.next_holderId = null;
|
||||||
posMaster.isSit = false;
|
posMaster.isSit = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue