add report filter1
This commit is contained in:
parent
d2050cbfea
commit
e605aea0ee
1 changed files with 42 additions and 4 deletions
|
|
@ -31,7 +31,7 @@ import {
|
||||||
UpdateProfileMother,
|
UpdateProfileMother,
|
||||||
UpdateProfileCouple,
|
UpdateProfileCouple,
|
||||||
} from "../entities/Profile";
|
} from "../entities/Profile";
|
||||||
import { Brackets, IsNull, Like, Not } from "typeorm";
|
import { Brackets, In, IsNull, Like, Not } from "typeorm";
|
||||||
import { OrgRevision } from "../entities/OrgRevision";
|
import { OrgRevision } from "../entities/OrgRevision";
|
||||||
import { PosMaster } from "../entities/PosMaster";
|
import { PosMaster } from "../entities/PosMaster";
|
||||||
import { PosLevel } from "../entities/PosLevel";
|
import { PosLevel } from "../entities/PosLevel";
|
||||||
|
|
@ -1136,7 +1136,11 @@ export class ProfileController extends Controller {
|
||||||
"amount",
|
"amount",
|
||||||
"remark",
|
"remark",
|
||||||
],
|
],
|
||||||
where: { profileId: id },
|
where: {
|
||||||
|
profileId: id,
|
||||||
|
commandCode: In(["5","6"]),
|
||||||
|
isEntry: false
|
||||||
|
},
|
||||||
order: { order: "ASC" },
|
order: { order: "ASC" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -1291,7 +1295,11 @@ export class ProfileController extends Controller {
|
||||||
];
|
];
|
||||||
|
|
||||||
const position_raw = await this.salaryRepo.find({
|
const position_raw = await this.salaryRepo.find({
|
||||||
where: { profileId: id },
|
where: {
|
||||||
|
profileId: id,
|
||||||
|
commandCode: In(["1", "2", "3", "4", "8", "10", "11", "12", "15", "16"]),
|
||||||
|
isEntry: false
|
||||||
|
},
|
||||||
order: { order: "ASC" },
|
order: { order: "ASC" },
|
||||||
});
|
});
|
||||||
const positionList =
|
const positionList =
|
||||||
|
|
@ -1310,7 +1318,6 @@ export class ProfileController extends Controller {
|
||||||
{
|
{
|
||||||
commandDateAffect: "-",
|
commandDateAffect: "-",
|
||||||
commandDateSign: "-",
|
commandDateSign: "-",
|
||||||
refCommandNo: "-",
|
|
||||||
posNo: "-",
|
posNo: "-",
|
||||||
position: "-",
|
position: "-",
|
||||||
posType: "-",
|
posType: "-",
|
||||||
|
|
@ -1402,6 +1409,36 @@ export class ProfileController extends Controller {
|
||||||
detail: "-",
|
detail: "-",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const otherIncome_raw = await this.salaryRepo.find({
|
||||||
|
where: {
|
||||||
|
profileId: id,
|
||||||
|
commandCode: "7",
|
||||||
|
isEntry: false
|
||||||
|
},
|
||||||
|
order: { order: "ASC" },
|
||||||
|
});
|
||||||
|
const otherIncome =
|
||||||
|
otherIncome_raw.length > 0
|
||||||
|
? otherIncome_raw.map((item) => ({
|
||||||
|
commandDateAffect: item.commandDateAffect?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.commandDateAffect)):"",
|
||||||
|
commandDateSign: item.commandDateSign?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.commandDateSign)):"",
|
||||||
|
commandNo: item.commandNo?Extension.ToThaiNumber(item.commandNo):"",
|
||||||
|
position: item.positionName,
|
||||||
|
posLevel: item.positionLevel?Extension.ToThaiNumber(item.positionLevel):"",
|
||||||
|
amount: item.amount?Extension.ToThaiNumber(Number(item.amount).toLocaleString()):"",
|
||||||
|
}))
|
||||||
|
: [
|
||||||
|
{
|
||||||
|
commandDateAffect: "-",
|
||||||
|
commandDateSign: "-",
|
||||||
|
commandNo: "-",
|
||||||
|
position: "-",
|
||||||
|
posLevel: "-",
|
||||||
|
amount: "-",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const sum = profiles?Extension.ToThaiNumber((Number(profiles.amount) + Number(profiles.positionSalaryAmount) + Number(profiles.mouthSalaryAmount) + Number(profiles.amountSpecial)).toLocaleString()):"";
|
const sum = profiles?Extension.ToThaiNumber((Number(profiles.amount) + Number(profiles.positionSalaryAmount) + Number(profiles.mouthSalaryAmount) + Number(profiles.amountSpecial)).toLocaleString()):"";
|
||||||
const fullCurrentAddress = profiles?Extension.ToThaiNumber(profiles.currentAddress + " ตำบล/แขวง " + profiles.currentSubDistrict.name + " อำเภอ/เขต " + profiles.currentDistrict.name + " จังหวัด " + profiles.currentProvince.name + profiles.currentZipCode):"";
|
const fullCurrentAddress = profiles?Extension.ToThaiNumber(profiles.currentAddress + " ตำบล/แขวง " + profiles.currentSubDistrict.name + " อำเภอ/เขต " + profiles.currentDistrict.name + " จังหวัด " + profiles.currentProvince.name + profiles.currentZipCode):"";
|
||||||
const fullRegistrationAddress = profiles?Extension.ToThaiNumber(profiles.registrationAddress + " ตำบล/แขวง " + profiles.registrationSubDistrict.name + " อำเภอ/เขต " + profiles.registrationDistrict.name + " จังหวัด " + profiles.registrationProvince.name + profiles.registrationZipCode):"";
|
const fullRegistrationAddress = profiles?Extension.ToThaiNumber(profiles.registrationAddress + " ตำบล/แขวง " + profiles.registrationSubDistrict.name + " อำเภอ/เขต " + profiles.registrationDistrict.name + " จังหวัด " + profiles.registrationProvince.name + profiles.registrationZipCode):"";
|
||||||
|
|
@ -1535,6 +1572,7 @@ export class ProfileController extends Controller {
|
||||||
duty,
|
duty,
|
||||||
assessments,
|
assessments,
|
||||||
profileAbility,
|
profileAbility,
|
||||||
|
otherIncome
|
||||||
};
|
};
|
||||||
|
|
||||||
return new HttpSuccess({
|
return new HttpSuccess({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue