no message
This commit is contained in:
parent
77d9a382a2
commit
134296b5b1
2 changed files with 21 additions and 20 deletions
|
|
@ -316,10 +316,9 @@ export class ImportDataController extends Controller {
|
||||||
existingProfile.map(async (item) => {
|
existingProfile.map(async (item) => {
|
||||||
rowCount++;
|
rowCount++;
|
||||||
const profileSalary = new ProfileSalary();
|
const profileSalary = new ProfileSalary();
|
||||||
profileSalary.date =
|
profileSalary.date = item.MP_POS_DATE
|
||||||
item.MP_POS_DATE == ""
|
? new Date(item.MP_POS_DATE.replace(" +0700 +07:00", ""))
|
||||||
? null_
|
: null_;
|
||||||
: new Date(item.MP_POS_DATE.replace(" +0700 +07:00", ""));
|
|
||||||
const SALARY: any =
|
const SALARY: any =
|
||||||
item.SALARY == null || item.SALARY == "" ? null_ : Number(item.SALARY);
|
item.SALARY == null || item.SALARY == "" ? null_ : Number(item.SALARY);
|
||||||
profileSalary.amount = SALARY;
|
profileSalary.amount = SALARY;
|
||||||
|
|
@ -344,8 +343,8 @@ export class ImportDataController extends Controller {
|
||||||
profileSalary.templateDoc = item.REMARK;
|
profileSalary.templateDoc = item.REMARK;
|
||||||
profileSalary.refCommandDate =
|
profileSalary.refCommandDate =
|
||||||
item.MP_COMMAND_DATE == ""
|
item.MP_COMMAND_DATE == ""
|
||||||
? null_
|
? new Date(item.MP_COMMAND_DATE.replace(" +0700 +07:00", ""))
|
||||||
: new Date(item.MP_COMMAND_DATE.replace(" +0700 +07:00", ""));
|
: null_;
|
||||||
profileSalary.refCommandCode = item.FLAG_TO_NAME_CODE;
|
profileSalary.refCommandCode = item.FLAG_TO_NAME_CODE;
|
||||||
profileSalary.refCommandName = item.FLAG_TO_NAME;
|
profileSalary.refCommandName = item.FLAG_TO_NAME;
|
||||||
profileSalary.orgRoot = item.DEPARTMENT_NAME;
|
profileSalary.orgRoot = item.DEPARTMENT_NAME;
|
||||||
|
|
@ -364,12 +363,12 @@ export class ImportDataController extends Controller {
|
||||||
profileSalary.lastUpdateFullName = request.user.name;
|
profileSalary.lastUpdateFullName = request.user.name;
|
||||||
profileSalary.createdAt =
|
profileSalary.createdAt =
|
||||||
item.USER_CREATE == ""
|
item.USER_CREATE == ""
|
||||||
? null_
|
? new Date(item.USER_CREATE.replace(" +0700 +07:00", ""))
|
||||||
: new Date(item.USER_CREATE.replace(" +0700 +07:00", ""));
|
: null_;
|
||||||
profileSalary.lastUpdatedAt =
|
profileSalary.lastUpdatedAt =
|
||||||
item.USER_UPDATE == ""
|
item.USER_UPDATE == ""
|
||||||
? null_
|
? new Date(item.USER_UPDATE.replace(" +0700 +07:00", ""))
|
||||||
: new Date(item.USER_UPDATE.replace(" +0700 +07:00", ""));
|
: null_;
|
||||||
console.log(">>>>>>>>>>>>>>>>>>>" + rowCount);
|
console.log(">>>>>>>>>>>>>>>>>>>" + rowCount);
|
||||||
await this.salaryRepo.save(profileSalary);
|
await this.salaryRepo.save(profileSalary);
|
||||||
}),
|
}),
|
||||||
|
|
@ -430,8 +429,8 @@ export class ImportDataController extends Controller {
|
||||||
const profileSalary = new ProfileSalary();
|
const profileSalary = new ProfileSalary();
|
||||||
profileSalary.date =
|
profileSalary.date =
|
||||||
item.MP_POS_DATE == ""
|
item.MP_POS_DATE == ""
|
||||||
? null_
|
? new Date(item.MP_POS_DATE.replace(" +0700 +07:00", ""))
|
||||||
: new Date(item.MP_POS_DATE.replace(" +0700 +07:00", ""));
|
: null_;
|
||||||
const SALARY: any =
|
const SALARY: any =
|
||||||
item.SALARY == null || item.SALARY == "" ? null_ : Number(item.SALARY);
|
item.SALARY == null || item.SALARY == "" ? null_ : Number(item.SALARY);
|
||||||
profileSalary.amount = SALARY;
|
profileSalary.amount = SALARY;
|
||||||
|
|
@ -456,8 +455,8 @@ export class ImportDataController extends Controller {
|
||||||
profileSalary.templateDoc = item.REMARK;
|
profileSalary.templateDoc = item.REMARK;
|
||||||
profileSalary.refCommandDate =
|
profileSalary.refCommandDate =
|
||||||
item.MP_COMMAND_DATE == ""
|
item.MP_COMMAND_DATE == ""
|
||||||
? null_
|
? new Date(item.MP_COMMAND_DATE.replace(" +0700 +07:00", ""))
|
||||||
: new Date(item.MP_COMMAND_DATE.replace(" +0700 +07:00", ""));
|
: null_;
|
||||||
profileSalary.refCommandCode = item.FLAG_TO_NAME_CODE;
|
profileSalary.refCommandCode = item.FLAG_TO_NAME_CODE;
|
||||||
profileSalary.refCommandName = item.FLAG_TO_NAME;
|
profileSalary.refCommandName = item.FLAG_TO_NAME;
|
||||||
profileSalary.orgRoot = item.DEPARTMENT_NAME;
|
profileSalary.orgRoot = item.DEPARTMENT_NAME;
|
||||||
|
|
@ -476,12 +475,12 @@ export class ImportDataController extends Controller {
|
||||||
profileSalary.lastUpdateFullName = request.user.name;
|
profileSalary.lastUpdateFullName = request.user.name;
|
||||||
profileSalary.createdAt =
|
profileSalary.createdAt =
|
||||||
item.USER_CREATE == ""
|
item.USER_CREATE == ""
|
||||||
? null_
|
? new Date(item.USER_CREATE.replace(" +0700 +07:00", ""))
|
||||||
: new Date(item.USER_CREATE.replace(" +0700 +07:00", ""));
|
: null_;
|
||||||
profileSalary.lastUpdatedAt =
|
profileSalary.lastUpdatedAt =
|
||||||
item.USER_UPDATE == ""
|
item.USER_UPDATE == ""
|
||||||
? null_
|
? new Date(item.USER_UPDATE.replace(" +0700 +07:00", ""))
|
||||||
: new Date(item.USER_UPDATE.replace(" +0700 +07:00", ""));
|
: null_;
|
||||||
console.log(">>>>>>>>>>>>>>>>>>>" + rowCount);
|
console.log(">>>>>>>>>>>>>>>>>>>" + rowCount);
|
||||||
await this.salaryRepo.save(profileSalary);
|
await this.salaryRepo.save(profileSalary);
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -5468,7 +5468,9 @@ export class OrganizationController extends Controller {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Post("find/node-all")
|
@Post("find/node-all")
|
||||||
async findNodeAllOrg(@Body() requestBody: { node: number; nodeId: string; isRoot: boolean }) {
|
async findNodeAllOrg(
|
||||||
|
@Body() requestBody: { node: number | null; nodeId: string | null; isRoot: boolean },
|
||||||
|
) {
|
||||||
let orgRootRankSub = ["DISTRICT"];
|
let orgRootRankSub = ["DISTRICT"];
|
||||||
if (requestBody.isRoot == true) {
|
if (requestBody.isRoot == true) {
|
||||||
orgRootRankSub = ["BUREAU", "OFFICE"];
|
orgRootRankSub = ["BUREAU", "OFFICE"];
|
||||||
|
|
@ -5476,7 +5478,7 @@ export class OrganizationController extends Controller {
|
||||||
switch (requestBody.node) {
|
switch (requestBody.node) {
|
||||||
case 0: {
|
case 0: {
|
||||||
const data = await this.orgRootRepository.find({
|
const data = await this.orgRootRepository.find({
|
||||||
where: { id: requestBody.nodeId, orgRootRankSub: In(orgRootRankSub) },
|
where: { id: requestBody.nodeId ?? "", orgRootRankSub: In(orgRootRankSub) },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(
|
return new HttpSuccess(
|
||||||
data.map((y) => ({
|
data.map((y) => ({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue