This commit is contained in:
parent
7d572b18d2
commit
f31ecf1c2b
11 changed files with 349 additions and 19 deletions
|
|
@ -323,14 +323,30 @@ export class OrgChild1Controller {
|
|||
// if(requestBody.orgChild1ShortName == rootIdExits.orgRootShortName){
|
||||
// throw new HttpError(HttpStatusCode.NOT_FOUND, "อักษรย่อนี้ซ้ำกับอักษรย่อหน่วยงาน");
|
||||
// }
|
||||
const _null:any = null;
|
||||
const before = structuredClone(child1);
|
||||
|
||||
child1.lastUpdateUserId = request.user.sub;
|
||||
child1.lastUpdateFullName = request.user.name;
|
||||
child1.lastUpdatedAt = new Date();
|
||||
child1.orgRevisionId = String(rootIdExits?.orgRevisionId);
|
||||
child1.orgRootId = String(rootIdExits?.id);
|
||||
child1.responsibility = child1.responsibility || "";
|
||||
this.child1Repository.merge(child1, requestBody);
|
||||
this.child1Repository.merge(child1,{
|
||||
orgChild1Name: requestBody.orgChild1Name,
|
||||
orgChild1ShortName: requestBody.orgChild1ShortName,
|
||||
orgChild1Code: requestBody.orgChild1Code,
|
||||
DEPARTMENT_CODE: requestBody.DEPARTMENT_CODE != null ? requestBody.DEPARTMENT_CODE : _null,
|
||||
DIVISION_CODE: requestBody.DIVISION_CODE != null ? requestBody.DIVISION_CODE : _null,
|
||||
SECTION_CODE: requestBody.SECTION_CODE != null ? requestBody.SECTION_CODE : _null,
|
||||
JOB_CODE: requestBody.JOB_CODE != null ? requestBody.JOB_CODE : _null,
|
||||
isOfficer: requestBody.isOfficer,
|
||||
isInformation: requestBody.isInformation,
|
||||
orgChild1PhoneEx: requestBody.orgChild1PhoneEx,
|
||||
orgChild1PhoneIn: requestBody.orgChild1PhoneIn,
|
||||
orgChild1Fax: requestBody.orgChild1Fax,
|
||||
misId: requestBody.misId,
|
||||
});
|
||||
await this.child1Repository.save(child1, { data: request });
|
||||
setLogDataDiff(request, { before, after: child1 });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue