Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBizEAM训练四营
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBizEAM训练营
iBizEAM训练四营
提交
adfdbcc8
提交
adfdbcc8
编写于
5月 28, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wwwwww 部署微服务应用
上级
a001bdf7
变更
17
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
1132 行增加
和
1132 行删除
+1132
-1132
emacclass-service-base.ts
app_EAMWeb/src/service/emacclass/emacclass-service-base.ts
+47
-47
emeqspare-service-base.ts
app_EAMWeb/src/service/emeqspare/emeqspare-service-base.ts
+47
-47
emeqtype-service-base.ts
app_EAMWeb/src/service/emeqtype/emeqtype-service-base.ts
+47
-47
emequip-service-base.ts
app_EAMWeb/src/service/emequip/emequip-service-base.ts
+299
-299
emitem-service-base.ts
app_EAMWeb/src/service/emitem/emitem-service-base.ts
+170
-170
emplan-service-base.ts
app_EAMWeb/src/service/emplan/emplan-service-base.ts
+47
-47
emrfode-service-base.ts
app_EAMWeb/src/service/emrfode/emrfode-service-base.ts
+52
-52
emservice-service-base.ts
app_EAMWeb/src/service/emservice/emservice-service-base.ts
+52
-52
emstore-service-base.ts
app_EAMWeb/src/service/emstore/emstore-service-base.ts
+52
-52
pfdept-service-base.ts
app_EAMWeb/src/service/pfdept/pfdept-service-base.ts
+76
-76
pfemp-service-base.ts
app_EAMWeb/src/service/pfemp/pfemp-service-base.ts
+120
-120
pfteam-service-base.ts
app_EAMWeb/src/service/pfteam/pfteam-service-base.ts
+102
-102
config.xml
config.xml
+5
-5
Dockerfile
eam-app/eam-app-eamweb/src/main/docker/Dockerfile
+1
-1
eam-app-eamweb.yaml
eam-app/eam-app-eamweb/src/main/docker/eam-app-eamweb.yaml
+13
-1
Dockerfile
eam-provider/eam-provider-webapi/src/main/docker/Dockerfile
+1
-1
eam-provider-webapi.yaml
...-provider-webapi/src/main/docker/eam-provider-webapi.yaml
+1
-13
未找到文件。
app_EAMWeb/src/service/emacclass/emacclass-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -62,40 +62,40 @@ export default class EMACClassServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emplan
templ
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
templ
s'
),
'undefined'
)){
emplan
templsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
emplan
templsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
emplan
templ
sData
.
forEach
((
item
:
any
)
=>
{
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplan
sData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
emplan
sData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
emplansData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplan
templ
id
=
null
;
item
.
emplanid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
templs
=
emplantempl
sData
;
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplan
sData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
emplan
sData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
emplansData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emplan
s
=
emplan
sData
;
let
emplan
templ
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
templ
s'
),
'undefined'
)){
emplan
templsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
emplan
templsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
emplan
templ
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplanid
=
null
;
item
.
emplan
templ
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
s
=
emplan
sData
;
masterData
.
emplan
templs
=
emplantempl
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emacclasses/
${
context
.
emacclass
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
return
res
;
}
...
...
@@ -111,8 +111,8 @@ export default class EMACClassServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emacclasses/getdraft`
,
isloading
);
res
.
data
.
emacclass
=
data
.
emacclass
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
return
res
;
}
...
...
@@ -127,36 +127,36 @@ export default class EMACClassServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emplan
templ
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
templ
s'
),
'undefined'
)){
emplan
templsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
emplan
templsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
emplan
templ
sData
.
forEach
((
item
:
any
)
=>
{
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplan
sData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
emplan
sData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
emplansData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplan
templ
id
=
null
;
item
.
emplanid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
templs
=
emplantempl
sData
;
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplan
sData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
emplan
sData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
emplansData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emplan
s
=
emplan
sData
;
let
emplan
templ
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
templ
s'
),
'undefined'
)){
emplan
templsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
emplan
templsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
emplan
templ
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplanid
=
null
;
item
.
emplan
templ
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
s
=
emplan
sData
;
masterData
.
emplan
templs
=
emplantempl
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -166,8 +166,8 @@ export default class EMACClassServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emacclasses`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
return
res
;
}
...
...
@@ -182,8 +182,8 @@ export default class EMACClassServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emacclasses/
${
context
.
emacclass
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
return
res
;
}
...
...
@@ -226,40 +226,40 @@ export default class EMACClassServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emplan
templ
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
templ
s'
),
'undefined'
)){
emplan
templsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
emplan
templsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
emplan
templ
sData
.
forEach
((
item
:
any
)
=>
{
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplan
sData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
emplan
sData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
emplansData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplan
templ
id
=
null
;
item
.
emplanid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
templs
=
emplantempl
sData
;
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplan
sData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
emplan
sData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
emplansData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emplan
s
=
emplan
sData
;
let
emplan
templ
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
templ
s'
),
'undefined'
)){
emplan
templsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
emplan
templsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
emplan
templ
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplanid
=
null
;
item
.
emplan
templ
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
s
=
emplan
sData
;
masterData
.
emplan
templs
=
emplantempl
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/emacclasses/
${
context
.
emacclass
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
return
res
;
}
...
...
app_EAMWeb/src/service/emeqspare/emeqspare-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -62,40 +62,40 @@ export default class EMEQSpareServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emeqspare
map
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
map
s'
),
'undefined'
)){
emeqspare
mapsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparemap
s'
)
as
any
);
if
(
emeqspare
mapsData
&&
emeqsparemapsData
.
length
&&
emeqsparemap
sData
.
length
>
0
){
emeqspare
map
sData
.
forEach
((
item
:
any
)
=>
{
let
emeqspare
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
detail
s'
),
'undefined'
)){
emeqspare
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
emeqspare
detailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
emeqspare
detail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeqspare
map
id
=
null
;
item
.
emeqspare
detail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeqspare
maps
=
emeqsparemap
sData
;
let
emeqspare
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
detail
s'
),
'undefined'
)){
emeqspare
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
emeqspare
detailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
emeqspare
detail
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emeqspare
details
=
emeqsparedetail
sData
;
let
emeqspare
map
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
map
s'
),
'undefined'
)){
emeqspare
mapsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparemap
s'
)
as
any
);
if
(
emeqspare
mapsData
&&
emeqsparemapsData
.
length
&&
emeqsparemap
sData
.
length
>
0
){
emeqspare
map
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeqspare
detail
id
=
null
;
item
.
emeqspare
map
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeqspare
details
=
emeqsparedetail
sData
;
masterData
.
emeqspare
maps
=
emeqsparemap
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/emeqspares/
${
context
.
emeqspare
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparemaps'
,
JSON
.
stringify
(
res
.
data
.
emeqsparemaps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparedetails'
,
JSON
.
stringify
(
res
.
data
.
emeqsparedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparemaps'
,
JSON
.
stringify
(
res
.
data
.
emeqsparemaps
));
return
res
;
}
...
...
@@ -137,36 +137,36 @@ export default class EMEQSpareServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emeqspare
map
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
map
s'
),
'undefined'
)){
emeqspare
mapsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparemap
s'
)
as
any
);
if
(
emeqspare
mapsData
&&
emeqsparemapsData
.
length
&&
emeqsparemap
sData
.
length
>
0
){
emeqspare
map
sData
.
forEach
((
item
:
any
)
=>
{
let
emeqspare
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
detail
s'
),
'undefined'
)){
emeqspare
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
emeqspare
detailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
emeqspare
detail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeqspare
map
id
=
null
;
item
.
emeqspare
detail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeqspare
maps
=
emeqsparemap
sData
;
let
emeqspare
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
detail
s'
),
'undefined'
)){
emeqspare
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
emeqspare
detailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
emeqspare
detail
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emeqspare
details
=
emeqsparedetail
sData
;
let
emeqspare
map
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
map
s'
),
'undefined'
)){
emeqspare
mapsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparemap
s'
)
as
any
);
if
(
emeqspare
mapsData
&&
emeqsparemapsData
.
length
&&
emeqsparemap
sData
.
length
>
0
){
emeqspare
map
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeqspare
detail
id
=
null
;
item
.
emeqspare
map
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeqspare
details
=
emeqsparedetail
sData
;
masterData
.
emeqspare
maps
=
emeqsparemap
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -176,8 +176,8 @@ export default class EMEQSpareServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emeqspares`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqsparemaps'
,
JSON
.
stringify
(
res
.
data
.
emeqsparemaps
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqsparedetails'
,
JSON
.
stringify
(
res
.
data
.
emeqsparedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqsparemaps'
,
JSON
.
stringify
(
res
.
data
.
emeqsparemaps
));
return
res
;
}
...
...
@@ -192,40 +192,40 @@ export default class EMEQSpareServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emeqspare
map
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
map
s'
),
'undefined'
)){
emeqspare
mapsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparemap
s'
)
as
any
);
if
(
emeqspare
mapsData
&&
emeqsparemapsData
.
length
&&
emeqsparemap
sData
.
length
>
0
){
emeqspare
map
sData
.
forEach
((
item
:
any
)
=>
{
let
emeqspare
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
detail
s'
),
'undefined'
)){
emeqspare
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
emeqspare
detailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
emeqspare
detail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeqspare
map
id
=
null
;
item
.
emeqspare
detail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeqspare
maps
=
emeqsparemap
sData
;
let
emeqspare
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
detail
s'
),
'undefined'
)){
emeqspare
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
emeqspare
detailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
emeqspare
detail
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emeqspare
details
=
emeqsparedetail
sData
;
let
emeqspare
map
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqspare
map
s'
),
'undefined'
)){
emeqspare
mapsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparemap
s'
)
as
any
);
if
(
emeqspare
mapsData
&&
emeqsparemapsData
.
length
&&
emeqsparemap
sData
.
length
>
0
){
emeqspare
map
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeqspare
detail
id
=
null
;
item
.
emeqspare
map
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeqspare
details
=
emeqsparedetail
sData
;
masterData
.
emeqspare
maps
=
emeqsparemap
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emeqspares/
${
context
.
emeqspare
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparemaps'
,
JSON
.
stringify
(
res
.
data
.
emeqsparemaps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparedetails'
,
JSON
.
stringify
(
res
.
data
.
emeqsparedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparemaps'
,
JSON
.
stringify
(
res
.
data
.
emeqsparemaps
));
return
res
;
}
...
...
@@ -241,8 +241,8 @@ export default class EMEQSpareServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emeqspares/getdraft`
,
isloading
);
res
.
data
.
emeqspare
=
data
.
emeqspare
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparemaps'
,
JSON
.
stringify
(
res
.
data
.
emeqsparemaps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparedetails'
,
JSON
.
stringify
(
res
.
data
.
emeqsparedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparemaps'
,
JSON
.
stringify
(
res
.
data
.
emeqsparemaps
));
return
res
;
}
...
...
@@ -257,8 +257,8 @@ export default class EMEQSpareServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emeqspares/
${
context
.
emeqspare
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparemaps'
,
JSON
.
stringify
(
res
.
data
.
emeqsparemaps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparedetails'
,
JSON
.
stringify
(
res
.
data
.
emeqsparedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparemaps'
,
JSON
.
stringify
(
res
.
data
.
emeqsparemaps
));
return
res
;
}
...
...
app_EAMWeb/src/service/emeqtype/emeqtype-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -76,40 +76,40 @@ export default class EMEQTypeServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emeq
uip
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
uip
s'
),
'undefined'
)){
emeq
uipsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequip
s'
)
as
any
);
if
(
emeq
uipsData
&&
emequipsData
.
length
&&
emequip
sData
.
length
>
0
){
emeq
uip
sData
.
forEach
((
item
:
any
)
=>
{
let
emeq
type
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
type
s'
),
'undefined'
)){
emeq
typesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqtype
s'
)
as
any
);
if
(
emeq
typesData
&&
emeqtypesData
.
length
&&
emeqtype
sData
.
length
>
0
){
emeq
type
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeq
uip
id
=
null
;
item
.
emeq
type
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeq
uips
=
emequip
sData
;
let
emeq
type
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
type
s'
),
'undefined'
)){
emeq
typesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqtype
s'
)
as
any
);
if
(
emeq
typesData
&&
emeqtypesData
.
length
&&
emeqtype
sData
.
length
>
0
){
emeq
type
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emeq
types
=
emeqtype
sData
;
let
emeq
uip
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
uip
s'
),
'undefined'
)){
emeq
uipsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequip
s'
)
as
any
);
if
(
emeq
uipsData
&&
emequipsData
.
length
&&
emequip
sData
.
length
>
0
){
emeq
uip
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeq
type
id
=
null
;
item
.
emeq
uip
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeq
types
=
emeqtype
sData
;
masterData
.
emeq
uips
=
emequip
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/emeqtypes/
${
context
.
emeqtype
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqtypes'
,
JSON
.
stringify
(
res
.
data
.
emeqtypes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
return
res
;
}
...
...
@@ -125,8 +125,8 @@ export default class EMEQTypeServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emeqtypes/getdraft`
,
isloading
);
res
.
data
.
emeqtype
=
data
.
emeqtype
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqtypes'
,
JSON
.
stringify
(
res
.
data
.
emeqtypes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
return
res
;
}
...
...
@@ -141,8 +141,8 @@ export default class EMEQTypeServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emeqtypes/
${
context
.
emeqtype
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqtypes'
,
JSON
.
stringify
(
res
.
data
.
emeqtypes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
return
res
;
}
...
...
@@ -158,36 +158,36 @@ export default class EMEQTypeServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emeq
uip
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
uip
s'
),
'undefined'
)){
emeq
uipsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequip
s'
)
as
any
);
if
(
emeq
uipsData
&&
emequipsData
.
length
&&
emequip
sData
.
length
>
0
){
emeq
uip
sData
.
forEach
((
item
:
any
)
=>
{
let
emeq
type
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
type
s'
),
'undefined'
)){
emeq
typesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqtype
s'
)
as
any
);
if
(
emeq
typesData
&&
emeqtypesData
.
length
&&
emeqtype
sData
.
length
>
0
){
emeq
type
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeq
uip
id
=
null
;
item
.
emeq
type
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeq
uips
=
emequip
sData
;
let
emeq
type
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
type
s'
),
'undefined'
)){
emeq
typesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqtype
s'
)
as
any
);
if
(
emeq
typesData
&&
emeqtypesData
.
length
&&
emeqtype
sData
.
length
>
0
){
emeq
type
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emeq
types
=
emeqtype
sData
;
let
emeq
uip
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
uip
s'
),
'undefined'
)){
emeq
uipsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequip
s'
)
as
any
);
if
(
emeq
uipsData
&&
emequipsData
.
length
&&
emequip
sData
.
length
>
0
){
emeq
uip
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeq
type
id
=
null
;
item
.
emeq
uip
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeq
types
=
emeqtype
sData
;
masterData
.
emeq
uips
=
emequip
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -197,8 +197,8 @@ export default class EMEQTypeServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emeqtypes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqtypes'
,
JSON
.
stringify
(
res
.
data
.
emeqtypes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
return
res
;
}
...
...
@@ -226,40 +226,40 @@ export default class EMEQTypeServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emeq
uip
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
uip
s'
),
'undefined'
)){
emeq
uipsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequip
s'
)
as
any
);
if
(
emeq
uipsData
&&
emequipsData
.
length
&&
emequip
sData
.
length
>
0
){
emeq
uip
sData
.
forEach
((
item
:
any
)
=>
{
let
emeq
type
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
type
s'
),
'undefined'
)){
emeq
typesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqtype
s'
)
as
any
);
if
(
emeq
typesData
&&
emeqtypesData
.
length
&&
emeqtype
sData
.
length
>
0
){
emeq
type
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeq
uip
id
=
null
;
item
.
emeq
type
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeq
uips
=
emequip
sData
;
let
emeq
type
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
type
s'
),
'undefined'
)){
emeq
typesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqtype
s'
)
as
any
);
if
(
emeq
typesData
&&
emeqtypesData
.
length
&&
emeqtype
sData
.
length
>
0
){
emeq
type
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emeq
types
=
emeqtype
sData
;
let
emeq
uip
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
uip
s'
),
'undefined'
)){
emeq
uipsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequip
s'
)
as
any
);
if
(
emeq
uipsData
&&
emequipsData
.
length
&&
emequip
sData
.
length
>
0
){
emeq
uip
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeq
type
id
=
null
;
item
.
emeq
uip
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeq
types
=
emeqtype
sData
;
masterData
.
emeq
uips
=
emequip
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emeqtypes/
${
context
.
emeqtype
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqtypes'
,
JSON
.
stringify
(
res
.
data
.
emeqtypes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
return
res
;
}
...
...
app_EAMWeb/src/service/emequip/emequip-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -74,6 +74,36 @@ export default class EMEquipServiceBase extends EntityService {
return
Http
.
getInstance
().
put
(
`/emeqtypes/
${
context
.
emeqtype
}
/emequips/
${
context
.
emequip
}
`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
)
as
any
);
if
(
emplansData
&&
emplansData
.
length
&&
emplansData
.
length
>
0
){
emplansData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplanid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplans
=
emplansData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
if
(
emitempusesData
&&
emitempusesData
.
length
&&
emitempusesData
.
length
>
0
){
emitempusesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitempuseid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitempuses
=
emitempusesData
;
let
emeqsetupsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsetups'
),
'undefined'
)){
emeqsetupsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsetups'
)
as
any
);
...
...
@@ -89,6 +119,21 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emeqsetups
=
emeqsetupsData
;
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_dpid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_dps
=
emwo_dpsData
;
let
emeqdebugsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqdebugs'
),
'undefined'
)){
emeqdebugsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqdebugs'
)
as
any
);
...
...
@@ -104,6 +149,21 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emeqdebugs
=
emeqdebugsData
;
let
emwo_ensData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
),
'undefined'
)){
emwo_ensData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
)
as
any
);
if
(
emwo_ensData
&&
emwo_ensData
.
length
&&
emwo_ensData
.
length
>
0
){
emwo_ensData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_enid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_ens
=
emwo_ensData
;
let
emeqchecksData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqchecks'
),
'undefined'
)){
emeqchecksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqchecks'
)
as
any
);
...
...
@@ -149,51 +209,21 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emwo_inners
=
emwo_innersData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
if
(
emitempusesData
&&
emitempusesData
.
length
&&
emitempusesData
.
length
>
0
){
emitempusesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitempuseid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitempuses
=
emitempusesData
;
let
emenconsumsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
),
'undefined'
)){
emenconsumsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
)
as
any
);
if
(
emenconsumsData
&&
emenconsumsData
.
length
&&
emenconsumsData
.
length
>
0
){
emenconsumsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emenconsumid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emenconsums
=
emenconsumsData
;
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
let
emappliesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
),
'undefined'
)){
emappliesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
)
as
any
);
if
(
emappliesData
&&
emappliesData
.
length
&&
emappliesData
.
length
>
0
){
emappliesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
wo_dp
id
=
null
;
item
.
em
apply
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
wo_dps
=
emwo_dp
sData
;
masterData
.
em
applies
=
emapplie
sData
;
let
emwo_oscsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_oscs'
),
'undefined'
)){
emwo_oscsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_oscs'
)
as
any
);
...
...
@@ -224,98 +254,68 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emwos
=
emwosData
;
let
emeqahsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqahs'
),
'undefined'
)){
emeqahsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqahs'
)
as
any
);
if
(
emeqahsData
&&
emeqahsData
.
length
&&
emeqahsData
.
length
>
0
){
emeqahsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeqahid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeqahs
=
emeqahsData
;
let
emwo_ensData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
),
'undefined'
)){
emwo_ensData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
)
as
any
);
if
(
emwo_ensData
&&
emwo_ensData
.
length
&&
emwo_ensData
.
length
>
0
){
emwo_ensData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_enid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_ens
=
emwo_ensData
;
let
emappliesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
),
'undefined'
)){
emappliesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
)
as
any
);
if
(
emappliesData
&&
emappliesData
.
length
&&
emappliesData
.
length
>
0
){
emappliesData
.
forEach
((
item
:
any
)
=>
{
let
emeqmaintancesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqmaintances'
),
'undefined'
)){
emeqmaintancesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqmaintances'
)
as
any
);
if
(
emeqmaintancesData
&&
emeqmaintancesData
.
length
&&
emeqmaintancesData
.
length
>
0
){
emeqmaintancesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
apply
id
=
null
;
item
.
em
eqmaintance
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
applies
=
emappli
esData
;
let
emeq
maintance
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
maintance
s'
),
'undefined'
)){
emeq
maintancesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqmaintance
s'
)
as
any
);
if
(
emeq
maintancesData
&&
emeqmaintancesData
.
length
&&
emeqmaintance
sData
.
length
>
0
){
emeq
maintance
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
eqmaintances
=
emeqmaintanc
esData
;
let
emeq
ah
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
ah
s'
),
'undefined'
)){
emeq
ahsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqah
s'
)
as
any
);
if
(
emeq
ahsData
&&
emeqahsData
.
length
&&
emeqah
sData
.
length
>
0
){
emeq
ah
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeq
maintance
id
=
null
;
item
.
emeq
ah
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeq
maintances
=
emeqmaintance
sData
;
let
em
plan
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plan
s'
),
'undefined'
)){
em
plansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
em
plansData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
em
plan
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emeq
ahs
=
emeqah
sData
;
let
em
enconsum
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
enconsum
s'
),
'undefined'
)){
em
enconsumsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsum
s'
)
as
any
);
if
(
em
enconsumsData
&&
emenconsumsData
.
length
&&
emenconsum
sData
.
length
>
0
){
em
enconsum
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plan
id
=
null
;
item
.
em
enconsum
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plans
=
emplan
sData
;
masterData
.
em
enconsums
=
emenconsum
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/emequips/
${
context
.
emequip
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsetups'
,
JSON
.
stringify
(
res
.
data
.
emeqsetups
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqdebugs'
,
JSON
.
stringify
(
res
.
data
.
emeqdebugs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_ens'
,
JSON
.
stringify
(
res
.
data
.
emwo_ens
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqchecks'
,
JSON
.
stringify
(
res
.
data
.
emeqchecks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqkeeps'
,
JSON
.
stringify
(
res
.
data
.
emeqkeeps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_inners'
,
JSON
.
stringify
(
res
.
data
.
emwo_inners
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emapplies'
,
JSON
.
stringify
(
res
.
data
.
emapplies
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_oscs'
,
JSON
.
stringify
(
res
.
data
.
emwo_oscs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwos'
,
JSON
.
stringify
(
res
.
data
.
emwos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqahs'
,
JSON
.
stringify
(
res
.
data
.
emeqahs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_ens'
,
JSON
.
stringify
(
res
.
data
.
emwo_ens
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emapplies'
,
JSON
.
stringify
(
res
.
data
.
emapplies
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqmaintances'
,
JSON
.
stringify
(
res
.
data
.
emeqmaintances
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqahs'
,
JSON
.
stringify
(
res
.
data
.
emeqahs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
return
res
;
}
...
...
@@ -348,6 +348,36 @@ export default class EMEquipServiceBase extends EntityService {
return
Http
.
getInstance
().
post
(
`/emeqtypes/
${
context
.
emeqtype
}
/emequips`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
)
as
any
);
if
(
emplansData
&&
emplansData
.
length
&&
emplansData
.
length
>
0
){
emplansData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplanid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplans
=
emplansData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
if
(
emitempusesData
&&
emitempusesData
.
length
&&
emitempusesData
.
length
>
0
){
emitempusesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitempuseid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitempuses
=
emitempusesData
;
let
emeqsetupsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsetups'
),
'undefined'
)){
emeqsetupsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsetups'
)
as
any
);
...
...
@@ -363,6 +393,21 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emeqsetups
=
emeqsetupsData
;
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_dpid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_dps
=
emwo_dpsData
;
let
emeqdebugsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqdebugs'
),
'undefined'
)){
emeqdebugsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqdebugs'
)
as
any
);
...
...
@@ -378,6 +423,21 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emeqdebugs
=
emeqdebugsData
;
let
emwo_ensData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
),
'undefined'
)){
emwo_ensData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
)
as
any
);
if
(
emwo_ensData
&&
emwo_ensData
.
length
&&
emwo_ensData
.
length
>
0
){
emwo_ensData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_enid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_ens
=
emwo_ensData
;
let
emeqchecksData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqchecks'
),
'undefined'
)){
emeqchecksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqchecks'
)
as
any
);
...
...
@@ -423,51 +483,21 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emwo_inners
=
emwo_innersData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
if
(
emitempusesData
&&
emitempusesData
.
length
&&
emitempusesData
.
length
>
0
){
emitempusesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitempuseid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitempuses
=
emitempusesData
;
let
emenconsumsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
),
'undefined'
)){
emenconsumsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
)
as
any
);
if
(
emenconsumsData
&&
emenconsumsData
.
length
&&
emenconsumsData
.
length
>
0
){
emenconsumsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emenconsumid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emenconsums
=
emenconsumsData
;
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
let
emappliesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
),
'undefined'
)){
emappliesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
)
as
any
);
if
(
emappliesData
&&
emappliesData
.
length
&&
emappliesData
.
length
>
0
){
emappliesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
wo_dp
id
=
null
;
item
.
em
apply
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
wo_dps
=
emwo_dp
sData
;
masterData
.
em
applies
=
emapplie
sData
;
let
emwo_oscsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_oscs'
),
'undefined'
)){
emwo_oscsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_oscs'
)
as
any
);
...
...
@@ -498,81 +528,51 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emwos
=
emwosData
;
let
emeqahsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqahs'
),
'undefined'
)){
emeqahsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqahs'
)
as
any
);
if
(
emeqahsData
&&
emeqahsData
.
length
&&
emeqahsData
.
length
>
0
){
emeqahsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeqahid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeqahs
=
emeqahsData
;
let
emwo_ensData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
),
'undefined'
)){
emwo_ensData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
)
as
any
);
if
(
emwo_ensData
&&
emwo_ensData
.
length
&&
emwo_ensData
.
length
>
0
){
emwo_ensData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_enid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_ens
=
emwo_ensData
;
let
emappliesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
),
'undefined'
)){
emappliesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
)
as
any
);
if
(
emappliesData
&&
emappliesData
.
length
&&
emappliesData
.
length
>
0
){
emappliesData
.
forEach
((
item
:
any
)
=>
{
let
emeqmaintancesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqmaintances'
),
'undefined'
)){
emeqmaintancesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqmaintances'
)
as
any
);
if
(
emeqmaintancesData
&&
emeqmaintancesData
.
length
&&
emeqmaintancesData
.
length
>
0
){
emeqmaintancesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
apply
id
=
null
;
item
.
em
eqmaintance
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
applies
=
emappli
esData
;
let
emeq
maintance
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
maintance
s'
),
'undefined'
)){
emeq
maintancesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqmaintance
s'
)
as
any
);
if
(
emeq
maintancesData
&&
emeqmaintancesData
.
length
&&
emeqmaintance
sData
.
length
>
0
){
emeq
maintance
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
eqmaintances
=
emeqmaintanc
esData
;
let
emeq
ah
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
ah
s'
),
'undefined'
)){
emeq
ahsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqah
s'
)
as
any
);
if
(
emeq
ahsData
&&
emeqahsData
.
length
&&
emeqah
sData
.
length
>
0
){
emeq
ah
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeq
maintance
id
=
null
;
item
.
emeq
ah
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeq
maintances
=
emeqmaintance
sData
;
let
em
plan
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plan
s'
),
'undefined'
)){
em
plansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
em
plansData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
em
plan
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emeq
ahs
=
emeqah
sData
;
let
em
enconsum
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
enconsum
s'
),
'undefined'
)){
em
enconsumsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsum
s'
)
as
any
);
if
(
em
enconsumsData
&&
emenconsumsData
.
length
&&
emenconsum
sData
.
length
>
0
){
em
enconsum
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plan
id
=
null
;
item
.
em
enconsum
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plans
=
emplan
sData
;
masterData
.
em
enconsums
=
emenconsum
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -582,21 +582,21 @@ export default class EMEquipServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emequips`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqsetups'
,
JSON
.
stringify
(
res
.
data
.
emeqsetups
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqdebugs'
,
JSON
.
stringify
(
res
.
data
.
emeqdebugs
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwo_ens'
,
JSON
.
stringify
(
res
.
data
.
emwo_ens
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqchecks'
,
JSON
.
stringify
(
res
.
data
.
emeqchecks
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqkeeps'
,
JSON
.
stringify
(
res
.
data
.
emeqkeeps
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwo_inners'
,
JSON
.
stringify
(
res
.
data
.
emwo_inners
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emapplies'
,
JSON
.
stringify
(
res
.
data
.
emapplies
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwo_oscs'
,
JSON
.
stringify
(
res
.
data
.
emwo_oscs
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwos'
,
JSON
.
stringify
(
res
.
data
.
emwos
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqahs'
,
JSON
.
stringify
(
res
.
data
.
emeqahs
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwo_ens'
,
JSON
.
stringify
(
res
.
data
.
emwo_ens
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emapplies'
,
JSON
.
stringify
(
res
.
data
.
emapplies
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqmaintances'
,
JSON
.
stringify
(
res
.
data
.
emeqmaintances
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqahs'
,
JSON
.
stringify
(
res
.
data
.
emeqahs
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
return
res
;
}
...
...
@@ -636,21 +636,21 @@ export default class EMEquipServiceBase extends EntityService {
return
Http
.
getInstance
().
get
(
`/emeqtypes/
${
context
.
emeqtype
}
/emequips/
${
context
.
emequip
}
`
,
isloading
);
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emequips/
${
context
.
emequip
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsetups'
,
JSON
.
stringify
(
res
.
data
.
emeqsetups
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqdebugs'
,
JSON
.
stringify
(
res
.
data
.
emeqdebugs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_ens'
,
JSON
.
stringify
(
res
.
data
.
emwo_ens
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqchecks'
,
JSON
.
stringify
(
res
.
data
.
emeqchecks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqkeeps'
,
JSON
.
stringify
(
res
.
data
.
emeqkeeps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_inners'
,
JSON
.
stringify
(
res
.
data
.
emwo_inners
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emapplies'
,
JSON
.
stringify
(
res
.
data
.
emapplies
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_oscs'
,
JSON
.
stringify
(
res
.
data
.
emwo_oscs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwos'
,
JSON
.
stringify
(
res
.
data
.
emwos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqahs'
,
JSON
.
stringify
(
res
.
data
.
emeqahs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_ens'
,
JSON
.
stringify
(
res
.
data
.
emwo_ens
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emapplies'
,
JSON
.
stringify
(
res
.
data
.
emapplies
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqmaintances'
,
JSON
.
stringify
(
res
.
data
.
emeqmaintances
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqahs'
,
JSON
.
stringify
(
res
.
data
.
emeqahs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
return
res
;
}
...
...
@@ -672,6 +672,36 @@ export default class EMEquipServiceBase extends EntityService {
return
Http
.
getInstance
().
post
(
`/emeqtypes/
${
context
.
emeqtype
}
/emequips/
${
context
.
emequip
}
/save`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
)
as
any
);
if
(
emplansData
&&
emplansData
.
length
&&
emplansData
.
length
>
0
){
emplansData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplanid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplans
=
emplansData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
if
(
emitempusesData
&&
emitempusesData
.
length
&&
emitempusesData
.
length
>
0
){
emitempusesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitempuseid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitempuses
=
emitempusesData
;
let
emeqsetupsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsetups'
),
'undefined'
)){
emeqsetupsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsetups'
)
as
any
);
...
...
@@ -687,6 +717,21 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emeqsetups
=
emeqsetupsData
;
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_dpid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_dps
=
emwo_dpsData
;
let
emeqdebugsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqdebugs'
),
'undefined'
)){
emeqdebugsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqdebugs'
)
as
any
);
...
...
@@ -702,6 +747,21 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emeqdebugs
=
emeqdebugsData
;
let
emwo_ensData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
),
'undefined'
)){
emwo_ensData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
)
as
any
);
if
(
emwo_ensData
&&
emwo_ensData
.
length
&&
emwo_ensData
.
length
>
0
){
emwo_ensData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_enid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_ens
=
emwo_ensData
;
let
emeqchecksData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqchecks'
),
'undefined'
)){
emeqchecksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqchecks'
)
as
any
);
...
...
@@ -747,51 +807,21 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emwo_inners
=
emwo_innersData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
if
(
emitempusesData
&&
emitempusesData
.
length
&&
emitempusesData
.
length
>
0
){
emitempusesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitempuseid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitempuses
=
emitempusesData
;
let
emenconsumsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
),
'undefined'
)){
emenconsumsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
)
as
any
);
if
(
emenconsumsData
&&
emenconsumsData
.
length
&&
emenconsumsData
.
length
>
0
){
emenconsumsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emenconsumid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emenconsums
=
emenconsumsData
;
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
let
emappliesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
),
'undefined'
)){
emappliesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
)
as
any
);
if
(
emappliesData
&&
emappliesData
.
length
&&
emappliesData
.
length
>
0
){
emappliesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
wo_dp
id
=
null
;
item
.
em
apply
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
wo_dps
=
emwo_dp
sData
;
masterData
.
em
applies
=
emapplie
sData
;
let
emwo_oscsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_oscs'
),
'undefined'
)){
emwo_oscsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_oscs'
)
as
any
);
...
...
@@ -822,98 +852,68 @@ export default class EMEquipServiceBase extends EntityService {
}
}
masterData
.
emwos
=
emwosData
;
let
emeqahsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqahs'
),
'undefined'
)){
emeqahsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqahs'
)
as
any
);
if
(
emeqahsData
&&
emeqahsData
.
length
&&
emeqahsData
.
length
>
0
){
emeqahsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeqahid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeqahs
=
emeqahsData
;
let
emwo_ensData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
),
'undefined'
)){
emwo_ensData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_ens'
)
as
any
);
if
(
emwo_ensData
&&
emwo_ensData
.
length
&&
emwo_ensData
.
length
>
0
){
emwo_ensData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_enid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_ens
=
emwo_ensData
;
let
emappliesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
),
'undefined'
)){
emappliesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emapplies'
)
as
any
);
if
(
emappliesData
&&
emappliesData
.
length
&&
emappliesData
.
length
>
0
){
emappliesData
.
forEach
((
item
:
any
)
=>
{
let
emeqmaintancesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqmaintances'
),
'undefined'
)){
emeqmaintancesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqmaintances'
)
as
any
);
if
(
emeqmaintancesData
&&
emeqmaintancesData
.
length
&&
emeqmaintancesData
.
length
>
0
){
emeqmaintancesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
apply
id
=
null
;
item
.
em
eqmaintance
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
applies
=
emappli
esData
;
let
emeq
maintance
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
maintance
s'
),
'undefined'
)){
emeq
maintancesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqmaintance
s'
)
as
any
);
if
(
emeq
maintancesData
&&
emeqmaintancesData
.
length
&&
emeqmaintance
sData
.
length
>
0
){
emeq
maintance
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
eqmaintances
=
emeqmaintanc
esData
;
let
emeq
ah
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeq
ah
s'
),
'undefined'
)){
emeq
ahsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqah
s'
)
as
any
);
if
(
emeq
ahsData
&&
emeqahsData
.
length
&&
emeqah
sData
.
length
>
0
){
emeq
ah
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emeq
maintance
id
=
null
;
item
.
emeq
ah
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emeq
maintances
=
emeqmaintance
sData
;
let
em
plan
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plan
s'
),
'undefined'
)){
em
plansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
em
plansData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
em
plan
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emeq
ahs
=
emeqah
sData
;
let
em
enconsum
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
enconsum
s'
),
'undefined'
)){
em
enconsumsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsum
s'
)
as
any
);
if
(
em
enconsumsData
&&
emenconsumsData
.
length
&&
emenconsum
sData
.
length
>
0
){
em
enconsum
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plan
id
=
null
;
item
.
em
enconsum
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plans
=
emplan
sData
;
masterData
.
em
enconsums
=
emenconsum
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emequips/
${
context
.
emequip
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsetups'
,
JSON
.
stringify
(
res
.
data
.
emeqsetups
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqdebugs'
,
JSON
.
stringify
(
res
.
data
.
emeqdebugs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_ens'
,
JSON
.
stringify
(
res
.
data
.
emwo_ens
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqchecks'
,
JSON
.
stringify
(
res
.
data
.
emeqchecks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqkeeps'
,
JSON
.
stringify
(
res
.
data
.
emeqkeeps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_inners'
,
JSON
.
stringify
(
res
.
data
.
emwo_inners
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emapplies'
,
JSON
.
stringify
(
res
.
data
.
emapplies
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_oscs'
,
JSON
.
stringify
(
res
.
data
.
emwo_oscs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwos'
,
JSON
.
stringify
(
res
.
data
.
emwos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqahs'
,
JSON
.
stringify
(
res
.
data
.
emeqahs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_ens'
,
JSON
.
stringify
(
res
.
data
.
emwo_ens
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emapplies'
,
JSON
.
stringify
(
res
.
data
.
emapplies
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqmaintances'
,
JSON
.
stringify
(
res
.
data
.
emeqmaintances
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqahs'
,
JSON
.
stringify
(
res
.
data
.
emeqahs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
return
res
;
}
...
...
@@ -955,21 +955,21 @@ export default class EMEquipServiceBase extends EntityService {
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emequips/getdraft`
,
isloading
);
res
.
data
.
emequip
=
data
.
emequip
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsetups'
,
JSON
.
stringify
(
res
.
data
.
emeqsetups
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqdebugs'
,
JSON
.
stringify
(
res
.
data
.
emeqdebugs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_ens'
,
JSON
.
stringify
(
res
.
data
.
emwo_ens
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqchecks'
,
JSON
.
stringify
(
res
.
data
.
emeqchecks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqkeeps'
,
JSON
.
stringify
(
res
.
data
.
emeqkeeps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_inners'
,
JSON
.
stringify
(
res
.
data
.
emwo_inners
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emapplies'
,
JSON
.
stringify
(
res
.
data
.
emapplies
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_oscs'
,
JSON
.
stringify
(
res
.
data
.
emwo_oscs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwos'
,
JSON
.
stringify
(
res
.
data
.
emwos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqahs'
,
JSON
.
stringify
(
res
.
data
.
emeqahs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_ens'
,
JSON
.
stringify
(
res
.
data
.
emwo_ens
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emapplies'
,
JSON
.
stringify
(
res
.
data
.
emapplies
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqmaintances'
,
JSON
.
stringify
(
res
.
data
.
emeqmaintances
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqahs'
,
JSON
.
stringify
(
res
.
data
.
emeqahs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
return
res
;
}
...
...
app_EAMWeb/src/service/emitem/emitem-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -130,17 +130,17 @@ export default class EMItemServiceBase extends EntityService {
return
Http
.
getInstance
().
get
(
`/emservices/
${
context
.
emservice
}
/emitems/
${
context
.
emitem
}
`
,
isloading
);
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emitems/
${
context
.
emitem
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
,
JSON
.
stringify
(
res
.
data
.
emwplistcosts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemtrades'
,
JSON
.
stringify
(
res
.
data
.
emitemtrades
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplists'
,
JSON
.
stringify
(
res
.
data
.
emwplists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemprtns'
,
JSON
.
stringify
(
res
.
data
.
emitemprtns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparedetails'
,
JSON
.
stringify
(
res
.
data
.
emeqsparedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emen'
,
JSON
.
stringify
(
res
.
data
.
emen
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemrins'
,
JSON
.
stringify
(
res
.
data
.
emitemrins
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emen'
,
JSON
.
stringify
(
res
.
data
.
emen
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_empodetails'
,
JSON
.
stringify
(
res
.
data
.
empodetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemrouts'
,
JSON
.
stringify
(
res
.
data
.
emitemrouts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
,
JSON
.
stringify
(
res
.
data
.
emwplistcosts
));
return
res
;
}
...
...
@@ -174,6 +174,21 @@ export default class EMItemServiceBase extends EntityService {
return
Http
.
getInstance
().
post
(
`/emservices/
${
context
.
emservice
}
/emitems/
${
context
.
emitem
}
/save`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
emwplistcostsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
),
'undefined'
)){
emwplistcostsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
)
as
any
);
if
(
emwplistcostsData
&&
emwplistcostsData
.
length
&&
emwplistcostsData
.
length
>
0
){
emwplistcostsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwplistcostid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwplistcosts
=
emwplistcostsData
;
let
emitemtradesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemtrades'
),
'undefined'
)){
emitemtradesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemtrades'
)
as
any
);
...
...
@@ -219,36 +234,36 @@ export default class EMItemServiceBase extends EntityService {
}
}
masterData
.
emitemprtns
=
emitemprtnsData
;
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
let
em
eqsparedetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
eqsparedetail
s'
),
'undefined'
)){
em
eqsparedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
em
eqsparedetailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
em
eqsparedetail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
stock
id
=
null
;
item
.
em
eqsparedetail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
stocks
=
emstock
sData
;
let
em
eqsparedetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
eqsparedetail
s'
),
'undefined'
)){
em
eqsparedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
em
eqsparedetailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
em
eqsparedetail
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
eqsparedetails
=
emeqsparedetail
sData
;
let
em
itemrin
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itemrin
s'
),
'undefined'
)){
em
itemrinsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrin
s'
)
as
any
);
if
(
em
itemrinsData
&&
emitemrinsData
.
length
&&
emitemrin
sData
.
length
>
0
){
em
itemrin
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
eqsparedetail
id
=
null
;
item
.
em
itemrin
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
eqsparedetails
=
emeqsparedetail
sData
;
masterData
.
em
itemrins
=
emitemrin
sData
;
let
emenData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emen'
),
'undefined'
)){
emenData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emen'
)
as
any
);
...
...
@@ -264,51 +279,51 @@ export default class EMItemServiceBase extends EntityService {
}
}
masterData
.
emen
=
emenData
;
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
let
em
podetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
podetail
s'
),
'undefined'
)){
em
podetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_empodetail
s'
)
as
any
);
if
(
em
podetailsData
&&
empodetailsData
.
length
&&
empodetail
sData
.
length
>
0
){
em
podetail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
podetail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
let
emitem
rin
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
rin
s'
),
'undefined'
)){
emitem
rinsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrin
s'
)
as
any
);
if
(
emitem
rinsData
&&
emitemrinsData
.
length
&&
emitemrin
sData
.
length
>
0
){
emitem
rin
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
podetails
=
empodetail
sData
;
let
emitem
puse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
puse
s'
),
'undefined'
)){
emitem
pusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
emitem
pusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
emitem
puse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitem
rin
id
=
null
;
item
.
emitem
puse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitem
rins
=
emitemrin
sData
;
let
em
podetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
podetail
s'
),
'undefined'
)){
em
podetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_empodetail
s'
)
as
any
);
if
(
em
podetailsData
&&
empodetailsData
.
length
&&
empodetail
sData
.
length
>
0
){
em
podetail
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emitem
puses
=
emitempuse
sData
;
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
podetail
id
=
null
;
item
.
em
stock
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
podetails
=
empodetail
sData
;
masterData
.
em
stocks
=
emstock
sData
;
let
emitemroutsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrouts'
),
'undefined'
)){
emitemroutsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrouts'
)
as
any
);
...
...
@@ -324,34 +339,19 @@ export default class EMItemServiceBase extends EntityService {
}
}
masterData
.
emitemrouts
=
emitemroutsData
;
let
emwplistcostsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
),
'undefined'
)){
emwplistcostsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
)
as
any
);
if
(
emwplistcostsData
&&
emwplistcostsData
.
length
&&
emwplistcostsData
.
length
>
0
){
emwplistcostsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwplistcostid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwplistcosts
=
emwplistcostsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emitems/
${
context
.
emitem
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
,
JSON
.
stringify
(
res
.
data
.
emwplistcosts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemtrades'
,
JSON
.
stringify
(
res
.
data
.
emitemtrades
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplists'
,
JSON
.
stringify
(
res
.
data
.
emwplists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemprtns'
,
JSON
.
stringify
(
res
.
data
.
emitemprtns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparedetails'
,
JSON
.
stringify
(
res
.
data
.
emeqsparedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emen'
,
JSON
.
stringify
(
res
.
data
.
emen
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemrins'
,
JSON
.
stringify
(
res
.
data
.
emitemrins
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emen'
,
JSON
.
stringify
(
res
.
data
.
emen
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_empodetails'
,
JSON
.
stringify
(
res
.
data
.
empodetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemrouts'
,
JSON
.
stringify
(
res
.
data
.
emitemrouts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
,
JSON
.
stringify
(
res
.
data
.
emwplistcosts
));
return
res
;
}
...
...
@@ -385,17 +385,17 @@ export default class EMItemServiceBase extends EntityService {
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emitems/getdraft`
,
isloading
);
res
.
data
.
emitem
=
data
.
emitem
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
,
JSON
.
stringify
(
res
.
data
.
emwplistcosts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemtrades'
,
JSON
.
stringify
(
res
.
data
.
emitemtrades
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplists'
,
JSON
.
stringify
(
res
.
data
.
emwplists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemprtns'
,
JSON
.
stringify
(
res
.
data
.
emitemprtns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparedetails'
,
JSON
.
stringify
(
res
.
data
.
emeqsparedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emen'
,
JSON
.
stringify
(
res
.
data
.
emen
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemrins'
,
JSON
.
stringify
(
res
.
data
.
emitemrins
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emen'
,
JSON
.
stringify
(
res
.
data
.
emen
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_empodetails'
,
JSON
.
stringify
(
res
.
data
.
empodetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemrouts'
,
JSON
.
stringify
(
res
.
data
.
emitemrouts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
,
JSON
.
stringify
(
res
.
data
.
emwplistcosts
));
return
res
;
}
...
...
@@ -428,6 +428,21 @@ export default class EMItemServiceBase extends EntityService {
return
Http
.
getInstance
().
put
(
`/emservices/
${
context
.
emservice
}
/emitems/
${
context
.
emitem
}
`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
emwplistcostsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
),
'undefined'
)){
emwplistcostsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
)
as
any
);
if
(
emwplistcostsData
&&
emwplistcostsData
.
length
&&
emwplistcostsData
.
length
>
0
){
emwplistcostsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwplistcostid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwplistcosts
=
emwplistcostsData
;
let
emitemtradesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemtrades'
),
'undefined'
)){
emitemtradesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemtrades'
)
as
any
);
...
...
@@ -473,36 +488,36 @@ export default class EMItemServiceBase extends EntityService {
}
}
masterData
.
emitemprtns
=
emitemprtnsData
;
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
let
em
eqsparedetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
eqsparedetail
s'
),
'undefined'
)){
em
eqsparedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
em
eqsparedetailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
em
eqsparedetail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
stock
id
=
null
;
item
.
em
eqsparedetail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
stocks
=
emstock
sData
;
let
em
eqsparedetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
eqsparedetail
s'
),
'undefined'
)){
em
eqsparedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
em
eqsparedetailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
em
eqsparedetail
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
eqsparedetails
=
emeqsparedetail
sData
;
let
em
itemrin
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itemrin
s'
),
'undefined'
)){
em
itemrinsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrin
s'
)
as
any
);
if
(
em
itemrinsData
&&
emitemrinsData
.
length
&&
emitemrin
sData
.
length
>
0
){
em
itemrin
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
eqsparedetail
id
=
null
;
item
.
em
itemrin
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
eqsparedetails
=
emeqsparedetail
sData
;
masterData
.
em
itemrins
=
emitemrin
sData
;
let
emenData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emen'
),
'undefined'
)){
emenData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emen'
)
as
any
);
...
...
@@ -518,51 +533,51 @@ export default class EMItemServiceBase extends EntityService {
}
}
masterData
.
emen
=
emenData
;
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
let
em
podetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
podetail
s'
),
'undefined'
)){
em
podetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_empodetail
s'
)
as
any
);
if
(
em
podetailsData
&&
empodetailsData
.
length
&&
empodetail
sData
.
length
>
0
){
em
podetail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
podetail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
let
emitem
rin
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
rin
s'
),
'undefined'
)){
emitem
rinsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrin
s'
)
as
any
);
if
(
emitem
rinsData
&&
emitemrinsData
.
length
&&
emitemrin
sData
.
length
>
0
){
emitem
rin
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
podetails
=
empodetail
sData
;
let
emitem
puse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
puse
s'
),
'undefined'
)){
emitem
pusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
emitem
pusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
emitem
puse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitem
rin
id
=
null
;
item
.
emitem
puse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitem
rins
=
emitemrin
sData
;
let
em
podetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
podetail
s'
),
'undefined'
)){
em
podetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_empodetail
s'
)
as
any
);
if
(
em
podetailsData
&&
empodetailsData
.
length
&&
empodetail
sData
.
length
>
0
){
em
podetail
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emitem
puses
=
emitempuse
sData
;
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
podetail
id
=
null
;
item
.
em
stock
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
podetails
=
empodetail
sData
;
masterData
.
em
stocks
=
emstock
sData
;
let
emitemroutsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrouts'
),
'undefined'
)){
emitemroutsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrouts'
)
as
any
);
...
...
@@ -578,34 +593,19 @@ export default class EMItemServiceBase extends EntityService {
}
}
masterData
.
emitemrouts
=
emitemroutsData
;
let
emwplistcostsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
),
'undefined'
)){
emwplistcostsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
)
as
any
);
if
(
emwplistcostsData
&&
emwplistcostsData
.
length
&&
emwplistcostsData
.
length
>
0
){
emwplistcostsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwplistcostid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwplistcosts
=
emwplistcostsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/emitems/
${
context
.
emitem
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
,
JSON
.
stringify
(
res
.
data
.
emwplistcosts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemtrades'
,
JSON
.
stringify
(
res
.
data
.
emitemtrades
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplists'
,
JSON
.
stringify
(
res
.
data
.
emwplists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemprtns'
,
JSON
.
stringify
(
res
.
data
.
emitemprtns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emeqsparedetails'
,
JSON
.
stringify
(
res
.
data
.
emeqsparedetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emen'
,
JSON
.
stringify
(
res
.
data
.
emen
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemrins'
,
JSON
.
stringify
(
res
.
data
.
emitemrins
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emen'
,
JSON
.
stringify
(
res
.
data
.
emen
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_empodetails'
,
JSON
.
stringify
(
res
.
data
.
empodetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitemrouts'
,
JSON
.
stringify
(
res
.
data
.
emitemrouts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
,
JSON
.
stringify
(
res
.
data
.
emwplistcosts
));
return
res
;
}
...
...
@@ -674,6 +674,21 @@ export default class EMItemServiceBase extends EntityService {
return
Http
.
getInstance
().
post
(
`/emservices/
${
context
.
emservice
}
/emitems`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
emwplistcostsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
),
'undefined'
)){
emwplistcostsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
)
as
any
);
if
(
emwplistcostsData
&&
emwplistcostsData
.
length
&&
emwplistcostsData
.
length
>
0
){
emwplistcostsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwplistcostid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwplistcosts
=
emwplistcostsData
;
let
emitemtradesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemtrades'
),
'undefined'
)){
emitemtradesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemtrades'
)
as
any
);
...
...
@@ -719,36 +734,36 @@ export default class EMItemServiceBase extends EntityService {
}
}
masterData
.
emitemprtns
=
emitemprtnsData
;
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
let
em
eqsparedetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
eqsparedetail
s'
),
'undefined'
)){
em
eqsparedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
em
eqsparedetailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
em
eqsparedetail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
stock
id
=
null
;
item
.
em
eqsparedetail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
stocks
=
emstock
sData
;
let
em
eqsparedetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
eqsparedetail
s'
),
'undefined'
)){
em
eqsparedetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emeqsparedetail
s'
)
as
any
);
if
(
em
eqsparedetailsData
&&
emeqsparedetailsData
.
length
&&
emeqsparedetail
sData
.
length
>
0
){
em
eqsparedetail
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
eqsparedetails
=
emeqsparedetail
sData
;
let
em
itemrin
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itemrin
s'
),
'undefined'
)){
em
itemrinsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrin
s'
)
as
any
);
if
(
em
itemrinsData
&&
emitemrinsData
.
length
&&
emitemrin
sData
.
length
>
0
){
em
itemrin
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
eqsparedetail
id
=
null
;
item
.
em
itemrin
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
eqsparedetails
=
emeqsparedetail
sData
;
masterData
.
em
itemrins
=
emitemrin
sData
;
let
emenData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emen'
),
'undefined'
)){
emenData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emen'
)
as
any
);
...
...
@@ -764,51 +779,51 @@ export default class EMItemServiceBase extends EntityService {
}
}
masterData
.
emen
=
emenData
;
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
let
em
podetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
podetail
s'
),
'undefined'
)){
em
podetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_empodetail
s'
)
as
any
);
if
(
em
podetailsData
&&
empodetailsData
.
length
&&
empodetail
sData
.
length
>
0
){
em
podetail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
podetail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
let
emitem
rin
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
rin
s'
),
'undefined'
)){
emitem
rinsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrin
s'
)
as
any
);
if
(
emitem
rinsData
&&
emitemrinsData
.
length
&&
emitemrin
sData
.
length
>
0
){
emitem
rin
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
podetails
=
empodetail
sData
;
let
emitem
puse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
puse
s'
),
'undefined'
)){
emitem
pusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
emitem
pusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
emitem
puse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitem
rin
id
=
null
;
item
.
emitem
puse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitem
rins
=
emitemrin
sData
;
let
em
podetail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
podetail
s'
),
'undefined'
)){
em
podetailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_empodetail
s'
)
as
any
);
if
(
em
podetailsData
&&
empodetailsData
.
length
&&
empodetail
sData
.
length
>
0
){
em
podetail
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emitem
puses
=
emitempuse
sData
;
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
podetail
id
=
null
;
item
.
em
stock
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
podetails
=
empodetail
sData
;
masterData
.
em
stocks
=
emstock
sData
;
let
emitemroutsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrouts'
),
'undefined'
)){
emitemroutsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitemrouts'
)
as
any
);
...
...
@@ -824,21 +839,6 @@ export default class EMItemServiceBase extends EntityService {
}
}
masterData
.
emitemrouts
=
emitemroutsData
;
let
emwplistcostsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
),
'undefined'
)){
emwplistcostsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwplistcosts'
)
as
any
);
if
(
emwplistcostsData
&&
emwplistcostsData
.
length
&&
emwplistcostsData
.
length
>
0
){
emwplistcostsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwplistcostid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwplistcosts
=
emwplistcostsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -848,17 +848,17 @@ export default class EMItemServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emitems`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwplistcosts'
,
JSON
.
stringify
(
res
.
data
.
emwplistcosts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitemtrades'
,
JSON
.
stringify
(
res
.
data
.
emitemtrades
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwplists'
,
JSON
.
stringify
(
res
.
data
.
emwplists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitemprtns'
,
JSON
.
stringify
(
res
.
data
.
emitemprtns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emeqsparedetails'
,
JSON
.
stringify
(
res
.
data
.
emeqsparedetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emen'
,
JSON
.
stringify
(
res
.
data
.
emen
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitemrins'
,
JSON
.
stringify
(
res
.
data
.
emitemrins
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emen'
,
JSON
.
stringify
(
res
.
data
.
emen
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_empodetails'
,
JSON
.
stringify
(
res
.
data
.
empodetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitemrouts'
,
JSON
.
stringify
(
res
.
data
.
emitemrouts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwplistcosts'
,
JSON
.
stringify
(
res
.
data
.
emwplistcosts
));
return
res
;
}
...
...
app_EAMWeb/src/service/emplan/emplan-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -230,36 +230,36 @@ export default class EMPlanServiceBase extends EntityService {
return
Http
.
getInstance
().
post
(
`/emacclasses/
${
context
.
emacclass
}
/emplans`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
emplan
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
detail
s'
),
'undefined'
)){
emplan
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplandetail
s'
)
as
any
);
if
(
emplan
detailsData
&&
emplandetailsData
.
length
&&
emplandetail
sData
.
length
>
0
){
emplan
detail
sData
.
forEach
((
item
:
any
)
=>
{
let
emplan
cdt
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
cdt
s'
),
'undefined'
)){
emplan
cdtsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplancdt
s'
)
as
any
);
if
(
emplan
cdtsData
&&
emplancdtsData
.
length
&&
emplancdt
sData
.
length
>
0
){
emplan
cdt
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplan
detail
id
=
null
;
item
.
emplan
cdt
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
details
=
emplandetail
sData
;
let
emplan
cdt
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
cdt
s'
),
'undefined'
)){
emplan
cdtsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplancdt
s'
)
as
any
);
if
(
emplan
cdtsData
&&
emplancdtsData
.
length
&&
emplancdt
sData
.
length
>
0
){
emplan
cdt
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emplan
cdts
=
emplancdt
sData
;
let
emplan
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
detail
s'
),
'undefined'
)){
emplan
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplandetail
s'
)
as
any
);
if
(
emplan
detailsData
&&
emplandetailsData
.
length
&&
emplandetail
sData
.
length
>
0
){
emplan
detail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplan
cdt
id
=
null
;
item
.
emplan
detail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
cdts
=
emplancdt
sData
;
masterData
.
emplan
details
=
emplandetail
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -269,8 +269,8 @@ export default class EMPlanServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emplans`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplandetails'
,
JSON
.
stringify
(
res
.
data
.
emplandetails
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplancdts'
,
JSON
.
stringify
(
res
.
data
.
emplancdts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplandetails'
,
JSON
.
stringify
(
res
.
data
.
emplandetails
));
return
res
;
}
...
...
@@ -327,40 +327,40 @@ export default class EMPlanServiceBase extends EntityService {
return
Http
.
getInstance
().
put
(
`/emacclasses/
${
context
.
emacclass
}
/emplans/
${
context
.
emplan
}
`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
emplan
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
detail
s'
),
'undefined'
)){
emplan
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplandetail
s'
)
as
any
);
if
(
emplan
detailsData
&&
emplandetailsData
.
length
&&
emplandetail
sData
.
length
>
0
){
emplan
detail
sData
.
forEach
((
item
:
any
)
=>
{
let
emplan
cdt
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
cdt
s'
),
'undefined'
)){
emplan
cdtsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplancdt
s'
)
as
any
);
if
(
emplan
cdtsData
&&
emplancdtsData
.
length
&&
emplancdt
sData
.
length
>
0
){
emplan
cdt
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplan
detail
id
=
null
;
item
.
emplan
cdt
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
details
=
emplandetail
sData
;
let
emplan
cdt
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
cdt
s'
),
'undefined'
)){
emplan
cdtsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplancdt
s'
)
as
any
);
if
(
emplan
cdtsData
&&
emplancdtsData
.
length
&&
emplancdt
sData
.
length
>
0
){
emplan
cdt
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emplan
cdts
=
emplancdt
sData
;
let
emplan
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
detail
s'
),
'undefined'
)){
emplan
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplandetail
s'
)
as
any
);
if
(
emplan
detailsData
&&
emplandetailsData
.
length
&&
emplandetail
sData
.
length
>
0
){
emplan
detail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplan
cdt
id
=
null
;
item
.
emplan
detail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
cdts
=
emplancdt
sData
;
masterData
.
emplan
details
=
emplandetail
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/emplans/
${
context
.
emplan
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplandetails'
,
JSON
.
stringify
(
res
.
data
.
emplandetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplancdts'
,
JSON
.
stringify
(
res
.
data
.
emplancdts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplandetails'
,
JSON
.
stringify
(
res
.
data
.
emplandetails
));
return
res
;
}
...
...
@@ -417,8 +417,8 @@ export default class EMPlanServiceBase extends EntityService {
return
Http
.
getInstance
().
get
(
`/emacclasses/
${
context
.
emacclass
}
/emplans/
${
context
.
emplan
}
`
,
isloading
);
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emplans/
${
context
.
emplan
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplandetails'
,
JSON
.
stringify
(
res
.
data
.
emplandetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplancdts'
,
JSON
.
stringify
(
res
.
data
.
emplancdts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplandetails'
,
JSON
.
stringify
(
res
.
data
.
emplandetails
));
return
res
;
}
...
...
@@ -533,8 +533,8 @@ export default class EMPlanServiceBase extends EntityService {
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emplans/getdraft`
,
isloading
);
res
.
data
.
emplan
=
data
.
emplan
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplandetails'
,
JSON
.
stringify
(
res
.
data
.
emplandetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplancdts'
,
JSON
.
stringify
(
res
.
data
.
emplancdts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplandetails'
,
JSON
.
stringify
(
res
.
data
.
emplandetails
));
return
res
;
}
...
...
@@ -646,40 +646,40 @@ export default class EMPlanServiceBase extends EntityService {
return
Http
.
getInstance
().
post
(
`/emacclasses/
${
context
.
emacclass
}
/emplans/
${
context
.
emplan
}
/save`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
emplan
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
detail
s'
),
'undefined'
)){
emplan
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplandetail
s'
)
as
any
);
if
(
emplan
detailsData
&&
emplandetailsData
.
length
&&
emplandetail
sData
.
length
>
0
){
emplan
detail
sData
.
forEach
((
item
:
any
)
=>
{
let
emplan
cdt
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
cdt
s'
),
'undefined'
)){
emplan
cdtsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplancdt
s'
)
as
any
);
if
(
emplan
cdtsData
&&
emplancdtsData
.
length
&&
emplancdt
sData
.
length
>
0
){
emplan
cdt
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplan
detail
id
=
null
;
item
.
emplan
cdt
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
details
=
emplandetail
sData
;
let
emplan
cdt
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
cdt
s'
),
'undefined'
)){
emplan
cdtsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplancdt
s'
)
as
any
);
if
(
emplan
cdtsData
&&
emplancdtsData
.
length
&&
emplancdt
sData
.
length
>
0
){
emplan
cdt
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emplan
cdts
=
emplancdt
sData
;
let
emplan
detail
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
detail
s'
),
'undefined'
)){
emplan
detailsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplandetail
s'
)
as
any
);
if
(
emplan
detailsData
&&
emplandetailsData
.
length
&&
emplandetail
sData
.
length
>
0
){
emplan
detail
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplan
cdt
id
=
null
;
item
.
emplan
detail
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplan
cdts
=
emplancdt
sData
;
masterData
.
emplan
details
=
emplandetail
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emplans/
${
context
.
emplan
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplandetails'
,
JSON
.
stringify
(
res
.
data
.
emplandetails
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplancdts'
,
JSON
.
stringify
(
res
.
data
.
emplancdts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplandetails'
,
JSON
.
stringify
(
res
.
data
.
emplandetails
));
return
res
;
}
...
...
app_EAMWeb/src/service/emrfode/emrfode-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -75,21 +75,21 @@ export default class EMRFODEServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emrfo
mo
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
mo
s'
),
'undefined'
)){
emrfo
mosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfomo
s'
)
as
any
);
if
(
emrfo
mosData
&&
emrfomosData
.
length
&&
emrfomo
sData
.
length
>
0
){
emrfo
mo
sData
.
forEach
((
item
:
any
)
=>
{
let
emrfo
ca
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
ca
s'
),
'undefined'
)){
emrfo
casData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoca
s'
)
as
any
);
if
(
emrfo
casData
&&
emrfocasData
.
length
&&
emrfoca
sData
.
length
>
0
){
emrfo
ca
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emrfo
mo
id
=
null
;
item
.
emrfo
ca
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emrfo
mos
=
emrfomo
sData
;
masterData
.
emrfo
cas
=
emrfoca
sData
;
let
emrfoacsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoacs'
),
'undefined'
)){
emrfoacsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoacs'
)
as
any
);
...
...
@@ -105,26 +105,26 @@ export default class EMRFODEServiceBase extends EntityService {
}
}
masterData
.
emrfoacs
=
emrfoacsData
;
let
emrfo
ca
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
ca
s'
),
'undefined'
)){
emrfo
casData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoca
s'
)
as
any
);
if
(
emrfo
casData
&&
emrfocasData
.
length
&&
emrfoca
sData
.
length
>
0
){
emrfo
ca
sData
.
forEach
((
item
:
any
)
=>
{
let
emrfo
mo
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
mo
s'
),
'undefined'
)){
emrfo
mosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfomo
s'
)
as
any
);
if
(
emrfo
mosData
&&
emrfomosData
.
length
&&
emrfomo
sData
.
length
>
0
){
emrfo
mo
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emrfo
ca
id
=
null
;
item
.
emrfo
mo
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emrfo
cas
=
emrfoca
sData
;
masterData
.
emrfo
mos
=
emrfomo
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emrfodes/
${
context
.
emrfode
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfomos'
,
JSON
.
stringify
(
res
.
data
.
emrfomos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfoacs'
,
JSON
.
stringify
(
res
.
data
.
emrfoacs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfocas'
,
JSON
.
stringify
(
res
.
data
.
emrfocas
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfoacs'
,
JSON
.
stringify
(
res
.
data
.
emrfoacs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfomos'
,
JSON
.
stringify
(
res
.
data
.
emrfomos
));
return
res
;
}
...
...
@@ -139,21 +139,21 @@ export default class EMRFODEServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emrfo
mo
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
mo
s'
),
'undefined'
)){
emrfo
mosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfomo
s'
)
as
any
);
if
(
emrfo
mosData
&&
emrfomosData
.
length
&&
emrfomo
sData
.
length
>
0
){
emrfo
mo
sData
.
forEach
((
item
:
any
)
=>
{
let
emrfo
ca
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
ca
s'
),
'undefined'
)){
emrfo
casData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoca
s'
)
as
any
);
if
(
emrfo
casData
&&
emrfocasData
.
length
&&
emrfoca
sData
.
length
>
0
){
emrfo
ca
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emrfo
mo
id
=
null
;
item
.
emrfo
ca
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emrfo
mos
=
emrfomo
sData
;
masterData
.
emrfo
cas
=
emrfoca
sData
;
let
emrfoacsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoacs'
),
'undefined'
)){
emrfoacsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoacs'
)
as
any
);
...
...
@@ -169,26 +169,26 @@ export default class EMRFODEServiceBase extends EntityService {
}
}
masterData
.
emrfoacs
=
emrfoacsData
;
let
emrfo
ca
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
ca
s'
),
'undefined'
)){
emrfo
casData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoca
s'
)
as
any
);
if
(
emrfo
casData
&&
emrfocasData
.
length
&&
emrfoca
sData
.
length
>
0
){
emrfo
ca
sData
.
forEach
((
item
:
any
)
=>
{
let
emrfo
mo
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
mo
s'
),
'undefined'
)){
emrfo
mosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfomo
s'
)
as
any
);
if
(
emrfo
mosData
&&
emrfomosData
.
length
&&
emrfomo
sData
.
length
>
0
){
emrfo
mo
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emrfo
ca
id
=
null
;
item
.
emrfo
mo
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emrfo
cas
=
emrfoca
sData
;
masterData
.
emrfo
mos
=
emrfomo
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/emrfodes/
${
context
.
emrfode
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfomos'
,
JSON
.
stringify
(
res
.
data
.
emrfomos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfoacs'
,
JSON
.
stringify
(
res
.
data
.
emrfoacs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfocas'
,
JSON
.
stringify
(
res
.
data
.
emrfocas
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfoacs'
,
JSON
.
stringify
(
res
.
data
.
emrfoacs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfomos'
,
JSON
.
stringify
(
res
.
data
.
emrfomos
));
return
res
;
}
...
...
@@ -217,21 +217,21 @@ export default class EMRFODEServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emrfo
mo
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
mo
s'
),
'undefined'
)){
emrfo
mosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfomo
s'
)
as
any
);
if
(
emrfo
mosData
&&
emrfomosData
.
length
&&
emrfomo
sData
.
length
>
0
){
emrfo
mo
sData
.
forEach
((
item
:
any
)
=>
{
let
emrfo
ca
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
ca
s'
),
'undefined'
)){
emrfo
casData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoca
s'
)
as
any
);
if
(
emrfo
casData
&&
emrfocasData
.
length
&&
emrfoca
sData
.
length
>
0
){
emrfo
ca
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emrfo
mo
id
=
null
;
item
.
emrfo
ca
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emrfo
mos
=
emrfomo
sData
;
masterData
.
emrfo
cas
=
emrfoca
sData
;
let
emrfoacsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoacs'
),
'undefined'
)){
emrfoacsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoacs'
)
as
any
);
...
...
@@ -247,21 +247,21 @@ export default class EMRFODEServiceBase extends EntityService {
}
}
masterData
.
emrfoacs
=
emrfoacsData
;
let
emrfo
ca
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
ca
s'
),
'undefined'
)){
emrfo
casData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfoca
s'
)
as
any
);
if
(
emrfo
casData
&&
emrfocasData
.
length
&&
emrfoca
sData
.
length
>
0
){
emrfo
ca
sData
.
forEach
((
item
:
any
)
=>
{
let
emrfo
mo
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfo
mo
s'
),
'undefined'
)){
emrfo
mosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emrfomo
s'
)
as
any
);
if
(
emrfo
mosData
&&
emrfomosData
.
length
&&
emrfomo
sData
.
length
>
0
){
emrfo
mo
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emrfo
ca
id
=
null
;
item
.
emrfo
mo
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emrfo
cas
=
emrfoca
sData
;
masterData
.
emrfo
mos
=
emrfomo
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -271,9 +271,9 @@ export default class EMRFODEServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emrfodes`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emrfomos'
,
JSON
.
stringify
(
res
.
data
.
emrfomos
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emrfoacs'
,
JSON
.
stringify
(
res
.
data
.
emrfoacs
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emrfocas'
,
JSON
.
stringify
(
res
.
data
.
emrfocas
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emrfoacs'
,
JSON
.
stringify
(
res
.
data
.
emrfoacs
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emrfomos'
,
JSON
.
stringify
(
res
.
data
.
emrfomos
));
return
res
;
}
...
...
@@ -288,9 +288,9 @@ export default class EMRFODEServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emrfodes/
${
context
.
emrfode
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfomos'
,
JSON
.
stringify
(
res
.
data
.
emrfomos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfoacs'
,
JSON
.
stringify
(
res
.
data
.
emrfoacs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfocas'
,
JSON
.
stringify
(
res
.
data
.
emrfocas
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfoacs'
,
JSON
.
stringify
(
res
.
data
.
emrfoacs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfomos'
,
JSON
.
stringify
(
res
.
data
.
emrfomos
));
return
res
;
}
...
...
@@ -307,9 +307,9 @@ export default class EMRFODEServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emrfodes/getdraft`
,
isloading
);
res
.
data
.
emrfode
=
data
.
emrfode
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfomos'
,
JSON
.
stringify
(
res
.
data
.
emrfomos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfoacs'
,
JSON
.
stringify
(
res
.
data
.
emrfoacs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfocas'
,
JSON
.
stringify
(
res
.
data
.
emrfocas
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfoacs'
,
JSON
.
stringify
(
res
.
data
.
emrfoacs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emrfomos'
,
JSON
.
stringify
(
res
.
data
.
emrfomos
));
return
res
;
}
...
...
app_EAMWeb/src/service/emservice/emservice-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -63,10 +63,10 @@ export default class EMServiceServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emservices/getdraft`
,
isloading
);
res
.
data
.
emservice
=
data
.
emservice
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
itempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuse
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
plantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempl
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
plantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempl
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
itempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuse
s
));
return
res
;
}
...
...
@@ -81,21 +81,21 @@ export default class EMServiceServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
plantempl
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
masterData
.
em
plantempls
=
emplantempl
sData
;
let
emitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
),
'undefined'
)){
emitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
)
as
any
);
...
...
@@ -126,27 +126,27 @@ export default class EMServiceServiceBase extends EntityService {
}
}
masterData
.
emplans
=
emplansData
;
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plantempl
id
=
null
;
item
.
em
itempuse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plantempls
=
emplantempl
sData
;
masterData
.
em
itempuses
=
emitempuse
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emservices/
${
context
.
emservice
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
itempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuse
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
plantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempl
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
plantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempl
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
itempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuse
s
));
return
res
;
}
...
...
@@ -161,21 +161,21 @@ export default class EMServiceServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
plantempl
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
masterData
.
em
plantempls
=
emplantempl
sData
;
let
emitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
),
'undefined'
)){
emitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
)
as
any
);
...
...
@@ -206,21 +206,21 @@ export default class EMServiceServiceBase extends EntityService {
}
}
masterData
.
emplans
=
emplansData
;
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plantempl
id
=
null
;
item
.
em
itempuse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plantempls
=
emplantempl
sData
;
masterData
.
em
itempuses
=
emitempuse
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -230,10 +230,10 @@ export default class EMServiceServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emservices`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_em
itempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuse
s
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_em
plantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempl
s
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_em
plantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempl
s
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_em
itempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuse
s
));
return
res
;
}
...
...
@@ -248,21 +248,21 @@ export default class EMServiceServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
plantempl
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
masterData
.
em
plantempls
=
emplantempl
sData
;
let
emitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
),
'undefined'
)){
emitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
)
as
any
);
...
...
@@ -293,27 +293,27 @@ export default class EMServiceServiceBase extends EntityService {
}
}
masterData
.
emplans
=
emplansData
;
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plantempl
id
=
null
;
item
.
em
itempuse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plantempls
=
emplantempl
sData
;
masterData
.
em
itempuses
=
emitempuse
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/emservices/
${
context
.
emservice
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
itempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuse
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
plantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempl
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
plantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempl
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
itempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuse
s
));
return
res
;
}
...
...
@@ -328,10 +328,10 @@ export default class EMServiceServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emservices/
${
context
.
emservice
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
itempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuse
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
plantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempl
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
plantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempl
s
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_em
itempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuse
s
));
return
res
;
}
...
...
app_EAMWeb/src/service/emstore/emstore-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -77,21 +77,21 @@ export default class EMStoreServiceBase extends EntityService {
}
}
masterData
.
emstoreparts
=
emstorepartsData
;
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
stock
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
masterData
.
em
stocks
=
emstock
sData
;
let
emitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
),
'undefined'
)){
emitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
)
as
any
);
...
...
@@ -107,27 +107,27 @@ export default class EMStoreServiceBase extends EntityService {
}
}
masterData
.
emitems
=
emitemsData
;
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
stock
id
=
null
;
item
.
em
itempuse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
stocks
=
emstock
sData
;
masterData
.
em
itempuses
=
emitempuse
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/emstores/
${
context
.
emstore
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstoreparts'
,
JSON
.
stringify
(
res
.
data
.
emstoreparts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
return
res
;
}
...
...
@@ -144,9 +144,9 @@ export default class EMStoreServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emstores/getdraft`
,
isloading
);
res
.
data
.
emstore
=
data
.
emstore
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstoreparts'
,
JSON
.
stringify
(
res
.
data
.
emstoreparts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
return
res
;
}
...
...
@@ -175,9 +175,9 @@ export default class EMStoreServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/emstores/
${
context
.
emstore
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstoreparts'
,
JSON
.
stringify
(
res
.
data
.
emstoreparts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
return
res
;
}
...
...
@@ -208,21 +208,21 @@ export default class EMStoreServiceBase extends EntityService {
}
}
masterData
.
emstoreparts
=
emstorepartsData
;
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
stock
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
masterData
.
em
stocks
=
emstock
sData
;
let
emitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
),
'undefined'
)){
emitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
)
as
any
);
...
...
@@ -238,21 +238,21 @@ export default class EMStoreServiceBase extends EntityService {
}
}
masterData
.
emitems
=
emitemsData
;
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
stock
id
=
null
;
item
.
em
itempuse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
stocks
=
emstock
sData
;
masterData
.
em
itempuses
=
emitempuse
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -263,9 +263,9 @@ export default class EMStoreServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emstores`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emstoreparts'
,
JSON
.
stringify
(
res
.
data
.
emstoreparts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
return
res
;
}
...
...
@@ -295,21 +295,21 @@ export default class EMStoreServiceBase extends EntityService {
}
}
masterData
.
emstoreparts
=
emstorepartsData
;
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
stock
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
masterData
.
em
stocks
=
emstock
sData
;
let
emitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
),
'undefined'
)){
emitemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
)
as
any
);
...
...
@@ -325,27 +325,27 @@ export default class EMStoreServiceBase extends EntityService {
}
}
masterData
.
emitems
=
emitemsData
;
let
em
stock
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
stock
s'
),
'undefined'
)){
em
stocksData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emstock
s'
)
as
any
);
if
(
em
stocksData
&&
emstocksData
.
length
&&
emstock
sData
.
length
>
0
){
em
stock
sData
.
forEach
((
item
:
any
)
=>
{
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
stock
id
=
null
;
item
.
em
itempuse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
stocks
=
emstock
sData
;
masterData
.
em
itempuses
=
emitempuse
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/emstores/
${
context
.
emstore
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstoreparts'
,
JSON
.
stringify
(
res
.
data
.
emstoreparts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emstocks'
,
JSON
.
stringify
(
res
.
data
.
emstocks
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
return
res
;
}
...
...
app_EAMWeb/src/service/pfdept/pfdept-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -62,6 +62,21 @@ export default class PFDeptServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_dpid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_dps
=
emwo_dpsData
;
let
emenconsumsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
),
'undefined'
)){
emenconsumsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
)
as
any
);
...
...
@@ -92,21 +107,21 @@ export default class PFDeptServiceBase extends EntityService {
}
}
masterData
.
emplans
=
emplansData
;
let
em
wo_dp
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
wo_dp
s'
),
'undefined'
)){
em
wo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dp
s'
)
as
any
);
if
(
em
wo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dp
sData
.
length
>
0
){
em
wo_dp
sData
.
forEach
((
item
:
any
)
=>
{
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
wo_dp
id
=
null
;
item
.
em
plantempl
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
wo_dps
=
emwo_dp
sData
;
masterData
.
em
plantempls
=
emplantempl
sData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
...
...
@@ -122,28 +137,13 @@ export default class PFDeptServiceBase extends EntityService {
}
}
masterData
.
emitempuses
=
emitempusesData
;
let
emplantemplsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
),
'undefined'
)){
emplantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
)
as
any
);
if
(
emplantemplsData
&&
emplantemplsData
.
length
&&
emplantemplsData
.
length
>
0
){
emplantemplsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplantemplid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplantempls
=
emplantemplsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pfdepts/
${
context
.
pfdept
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
return
res
;
}
...
...
@@ -172,6 +172,21 @@ export default class PFDeptServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_dpid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_dps
=
emwo_dpsData
;
let
emenconsumsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
),
'undefined'
)){
emenconsumsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
)
as
any
);
...
...
@@ -202,21 +217,21 @@ export default class PFDeptServiceBase extends EntityService {
}
}
masterData
.
emplans
=
emplansData
;
let
em
wo_dp
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
wo_dp
s'
),
'undefined'
)){
em
wo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dp
s'
)
as
any
);
if
(
em
wo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dp
sData
.
length
>
0
){
em
wo_dp
sData
.
forEach
((
item
:
any
)
=>
{
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
wo_dp
id
=
null
;
item
.
em
plantempl
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
wo_dps
=
emwo_dp
sData
;
masterData
.
em
plantempls
=
emplantempl
sData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
...
...
@@ -232,21 +247,6 @@ export default class PFDeptServiceBase extends EntityService {
}
}
masterData
.
emitempuses
=
emitempusesData
;
let
emplantemplsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
),
'undefined'
)){
emplantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
)
as
any
);
if
(
emplantemplsData
&&
emplantemplsData
.
length
&&
emplantemplsData
.
length
>
0
){
emplantemplsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplantemplid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplantempls
=
emplantemplsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -256,11 +256,11 @@ export default class PFDeptServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pfdepts`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
return
res
;
}
...
...
@@ -276,11 +276,11 @@ export default class PFDeptServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/pfdepts/getdraft`
,
isloading
);
res
.
data
.
pfdept
=
data
.
pfdept
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
return
res
;
}
...
...
@@ -295,11 +295,11 @@ export default class PFDeptServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/pfdepts/
${
context
.
pfdept
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
return
res
;
}
...
...
@@ -315,6 +315,21 @@ export default class PFDeptServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emwo_dpid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emwo_dps
=
emwo_dpsData
;
let
emenconsumsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
),
'undefined'
)){
emenconsumsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emenconsums'
)
as
any
);
...
...
@@ -345,21 +360,21 @@ export default class PFDeptServiceBase extends EntityService {
}
}
masterData
.
emplans
=
emplansData
;
let
em
wo_dp
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
wo_dp
s'
),
'undefined'
)){
em
wo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dp
s'
)
as
any
);
if
(
em
wo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dp
sData
.
length
>
0
){
em
wo_dp
sData
.
forEach
((
item
:
any
)
=>
{
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
wo_dp
id
=
null
;
item
.
em
plantempl
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
wo_dps
=
emwo_dp
sData
;
masterData
.
em
plantempls
=
emplantempl
sData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
...
...
@@ -375,28 +390,13 @@ export default class PFDeptServiceBase extends EntityService {
}
}
masterData
.
emitempuses
=
emitempusesData
;
let
emplantemplsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
),
'undefined'
)){
emplantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
)
as
any
);
if
(
emplantemplsData
&&
emplantemplsData
.
length
&&
emplantemplsData
.
length
>
0
){
emplantemplsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplantemplid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplantempls
=
emplantemplsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/pfdepts/
${
context
.
pfdept
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emenconsums'
,
JSON
.
stringify
(
res
.
data
.
emenconsums
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
return
res
;
}
...
...
app_EAMWeb/src/service/pfemp/pfemp-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -62,81 +62,81 @@ export default class PFEmpServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
),
'undefined'
)){
emitem
sData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
s'
)
as
any
);
if
(
emitem
sData
&&
emitemsData
.
length
&&
emitem
sData
.
length
>
0
){
emitemsData
.
forEach
((
item
:
any
)
=>
{
let
emitem
puse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
puse
s'
),
'undefined'
)){
emitem
pusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
emitem
pusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
emitem
puse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitemid
=
null
;
item
.
emitem
puse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitem
s
=
emitem
sData
;
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emitem
puses
=
emitempuse
sData
;
let
em
drwg
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
drwg
s'
),
'undefined'
)){
em
drwgsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emdrwg
s'
)
as
any
);
if
(
em
drwgsData
&&
emdrwgsData
.
length
&&
emdrwg
sData
.
length
>
0
){
em
drwg
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plantempl
id
=
null
;
item
.
em
drwg
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plantempls
=
emplantempl
sData
;
let
em
drwg
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
drwg
s'
),
'undefined'
)){
em
drwgsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emdrwg
s'
)
as
any
);
if
(
em
drwgsData
&&
emdrwgsData
.
length
&&
emdrwg
sData
.
length
>
0
){
em
drwg
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
drwgs
=
emdrwg
sData
;
let
em
plan
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plan
s'
),
'undefined'
)){
em
plansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
em
plansData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
em
plan
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
drwg
id
=
null
;
item
.
em
plan
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
drwgs
=
emdrwg
sData
;
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
plans
=
emplan
sData
;
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
plantempl
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
let
em
plan
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plan
s'
),
'undefined'
)){
em
plansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
em
plansData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
em
plan
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
plantempls
=
emplantempl
sData
;
let
em
item
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
item
s'
),
'undefined'
)){
em
itemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
s'
)
as
any
);
if
(
em
itemsData
&&
emitemsData
.
length
&&
emitem
sData
.
length
>
0
){
em
item
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plan
id
=
null
;
item
.
em
item
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plans
=
emplan
sData
;
masterData
.
em
items
=
emitem
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -146,11 +146,11 @@ export default class PFEmpServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pfemps`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emdrwgs'
,
JSON
.
stringify
(
res
.
data
.
emdrwgs
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emdrwgs'
,
JSON
.
stringify
(
res
.
data
.
emdrwgs
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
return
res
;
}
...
...
@@ -165,11 +165,11 @@ export default class PFEmpServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/pfemps/
${
context
.
pfemp
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emdrwgs'
,
JSON
.
stringify
(
res
.
data
.
emdrwgs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emdrwgs'
,
JSON
.
stringify
(
res
.
data
.
emdrwgs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
return
res
;
}
...
...
@@ -185,88 +185,88 @@ export default class PFEmpServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
),
'undefined'
)){
emitem
sData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
s'
)
as
any
);
if
(
emitem
sData
&&
emitemsData
.
length
&&
emitem
sData
.
length
>
0
){
emitemsData
.
forEach
((
item
:
any
)
=>
{
let
emitem
puse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
puse
s'
),
'undefined'
)){
emitem
pusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
emitem
pusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
emitem
puse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitemid
=
null
;
item
.
emitem
puse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitem
s
=
emitem
sData
;
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emitem
puses
=
emitempuse
sData
;
let
em
drwg
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
drwg
s'
),
'undefined'
)){
em
drwgsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emdrwg
s'
)
as
any
);
if
(
em
drwgsData
&&
emdrwgsData
.
length
&&
emdrwg
sData
.
length
>
0
){
em
drwg
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plantempl
id
=
null
;
item
.
em
drwg
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plantempls
=
emplantempl
sData
;
let
em
drwg
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
drwg
s'
),
'undefined'
)){
em
drwgsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emdrwg
s'
)
as
any
);
if
(
em
drwgsData
&&
emdrwgsData
.
length
&&
emdrwg
sData
.
length
>
0
){
em
drwg
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
drwgs
=
emdrwg
sData
;
let
em
plan
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plan
s'
),
'undefined'
)){
em
plansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
em
plansData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
em
plan
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
drwg
id
=
null
;
item
.
em
plan
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
drwgs
=
emdrwg
sData
;
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
plans
=
emplan
sData
;
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
plantempl
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
let
em
plan
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plan
s'
),
'undefined'
)){
em
plansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
em
plansData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
em
plan
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
plantempls
=
emplantempl
sData
;
let
em
item
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
item
s'
),
'undefined'
)){
em
itemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
s'
)
as
any
);
if
(
em
itemsData
&&
emitemsData
.
length
&&
emitem
sData
.
length
>
0
){
em
item
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plan
id
=
null
;
item
.
em
item
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plans
=
emplan
sData
;
masterData
.
em
items
=
emitem
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/pfemps/
${
context
.
pfemp
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emdrwgs'
,
JSON
.
stringify
(
res
.
data
.
emdrwgs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emdrwgs'
,
JSON
.
stringify
(
res
.
data
.
emdrwgs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
return
res
;
}
...
...
@@ -281,88 +281,88 @@ export default class PFEmpServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emitemsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitems'
),
'undefined'
)){
emitem
sData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
s'
)
as
any
);
if
(
emitem
sData
&&
emitemsData
.
length
&&
emitem
sData
.
length
>
0
){
emitemsData
.
forEach
((
item
:
any
)
=>
{
let
emitem
puse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
puse
s'
),
'undefined'
)){
emitem
pusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
emitem
pusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
emitem
puse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emitemid
=
null
;
item
.
emitem
puse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emitem
s
=
emitem
sData
;
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
emitem
puses
=
emitempuse
sData
;
let
em
drwg
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
drwg
s'
),
'undefined'
)){
em
drwgsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emdrwg
s'
)
as
any
);
if
(
em
drwgsData
&&
emdrwgsData
.
length
&&
emdrwg
sData
.
length
>
0
){
em
drwg
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plantempl
id
=
null
;
item
.
em
drwg
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plantempls
=
emplantempl
sData
;
let
em
drwg
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
drwg
s'
),
'undefined'
)){
em
drwgsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emdrwg
s'
)
as
any
);
if
(
em
drwgsData
&&
emdrwgsData
.
length
&&
emdrwg
sData
.
length
>
0
){
em
drwg
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
drwgs
=
emdrwg
sData
;
let
em
plan
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plan
s'
),
'undefined'
)){
em
plansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
em
plansData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
em
plan
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
drwg
id
=
null
;
item
.
em
plan
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
drwgs
=
emdrwg
sData
;
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
plans
=
emplan
sData
;
let
em
plantempl
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plantempl
s'
),
'undefined'
)){
em
plantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempl
s'
)
as
any
);
if
(
em
plantemplsData
&&
emplantemplsData
.
length
&&
emplantempl
sData
.
length
>
0
){
em
plantempl
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
plantempl
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
let
em
plan
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
plan
s'
),
'undefined'
)){
em
plansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplan
s'
)
as
any
);
if
(
em
plansData
&&
emplansData
.
length
&&
emplan
sData
.
length
>
0
){
em
plan
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
em
plantempls
=
emplantempl
sData
;
let
em
item
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
item
s'
),
'undefined'
)){
em
itemsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitem
s'
)
as
any
);
if
(
em
itemsData
&&
emitemsData
.
length
&&
emitem
sData
.
length
>
0
){
em
item
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
plan
id
=
null
;
item
.
em
item
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
plans
=
emplan
sData
;
masterData
.
em
items
=
emitem
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pfemps/
${
context
.
pfemp
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emdrwgs'
,
JSON
.
stringify
(
res
.
data
.
emdrwgs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emdrwgs'
,
JSON
.
stringify
(
res
.
data
.
emdrwgs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
return
res
;
}
...
...
@@ -391,11 +391,11 @@ export default class PFEmpServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/pfemps/getdraft`
,
isloading
);
res
.
data
.
pfemp
=
data
.
pfemp
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emdrwgs'
,
JSON
.
stringify
(
res
.
data
.
emdrwgs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emdrwgs'
,
JSON
.
stringify
(
res
.
data
.
emdrwgs
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitems'
,
JSON
.
stringify
(
res
.
data
.
emitems
));
return
res
;
}
...
...
app_EAMWeb/src/service/pfteam/pfteam-service-base.ts
浏览文件 @
adfdbcc8
...
...
@@ -77,11 +77,11 @@ export default class PFTeamServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/pfteams/getdraft`
,
isloading
);
res
.
data
.
pfteam
=
data
.
pfteam
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
return
res
;
}
...
...
@@ -96,6 +96,21 @@ export default class PFTeamServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emplantemplsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
),
'undefined'
)){
emplantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
)
as
any
);
if
(
emplantemplsData
&&
emplantemplsData
.
length
&&
emplantemplsData
.
length
>
0
){
emplantemplsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplantemplid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplantempls
=
emplantemplsData
;
let
emequipsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequips'
),
'undefined'
)){
emequipsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequips'
)
as
any
);
...
...
@@ -111,21 +126,21 @@ export default class PFTeamServiceBase extends EntityService {
}
}
masterData
.
emequips
=
emequipsData
;
let
em
wo_dp
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
wo_dp
s'
),
'undefined'
)){
em
wo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dp
s'
)
as
any
);
if
(
em
wo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dp
sData
.
length
>
0
){
em
wo_dp
sData
.
forEach
((
item
:
any
)
=>
{
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
wo_dp
id
=
null
;
item
.
em
itempuse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
wo_dps
=
emwo_dp
sData
;
masterData
.
em
itempuses
=
emitempuse
sData
;
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
)
as
any
);
...
...
@@ -141,43 +156,28 @@ export default class PFTeamServiceBase extends EntityService {
}
}
masterData
.
emplans
=
emplansData
;
let
emplantemplsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
),
'undefined'
)){
emplantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
)
as
any
);
if
(
emplantemplsData
&&
emplantemplsData
.
length
&&
emplantemplsData
.
length
>
0
){
emplantemplsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplantemplid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplantempls
=
emplantemplsData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
if
(
emitempusesData
&&
emitempusesData
.
length
&&
emitempusesData
.
length
>
0
){
emitempusesData
.
forEach
((
item
:
any
)
=>
{
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
wo_dp
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
masterData
.
em
wo_dps
=
emwo_dp
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pfteams/
${
context
.
pfteam
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
return
res
;
}
...
...
@@ -192,6 +192,21 @@ export default class PFTeamServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emplantemplsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
),
'undefined'
)){
emplantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
)
as
any
);
if
(
emplantemplsData
&&
emplantemplsData
.
length
&&
emplantemplsData
.
length
>
0
){
emplantemplsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplantemplid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplantempls
=
emplantemplsData
;
let
emequipsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequips'
),
'undefined'
)){
emequipsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequips'
)
as
any
);
...
...
@@ -207,21 +222,21 @@ export default class PFTeamServiceBase extends EntityService {
}
}
masterData
.
emequips
=
emequipsData
;
let
em
wo_dp
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
wo_dp
s'
),
'undefined'
)){
em
wo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dp
s'
)
as
any
);
if
(
em
wo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dp
sData
.
length
>
0
){
em
wo_dp
sData
.
forEach
((
item
:
any
)
=>
{
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
wo_dp
id
=
null
;
item
.
em
itempuse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
wo_dps
=
emwo_dp
sData
;
masterData
.
em
itempuses
=
emitempuse
sData
;
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
)
as
any
);
...
...
@@ -237,36 +252,21 @@ export default class PFTeamServiceBase extends EntityService {
}
}
masterData
.
emplans
=
emplansData
;
let
emplantemplsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
),
'undefined'
)){
emplantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
)
as
any
);
if
(
emplantemplsData
&&
emplantemplsData
.
length
&&
emplantemplsData
.
length
>
0
){
emplantemplsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplantemplid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplantempls
=
emplantemplsData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
if
(
emitempusesData
&&
emitempusesData
.
length
&&
emitempusesData
.
length
>
0
){
emitempusesData
.
forEach
((
item
:
any
)
=>
{
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
wo_dp
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
masterData
.
em
wo_dps
=
emwo_dp
sData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -276,11 +276,11 @@ export default class PFTeamServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pfteams`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
return
res
;
}
...
...
@@ -308,6 +308,21 @@ export default class PFTeamServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
emplantemplsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
),
'undefined'
)){
emplantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
)
as
any
);
if
(
emplantemplsData
&&
emplantemplsData
.
length
&&
emplantemplsData
.
length
>
0
){
emplantemplsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplantemplid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplantempls
=
emplantemplsData
;
let
emequipsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequips'
),
'undefined'
)){
emequipsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emequips'
)
as
any
);
...
...
@@ -323,21 +338,21 @@ export default class PFTeamServiceBase extends EntityService {
}
}
masterData
.
emequips
=
emequipsData
;
let
em
wo_dp
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
wo_dp
s'
),
'undefined'
)){
em
wo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dp
s'
)
as
any
);
if
(
em
wo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dp
sData
.
length
>
0
){
em
wo_dp
sData
.
forEach
((
item
:
any
)
=>
{
let
em
itempuse
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_em
itempuse
s'
),
'undefined'
)){
em
itempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuse
s'
)
as
any
);
if
(
em
itempusesData
&&
emitempusesData
.
length
&&
emitempuse
sData
.
length
>
0
){
em
itempuse
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
wo_dp
id
=
null
;
item
.
em
itempuse
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
wo_dps
=
emwo_dp
sData
;
masterData
.
em
itempuses
=
emitempuse
sData
;
let
emplansData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
),
'undefined'
)){
emplansData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplans'
)
as
any
);
...
...
@@ -353,43 +368,28 @@ export default class PFTeamServiceBase extends EntityService {
}
}
masterData
.
emplans
=
emplansData
;
let
emplantemplsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
),
'undefined'
)){
emplantemplsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emplantempls'
)
as
any
);
if
(
emplantemplsData
&&
emplantemplsData
.
length
&&
emplantemplsData
.
length
>
0
){
emplantemplsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
emplantemplid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
emplantempls
=
emplantemplsData
;
let
emitempusesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
),
'undefined'
)){
emitempusesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emitempuses'
)
as
any
);
if
(
emitempusesData
&&
emitempusesData
.
length
&&
emitempusesData
.
length
>
0
){
emitempusesData
.
forEach
((
item
:
any
)
=>
{
let
emwo_dpsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
),
'undefined'
)){
emwo_dpsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_emwo_dps'
)
as
any
);
if
(
emwo_dpsData
&&
emwo_dpsData
.
length
&&
emwo_dpsData
.
length
>
0
){
emwo_dpsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
em
itempuse
id
=
null
;
item
.
em
wo_dp
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
em
itempuses
=
emitempuse
sData
;
masterData
.
em
wo_dps
=
emwo_dp
sData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/pfteams/
${
context
.
pfteam
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
return
res
;
}
...
...
@@ -404,11 +404,11 @@ export default class PFTeamServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/pfteams/
${
context
.
pfteam
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplantempls'
,
JSON
.
stringify
(
res
.
data
.
emplantempls
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emequips'
,
JSON
.
stringify
(
res
.
data
.
emequips
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emitempuses'
,
JSON
.
stringify
(
res
.
data
.
emitempuses
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emplans'
,
JSON
.
stringify
(
res
.
data
.
emplans
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_emwo_dps'
,
JSON
.
stringify
(
res
.
data
.
emwo_dps
));
return
res
;
}
...
...
config.xml
浏览文件 @
adfdbcc8
...
...
@@ -38,11 +38,11 @@
git clone -b master $para2 eam_practice04/
export NODE_OPTIONS=--max-old-space-size=4096
cd eam_practice04/
mvn clean package -P
webapi
cd eam-
provider/eam-provider-webapi
mvn -P
webapi
docker:build
mvn -P
webapi
docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/eam-
provider-webapi.yaml iBizPractice --with-registry-auth
mvn clean package -P
eamweb
cd eam-
app/eam-app-eamweb
mvn -P
eamweb
docker:build
mvn -P
eamweb
docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/eam-
app-eamweb.yaml iBizPractice --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
eam-app/eam-app-eamweb/src/main/docker/Dockerfile
浏览文件 @
adfdbcc8
...
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /eam-app-eamweb.jar
EXPOSE
8080
EXPOSE
30009
ADD
eam-app-eamweb.jar /eam-app-eamweb.jar
eam-app/eam-app-eamweb/src/main/docker/eam-app-eamweb.yaml
浏览文件 @
adfdbcc8
...
...
@@ -3,9 +3,21 @@ services:
eam-app-eamweb
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/eam-app-eamweb:latest
ports
:
-
"
8080:8080
"
-
"
30009:30009
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=practice.ibizlab.cn
-
SERVER_PORT=30009
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_LAB01_30c03252a
-
SPRING_DATASOURCE_PASSWORD=@7@dd7d0
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_30c03252a?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_30c03252a
deploy
:
mode
:
replicated
replicas
:
1
...
...
eam-provider/eam-provider-webapi/src/main/docker/Dockerfile
浏览文件 @
adfdbcc8
...
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /eam-provider-webapi.jar
EXPOSE
20009
EXPOSE
8081
ADD
eam-provider-webapi.jar /eam-provider-webapi.jar
eam-provider/eam-provider-webapi/src/main/docker/eam-provider-webapi.yaml
浏览文件 @
adfdbcc8
...
...
@@ -3,21 +3,9 @@ services:
eam-provider-webapi
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/eam-provider-webapi:latest
ports
:
-
"
20009:20009
"
-
"
8081:8081
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=practice.ibizlab.cn
-
SERVER_PORT=20009
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_LAB01_30c03252a
-
SPRING_DATASOURCE_PASSWORD=@7@dd7d0
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_30c03252a?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_30c03252a
deploy
:
mode
:
replicated
replicas
:
1
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录