search dna
This commit is contained in:
parent
8f233cbe2e
commit
5c1e691424
2 changed files with 91 additions and 22 deletions
|
|
@ -30,6 +30,7 @@ import { DevelopmentProject } from "../entities/developmentProject";
|
|||
import { RequestWithUser } from "../middlewares/user";
|
||||
import permission from "../interfaces/permission";
|
||||
import { setLogDataDiff } from "../interfaces/utils";
|
||||
import CallAPI from "../interfaces/call-api";
|
||||
|
||||
@Route("api/v1/kpi/user/achievement/development")
|
||||
@Tags("KpiUserDevelopment")
|
||||
|
|
@ -361,7 +362,13 @@ export class KpiUserDevelopmentController extends Controller {
|
|||
// await new permission().PermissionList(request, "SYS_RESULT");
|
||||
let conditionFullName =
|
||||
"CONCAT(kpiUserEvaluation.prefix, kpiUserEvaluation.firstName, ' ', kpiUserEvaluation.lastName) LIKE :keyword";
|
||||
let _data = await new permission().PermissionOrgList(request,"SYS_RESULT");
|
||||
let _data = await new permission().PermissionOrgList(request, "SYS_RESULT");
|
||||
await new CallAPI()
|
||||
.PostData(request, "/org/finddna", _data)
|
||||
.then((x) => {
|
||||
_data = x;
|
||||
})
|
||||
.catch((x) => {});
|
||||
const [kpiUserDevelopment, total] = await AppDataSource.getRepository(KpiUserDevelopment)
|
||||
.createQueryBuilder("kpiUserDevelopment")
|
||||
.leftJoinAndSelect("kpiUserDevelopment.kpiUserEvaluation", "kpiUserEvaluation")
|
||||
|
|
@ -370,8 +377,8 @@ export class KpiUserDevelopmentController extends Controller {
|
|||
.andWhere(
|
||||
_data.root != undefined && _data.root != null
|
||||
? _data.root[0] != null
|
||||
? `kpiUserEvaluation.orgId IN (:...root)`
|
||||
: `kpiUserEvaluation.orgId is null`
|
||||
? `kpiUserEvaluation.rootDnaId IN (:...root)`
|
||||
: `kpiUserEvaluation.rootDnaId is null`
|
||||
: "1=1",
|
||||
{
|
||||
root: _data.root,
|
||||
|
|
@ -380,8 +387,8 @@ export class KpiUserDevelopmentController extends Controller {
|
|||
.andWhere(
|
||||
_data.child1 != undefined && _data.child1 != null
|
||||
? _data.child1[0] != null
|
||||
? `kpiUserEvaluation.child1Id IN (:...child1)`
|
||||
: `kpiUserEvaluation.child1Id is null`
|
||||
? `kpiUserEvaluation.child1DnaId IN (:...child1)`
|
||||
: `kpiUserEvaluation.child1DnaId is null`
|
||||
: "1=1",
|
||||
{
|
||||
child1: _data.child1,
|
||||
|
|
@ -390,8 +397,8 @@ export class KpiUserDevelopmentController extends Controller {
|
|||
.andWhere(
|
||||
_data.child2 != undefined && _data.child2 != null
|
||||
? _data.child2[0] != null
|
||||
? `kpiUserEvaluation.child2Id IN (:...child2)`
|
||||
: `kpiUserEvaluation.child2Id is null`
|
||||
? `kpiUserEvaluation.child2DnaId IN (:...child2)`
|
||||
: `kpiUserEvaluation.child2DnaId is null`
|
||||
: "1=1",
|
||||
{
|
||||
child2: _data.child2,
|
||||
|
|
@ -400,8 +407,8 @@ export class KpiUserDevelopmentController extends Controller {
|
|||
.andWhere(
|
||||
_data.child3 != undefined && _data.child3 != null
|
||||
? _data.child3[0] != null
|
||||
? `kpiUserEvaluation.child3Id IN (:...child3)`
|
||||
: `kpiUserEvaluation.child3Id is null`
|
||||
? `kpiUserEvaluation.child3DnaId IN (:...child3)`
|
||||
: `kpiUserEvaluation.child3DnaId is null`
|
||||
: "1=1",
|
||||
{
|
||||
child3: _data.child3,
|
||||
|
|
@ -410,8 +417,8 @@ export class KpiUserDevelopmentController extends Controller {
|
|||
.andWhere(
|
||||
_data.child4 != undefined && _data.child4 != null
|
||||
? _data.child4[0] != null
|
||||
? `kpiUserEvaluation.child4Id IN (:...child4)`
|
||||
: `kpiUserEvaluation.child4Id is null`
|
||||
? `kpiUserEvaluation.child4DnaId IN (:...child4)`
|
||||
: `kpiUserEvaluation.child4DnaId is null`
|
||||
: "1=1",
|
||||
{
|
||||
child4: _data.child4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue