no message
This commit is contained in:
parent
33533d5638
commit
d18d28cb5b
7 changed files with 26 additions and 20 deletions
|
|
@ -4480,7 +4480,7 @@ export class CommandController extends Controller {
|
||||||
];
|
];
|
||||||
const _organization = organization
|
const _organization = organization
|
||||||
.filter((part) => part !== undefined && part !== null)
|
.filter((part) => part !== undefined && part !== null)
|
||||||
.join("/");
|
.join(" ");
|
||||||
|
|
||||||
const organizationNew = [
|
const organizationNew = [
|
||||||
posMasterAct.posMaster?.current_holder?.position ?? null,
|
posMasterAct.posMaster?.current_holder?.position ?? null,
|
||||||
|
|
@ -4492,7 +4492,7 @@ export class CommandController extends Controller {
|
||||||
];
|
];
|
||||||
const _organizationNew = organizationNew
|
const _organizationNew = organizationNew
|
||||||
.filter((part) => part !== undefined && part !== null)
|
.filter((part) => part !== undefined && part !== null)
|
||||||
.join("/");
|
.join(" ");
|
||||||
var _data = {
|
var _data = {
|
||||||
no: Extension.ToThaiNumber((i + 1).toString()),
|
no: Extension.ToThaiNumber((i + 1).toString()),
|
||||||
fullName: `${item.Prefix ?? ""}${item.FirstName ?? ""} ${item.LastName ?? ""}`,
|
fullName: `${item.Prefix ?? ""}${item.FirstName ?? ""} ${item.LastName ?? ""}`,
|
||||||
|
|
|
||||||
|
|
@ -300,7 +300,7 @@ export class PosMasterActController extends Controller {
|
||||||
];
|
];
|
||||||
const _organization = organization
|
const _organization = organization
|
||||||
.filter((part) => part !== undefined && part !== null)
|
.filter((part) => part !== undefined && part !== null)
|
||||||
.join("/");
|
.join(" ");
|
||||||
|
|
||||||
const organizationNew = [
|
const organizationNew = [
|
||||||
posMasterAct.posMaster?.current_holder?.position ?? null,
|
posMasterAct.posMaster?.current_holder?.position ?? null,
|
||||||
|
|
@ -312,7 +312,7 @@ export class PosMasterActController extends Controller {
|
||||||
];
|
];
|
||||||
const _organizationNew = organizationNew
|
const _organizationNew = organizationNew
|
||||||
.filter((part) => part !== undefined && part !== null)
|
.filter((part) => part !== undefined && part !== null)
|
||||||
.join("/");
|
.join(" ");
|
||||||
return new HttpSuccess({
|
return new HttpSuccess({
|
||||||
prefix: posMasterAct.posMasterChild?.current_holder?.prefix ?? null,
|
prefix: posMasterAct.posMasterChild?.current_holder?.prefix ?? null,
|
||||||
firstName: posMasterAct.posMasterChild?.current_holder?.firstName ?? null,
|
firstName: posMasterAct.posMasterChild?.current_holder?.firstName ?? null,
|
||||||
|
|
|
||||||
|
|
@ -5502,7 +5502,7 @@ export class ProfileController extends Controller {
|
||||||
: posMaster_.orgChild1.orgChild1Name,
|
: posMaster_.orgChild1.orgChild1Name,
|
||||||
posMaster_ == null || posMaster_.orgRoot == null ? null : posMaster_.orgRoot.orgRootName,
|
posMaster_ == null || posMaster_.orgRoot == null ? null : posMaster_.orgRoot.orgRootName,
|
||||||
];
|
];
|
||||||
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join("/");
|
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join(" ");
|
||||||
|
|
||||||
//find commander(ผู้บังคับบัญชา)
|
//find commander(ผู้บังคับบัญชา)
|
||||||
let node = 4;
|
let node = 4;
|
||||||
|
|
@ -5707,7 +5707,7 @@ export class ProfileController extends Controller {
|
||||||
];
|
];
|
||||||
commanderOrg_ = commanderFullNameParts
|
commanderOrg_ = commanderFullNameParts
|
||||||
.filter((part) => part !== undefined && part !== null)
|
.filter((part) => part !== undefined && part !== null)
|
||||||
.join("/");
|
.join(" ");
|
||||||
|
|
||||||
const commandAboveProfile = await this.profileRepo.findOne({
|
const commandAboveProfile = await this.profileRepo.findOne({
|
||||||
where: { id: String(commandAboveProfileId) },
|
where: { id: String(commandAboveProfileId) },
|
||||||
|
|
@ -5755,7 +5755,7 @@ export class ProfileController extends Controller {
|
||||||
];
|
];
|
||||||
commanderAboveOrg_ = commanderAboveFullNameParts
|
commanderAboveOrg_ = commanderAboveFullNameParts
|
||||||
.filter((part) => part !== undefined && part !== null)
|
.filter((part) => part !== undefined && part !== null)
|
||||||
.join("/");
|
.join(" ");
|
||||||
|
|
||||||
const _profile: any = {
|
const _profile: any = {
|
||||||
profileId: profile.id,
|
profileId: profile.id,
|
||||||
|
|
|
||||||
|
|
@ -3191,6 +3191,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
.orWhere(conditionFullName, {
|
.orWhere(conditionFullName, {
|
||||||
keyword: `%${body.keyword}%`,
|
keyword: `%${body.keyword}%`,
|
||||||
})
|
})
|
||||||
|
.where("profileEmployee.isLeave = false")
|
||||||
.orderBy("profileEmployee.citizenId", "ASC")
|
.orderBy("profileEmployee.citizenId", "ASC")
|
||||||
.skip((body.page - 1) * body.pageSize)
|
.skip((body.page - 1) * body.pageSize)
|
||||||
.take(body.pageSize)
|
.take(body.pageSize)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,12 @@ import { Profile } from "../entities/Profile";
|
||||||
import { ProfileGovernment, UpdateProfileGovernment } from "../entities/ProfileGovernment";
|
import { ProfileGovernment, UpdateProfileGovernment } from "../entities/ProfileGovernment";
|
||||||
import { Position } from "../entities/Position";
|
import { Position } from "../entities/Position";
|
||||||
import { PosMaster } from "../entities/PosMaster";
|
import { PosMaster } from "../entities/PosMaster";
|
||||||
import { calculateAge, calculateGovAge, calculateRetireDate, setLogDataDiff } from "../interfaces/utils";
|
import {
|
||||||
|
calculateAge,
|
||||||
|
calculateGovAge,
|
||||||
|
calculateRetireDate,
|
||||||
|
setLogDataDiff,
|
||||||
|
} from "../interfaces/utils";
|
||||||
import permission from "../interfaces/permission";
|
import permission from "../interfaces/permission";
|
||||||
import { OrgRevision } from "../entities/OrgRevision";
|
import { OrgRevision } from "../entities/OrgRevision";
|
||||||
@Route("api/v1/org/profile/government")
|
@Route("api/v1/org/profile/government")
|
||||||
|
|
@ -89,7 +94,7 @@ export class ProfileGovernmentHistoryController extends Controller {
|
||||||
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
||||||
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
||||||
];
|
];
|
||||||
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join("/");
|
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join(" ");
|
||||||
let orgShortName = "";
|
let orgShortName = "";
|
||||||
if (posMaster != null) {
|
if (posMaster != null) {
|
||||||
if (posMaster.orgChild1Id === null) {
|
if (posMaster.orgChild1Id === null) {
|
||||||
|
|
@ -120,7 +125,7 @@ export class ProfileGovernmentHistoryController extends Controller {
|
||||||
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate),
|
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate),
|
||||||
dateRetireLaw: record.dateRetireLaw ?? null,
|
dateRetireLaw: record.dateRetireLaw ?? null,
|
||||||
// govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
// govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
||||||
govAge: await calculateGovAge(profile.id,"OFFICER"),
|
govAge: await calculateGovAge(profile.id, "OFFICER"),
|
||||||
dateAppoint: record.dateAppoint,
|
dateAppoint: record.dateAppoint,
|
||||||
dateStart: record.dateStart,
|
dateStart: record.dateStart,
|
||||||
govAgeAbsent: record.govAgeAbsent,
|
govAgeAbsent: record.govAgeAbsent,
|
||||||
|
|
@ -200,7 +205,7 @@ export class ProfileGovernmentHistoryController extends Controller {
|
||||||
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
||||||
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
||||||
];
|
];
|
||||||
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join("/");
|
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join(" ");
|
||||||
let orgShortName = "";
|
let orgShortName = "";
|
||||||
if (posMaster != null) {
|
if (posMaster != null) {
|
||||||
if (posMaster.orgChild1Id === null) {
|
if (posMaster.orgChild1Id === null) {
|
||||||
|
|
@ -231,7 +236,7 @@ export class ProfileGovernmentHistoryController extends Controller {
|
||||||
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate),
|
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate),
|
||||||
dateRetireLaw: record.dateRetireLaw ?? null,
|
dateRetireLaw: record.dateRetireLaw ?? null,
|
||||||
// govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
// govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
||||||
govAge: await calculateGovAge(profileId,"OFFICER"),
|
govAge: await calculateGovAge(profileId, "OFFICER"),
|
||||||
dateAppoint: record.dateAppoint,
|
dateAppoint: record.dateAppoint,
|
||||||
dateStart: record.dateStart,
|
dateStart: record.dateStart,
|
||||||
govAgeAbsent: record.govAgeAbsent,
|
govAgeAbsent: record.govAgeAbsent,
|
||||||
|
|
@ -294,7 +299,7 @@ export class ProfileGovernmentHistoryController extends Controller {
|
||||||
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
||||||
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
||||||
];
|
];
|
||||||
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join("/");
|
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join(" ");
|
||||||
let orgShortName = "";
|
let orgShortName = "";
|
||||||
if (posMaster != null) {
|
if (posMaster != null) {
|
||||||
if (posMaster.orgChild1Id === null) {
|
if (posMaster.orgChild1Id === null) {
|
||||||
|
|
@ -325,7 +330,7 @@ export class ProfileGovernmentHistoryController extends Controller {
|
||||||
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate),
|
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate),
|
||||||
dateRetireLaw: record.dateRetireLaw ?? null,
|
dateRetireLaw: record.dateRetireLaw ?? null,
|
||||||
// govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
// govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
||||||
govAge: await calculateGovAge(profileId,"OFFICER"),
|
govAge: await calculateGovAge(profileId, "OFFICER"),
|
||||||
dateAppoint: record.dateAppoint,
|
dateAppoint: record.dateAppoint,
|
||||||
dateStart: record.dateStart,
|
dateStart: record.dateStart,
|
||||||
govAgeAbsent: record.govAgeAbsent,
|
govAgeAbsent: record.govAgeAbsent,
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ export class ProfileGovernmentEmployeeController extends Controller {
|
||||||
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
||||||
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
||||||
];
|
];
|
||||||
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join("/");
|
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join(" ");
|
||||||
let orgShortName = "";
|
let orgShortName = "";
|
||||||
if (posMaster != null) {
|
if (posMaster != null) {
|
||||||
if (posMaster.orgChild1Id === null) {
|
if (posMaster.orgChild1Id === null) {
|
||||||
|
|
@ -194,7 +194,7 @@ export class ProfileGovernmentEmployeeController extends Controller {
|
||||||
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
||||||
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
||||||
];
|
];
|
||||||
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join("/");
|
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join(" ");
|
||||||
let orgShortName = "";
|
let orgShortName = "";
|
||||||
if (posMaster != null) {
|
if (posMaster != null) {
|
||||||
if (posMaster.orgChild1Id === null) {
|
if (posMaster.orgChild1Id === null) {
|
||||||
|
|
@ -281,7 +281,7 @@ export class ProfileGovernmentEmployeeController extends Controller {
|
||||||
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
||||||
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
||||||
];
|
];
|
||||||
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join("/");
|
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join(" ");
|
||||||
let orgShortName = "";
|
let orgShortName = "";
|
||||||
if (posMaster != null) {
|
if (posMaster != null) {
|
||||||
if (posMaster.orgChild1Id === null) {
|
if (posMaster.orgChild1Id === null) {
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ export class ProfileGovernmentEmployeeTempController extends Controller {
|
||||||
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
||||||
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
||||||
];
|
];
|
||||||
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join("/");
|
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join(" ");
|
||||||
let orgShortName = "";
|
let orgShortName = "";
|
||||||
if (posMaster != null) {
|
if (posMaster != null) {
|
||||||
if (posMaster.orgChild1Id === null) {
|
if (posMaster.orgChild1Id === null) {
|
||||||
|
|
@ -184,7 +184,7 @@ export class ProfileGovernmentEmployeeTempController extends Controller {
|
||||||
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
||||||
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
||||||
];
|
];
|
||||||
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join("/");
|
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join(" ");
|
||||||
let orgShortName = "";
|
let orgShortName = "";
|
||||||
if (posMaster != null) {
|
if (posMaster != null) {
|
||||||
if (posMaster.orgChild1Id === null) {
|
if (posMaster.orgChild1Id === null) {
|
||||||
|
|
@ -271,7 +271,7 @@ export class ProfileGovernmentEmployeeTempController extends Controller {
|
||||||
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
posMaster == null || posMaster.orgChild1 == null ? null : posMaster.orgChild1.orgChild1Name,
|
||||||
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
posMaster == null || posMaster.orgRoot == null ? null : posMaster.orgRoot.orgRootName,
|
||||||
];
|
];
|
||||||
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join("/");
|
const org = fullNameParts.filter((part) => part !== undefined && part !== null).join(" ");
|
||||||
let orgShortName = "";
|
let orgShortName = "";
|
||||||
if (posMaster != null) {
|
if (posMaster != null) {
|
||||||
if (posMaster.orgChild1Id === null) {
|
if (posMaster.orgChild1Id === null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue