Aucune description

FAMBL 9a377fd2b8 Added DefaultQueryData. Renamed defaultQuery. il y a 2 ans
src 9a377fd2b8 Added DefaultQueryData. Renamed defaultQuery. il y a 2 ans
test 9131481fa7 first commit il y a 3 ans
.env cf21905825 change return response type to dataservice il y a 2 ans
.eslintrc.js 7588824d9d Fix data service argument and typing. il y a 2 ans
.gitignore b213131626 add in nestjs config il y a 2 ans
.gitmodules 5f4c1f5808 add in default query module il y a 2 ans
.prettierrc 9131481fa7 first commit il y a 3 ans
DataServiceClassesList.json 44158bd7d8 Add feature to generate DataServiceClassesList. il y a 2 ans
README.md f198ef6041 add default query module il y a 2 ans
codegen.yml 481cee3548 config host il y a 2 ans
nest-cli.json 9131481fa7 first commit il y a 3 ans
package-lock.json 9a377fd2b8 Added DefaultQueryData. Renamed defaultQuery. il y a 2 ans
package.json f198ef6041 add default query module il y a 2 ans
tsconfig.build.json 9131481fa7 first commit il y a 3 ans
tsconfig.json 0e107aa02e add in query module il y a 2 ans

README.md

Query Module

Description

1) Graphql query the plantation data from backend server(laravel).

2) Graphql server will initialize the all the fis instances, and login to the UCP Server and get the UCPID.

Plantation site name , Phases and Blocks

List of db:
"db"=> "resb2",
"db"=> "fisJRSB",
"db"=> "fisJRSBBL",
"db"=> "fisLMSB",
"db"=> "fisPCSB",
"db"=> "fisPCSB_BL",
"db"=> "fisPSSB",
"db"=> "fisRESB",
"db"=> "fisSOP",
"db"=> "fisSPSB",
"db"=> "fisTISB",
"db"=> "fisVSDSB",
"db"=> "fisWHSB",

SCHEMA FIS DATASERVICE

REQUEST

dataservice(
    className: String!
    filter: String!
    returnFormatType: String!
): DataService!
column description
className REQUIRED: define which dataservice data want to retrieve
filter OPTIONAL : The filter for the getData function will be in key=value; key=value; pair format where key refers to column name.
returnFormatType OPTIONAL: byRow , byBatchOf5, byBatchOf10 or full

RESPONSE

type DataService {
    className: String!
    data: String!
    filter: String!
    returnFormatType: String!
    returnSequenceNumber: Float!
    returnSequenceTotal: Float!
}
column description
classname same as request className
data responsed data
filter same as request
returnFormatType same as requested returnFormatType
returnSequenceTotal refer to the total number of responses
returnSequenceNumber refer to the response number start from 1 to total number of response.

Available className:

ARAccountProfileDataService
APAccountProfileDataService
CMAccountProfileDataService
OrganisationProfileDataService
ProductProfileDataService
ServiceProgramProfileDataService
eg:
    query{
        dataservice(className:"APAccountProfileDataService", 
        filter: "acct_id=104"){
            filter,
            className,
            data
        }
    }
Note: support multiple filter string by using semicolom as separator. eg: acct_id=104;acct_no=30

SCHEMA PlANTATION DATASERVICE

Retrieve single site

site(
    db: String!
): Site!
type Site {
    db: String!
    name: String!
    phases: [Phase!]!
}

Retrieve all plantation sites

sites: [Site!]!

Site Schema

type Site {
    db: String!
    name: String!
    phases: [Phase!]!
}

Phase Schema

type Phase {
  blocks: [Block!]!
  db: String!
  pers_id: String!
  sec_code: String!
  sec_desc: String!
  sec_id: String!
  sec_name: String!
}

Block Schema

type Block {
  loc_area: String!
  loc_code: String!
  loc_desc: String!
}

Installation

$ npm install
$ git submodule deinit --all
$ git submodule add http://swopt.com:3000/FAMBL/FISAppMessageJSUtility.git ./src/FisAppQueryModule/message/fisappmessagejsutility
$ git rm --cached src/FisAppQueryModule/message/fisappmessagejsutility/
$ git submodule update --init --recursive

Running the app

#####Package Required for DefaultQuery Module

npm install gql-query-builder
npm install node-json-transform
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod