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,
|
posMasterNoSuffix: item.posMasterNoSuffix,
|
||||||
orgShortName: orgShortName,
|
orgShortName: orgShortName,
|
||||||
position: item.current_holder.position,
|
position: item.current_holder.position,
|
||||||
posType: item.current_holder.posType.posTypeName,
|
posType:
|
||||||
posLevel: item.current_holder.posLevel.posLevelName,
|
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,
|
amount: amount ? amount : null,
|
||||||
rootId: item.orgRootId,
|
rootId: item.orgRootId,
|
||||||
root: item.orgRoot?.orgRootName ? item.orgRoot.orgRootName : null,
|
root: item.orgRoot?.orgRootName ? item.orgRoot.orgRootName : null,
|
||||||
|
|
|
||||||
|
|
@ -159,10 +159,14 @@ export class PositionController extends Controller {
|
||||||
requestBody: CreatePosDictExe,
|
requestBody: CreatePosDictExe,
|
||||||
@Request() request: { user: Record<string, any> },
|
@Request() request: { user: Record<string, any> },
|
||||||
) {
|
) {
|
||||||
const posDict = Object.assign(new PosDict(), requestBody);
|
let posDict: any;
|
||||||
if (!posDict) {
|
posDict.posDictName = requestBody.posDictName;
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");
|
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({
|
const checkPosTypeId = await this.posTypeRepository.findOne({
|
||||||
where: { id: posDict.posTypeId },
|
where: { id: posDict.posTypeId },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue