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 (metaStateOp.operator == "PersonnelOfficer" && correspondingState?.order == 1) {
|
||||
return;
|
||||
}
|
||||
else if (metaStateOp.operator == "Officer" && [1, 2].includes(correspondingState?.order as number)) {
|
||||
metaStateOp.operator = "PersonnelOfficer"
|
||||
} else if (
|
||||
metaStateOp.operator == "Officer" &&
|
||||
[1, 2].includes(correspondingState?.order as number)
|
||||
) {
|
||||
metaStateOp.operator = "PersonnelOfficer";
|
||||
}
|
||||
}
|
||||
// Task #2208 กรณีขอแก้ไขข้อมูลทะเบียนประวัติ และ IDP และคนขออยู่ในสำนักปลัดกรุงเทพมหานคร
|
||||
if (metaStateOp.operator == "Officer" &&
|
||||
(["REGISTRY_PROFILE", "REGISTRY_PROFILE_EMP", "REGISTRY_IDP"].includes(body.sysName))
|
||||
if (
|
||||
metaStateOp.operator == "Officer" &&
|
||||
["REGISTRY_PROFILE", "REGISTRY_PROFILE_EMP", "REGISTRY_IDP"].includes(body.sysName)
|
||||
) {
|
||||
metaStateOp.operator = "PersonnelOfficer"
|
||||
metaStateOp.operator = "PersonnelOfficer";
|
||||
}
|
||||
}
|
||||
if (correspondingState) {
|
||||
|
|
@ -1042,14 +1045,12 @@ export class WorkflowController extends Controller {
|
|||
]);
|
||||
|
||||
// 8. ปรับ response mapping (ถ้าจำเป็น)
|
||||
const processedData = body.isAct
|
||||
? data
|
||||
: data.map((x: any) => ({
|
||||
...x,
|
||||
posExecutiveNameOrg:
|
||||
(x.posExecutiveName ?? "") +
|
||||
(x.orgChild4 ?? x.orgChild3 ?? x.orgChild2 ?? x.orgChild1 ?? x.orgRoot ?? ""),
|
||||
}));
|
||||
const processedData = data.map((x: any) => ({
|
||||
...x,
|
||||
posExecutiveNameOrg:
|
||||
(x.posExecutiveName ?? "") +
|
||||
(x.orgChild4 ?? x.orgChild3 ?? x.orgChild2 ?? x.orgChild1 ?? x.orgRoot ?? ""),
|
||||
}));
|
||||
|
||||
return new HttpSuccess({ data: processedData, total });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue