Przeglądaj źródła

add ffb production and summary

Stephen Wong 1 rok temu
rodzic
commit
03627e1cdc

+ 103 - 104
src/FisAppQueryModule/DS/Common.dataservice.ts

@@ -5,9 +5,11 @@ import { ConvertedResult } from "../entities/ConvertedResult";
 import { DataServiceMessage } from "../entities/DataService.entity";
 import { SummaryResponse } from "../entities/DescendentDataServiceArgument.entity";
 import { StatusResponse } from "../entities/StatusResponse";
-import { FisCreateMessageUtility, Query, DataTypeProfile, MessageTypeProfile, ResponseMessage,
-        FisReadDataUtility, GenericFisData, 
-        GenericFisRowColumn } from "../message/fisappmessagejsutility/interface/export";
+import {
+    FisCreateMessageUtility, Query, DataTypeProfile, MessageTypeProfile, ResponseMessage,
+    FisReadDataUtility, GenericFisData,
+    GenericFisRowColumn
+} from "../message/fisappmessagejsutility/interface/export";
 
 import { State } from "./state";
 
@@ -15,7 +17,7 @@ export class CommonDataService {
 
     public tempData: any;
     // static ResponseService: FisUASRequestMessage;
-    static ResponseService:FisCreateMessageUtility = new FisCreateMessageUtility("FisAppID/Name")
+    static ResponseService: FisCreateMessageUtility = new FisCreateMessageUtility("FisAppID/Name")
     public ucpId: string;
     public CurrentState: string = State.Initialisation.Code
 
@@ -34,24 +36,24 @@ export class CommonDataService {
 
     }
 
-    getDataFromServer(http: HttpService, ucpId: string, data):Observable<any>{
+    getDataFromServer(http: HttpService, ucpId: string, data): Observable<any> {
         return this.httpRequest(http, ucpId, data)
     }
 
-    getData(className, filter, returnFormatType):any {
+    getData(className, filter, returnFormatType): any {
         // return new Promise((resolve, reject) => {
-        return new Observable(subscriber=>{
+        return new Observable(subscriber => {
 
             let message: string;
             let result: [] | string;
             // try {
 
-            this.getDataWithStatus(className,filter, returnFormatType, 1).subscribe({
+            this.getDataWithStatus(className, filter, returnFormatType, 1).subscribe({
                 next: (res) => {
                     result = res;
                     subscriber.next(result)
                 },
-                error: (e)=>{
+                error: (e) => {
                     subscriber.error(e)
                 }
 
@@ -59,80 +61,78 @@ export class CommonDataService {
         })
     }
 
-    
 
-    getDataWithType(filter, className:string, message:any, returnFormatType:string, data:any[]): any {
 
+    getDataWithType(filter, className: string, message: any, returnFormatType: string, data: any[]): any {
 
-            return new Observable((subscriber)=>{
 
-                let key = []
-                let value = []
-                if (filter) { //check whether filter existed
-                    let semicolumn = filter.split(";"); //separate the semicolumn
-                    for (let i = 0; i < semicolumn.length; i++) {
-                        key[i] = semicolumn[i].split("=")[0];
-                        value[i] = semicolumn[i].split("=")[1];
-                    }
+        return new Observable((subscriber) => {
+
+            let key = []
+            let value = []
+            if (filter) { //check whether filter existed
+                let semicolumn = filter.split(";"); //separate the semicolumn
+                for (let i = 0; i < semicolumn.length; i++) {
+                    key[i] = semicolumn[i].split("=")[0];
+                    value[i] = semicolumn[i].split("=")[1];
                 }
+            }
 
-                this.getDataFromServer(this.http, this.ucpId, this.currentData).subscribe({
+            this.getDataFromServer(this.http, this.ucpId, this.currentData).subscribe({
                 // .then((res: ResponseMessage)=> {
-                    next: (res: ResponseMessage)=>{
-                    const dataUtil:FisReadDataUtility = new FisReadDataUtility();
+                next: (res: ResponseMessage) => {
+                    const dataUtil: FisReadDataUtility = new FisReadDataUtility();
                     const messageType: MessageTypeProfile = new MessageTypeProfile();
-                    const dataType:DataTypeProfile = new DataTypeProfile();
+                    const dataType: DataTypeProfile = new DataTypeProfile();
 
 
                     // const readData = dataUtil.readDataType(res, referenceType);
-                    let genericFisData:GenericFisData;
-                    let result:GenericFisRowColumn[];
+                    let genericFisData: GenericFisData;
+                    let result: GenericFisRowColumn[];
 
-                    let readData:any;
+                    let readData: any;
 
-                    if(res.data[0].data && res.data[0].data['GenericFisData'])
-                    {
-                        readData = dataUtil.readDataType(res.data[0].header.requestMessageRespondTo, res.data[0], messageType,dataType)
-                    }else{
+                    if (res.data[0].data && res.data[0].data['GenericFisData']) {
+                        readData = dataUtil.readDataType(res.data[0].header.requestMessageRespondTo, res.data[0], messageType, dataType)
+                    } else {
                         dataType.name = "GenericFisData";
                         readData = res;
                     }
 
 
-                    if(dataType.name == "GenericFisData"){
+                    if (dataType.name == "GenericFisData") {
                         genericFisData = readData as GenericFisData;
-
                         result = genericFisData.data[this.dataName].rows.row.filter(val => {
 
-                                    if (filter) {
-                                        for (let i = 0; i < key.length; i++) {
-                                            if (val.column[key[i]] != value[i]) {
-                                                return false;
-                                            }
-                                        }
-
+                            if (filter) {
+                                for (let i = 0; i < key.length; i++) {
+                                    if (val.column[key[i]] != value[i]) {
+                                        return false;
                                     }
-                                    return true
+                                }
+
+                            }
+                            return true
+
+                        }).map(x => x.column);
 
-                                }).map(x => x.column);
-                        
 
                         data = this.chunkFormatType(returnFormatType, result, 0);
-                                
-                        let returnMessage:DataServiceMessage[] = message;
 
-                        let summaryMessage:SummaryResponse = new SummaryResponse();
+                        let returnMessage: DataServiceMessage[] = message;
+
+                        let summaryMessage: SummaryResponse = new SummaryResponse();
 
-                            summaryMessage.className = className;
-                            summaryMessage.filter = filter;
-                            summaryMessage.returnFormatType = returnFormatType;
-                            summaryMessage.returnSequenceTotal = result.length;
+                        summaryMessage.className = className;
+                        summaryMessage.filter = filter;
+                        summaryMessage.returnFormatType = returnFormatType;
+                        summaryMessage.returnSequenceTotal = result.length;
 
                         let statusResponse = new StatusResponse();
                         statusResponse.status = "1";
 
 
-                        let dataReturn:APAccountProfile[] = data;
+                        let dataReturn: APAccountProfile[] = data;
 
                         message = [
                             summaryMessage,
@@ -140,13 +140,13 @@ export class CommonDataService {
                             statusResponse,
                         ];
 
-                        let messageName = className.replace('DataService','') + "Message";
+                        let messageName = className.replace('DataService', '') + "Message";
 
                         subscriber.next({
                             StatusResponse: statusResponse,
                             SummaryResponse: summaryMessage,
                             [messageName]: {
-                                data:dataReturn
+                                data: dataReturn
                             }
                         });
 
@@ -154,10 +154,10 @@ export class CommonDataService {
 
                     }
                 }
-                })
+            })
 
 
-            })
+        })
 
 
     }
@@ -167,7 +167,7 @@ export class CommonDataService {
         returnFormatType: string,
         gq, chunkSize = null): Observable<any> {
         // return new Promise((resolve, reject) => {
-            return new Observable((subscriber)=>{
+        return new Observable((subscriber) => {
 
             let JSONstring: string;
             let convertedResult: DataServiceMessage;
@@ -176,30 +176,30 @@ export class CommonDataService {
             let result = [];
             // try {
 
-                if (this.CurrentState = State.Initialisation.Code) {
-                    
-                    JSONstring = State.Initialisation.Message
+            if (this.CurrentState = State.Initialisation.Code) {
 
-                }
+                JSONstring = State.Initialisation.Message
+
+            }
+
+            if (this.CurrentState = State.Busy.Code) {
 
-                if (this.CurrentState = State.Busy.Code) {
-                    
-                        
-                    JSONstring = State.Busy.Message
-                }
 
-                if (this.CurrentState = State.Ready.Code) {
+                JSONstring = State.Busy.Message
+            }
 
-                    // Retrieve new data from server
-                    this.getDataFromServer(this.http, this.ucpId, this.currentData).subscribe({
-                        next: (res)=>{
-                    
-                    // .then(res => {
+            if (this.CurrentState = State.Ready.Code) {
+
+                // Retrieve new data from server
+                this.getDataFromServer(this.http, this.ucpId, this.currentData).subscribe({
+                    next: (res) => {
+
+                        // .then(res => {
                         if (res == null) // Check if it is null
                         {
-                            
+
                             JSONstring = State.Error.Message + "No data entity in cache to filter"
-                                
+
                         }
                         else {
 
@@ -207,8 +207,8 @@ export class CommonDataService {
                                 res['data'].DataService === undefined ||
                                 res['data'].DataService.rows['row'] === undefined
                             ) { //check whether row entity exist before perform filter
-                                
-                                JSONstring =  State.Error.Message + " No row entity in filter"
+
+                                JSONstring = State.Error.Message + " No row entity in filter"
                             } else {
 
                                 let key = []
@@ -226,7 +226,7 @@ export class CommonDataService {
                                     }
                                 }
 
-                               if (res['data'].DataService.rows.row.length > 0) // check whether got any record returned
+                                if (res['data'].DataService.rows.row.length > 0) // check whether got any record returned
                                 {
 
 
@@ -276,16 +276,16 @@ export class CommonDataService {
                                     } else { //result return to subscriberProxy
 
                                         // result.map((el, idx) => { //will be use to subscribe multiple observable from back office
-                                            convertedResult = new ConvertedResult(
-                                                className,
-                                                result[0],
-                                                filter,
-                                                returnFormatType,
-                                                result.length,
-                                                result.length + 1
-                                            );
-
-                                            // res.push(convertedResult)
+                                        convertedResult = new ConvertedResult(
+                                            className,
+                                            result[0],
+                                            filter,
+                                            returnFormatType,
+                                            result.length,
+                                            result.length + 1
+                                        );
+
+                                        // res.push(convertedResult)
                                         // })
                                         subscriber.next(convertedResult)
                                     }
@@ -316,22 +316,22 @@ export class CommonDataService {
                         );
 
                         subscriber.next(JSONstring);
-                        }
-                    })
-                }
+                    }
+                })
+            }
             // } catch (e) {
-                subscriber.error(e=>{
+            subscriber.error(e => {
 
-                    return convertedResult = new ConvertedResult(
-                        className,
-                        State.Error.Message + e.Message,
-                        filter,
-                        returnFormatType
-                    );
+                return convertedResult = new ConvertedResult(
+                    className,
+                    State.Error.Message + e.Message,
+                    filter,
+                    returnFormatType
+                );
 
-                })
+            })
 
-                // reject(convertedResult);
+            // reject(convertedResult);
             // }
 
         })
@@ -340,15 +340,15 @@ export class CommonDataService {
 
 
 
-    public httpRequest(http, ucpId, data: string):Observable<any> {
+    public httpRequest(http, ucpId, data: string): Observable<any> {
         if (!CommonDataService.ResponseService) {
             CommonDataService.ResponseService = new FisCreateMessageUtility('getQueryMessage');
         }
 
         try {
 
-            return http.post(process.env.UCP_HOST, CommonDataService.ResponseService.getQueryMessage(ucpId,Query.GetData, data))
-         
+            return http.post(process.env.UCP_HOST, CommonDataService.ResponseService.getQueryMessage(ucpId, Query.GetData, data))
+
         } catch (e) {
             console.log(e)
             throw e;
@@ -372,7 +372,7 @@ export class CommonDataService {
         } else if (chunkSize > 1) { // record by batch of #
             let result = this.chunk(data, chunkSize);
 
-            return block != null ? result[block]: result;
+            return block != null ? result[block] : result;
         } else { //record return by FULL
             return data;
         }
@@ -390,8 +390,7 @@ export class CommonDataService {
         return chunks;
     }
 
-    public validate(key,value):string
-    {
+    public validate(key, value): string {
         return "";
     }
 }

+ 29 - 0
src/FisAppQueryModule/DS/FFBProduction.dataservice.ts

@@ -0,0 +1,29 @@
+import { HttpService } from "@nestjs/axios";
+import { Observable } from "rxjs";
+import { FFBProduction, FFBProductionUnion } from "../entities/FFBProduction";
+import { FisCreateMessageUtility, FFBProductionData } from "../message/fisappmessagejsutility/interface/export";
+import { CommonDataService } from "./Common.dataservice";
+
+
+export class FFBProductionDataService extends CommonDataService {
+
+    static ResponseService: FisCreateMessageUtility = new FisCreateMessageUtility("FisAppID/Name")
+
+    static data: Record<string, any> = { "serviceId": "FFB Production Data", "parameter": "" };
+
+    constructor(http: HttpService, ucpId: string, data = FFBProductionDataService.data) {
+        super(http, ucpId, data);
+    }
+
+
+    getData(className, filter, returnFormatType): Observable<typeof FFBProductionUnion> {
+
+        let message: Array<typeof FFBProductionUnion> = [];
+        let data: FFBProduction[] = [];
+
+        return this.getDataWithType(filter, className, message, returnFormatType, data)
+
+    }
+
+
+}

+ 29 - 0
src/FisAppQueryModule/DS/FFBProductionSummary.dataservice.ts

@@ -0,0 +1,29 @@
+import { HttpService } from "@nestjs/axios";
+import { Observable } from "rxjs";
+import { FFBProductionSummary, FFBProductionSummaryUnion } from "../entities/FFBProductionSummary";
+import { FisCreateMessageUtility } from "../message/fisappmessagejsutility/interface/export";
+import { CommonDataService } from "./Common.dataservice";
+
+
+export class FFBProductionSummaryDataService extends CommonDataService {
+
+    static ResponseService: FisCreateMessageUtility = new FisCreateMessageUtility("FisAppID/Name")
+
+    static data: Record<string, any> = { "serviceId": "FFB Production Data", "parameter": "" };
+
+    constructor(http: HttpService, ucpId: string, data = FFBProductionSummaryDataService.data) {
+        super(http, ucpId, data);
+    }
+
+
+    getData(className, filter, returnFormatType): Observable<typeof FFBProductionSummaryUnion> {
+
+        let message: Array<typeof FFBProductionSummaryUnion> = [];
+        let data: FFBProductionSummary[] = [];
+
+        return this.getDataWithType(filter, className, message, returnFormatType, data)
+
+    }
+
+
+}

+ 15 - 15
src/FisAppQueryModule/DS/LeaveTypeProfile.dataservice.ts

@@ -1,29 +1,29 @@
 import { HttpService } from "@nestjs/axios";
 import { Observable } from "rxjs";
-import { LeaveTypeProfileUnion } from "../entities/LeaveTypeProfile";
-import { FisCreateMessageUtility, LeaveTypeProfile } from "../message/fisappmessagejsutility/interface/export";
+import { LeaveTypeProfile, LeaveTypeProfileUnion } from "../entities/LeaveTypeProfile";
+import { FisCreateMessageUtility } from "../message/fisappmessagejsutility/interface/export";
 import { CommonDataService } from "./Common.dataservice";
 
 
 export class LeaveTypeProfileDataService extends CommonDataService {
-    
-    static ResponseService:FisCreateMessageUtility = new FisCreateMessageUtility("FisAppID/Name")
 
-    static data:Record<string,any> = {"serviceId": "Leave Type Profile Data", "parameter": "" };
+    static ResponseService: FisCreateMessageUtility = new FisCreateMessageUtility("FisAppID/Name")
 
-    constructor(http: HttpService, ucpId: string, data= LeaveTypeProfileDataService.data){
-        super(http,ucpId, data);
+    static data: Record<string, any> = { "serviceId": "Leave Type Profile Data", "parameter": "" };
+
+    constructor(http: HttpService, ucpId: string, data = LeaveTypeProfileDataService.data) {
+        super(http, ucpId, data);
     }
 
 
-    getData(className,filter,returnFormatType): Observable<typeof LeaveTypeProfileUnion> {
-       
-            let message : Array<typeof LeaveTypeProfileUnion> = [];
-            let data: LeaveTypeProfile[] = [];
- 
-            return this.getDataWithType(filter,className,message,returnFormatType,data)
+    getData(className, filter, returnFormatType): Observable<typeof LeaveTypeProfileUnion> {
+
+        let message: Array<typeof LeaveTypeProfileUnion> = [];
+        let data: LeaveTypeProfile[] = [];
+
+        return this.getDataWithType(filter, className, message, returnFormatType, data)
 
     }
-    
-    
+
+
 }

+ 1 - 1
src/FisAppQueryModule/DefaultQuery/Fis-GraphQLQueryGenerator

@@ -1 +1 @@
-Subproject commit d37cdd5ec74e7bad7c15d2a16c3c346e22dcde9e
+Subproject commit 17d926197cd1576bc55ef89e08f7c5da456949fa

+ 4 - 0
src/FisAppQueryModule/Manager.dataservice.ts

@@ -28,6 +28,8 @@ import * as fs from 'graceful-fs';
 import { DomainProxyController } from '../common-service-channel/DomainProxy/src/services/DP.controller';
 import { ConnectionInterface } from '../common-service-channel/DomainProxy/src/interface/DP.Connection.interface';
 import { IPs } from './GetIPAddress';
+import { FFBProductionDataService } from './DS/FFBProduction.dataservice';
+import { FFBProductionSummaryDataService } from './DS/FFBProductionSummary.dataservice';
 
 @Injectable()
 export class DataServiceManager {
@@ -103,6 +105,8 @@ export class DataServiceManager {
                         DataServiceManager.classes['LeaveBalanceDataService'] = new LeaveBalanceDataService(this.http, DataServiceManager.ucpId);
                         DataServiceManager.classes['LeaveHistoryDataService'] = new LeaveHistoryDataService(this.http, DataServiceManager.ucpId);
                         DataServiceManager.classes['LeaveTypeProfileDataService'] = new LeaveTypeProfileDataService(this.http, DataServiceManager.ucpId);
+                        DataServiceManager.classes['FFBProductionDataService'] = new FFBProductionDataService(this.http, DataServiceManager.ucpId);
+                        DataServiceManager.classes['FFBProductionSummaryDataService'] = new FFBProductionSummaryDataService(this.http, DataServiceManager.ucpId);
 
                         // Keep a copy of the class list
                         let dataServiceClassesList = JSON.stringify(DataServiceManager.classes, null, 4);

+ 37 - 17
src/FisAppQueryModule/dataservice.classesList.json

@@ -7,7 +7,7 @@
             "parameter": "accountType=AP"
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "APAccountProfileDataService": {
         "http": {},
@@ -17,7 +17,7 @@
             "parameter": "accountType=AP"
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "ARAccountProfileDataService": {
         "http": {},
@@ -27,7 +27,7 @@
             "parameter": "accountType=AR"
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "CMAccountProfileDataService": {
         "http": {},
@@ -37,7 +37,7 @@
             "parameter": "accountType=CM"
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "DocumentDataService": {
         "http": {},
@@ -47,7 +47,7 @@
             "parameter": "subsystemcode=AP"
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "ARInvoiceDocumentDataService": {
         "http": {},
@@ -57,7 +57,7 @@
             "parameter": "doccategory=IV,subsystemcode=AR"
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "APInvoiceDocumentDataService": {
         "http": {},
@@ -67,7 +67,7 @@
             "parameter": "doccategory=RC,subsystemcode=AR"
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "ARReceiptDocumentDataService": {
         "http": {},
@@ -77,7 +77,7 @@
             "parameter": "doccategory=RC,subsystemcode=AR"
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "APReceiptDocumentDataService": {
         "http": {},
@@ -87,7 +87,7 @@
             "parameter": "doccategory=RC,subsystemcode=AP"
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "OrganisationProfileDataService": {
         "http": {},
@@ -97,7 +97,7 @@
             "parameter": ""
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "ProductProfileDataService": {
         "http": {},
@@ -107,7 +107,7 @@
             "parameter": ""
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "ServiceProgramProfileDataService": {
         "http": {},
@@ -117,7 +117,7 @@
             "parameter": ""
         },
         "dataName": "ServiceProgramProfileData",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "FisServiceProgramProfileDataService": {
         "http": {},
@@ -127,7 +127,7 @@
             "parameter": "serviceTypeCode=dataservice"
         },
         "dataName": "ServiceProgramProfileSecurityAccessRightData",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "RoleTypeProfileDataService": {
         "http": {},
@@ -137,7 +137,7 @@
             "parameter": ""
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "LeaveBalanceDataService": {
         "http": {},
@@ -147,7 +147,7 @@
             "parameter": ""
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "LeaveHistoryDataService": {
         "http": {},
@@ -157,7 +157,7 @@
             "parameter": ""
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
     },
     "LeaveTypeProfileDataService": {
         "http": {},
@@ -167,6 +167,26 @@
             "parameter": ""
         },
         "dataName": "DataService",
-        "ucpId": "c5fokb2803"
+        "ucpId": "c5fokb5991"
+    },
+    "FFBProductionDataService": {
+        "http": {},
+        "CurrentState": "Ready",
+        "currentData": {
+            "serviceId": "FFB Production Data",
+            "parameter": ""
+        },
+        "dataName": "DataService",
+        "ucpId": "c5fokb5991"
+    },
+    "FFBProductionSummaryDataService": {
+        "http": {},
+        "CurrentState": "Ready",
+        "currentData": {
+            "serviceId": "FFB Production Data",
+            "parameter": ""
+        },
+        "dataName": "DataService",
+        "ucpId": "c5fokb5991"
     }
 }

+ 102 - 0
src/FisAppQueryModule/entities/FFBProduction.ts

@@ -0,0 +1,102 @@
+import { ArgsType, Field, Int, ObjectType } from '@nestjs/graphql';
+import { SummaryResponse } from './DescendentDataServiceArgument.entity';
+import { FFBProductionData as FFBProductionType } from '../message/fisappmessagejsutility/interface/export';
+import { CustomFilter } from './CustomFilter.validate';
+import { CustomReturnFormatType } from './CustomReturnFormatType.validate';
+import { Validate } from 'class-validator'
+import { StatusResponse } from './StatusResponse';
+
+
+export const thisClassName = "FFBProductionDataService";
+
+@ObjectType()
+@ArgsType()
+export class FFBProductionArgument {
+
+    className: string = thisClassName;
+
+
+    @Field({ nullable: true })
+    @Validate(CustomFilter)
+    filter?: string;
+
+    @Field({ nullable: true })
+    @Validate(CustomReturnFormatType)
+    returnFormatType?: string;
+
+}
+
+
+@ObjectType()
+@ArgsType()
+export class FFBProductionMessage {
+
+    @Field(type => [FFBProduction])
+    data?: FFBProduction[];
+}
+
+
+@ObjectType()
+@ArgsType()
+export class FFBProduction implements FFBProductionType {
+
+
+    @Field({ nullable: true })
+    sec_code: string;
+
+    @Field({ nullable: true })
+    total_act_qty: string;
+
+    @Field({ nullable: true })
+    sumplanted: string;
+
+    @Field({ nullable: true })
+    sumunplanted: string;
+
+    @Field({ nullable: true })
+    orgn_full_name: string;
+
+    @Field({ nullable: true })
+    orgn_comp_reg_no: string;
+
+    @Field({ nullable: true })
+    orgn_address1: string;
+
+    @Field({ nullable: true })
+    orgn_address2: string;
+
+    @Field({ nullable: true })
+    orgn_address3: string;
+
+    @Field({ nullable: true })
+    wbc_date: string;
+
+    @Field({ nullable: true })
+    no_of_bunches: string;
+
+    @Field({ nullable: true })
+    tday: string;
+
+    @Field(type => Int, { nullable: true })
+    tyear: number;
+
+    @Field(type => Int, { nullable: true })
+    tmonth: number;
+
+
+}
+
+
+@ObjectType()
+@ArgsType()
+export class FFBProductionUnion {
+
+    @Field(type => SummaryResponse, { nullable: true })
+    SummaryResponse?: SummaryResponse;
+
+    @Field(type => StatusResponse, { nullable: true })
+    StatusResponse?: StatusResponse;
+
+    @Field(type => FFBProductionMessage, { nullable: true })
+    FFBProductionMessage?: FFBProductionMessage
+}

+ 108 - 0
src/FisAppQueryModule/entities/FFBProductionSummary.ts

@@ -0,0 +1,108 @@
+import { ArgsType, Field, Int, ObjectType } from '@nestjs/graphql';
+import { SummaryResponse } from './DescendentDataServiceArgument.entity';
+import { FFBProductionSummary as FFBProductionSummaryType } from '../message/fisappmessagejsutility/interface/export';
+import { CustomFilter } from './CustomFilter.validate';
+import { CustomReturnFormatType } from './CustomReturnFormatType.validate';
+import { Validate } from 'class-validator'
+import { StatusResponse } from './StatusResponse';
+
+
+export const thisClassName = "FFBProductionSummaryDataService";
+
+@ObjectType()
+@ArgsType()
+export class FFBProductionSummaryArgument {
+
+    className: string = thisClassName;
+
+
+    @Field({ nullable: true })
+    @Validate(CustomFilter)
+    filter?: string;
+
+    @Field({ nullable: true })
+    @Validate(CustomReturnFormatType)
+    returnFormatType?: string;
+
+}
+
+
+@ObjectType()
+@ArgsType()
+export class FFBProductionSummaryMessage {
+
+    @Field(type => [FFBProductionSummary])
+    data?: FFBProductionSummary[];
+}
+
+
+@ObjectType()
+@ArgsType()
+export class FFBProductionSummary implements FFBProductionSummaryType {
+
+
+    @Field({ nullable: true })
+    section_profile_sec_code: string;
+
+    @Field(type => Int, { nullable: true })
+    dmy_template_tyear: number;
+
+    @Field(type => Int, { nullable: true })
+    dmy_template_tmonth: number;
+
+    @Field(type => Int, { nullable: true })
+    dmy_template_tday: number;
+
+    @Field({ nullable: true })
+    sumplanted: string; // This is a number
+
+    @Field({ nullable: true })
+    sumunplanted: string; // This is a number
+
+    @Field({ nullable: true })
+    orgn_profile_company_v_orgn_full_name: string;
+
+    @Field({ nullable: true })
+    orgn_profile_company_v_orgn_comp_reg_no: string;
+
+    @Field({ nullable: true })
+    orgn_profile_company_v_orgn_address1: string;
+
+    @Field({ nullable: true })
+    orgn_profile_company_v_orgn_address2: string;
+
+    @Field({ nullable: true })
+    orgn_profile_company_v_orgn_address3: string;
+
+    @Field({ nullable: true })
+    wbc_date: string;
+
+    @Field({ nullable: true })
+    compute_1: string;
+
+    @Field({ nullable: true })
+    compute_2: string;
+
+    @Field({ nullable: true })
+    compute_3: string;
+
+    @Field(type => Int, { nullable: true })
+    no_of_bunches: number
+
+
+}
+
+
+@ObjectType()
+@ArgsType()
+export class FFBProductionSummaryUnion {
+
+    @Field(type => SummaryResponse, { nullable: true })
+    SummaryResponse?: SummaryResponse;
+
+    @Field(type => StatusResponse, { nullable: true })
+    StatusResponse?: StatusResponse;
+
+    @Field(type => FFBProductionSummaryMessage, { nullable: true })
+    FFBProductionSummaryMessage?: FFBProductionSummaryMessage
+}

+ 14 - 0
src/FisAppQueryModule/fisAppQuery.resolver.ts

@@ -23,6 +23,8 @@ import { LeaveBalanceArgument, LeaveBalanceUnion } from './entities/LeaveBalance
 import { LeaveHistoryArgument, LeaveHistoryUnion } from './entities/LeaveHistory';
 import { LeaveTypeProfileArgument, LeaveTypeProfileUnion } from './entities/LeaveTypeProfile';
 import { DefaultQueryData, DefaultQueryService } from './DefaultQuery/defaultQuery.dataservice';
+import { FFBProductionArgument, FFBProductionUnion } from './entities/FFBProduction';
+import { FFBProductionSummaryArgument, FFBProductionSummaryUnion } from './entities/FFBProductionSummary';
 
 @Resolver(() => DataServiceMessage)
 export class FisAppQueryResolver {
@@ -151,6 +153,18 @@ export class FisAppQueryResolver {
     return this.fisAppQueryService.LeaveTypeProfileGetData(filter, returnFormatType);
   }
 
+  @Query(() => FFBProductionUnion, { name: 'FFBProductionQuery' })
+  getFFBProductionDataService(@Args() dataservice: FFBProductionArgument): Observable<typeof FFBProductionUnion> {
+    const { filter, returnFormatType } = dataservice;
+    return this.fisAppQueryService.FFBProductionGetData(filter, returnFormatType);
+  }
+
+  @Query(() => FFBProductionSummaryUnion, { name: 'FFBProductionSummaryQuery' })
+  getFFBProductionSummaryDataService(@Args() dataservice: FFBProductionSummaryArgument): Observable<typeof FFBProductionSummaryUnion> {
+    const { filter, returnFormatType } = dataservice;
+    return this.fisAppQueryService.FFBProductionSummaryGetData(filter, returnFormatType);
+  }
+
   @Query(() => DefaultQueryData, { name: 'defaultQuery' })
   getDefaultQuery(): Observable<DefaultQueryData> {
     return this.fisDefaultQuery.GetDefaultQuery();

+ 17 - 0
src/FisAppQueryModule/fisAppQuery.service.ts

@@ -13,6 +13,8 @@ import { ARReceiptDocumentUnion, thisClassName as ARReceiptDocumentClassName } f
 import { CMAccountProfileUnion, thisClassName as CMAccountProfileClassName } from './entities/CMAccountProfile';
 import { DataServiceMessage } from './entities/DataService.entity';
 import { DocumentUnion, thisClassName as DocumentClassName } from './entities/Document';
+import { FFBProductionUnion, thisClassName as FFBProductionClassName } from './entities/FFBProduction';
+import { FFBProductionSummaryUnion } from './entities/FFBProductionSummary';
 import { FisServiceProgramUnion, thisClassName as FisServiceProgramClassName } from './entities/FisServiceProgram';
 import { LeaveBalanceUnion, thisClassName as LeaveBalanceClassName } from './entities/LeaveBalance';
 import { LeaveHistoryUnion, thisClassName as LeaveHistoryClassName } from './entities/LeaveHistory';
@@ -203,5 +205,20 @@ export class FisAppQueryService {
 
     return getDataObservable;
   }
+  FFBProductionGetData(filter, returnFormatType): Observable<typeof FFBProductionUnion> {
+    let className = FFBProductionClassName
+    let getDataObservable: Observable<typeof FFBProductionUnion> = this.dataservicemanager.getDataServiceData(className, filter, returnFormatType, 1).pipe(map(x => {
+      return x;
+    }));
 
+    return getDataObservable;
+  }
+  FFBProductionSummaryGetData(filter, returnFormatType): Observable<typeof FFBProductionSummaryUnion> {
+    let className = FFBProductionClassName
+    let getDataObservable: Observable<typeof FFBProductionSummaryUnion> = this.dataservicemanager.getDataServiceData(className, filter, returnFormatType, 1).pipe(map(x => {
+      return x;
+    }));
+
+    return getDataObservable;
+  }
 }

+ 1 - 1
src/FisAppQueryModule/message/fisappmessagejsutility

@@ -1 +1 @@
-Subproject commit d85756318ba7703e5e3093372e5d84fe88578512
+Subproject commit fcb0ecb490a856c453256a44b3e46ddbc8601e0f

+ 1 - 1
src/common-service-channel/DomainProxy

@@ -1 +1 @@
-Subproject commit 92c010507ac717496908a2077118bcbded82c3ad
+Subproject commit fe601e125721898e53c872405e5ab39d881f4b73

+ 58 - 0
src/schema.gql

@@ -317,6 +317,62 @@ type DocumentUnion {
   SummaryResponse: SummaryResponse
 }
 
+type FFBProduction {
+  no_of_bunches: String
+  orgn_address1: String
+  orgn_address2: String
+  orgn_address3: String
+  orgn_comp_reg_no: String
+  orgn_full_name: String
+  sec_code: String
+  sumplanted: String
+  sumunplanted: String
+  tday: String
+  tmonth: Int
+  total_act_qty: String
+  tyear: Int
+  wbc_date: String
+}
+
+type FFBProductionMessage {
+  data: [FFBProduction!]!
+}
+
+type FFBProductionSummary {
+  compute_1: String
+  compute_2: String
+  compute_3: String
+  dmy_template_tday: Int
+  dmy_template_tmonth: Int
+  dmy_template_tyear: Int
+  no_of_bunches: Int
+  orgn_profile_company_v_orgn_address1: String
+  orgn_profile_company_v_orgn_address2: String
+  orgn_profile_company_v_orgn_address3: String
+  orgn_profile_company_v_orgn_comp_reg_no: String
+  orgn_profile_company_v_orgn_full_name: String
+  section_profile_sec_code: String
+  sumplanted: String
+  sumunplanted: String
+  wbc_date: String
+}
+
+type FFBProductionSummaryMessage {
+  data: [FFBProductionSummary!]!
+}
+
+type FFBProductionSummaryUnion {
+  FFBProductionSummaryMessage: FFBProductionSummaryMessage
+  StatusResponse: StatusResponse
+  SummaryResponse: SummaryResponse
+}
+
+type FFBProductionUnion {
+  FFBProductionMessage: FFBProductionMessage
+  StatusResponse: StatusResponse
+  SummaryResponse: SummaryResponse
+}
+
 type FisServiceProgramProfile {
   canapprove: String
   cancancel: String
@@ -532,6 +588,8 @@ type Query {
   AccountProfileQuery(filter: String, returnFormatType: String): AccountProfileUnion!
   CMAccountProfileQuery(filter: String, returnFormatType: String): CMAccountProfileUnion!
   DocumentQuery(filter: String, returnFormatType: String): DocumentUnion!
+  FFBProductionQuery(filter: String, returnFormatType: String): FFBProductionUnion!
+  FFBProductionSummaryQuery(filter: String, returnFormatType: String): FFBProductionSummaryUnion!
   FisServiceProgramProfileQuery(filter: String, returnFormatType: String): FisServiceProgramUnion!
   LeaveBalanceQuery(filter: String, returnFormatType: String): LeaveBalanceUnion!
   LeaveHistoryQuery(filter: String, returnFormatType: String): LeaveHistoryUnion!