This commit is contained in:
Bright 2025-04-30 10:19:00 +07:00
parent fbda664337
commit 2e2d01e69c

View file

@ -572,7 +572,7 @@ export class EmployeePositionController extends Controller {
const chk_SName0 = await this.employeePosMasterRepository.findOne({ const chk_SName0 = await this.employeePosMasterRepository.findOne({
where: { where: {
orgRevisionId: posMaster.orgRevisionId, orgRevisionId: posMaster.orgRevisionId,
orgRoot: { orgRootShortName: SName, id: requestBody.orgRootId ?? "" }, orgRoot: { orgRootShortName: SName, /*id: requestBody.orgRootId ?? ""*/ },
orgChild1Id: IsNull(), orgChild1Id: IsNull(),
posMasterNo: requestBody.posMasterNo, posMasterNo: requestBody.posMasterNo,
}, },
@ -588,7 +588,7 @@ export class EmployeePositionController extends Controller {
const chk_SName1 = await this.employeePosMasterRepository.findOne({ const chk_SName1 = await this.employeePosMasterRepository.findOne({
where: { where: {
orgRevisionId: posMaster.orgRevisionId, orgRevisionId: posMaster.orgRevisionId,
orgChild1: { orgChild1ShortName: SName, id: requestBody.orgChild1Id ?? "" }, orgChild1: { orgChild1ShortName: SName, /*id: requestBody.orgChild1Id ?? ""*/ },
orgChild2Id: IsNull(), orgChild2Id: IsNull(),
posMasterNo: requestBody.posMasterNo, posMasterNo: requestBody.posMasterNo,
}, },
@ -604,7 +604,7 @@ export class EmployeePositionController extends Controller {
const chk_SName2 = await this.employeePosMasterRepository.findOne({ const chk_SName2 = await this.employeePosMasterRepository.findOne({
where: { where: {
orgRevisionId: posMaster.orgRevisionId, orgRevisionId: posMaster.orgRevisionId,
orgChild2: { orgChild2ShortName: SName, id: requestBody.orgChild2Id ?? "" }, orgChild2: { orgChild2ShortName: SName, /*id: requestBody.orgChild2Id ?? ""*/ },
orgChild3Id: IsNull(), orgChild3Id: IsNull(),
posMasterNo: requestBody.posMasterNo, posMasterNo: requestBody.posMasterNo,
}, },
@ -620,7 +620,7 @@ export class EmployeePositionController extends Controller {
const chk_SName3 = await this.employeePosMasterRepository.findOne({ const chk_SName3 = await this.employeePosMasterRepository.findOne({
where: { where: {
orgRevisionId: posMaster.orgRevisionId, orgRevisionId: posMaster.orgRevisionId,
orgChild3: { orgChild3ShortName: SName, id: requestBody.orgChild3Id ?? "" }, orgChild3: { orgChild3ShortName: SName, /*id: requestBody.orgChild3Id ?? ""*/ },
orgChild4Id: IsNull(), orgChild4Id: IsNull(),
posMasterNo: requestBody.posMasterNo, posMasterNo: requestBody.posMasterNo,
}, },
@ -636,7 +636,7 @@ export class EmployeePositionController extends Controller {
const chk_SName4 = await this.employeePosMasterRepository.findOne({ const chk_SName4 = await this.employeePosMasterRepository.findOne({
where: { where: {
orgRevisionId: posMaster.orgRevisionId, orgRevisionId: posMaster.orgRevisionId,
orgChild4: { orgChild4ShortName: SName, id: requestBody.orgChild4Id ?? "" }, orgChild4: { orgChild4ShortName: SName, /*id: requestBody.orgChild4Id ?? ""*/ },
posMasterNo: requestBody.posMasterNo, posMasterNo: requestBody.posMasterNo,
}, },
relations: ["orgChild4"], relations: ["orgChild4"],
@ -780,7 +780,7 @@ export class EmployeePositionController extends Controller {
const chk_SName0 = await this.employeePosMasterRepository.findOne({ const chk_SName0 = await this.employeePosMasterRepository.findOne({
where: { where: {
orgRevisionId: posMaster.orgRevisionId, orgRevisionId: posMaster.orgRevisionId,
orgRoot: { orgRootShortName: SName, id: requestBody.orgRootId ?? "" }, orgRoot: { orgRootShortName: SName, /*id: requestBody.orgRootId ?? ""*/ },
orgChild1Id: IsNull(), orgChild1Id: IsNull(),
posMasterNo: requestBody.posMasterNo, posMasterNo: requestBody.posMasterNo,
id: Not(posMaster.id), id: Not(posMaster.id),
@ -797,7 +797,7 @@ export class EmployeePositionController extends Controller {
const chk_SName1 = await this.employeePosMasterRepository.findOne({ const chk_SName1 = await this.employeePosMasterRepository.findOne({
where: { where: {
orgRevisionId: posMaster.orgRevisionId, orgRevisionId: posMaster.orgRevisionId,
orgChild1: { orgChild1ShortName: SName, id: requestBody.orgChild1Id ?? "" }, orgChild1: { orgChild1ShortName: SName, /*id: requestBody.orgChild1Id ?? ""*/ },
orgChild2Id: IsNull(), orgChild2Id: IsNull(),
posMasterNo: requestBody.posMasterNo, posMasterNo: requestBody.posMasterNo,
id: Not(posMaster.id), id: Not(posMaster.id),
@ -814,7 +814,7 @@ export class EmployeePositionController extends Controller {
const chk_SName2 = await this.employeePosMasterRepository.findOne({ const chk_SName2 = await this.employeePosMasterRepository.findOne({
where: { where: {
orgRevisionId: posMaster.orgRevisionId, orgRevisionId: posMaster.orgRevisionId,
orgChild2: { orgChild2ShortName: SName, id: requestBody.orgChild2Id ?? "" }, orgChild2: { orgChild2ShortName: SName, /*id: requestBody.orgChild2Id ?? ""*/ },
orgChild3Id: IsNull(), orgChild3Id: IsNull(),
posMasterNo: requestBody.posMasterNo, posMasterNo: requestBody.posMasterNo,
id: Not(posMaster.id), id: Not(posMaster.id),
@ -831,7 +831,7 @@ export class EmployeePositionController extends Controller {
const chk_SName3 = await this.employeePosMasterRepository.findOne({ const chk_SName3 = await this.employeePosMasterRepository.findOne({
where: { where: {
orgRevisionId: posMaster.orgRevisionId, orgRevisionId: posMaster.orgRevisionId,
orgChild3: { orgChild3ShortName: SName, id: requestBody.orgChild3Id ?? "" }, orgChild3: { orgChild3ShortName: SName, /*id: requestBody.orgChild3Id ?? ""*/ },
orgChild4Id: IsNull(), orgChild4Id: IsNull(),
posMasterNo: requestBody.posMasterNo, posMasterNo: requestBody.posMasterNo,
id: Not(posMaster.id), id: Not(posMaster.id),
@ -848,7 +848,7 @@ export class EmployeePositionController extends Controller {
const chk_SName4 = await this.employeePosMasterRepository.findOne({ const chk_SName4 = await this.employeePosMasterRepository.findOne({
where: { where: {
orgRevisionId: posMaster.orgRevisionId, orgRevisionId: posMaster.orgRevisionId,
orgChild4: { orgChild4ShortName: SName, id: requestBody.orgChild4Id ?? "" }, orgChild4: { orgChild4ShortName: SName, /*id: requestBody.orgChild4Id ?? ""*/ },
posMasterNo: requestBody.posMasterNo, posMasterNo: requestBody.posMasterNo,
id: Not(posMaster.id), id: Not(posMaster.id),
}, },