no message
This commit is contained in:
parent
ce7f814061
commit
8afaff0d6b
2 changed files with 12 additions and 6 deletions
|
|
@ -407,8 +407,10 @@ export class OrganizationUnauthorizeController extends Controller {
|
|||
posMasterNoSuffix: item.posMasterNoSuffix,
|
||||
orgShortName: orgShortName,
|
||||
position: item.current_holder.position,
|
||||
posType: item.current_holder.posType.posTypeName,
|
||||
posLevel: item.current_holder.posLevel.posLevelName,
|
||||
posType:
|
||||
item.current_holder.posType == null ? null : item.current_holder.posType.posTypeName,
|
||||
posLevel:
|
||||
item.current_holder.posLevel == null ? null : item.current_holder.posLevel.posLevelName,
|
||||
amount: amount ? amount : null,
|
||||
rootId: item.orgRootId,
|
||||
root: item.orgRoot?.orgRootName ? item.orgRoot.orgRootName : null,
|
||||
|
|
|
|||
|
|
@ -159,10 +159,14 @@ export class PositionController extends Controller {
|
|||
requestBody: CreatePosDictExe,
|
||||
@Request() request: { user: Record<string, any> },
|
||||
) {
|
||||
const posDict = Object.assign(new PosDict(), requestBody);
|
||||
if (!posDict) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
}
|
||||
let posDict: any;
|
||||
posDict.posDictName = requestBody.posDictName;
|
||||
posDict.posDictField = requestBody.posDictField;
|
||||
posDict.posTypeId = requestBody.posTypeId;
|
||||
posDict.posLevelId = requestBody.posLevelId;
|
||||
posDict.posDictExecutiveField = requestBody.posDictExecutiveField;
|
||||
posDict.posDictArea = requestBody.posDictArea;
|
||||
posDict.isSpecial = requestBody.isSpecial;
|
||||
|
||||
const checkPosTypeId = await this.posTypeRepository.findOne({
|
||||
where: { id: posDict.posTypeId },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue