提交 4f376f3e 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 e0d72b64
......@@ -4,12 +4,12 @@ const mock = MockAdapter.getInstance();
// 模拟数据
const mockDatas: Array<any> = [
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:10:47","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"1","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息","pimeducationid":"1","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:10:47","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:10:47","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"2","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(1)","pimeducationid":"2","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:10:47","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:10:47","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"3","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(2)","pimeducationid":"3","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:10:47","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:10:47","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"4","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(3)","pimeducationid":"4","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:10:47","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:10:47","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"5","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(4)","pimeducationid":"5","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:10:47","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:10:47","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"6","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(5)","pimeducationid":"6","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:10:47","createman":"示例操作者","pimpersonname":null}
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:33:34","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"1","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息","pimeducationid":"1","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:33:34","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:33:34","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"2","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(1)","pimeducationid":"2","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:33:34","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:33:34","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"3","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(2)","pimeducationid":"3","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:33:34","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:33:34","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"4","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(3)","pimeducationid":"4","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:33:34","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:33:34","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"5","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(4)","pimeducationid":"5","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:33:34","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 18:33:34","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"6","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(5)","pimeducationid":"6","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 18:33:34","createman":"示例操作者","pimpersonname":null}
];
......
......@@ -85,8 +85,8 @@ export default class PIMARCHIVESServiceBase extends EntityService {
}
let res:any = await Http.getInstance().get(`/pimarchives/getdraft`,isloading);
res.data.pimarchives = data.pimarchives;
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
return res;
}
......@@ -105,36 +105,36 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return Http.getInstance().post(`/pimpeople/${context.pimperson}/pimarchives/${context.pimarchives}/save`,data,isloading);
}
let masterData:any = {};
let pimarchiveschangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){
pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any);
if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){
pimarchiveschangesData.forEach((item:any) => {
let pimarchivesloanandreturnsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){
pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any);
if(pimarchivesloanandreturnsData && pimarchivesloanandreturnsData.length && pimarchivesloanandreturnsData.length > 0){
pimarchivesloanandreturnsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarchiveschangeid = null;
item.pimarchivesloanandreturnid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarchiveschanges = pimarchiveschangesData;
let pimarchivesloanandreturnsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){
pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any);
if(pimarchivesloanandreturnsData && pimarchivesloanandreturnsData.length && pimarchivesloanandreturnsData.length > 0){
pimarchivesloanandreturnsData.forEach((item:any) => {
masterData.pimarchivesloanandreturns = pimarchivesloanandreturnsData;
let pimarchiveschangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){
pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any);
if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){
pimarchiveschangesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarchivesloanandreturnid = null;
item.pimarchiveschangeid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarchivesloanandreturns = pimarchivesloanandreturnsData;
masterData.pimarchiveschanges = pimarchiveschangesData;
let pimarchivesrecordsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords'),'undefined')){
pimarchivesrecordsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords') as any);
......@@ -152,8 +152,8 @@ export default class PIMARCHIVESServiceBase extends EntityService {
masterData.pimarchivesrecords = pimarchivesrecordsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/pimarchives/${context.pimarchives}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
return res;
}
......@@ -172,8 +172,8 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return Http.getInstance().get(`/pimpeople/${context.pimperson}/pimarchives/${context.pimarchives}`,isloading);
}
let res:any = await Http.getInstance().get(`/pimarchives/${context.pimarchives}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
return res;
......@@ -193,36 +193,36 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return Http.getInstance().put(`/pimpeople/${context.pimperson}/pimarchives/${context.pimarchives}`,data,isloading);
}
let masterData:any = {};
let pimarchiveschangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){
pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any);
if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){
pimarchiveschangesData.forEach((item:any) => {
let pimarchivesloanandreturnsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){
pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any);
if(pimarchivesloanandreturnsData && pimarchivesloanandreturnsData.length && pimarchivesloanandreturnsData.length > 0){
pimarchivesloanandreturnsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarchiveschangeid = null;
item.pimarchivesloanandreturnid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarchiveschanges = pimarchiveschangesData;
let pimarchivesloanandreturnsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){
pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any);
if(pimarchivesloanandreturnsData && pimarchivesloanandreturnsData.length && pimarchivesloanandreturnsData.length > 0){
pimarchivesloanandreturnsData.forEach((item:any) => {
masterData.pimarchivesloanandreturns = pimarchivesloanandreturnsData;
let pimarchiveschangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){
pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any);
if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){
pimarchiveschangesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarchivesloanandreturnid = null;
item.pimarchiveschangeid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarchivesloanandreturns = pimarchivesloanandreturnsData;
masterData.pimarchiveschanges = pimarchiveschangesData;
let pimarchivesrecordsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords'),'undefined')){
pimarchivesrecordsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords') as any);
......@@ -240,8 +240,8 @@ export default class PIMARCHIVESServiceBase extends EntityService {
masterData.pimarchivesrecords = pimarchivesrecordsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/pimarchives/${context.pimarchives}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
return res;
}
......@@ -282,36 +282,36 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return Http.getInstance().post(`/pimpeople/${context.pimperson}/pimarchives`,data,isloading);
}
let masterData:any = {};
let pimarchiveschangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){
pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any);
if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){
pimarchiveschangesData.forEach((item:any) => {
let pimarchivesloanandreturnsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){
pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any);
if(pimarchivesloanandreturnsData && pimarchivesloanandreturnsData.length && pimarchivesloanandreturnsData.length > 0){
pimarchivesloanandreturnsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarchiveschangeid = null;
item.pimarchivesloanandreturnid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarchiveschanges = pimarchiveschangesData;
let pimarchivesloanandreturnsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){
pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any);
if(pimarchivesloanandreturnsData && pimarchivesloanandreturnsData.length && pimarchivesloanandreturnsData.length > 0){
pimarchivesloanandreturnsData.forEach((item:any) => {
masterData.pimarchivesloanandreturns = pimarchivesloanandreturnsData;
let pimarchiveschangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){
pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any);
if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){
pimarchiveschangesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarchivesloanandreturnid = null;
item.pimarchiveschangeid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarchivesloanandreturns = pimarchivesloanandreturnsData;
masterData.pimarchiveschanges = pimarchiveschangesData;
let pimarchivesrecordsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords'),'undefined')){
pimarchivesrecordsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords') as any);
......@@ -336,8 +336,8 @@ export default class PIMARCHIVESServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/pimarchives`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
return res;
}
......
......@@ -65,21 +65,21 @@ export default class PIMPERSONServiceBase extends EntityService {
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let pimvocationalsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){
pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any);
if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){
pimvocationalsData.forEach((item:any) => {
let pimpersonabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){
pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any);
if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){
pimpersonabilitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimvocationalid = null;
item.pimpersonabilityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimvocationals = pimvocationalsData;
masterData.pimpersonabilities = pimpersonabilitiesData;
let pimpersonchangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges'),'undefined')){
pimpersonchangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges') as any);
......@@ -95,21 +95,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimpersonchanges = pimpersonchangesData;
let pimlanguageabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){
pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any);
if(pimlanguageabilitiesData && pimlanguageabilitiesData.length && pimlanguageabilitiesData.length > 0){
pimlanguageabilitiesData.forEach((item:any) => {
let pimdistirbutionsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){
pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any);
if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){
pimdistirbutionsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimlanguageabilityid = null;
item.pimdistirbutionid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimlanguageabilities = pimlanguageabilitiesData;
masterData.pimdistirbutions = pimdistirbutionsData;
let pimexitandentriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries'),'undefined')){
pimexitandentriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries') as any);
......@@ -125,66 +125,81 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimexitandentries = pimexitandentriesData;
let pimarchivesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){
pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any);
if(pimarchivesData && pimarchivesData.length && pimarchivesData.length > 0){
pimarchivesData.forEach((item:any) => {
let pimarmycadresData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){
pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any);
if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){
pimarmycadresData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarchivesid = null;
item.pimarmycadresid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarchives = pimarchivesData;
let trmtrianpeopleData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople'),'undefined')){
trmtrianpeopleData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople') as any);
if(trmtrianpeopleData && trmtrianpeopleData.length && trmtrianpeopleData.length > 0){
trmtrianpeopleData.forEach((item:any) => {
masterData.pimarmycadres = pimarmycadresData;
let pimpatentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){
pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any);
if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){
pimpatentsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.trmtrianpersonid = null;
item.pimpatentid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.trmtrianpeople = trmtrianpeopleData;
let attendancemreportmxesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){
attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any);
if(attendancemreportmxesData && attendancemreportmxesData.length && attendancemreportmxesData.length > 0){
attendancemreportmxesData.forEach((item:any) => {
masterData.pimpatents = pimpatentsData;
let pimvacationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){
pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any);
if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){
pimvacationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.attendancemreportmxid = null;
item.pimvacationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.attendancemreportmxes = attendancemreportmxesData;
let pimarmycadresData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){
pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any);
if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){
pimarmycadresData.forEach((item:any) => {
masterData.pimvacations = pimvacationsData;
let pimarchivesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){
pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any);
if(pimarchivesData && pimarchivesData.length && pimarchivesData.length > 0){
pimarchivesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarmycadresid = null;
item.pimarchivesid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarmycadres = pimarmycadresData;
masterData.pimarchives = pimarchivesData;
let trmtrianpeopleData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople'),'undefined')){
trmtrianpeopleData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople') as any);
if(trmtrianpeopleData && trmtrianpeopleData.length && trmtrianpeopleData.length > 0){
trmtrianpeopleData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.trmtrianpersonid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.trmtrianpeople = trmtrianpeopleData;
let pimachievementsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements'),'undefined')){
pimachievementsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements') as any);
......@@ -200,21 +215,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimachievements = pimachievementsData;
let pimtitlesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){
pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any);
if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){
pimtitlesData.forEach((item:any) => {
let pimlanguageabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){
pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any);
if(pimlanguageabilitiesData && pimlanguageabilitiesData.length && pimlanguageabilitiesData.length > 0){
pimlanguageabilitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimtitleid = null;
item.pimlanguageabilityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimtitles = pimtitlesData;
masterData.pimlanguageabilities = pimlanguageabilitiesData;
let pimpapersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers'),'undefined')){
pimpapersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers') as any);
......@@ -230,51 +245,51 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimpapers = pimpapersData;
let pimfaminfosData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){
pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any);
if(pimfaminfosData && pimfaminfosData.length && pimfaminfosData.length > 0){
pimfaminfosData.forEach((item:any) => {
let attendancemreportmxesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){
attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any);
if(attendancemreportmxesData && attendancemreportmxesData.length && attendancemreportmxesData.length > 0){
attendancemreportmxesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimfaminfoid = null;
item.attendancemreportmxid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimfaminfos = pimfaminfosData;
let pimpatentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){
pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any);
if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){
pimpatentsData.forEach((item:any) => {
masterData.attendancemreportmxes = attendancemreportmxesData;
let pimresearchfindingsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){
pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any);
if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){
pimresearchfindingsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimpatentid = null;
item.pimresearchfindingsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimpatents = pimpatentsData;
let pimworkhistoriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){
pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any);
if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){
pimworkhistoriesData.forEach((item:any) => {
masterData.pimresearchfindings = pimresearchfindingsData;
let pimtitlesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){
pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any);
if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){
pimtitlesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimworkhistoryid = null;
item.pimtitleid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimworkhistories = pimworkhistoriesData;
masterData.pimtitles = pimtitlesData;
let pimrewardpunishmentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments'),'undefined')){
pimrewardpunishmentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments') as any);
......@@ -290,119 +305,104 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimrewardpunishments = pimrewardpunishmentsData;
let pimvacationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){
pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any);
if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){
pimvacationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimvacationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimvacations = pimvacationsData;
let pimcontractsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){
pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any);
if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){
pimcontractsData.forEach((item:any) => {
let pimfaminfosData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){
pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any);
if(pimfaminfosData && pimfaminfosData.length && pimfaminfosData.length > 0){
pimfaminfosData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimcontractid = null;
item.pimfaminfoid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimcontracts = pimcontractsData;
let pimeducationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){
pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any);
if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){
pimeducationsData.forEach((item:any) => {
masterData.pimfaminfos = pimfaminfosData;
let pimvocationalsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){
pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any);
if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){
pimvocationalsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimeducationid = null;
item.pimvocationalid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimeducations = pimeducationsData;
let pimresearchfindingsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){
pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any);
if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){
pimresearchfindingsData.forEach((item:any) => {
masterData.pimvocationals = pimvocationalsData;
let pimworkhistoriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){
pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any);
if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){
pimworkhistoriesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimresearchfindingsid = null;
item.pimworkhistoryid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimresearchfindings = pimresearchfindingsData;
let pimpersonabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){
pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any);
if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){
pimpersonabilitiesData.forEach((item:any) => {
masterData.pimworkhistories = pimworkhistoriesData;
let pimcontractsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){
pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any);
if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){
pimcontractsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimpersonabilityid = null;
item.pimcontractid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimpersonabilities = pimpersonabilitiesData;
let pimdistirbutionsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){
pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any);
if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){
pimdistirbutionsData.forEach((item:any) => {
masterData.pimcontracts = pimcontractsData;
let pimeducationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){
pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any);
if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){
pimeducationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimdistirbutionid = null;
item.pimeducationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimdistirbutions = pimdistirbutionsData;
masterData.pimeducations = pimeducationsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/pimpeople/${context.pimperson}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
return res;
}
......@@ -443,27 +443,27 @@ export default class PIMPERSONServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/pimpeople/${context.pimperson}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
return res;
}
......@@ -505,21 +505,21 @@ export default class PIMPERSONServiceBase extends EntityService {
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let pimvocationalsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){
pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any);
if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){
pimvocationalsData.forEach((item:any) => {
let pimpersonabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){
pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any);
if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){
pimpersonabilitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimvocationalid = null;
item.pimpersonabilityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimvocationals = pimvocationalsData;
masterData.pimpersonabilities = pimpersonabilitiesData;
let pimpersonchangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges'),'undefined')){
pimpersonchangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges') as any);
......@@ -535,21 +535,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimpersonchanges = pimpersonchangesData;
let pimlanguageabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){
pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any);
if(pimlanguageabilitiesData && pimlanguageabilitiesData.length && pimlanguageabilitiesData.length > 0){
pimlanguageabilitiesData.forEach((item:any) => {
let pimdistirbutionsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){
pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any);
if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){
pimdistirbutionsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimlanguageabilityid = null;
item.pimdistirbutionid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimlanguageabilities = pimlanguageabilitiesData;
masterData.pimdistirbutions = pimdistirbutionsData;
let pimexitandentriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries'),'undefined')){
pimexitandentriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries') as any);
......@@ -565,66 +565,81 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimexitandentries = pimexitandentriesData;
let pimarchivesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){
pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any);
if(pimarchivesData && pimarchivesData.length && pimarchivesData.length > 0){
pimarchivesData.forEach((item:any) => {
let pimarmycadresData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){
pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any);
if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){
pimarmycadresData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarchivesid = null;
item.pimarmycadresid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarchives = pimarchivesData;
let trmtrianpeopleData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople'),'undefined')){
trmtrianpeopleData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople') as any);
if(trmtrianpeopleData && trmtrianpeopleData.length && trmtrianpeopleData.length > 0){
trmtrianpeopleData.forEach((item:any) => {
masterData.pimarmycadres = pimarmycadresData;
let pimpatentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){
pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any);
if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){
pimpatentsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.trmtrianpersonid = null;
item.pimpatentid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.trmtrianpeople = trmtrianpeopleData;
let attendancemreportmxesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){
attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any);
if(attendancemreportmxesData && attendancemreportmxesData.length && attendancemreportmxesData.length > 0){
attendancemreportmxesData.forEach((item:any) => {
masterData.pimpatents = pimpatentsData;
let pimvacationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){
pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any);
if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){
pimvacationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.attendancemreportmxid = null;
item.pimvacationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.attendancemreportmxes = attendancemreportmxesData;
let pimarmycadresData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){
pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any);
if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){
pimarmycadresData.forEach((item:any) => {
masterData.pimvacations = pimvacationsData;
let pimarchivesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){
pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any);
if(pimarchivesData && pimarchivesData.length && pimarchivesData.length > 0){
pimarchivesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarmycadresid = null;
item.pimarchivesid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarmycadres = pimarmycadresData;
masterData.pimarchives = pimarchivesData;
let trmtrianpeopleData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople'),'undefined')){
trmtrianpeopleData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople') as any);
if(trmtrianpeopleData && trmtrianpeopleData.length && trmtrianpeopleData.length > 0){
trmtrianpeopleData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.trmtrianpersonid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.trmtrianpeople = trmtrianpeopleData;
let pimachievementsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements'),'undefined')){
pimachievementsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements') as any);
......@@ -640,21 +655,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimachievements = pimachievementsData;
let pimtitlesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){
pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any);
if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){
pimtitlesData.forEach((item:any) => {
let pimlanguageabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){
pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any);
if(pimlanguageabilitiesData && pimlanguageabilitiesData.length && pimlanguageabilitiesData.length > 0){
pimlanguageabilitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimtitleid = null;
item.pimlanguageabilityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimtitles = pimtitlesData;
masterData.pimlanguageabilities = pimlanguageabilitiesData;
let pimpapersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers'),'undefined')){
pimpapersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers') as any);
......@@ -670,51 +685,51 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimpapers = pimpapersData;
let pimfaminfosData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){
pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any);
if(pimfaminfosData && pimfaminfosData.length && pimfaminfosData.length > 0){
pimfaminfosData.forEach((item:any) => {
let attendancemreportmxesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){
attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any);
if(attendancemreportmxesData && attendancemreportmxesData.length && attendancemreportmxesData.length > 0){
attendancemreportmxesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimfaminfoid = null;
item.attendancemreportmxid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimfaminfos = pimfaminfosData;
let pimpatentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){
pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any);
if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){
pimpatentsData.forEach((item:any) => {
masterData.attendancemreportmxes = attendancemreportmxesData;
let pimresearchfindingsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){
pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any);
if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){
pimresearchfindingsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimpatentid = null;
item.pimresearchfindingsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimpatents = pimpatentsData;
let pimworkhistoriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){
pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any);
if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){
pimworkhistoriesData.forEach((item:any) => {
masterData.pimresearchfindings = pimresearchfindingsData;
let pimtitlesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){
pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any);
if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){
pimtitlesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimworkhistoryid = null;
item.pimtitleid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimworkhistories = pimworkhistoriesData;
masterData.pimtitles = pimtitlesData;
let pimrewardpunishmentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments'),'undefined')){
pimrewardpunishmentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments') as any);
......@@ -730,96 +745,81 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimrewardpunishments = pimrewardpunishmentsData;
let pimvacationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){
pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any);
if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){
pimvacationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimvacationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimvacations = pimvacationsData;
let pimcontractsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){
pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any);
if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){
pimcontractsData.forEach((item:any) => {
let pimfaminfosData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){
pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any);
if(pimfaminfosData && pimfaminfosData.length && pimfaminfosData.length > 0){
pimfaminfosData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimcontractid = null;
item.pimfaminfoid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimcontracts = pimcontractsData;
let pimeducationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){
pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any);
if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){
pimeducationsData.forEach((item:any) => {
masterData.pimfaminfos = pimfaminfosData;
let pimvocationalsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){
pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any);
if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){
pimvocationalsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimeducationid = null;
item.pimvocationalid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimeducations = pimeducationsData;
let pimresearchfindingsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){
pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any);
if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){
pimresearchfindingsData.forEach((item:any) => {
masterData.pimvocationals = pimvocationalsData;
let pimworkhistoriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){
pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any);
if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){
pimworkhistoriesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimresearchfindingsid = null;
item.pimworkhistoryid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimresearchfindings = pimresearchfindingsData;
let pimpersonabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){
pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any);
if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){
pimpersonabilitiesData.forEach((item:any) => {
masterData.pimworkhistories = pimworkhistoriesData;
let pimcontractsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){
pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any);
if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){
pimcontractsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimpersonabilityid = null;
item.pimcontractid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimpersonabilities = pimpersonabilitiesData;
let pimdistirbutionsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){
pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any);
if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){
pimdistirbutionsData.forEach((item:any) => {
masterData.pimcontracts = pimcontractsData;
let pimeducationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){
pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any);
if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){
pimeducationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimdistirbutionid = null;
item.pimeducationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimdistirbutions = pimdistirbutionsData;
masterData.pimeducations = pimeducationsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -829,27 +829,27 @@ export default class PIMPERSONServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/pimpeople`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
this.tempStorage.setItem(tempContext.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople));
this.tempStorage.setItem(tempContext.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers));
this.tempStorage.setItem(tempContext.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
return res;
}
......@@ -864,21 +864,21 @@ export default class PIMPERSONServiceBase extends EntityService {
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let pimvocationalsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){
pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any);
if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){
pimvocationalsData.forEach((item:any) => {
let pimpersonabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){
pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any);
if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){
pimpersonabilitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimvocationalid = null;
item.pimpersonabilityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimvocationals = pimvocationalsData;
masterData.pimpersonabilities = pimpersonabilitiesData;
let pimpersonchangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges'),'undefined')){
pimpersonchangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges') as any);
......@@ -886,44 +886,89 @@ export default class PIMPERSONServiceBase extends EntityService {
pimpersonchangesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimpersonchangeid = null;
item.pimpersonchangeid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimpersonchanges = pimpersonchangesData;
let pimdistirbutionsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){
pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any);
if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){
pimdistirbutionsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimdistirbutionid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimdistirbutions = pimdistirbutionsData;
let pimexitandentriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries'),'undefined')){
pimexitandentriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries') as any);
if(pimexitandentriesData && pimexitandentriesData.length && pimexitandentriesData.length > 0){
pimexitandentriesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimexitandentryid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimexitandentries = pimexitandentriesData;
let pimarmycadresData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){
pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any);
if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){
pimarmycadresData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarmycadresid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimpersonchanges = pimpersonchangesData;
let pimlanguageabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){
pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any);
if(pimlanguageabilitiesData && pimlanguageabilitiesData.length && pimlanguageabilitiesData.length > 0){
pimlanguageabilitiesData.forEach((item:any) => {
masterData.pimarmycadres = pimarmycadresData;
let pimpatentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){
pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any);
if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){
pimpatentsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimlanguageabilityid = null;
item.pimpatentid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimlanguageabilities = pimlanguageabilitiesData;
let pimexitandentriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries'),'undefined')){
pimexitandentriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries') as any);
if(pimexitandentriesData && pimexitandentriesData.length && pimexitandentriesData.length > 0){
pimexitandentriesData.forEach((item:any) => {
masterData.pimpatents = pimpatentsData;
let pimvacationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){
pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any);
if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){
pimvacationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimexitandentryid = null;
item.pimvacationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimexitandentries = pimexitandentriesData;
masterData.pimvacations = pimvacationsData;
let pimarchivesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){
pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any);
......@@ -954,36 +999,6 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.trmtrianpeople = trmtrianpeopleData;
let attendancemreportmxesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){
attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any);
if(attendancemreportmxesData && attendancemreportmxesData.length && attendancemreportmxesData.length > 0){
attendancemreportmxesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.attendancemreportmxid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.attendancemreportmxes = attendancemreportmxesData;
let pimarmycadresData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){
pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any);
if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){
pimarmycadresData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimarmycadresid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimarmycadres = pimarmycadresData;
let pimachievementsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements'),'undefined')){
pimachievementsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements') as any);
......@@ -999,21 +1014,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimachievements = pimachievementsData;
let pimtitlesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){
pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any);
if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){
pimtitlesData.forEach((item:any) => {
let pimlanguageabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){
pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any);
if(pimlanguageabilitiesData && pimlanguageabilitiesData.length && pimlanguageabilitiesData.length > 0){
pimlanguageabilitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimtitleid = null;
item.pimlanguageabilityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimtitles = pimtitlesData;
masterData.pimlanguageabilities = pimlanguageabilitiesData;
let pimpapersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers'),'undefined')){
pimpapersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers') as any);
......@@ -1029,51 +1044,51 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimpapers = pimpapersData;
let pimfaminfosData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){
pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any);
if(pimfaminfosData && pimfaminfosData.length && pimfaminfosData.length > 0){
pimfaminfosData.forEach((item:any) => {
let attendancemreportmxesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){
attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any);
if(attendancemreportmxesData && attendancemreportmxesData.length && attendancemreportmxesData.length > 0){
attendancemreportmxesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimfaminfoid = null;
item.attendancemreportmxid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimfaminfos = pimfaminfosData;
let pimpatentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){
pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any);
if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){
pimpatentsData.forEach((item:any) => {
masterData.attendancemreportmxes = attendancemreportmxesData;
let pimresearchfindingsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){
pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any);
if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){
pimresearchfindingsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimpatentid = null;
item.pimresearchfindingsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimpatents = pimpatentsData;
let pimworkhistoriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){
pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any);
if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){
pimworkhistoriesData.forEach((item:any) => {
masterData.pimresearchfindings = pimresearchfindingsData;
let pimtitlesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){
pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any);
if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){
pimtitlesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimworkhistoryid = null;
item.pimtitleid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimworkhistories = pimworkhistoriesData;
masterData.pimtitles = pimtitlesData;
let pimrewardpunishmentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments'),'undefined')){
pimrewardpunishmentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments') as any);
......@@ -1089,119 +1104,104 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData.pimrewardpunishments = pimrewardpunishmentsData;
let pimvacationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){
pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any);
if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){
pimvacationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimvacationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimvacations = pimvacationsData;
let pimcontractsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){
pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any);
if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){
pimcontractsData.forEach((item:any) => {
let pimfaminfosData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){
pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any);
if(pimfaminfosData && pimfaminfosData.length && pimfaminfosData.length > 0){
pimfaminfosData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimcontractid = null;
item.pimfaminfoid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimcontracts = pimcontractsData;
let pimeducationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){
pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any);
if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){
pimeducationsData.forEach((item:any) => {
masterData.pimfaminfos = pimfaminfosData;
let pimvocationalsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){
pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any);
if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){
pimvocationalsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimeducationid = null;
item.pimvocationalid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimeducations = pimeducationsData;
let pimresearchfindingsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){
pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any);
if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){
pimresearchfindingsData.forEach((item:any) => {
masterData.pimvocationals = pimvocationalsData;
let pimworkhistoriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){
pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any);
if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){
pimworkhistoriesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimresearchfindingsid = null;
item.pimworkhistoryid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimresearchfindings = pimresearchfindingsData;
let pimpersonabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){
pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any);
if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){
pimpersonabilitiesData.forEach((item:any) => {
masterData.pimworkhistories = pimworkhistoriesData;
let pimcontractsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){
pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any);
if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){
pimcontractsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimpersonabilityid = null;
item.pimcontractid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimpersonabilities = pimpersonabilitiesData;
let pimdistirbutionsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){
pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any);
if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){
pimdistirbutionsData.forEach((item:any) => {
masterData.pimcontracts = pimcontractsData;
let pimeducationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){
pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any);
if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){
pimeducationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimdistirbutionid = null;
item.pimeducationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimdistirbutions = pimdistirbutionsData;
masterData.pimeducations = pimeducationsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/pimpeople/${context.pimperson}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
return res;
}
......@@ -1285,27 +1285,27 @@ export default class PIMPERSONServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/pimpeople/getdraft`,isloading);
res.data.pimperson = data.pimperson;
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
return res;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册