Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
IMS
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘涛
IMS
Commits
605d2a49
提交
605d2a49
authored
12月 07, 2022
作者:
inroi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微调
上级
ecc0cb78
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
70 行增加
和
3 行删除
+70
-3
KingDeeUtil.java
...ain/java/org/jeecg/modules/iost/ims/Util/KingDeeUtil.java
+62
-0
ImsProductionpickingServiceImpl.java
...ost/ims/service/impl/ImsProductionpickingServiceImpl.java
+8
-3
没有找到文件。
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/ims/Util/KingDeeUtil.java
0 → 100644
浏览文件 @
605d2a49
package
org
.
jeecg
.
modules
.
iost
.
ims
.
Util
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author Inori
*/
public
class
KingDeeUtil
{
public
static
boolean
isError
(
String
json
)
{
Map
<
String
,
Object
>
map
=
JsonUtils
.
toMap
(
json
,
String
.
class
,
Object
.
class
);
Map
<
String
,
Object
>
tempMap
=
JsonUtils
.
toMap
(
JsonUtils
.
toString
(
map
.
get
(
"Result"
)),
String
.
class
,
Object
.
class
);
Map
<
String
,
Object
>
responseMap
=
JsonUtils
.
toMap
(
JsonUtils
.
toString
(
tempMap
.
get
(
"ResponseStatus"
)),
String
.
class
,
Object
.
class
);
List
<
Object
>
errorList
=
JsonUtils
.
toList
(
JsonUtils
.
toString
(
responseMap
.
get
(
"Errors"
)),
Object
.
class
);
return
!
CollectionUtils
.
isEmpty
(
errorList
);
}
public
static
String
getMessage
(
Object
object
)
{
Map
<
String
,
Object
>
map
=
JsonUtils
.
toMap
(
JsonUtils
.
toString
(
object
),
String
.
class
,
Object
.
class
);
String
result
=
JsonUtils
.
toString
(
map
.
get
(
"Result"
));
Map
<
String
,
Object
>
toMap
=
JsonUtils
.
toMap
(
result
,
String
.
class
,
Object
.
class
);
String
responseStatus
=
JsonUtils
.
toString
(
toMap
.
get
(
"ResponseStatus"
));
Map
<
String
,
Object
>
objectMap
=
JsonUtils
.
toMap
(
responseStatus
,
String
.
class
,
Object
.
class
);
List
<
Object
>
errorList
=
JsonUtils
.
toList
(
JsonUtils
.
toString
(
objectMap
.
get
(
"Errors"
)),
Object
.
class
);
StringBuilder
message
=
new
StringBuilder
();
for
(
Object
obj
:
errorList
)
{
Map
<
String
,
Object
>
messageMap
=
JsonUtils
.
toMap
(
JsonUtils
.
toString
(
obj
),
String
.
class
,
Object
.
class
);
if
(
StringUtils
.
isBlank
(
message
))
{
message
.
append
(
messageMap
.
get
(
"Message"
).
toString
());
}
else
{
message
.
append
(
","
).
append
(
messageMap
.
get
(
"Message"
).
toString
());
}
}
return
message
.
toString
();
}
public
static
List
<
Map
<
String
,
Object
>>
getSuccessEntity
(
String
json
)
{
Map
<
String
,
Object
>
map
=
JsonUtils
.
toMap
(
json
,
String
.
class
,
Object
.
class
);
Map
<
String
,
Object
>
tempMap
=
JsonUtils
.
toMap
(
JsonUtils
.
toString
(
map
.
get
(
"Result"
)),
String
.
class
,
Object
.
class
);
String
responseStatus
=
JsonUtils
.
toString
(
tempMap
.
get
(
"ResponseStatus"
));
Map
<
String
,
Object
>
responseMap
=
JsonUtils
.
toMap
(
responseStatus
,
String
.
class
,
Object
.
class
);
List
<
Object
>
successEntityList
=
JsonUtils
.
toList
(
JsonUtils
.
toString
(
responseMap
.
get
(
"SuccessEntitys"
)),
Object
.
class
);
return
successEntityList
.
stream
().
map
(
m
->
JsonUtils
.
toMap
(
JsonUtils
.
toString
(
m
),
String
.
class
,
Object
.
class
)).
collect
(
Collectors
.
toList
());
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/ims/service/impl/ImsProductionpickingServiceImpl.java
浏览文件 @
605d2a49
...
...
@@ -6,9 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.common.exception.DataRepeatException
;
import
org.jeecg.common.exception.KingdeeSelectException
;
import
org.jeecg.modules.iost.ims.Util.ImsLogUtil
;
import
org.jeecg.modules.iost.ims.Util.JsonUtil
;
import
org.jeecg.modules.iost.ims.Util.MapUtils
;
import
org.jeecg.modules.iost.ims.Util.*
;
import
org.jeecg.modules.iost.ims.entity.ImsProductionpicking
;
import
org.jeecg.modules.iost.ims.kingdeeapi.ProPickingKingdeeApi
;
import
org.jeecg.modules.iost.ims.mapper.ImsProductionpickingMapper
;
...
...
@@ -140,6 +138,13 @@ public class ImsProductionpickingServiceImpl extends ServiceImpl<ImsProductionpi
for
(
Map
<
String
,
String
>
stringStringMap
:
pushResult
)
{
//根据父单据的明细序号作为子单据的源单分录内码和主键来查询明细主键
List
<
Object
>
list1
=
proPickingKingdeeApi
.
select
(
needmaps
.
get
(
SEQ
).
toString
(),
stringStringMap
.
get
(
"FID"
));
if
(
list1
.
get
(
0
).
toString
().
contains
(
"Errors"
))
{
throw
new
KingdeeSelectException
(
"操作失败"
,
KingDeeUtil
.
getMessage
(
list1
.
get
(
0
)),
code
);
}
//如果有错误删除整个单据
String
fid
=
proPickingKingdeeApi
.
delete
(
stringStringMap
.
get
(
"FID"
));
//修改单据带入的过滤条件
needmaps
.
put
(
"FID"
,
stringStringMap
.
get
(
"FID"
));
needmaps
.
put
(
"FBILLNO"
,
stringStringMap
.
get
(
"FBILLNO"
));
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论