fix: PUT /org/workflow/commander/operate isAct = true not response posExecutiveNameOrg
All checks were successful
Build & Deploy on Dev / build (push) Successful in 51s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 51s
This commit is contained in:
parent
0a3f0d9170
commit
e5e407e122
1 changed files with 15 additions and 14 deletions
|
|
@ -150,16 +150,19 @@ export class WorkflowController extends Controller {
|
||||||
if (body.sysName == "SYS_TRANSFER_REQ") {
|
if (body.sysName == "SYS_TRANSFER_REQ") {
|
||||||
if (metaStateOp.operator == "PersonnelOfficer" && correspondingState?.order == 1) {
|
if (metaStateOp.operator == "PersonnelOfficer" && correspondingState?.order == 1) {
|
||||||
return;
|
return;
|
||||||
}
|
} else if (
|
||||||
else if (metaStateOp.operator == "Officer" && [1, 2].includes(correspondingState?.order as number)) {
|
metaStateOp.operator == "Officer" &&
|
||||||
metaStateOp.operator = "PersonnelOfficer"
|
[1, 2].includes(correspondingState?.order as number)
|
||||||
|
) {
|
||||||
|
metaStateOp.operator = "PersonnelOfficer";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Task #2208 กรณีขอแก้ไขข้อมูลทะเบียนประวัติ และ IDP และคนขออยู่ในสำนักปลัดกรุงเทพมหานคร
|
// Task #2208 กรณีขอแก้ไขข้อมูลทะเบียนประวัติ และ IDP และคนขออยู่ในสำนักปลัดกรุงเทพมหานคร
|
||||||
if (metaStateOp.operator == "Officer" &&
|
if (
|
||||||
(["REGISTRY_PROFILE", "REGISTRY_PROFILE_EMP", "REGISTRY_IDP"].includes(body.sysName))
|
metaStateOp.operator == "Officer" &&
|
||||||
|
["REGISTRY_PROFILE", "REGISTRY_PROFILE_EMP", "REGISTRY_IDP"].includes(body.sysName)
|
||||||
) {
|
) {
|
||||||
metaStateOp.operator = "PersonnelOfficer"
|
metaStateOp.operator = "PersonnelOfficer";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (correspondingState) {
|
if (correspondingState) {
|
||||||
|
|
@ -1042,14 +1045,12 @@ export class WorkflowController extends Controller {
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 8. ปรับ response mapping (ถ้าจำเป็น)
|
// 8. ปรับ response mapping (ถ้าจำเป็น)
|
||||||
const processedData = body.isAct
|
const processedData = data.map((x: any) => ({
|
||||||
? data
|
...x,
|
||||||
: data.map((x: any) => ({
|
posExecutiveNameOrg:
|
||||||
...x,
|
(x.posExecutiveName ?? "") +
|
||||||
posExecutiveNameOrg:
|
(x.orgChild4 ?? x.orgChild3 ?? x.orgChild2 ?? x.orgChild1 ?? x.orgRoot ?? ""),
|
||||||
(x.posExecutiveName ?? "") +
|
}));
|
||||||
(x.orgChild4 ?? x.orgChild3 ?? x.orgChild2 ?? x.orgChild1 ?? x.orgRoot ?? ""),
|
|
||||||
}));
|
|
||||||
|
|
||||||
return new HttpSuccess({ data: processedData, total });
|
return new HttpSuccess({ data: processedData, total });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue