add pointSumTotal
This commit is contained in:
parent
7351c9b510
commit
063752f002
1 changed files with 15 additions and 3 deletions
|
|
@ -61,6 +61,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
.leftJoinAndSelect("positions.posExecutive", "posExecutive")
|
.leftJoinAndSelect("positions.posExecutive", "posExecutive")
|
||||||
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
||||||
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
|
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
|
||||||
|
.leftJoinAndSelect("current_holder.profileAssessments", "profileAssessments")
|
||||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||||
.leftJoinAndSelect("current_holder.posType", "posType")
|
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||||
.where({
|
.where({
|
||||||
|
|
@ -188,6 +189,13 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
(position) => position.positionIsSelected === true,
|
(position) => position.positionIsSelected === true,
|
||||||
);
|
);
|
||||||
const isSpecial = specialPosition ? specialPosition.isSpecial : null;
|
const isSpecial = specialPosition ? specialPosition.isSpecial : null;
|
||||||
|
|
||||||
|
const latestProfileAssessment = item.current_holder.profileAssessments
|
||||||
|
? item.current_holder.profileAssessments.sort((a:any, b:any) => b.date - a.date)[0]
|
||||||
|
: null;
|
||||||
|
const pointSumtotal = latestProfileAssessment
|
||||||
|
? latestProfileAssessment.pointSumTotal
|
||||||
|
: null;
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
profileId: item.current_holder.id,
|
profileId: item.current_holder.id,
|
||||||
|
|
@ -216,7 +224,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
child3: item.orgChild3?.orgChild3Name ? item.orgChild3.orgChild3Name : null,
|
child3: item.orgChild3?.orgChild3Name ? item.orgChild3.orgChild3Name : null,
|
||||||
child4Id: item.orgChild4Id,
|
child4Id: item.orgChild4Id,
|
||||||
child4: item.orgChild4?.orgChild4Name ? item.orgChild4.orgChild4Name : null,
|
child4: item.orgChild4?.orgChild4Name ? item.orgChild4.orgChild4Name : null,
|
||||||
result: null,
|
result: pointSumtotal,
|
||||||
duration: null,
|
duration: null,
|
||||||
isPunish:
|
isPunish:
|
||||||
item.current_holder.profileDisciplines.filter(
|
item.current_holder.profileDisciplines.filter(
|
||||||
|
|
@ -279,6 +287,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
.leftJoinAndSelect("employeePosMaster.positions", "positions")
|
.leftJoinAndSelect("employeePosMaster.positions", "positions")
|
||||||
.leftJoinAndSelect("current_holder.profileSalarys", "profileSalarys")
|
.leftJoinAndSelect("current_holder.profileSalarys", "profileSalarys")
|
||||||
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
|
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
|
||||||
|
.leftJoinAndSelect("current_holder.profileAssessments", "profileAssessments")
|
||||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||||
.leftJoinAndSelect("current_holder.posType", "posType")
|
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||||
.where({
|
.where({
|
||||||
|
|
@ -392,7 +401,10 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
datePeriodStart.getMonth() - 6,
|
datePeriodStart.getMonth() - 6,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
const latestProfileAssessment = item.current_holder.profileAssessments
|
||||||
|
? item.current_holder.profileAssessments.sort((a: any, b: any) => b.date - a.date)[0]
|
||||||
|
: null;
|
||||||
|
const pointSumtotal = latestProfileAssessment ? latestProfileAssessment.pointSumTotal : null;
|
||||||
return {
|
return {
|
||||||
profileId: item.current_holder.id,
|
profileId: item.current_holder.id,
|
||||||
salaryLevel: item.current_holder.salaryLevel,
|
salaryLevel: item.current_holder.salaryLevel,
|
||||||
|
|
@ -423,7 +435,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
child3: item.orgChild3?.orgChild3Name ? item.orgChild3.orgChild3Name : null,
|
child3: item.orgChild3?.orgChild3Name ? item.orgChild3.orgChild3Name : null,
|
||||||
child4Id: item.orgChild4Id,
|
child4Id: item.orgChild4Id,
|
||||||
child4: item.orgChild4?.orgChild4Name ? item.orgChild4.orgChild4Name : null,
|
child4: item.orgChild4?.orgChild4Name ? item.orgChild4.orgChild4Name : null,
|
||||||
result: null,
|
result: pointSumtotal,
|
||||||
duration: null,
|
duration: null,
|
||||||
isPunish:
|
isPunish:
|
||||||
item.current_holder.profileDisciplines.filter(
|
item.current_holder.profileDisciplines.filter(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue