Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
鲁鑫
topsun-bpm
Commits
7f9cc452
Commit
7f9cc452
authored
Mar 28, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品主数据接口增加日志
parent
e78a891a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
10 deletions
+34
-10
SapMutualEpLogApplicationImpl.java
...ommon/application/impl/SapMutualEpLogApplicationImpl.java
+1
-1
NonProdApplyApplication.java
...sap/nonProdApply/application/NonProdApplyApplication.java
+1
-1
NonProdApplyApplicationImpl.java
...odApply/application/impl/NonProdApplyApplicationImpl.java
+5
-3
NonProdApplyController.java
...n/sap/nonProdApply/controller/NonProdApplyController.java
+27
-5
No files found.
topsun/src/main/java/com/huigou/topsun/sap/common/application/impl/SapMutualEpLogApplicationImpl.java
View file @
7f9cc452
...
...
@@ -28,7 +28,7 @@ public class SapMutualEpLogApplicationImpl implements SapMutualEpLogApplication
public
SapMutualEpLog
saveSapMutualEpLog
(
Map
<
String
,
Object
>
map
){
SapMutualEpLog
sapMutualEpLog
=
new
SapMutualEpLog
();
try
{
sapMutualEpLog
.
setBusinessId
(
map
.
get
(
"businessId"
).
toString
());
sapMutualEpLog
.
setBusinessId
(
map
.
get
(
"businessId"
).
toString
());
sapMutualEpLog
.
setBusinessType
(
map
.
get
(
"businessType"
).
toString
());
sapMutualEpLog
=
ClassHelper
.
fromMap
(
SapMutualEpLog
.
class
,
map
);
//BeanUtil.mapToBean(map, ClassHelpersapMutualEpLog);
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/NonProdApplyApplication.java
View file @
7f9cc452
...
...
@@ -34,5 +34,5 @@ public interface NonProdApplyApplication{
String
getChangeBusinessUsage
(
String
bizId
,
String
type
);
//保存来自SAP的产品申请
void
saveProdApplyFromSapVO
(
ProdApplyFromSapVO
prodApplyFromSapVO
);
String
saveProdApplyFromSapVO
(
ProdApplyFromSapVO
prodApplyFromSapVO
);
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyApplicationImpl.java
View file @
7f9cc452
...
...
@@ -464,11 +464,12 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
@Override
@Transactional
public
void
saveProdApplyFromSapVO
(
ProdApplyFromSapVO
prodApplyFromSapVO
)
{
public
String
saveProdApplyFromSapVO
(
ProdApplyFromSapVO
prodApplyFromSapVO
)
{
//初始化用户信息
String
createdById
=
"5EEB2DC861694A65933CB4CE9A8D870A@C18E23AAAA6940E09DF7C122332C51E0"
;
Operator
operator
=
operatorApplication
.
createOperatorByPersonMemberId
(
createdById
);
String
message
=
""
;
try
{
NonProdApplyBaseInfo
nonProdApplyBaseInfo
=
new
NonProdApplyBaseInfo
();
SapNonProdApplyDept
sapNonProdApplyDept
=
new
SapNonProdApplyDept
();
...
...
@@ -527,8 +528,9 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
// bsnMessageApplication.publishTasks(sapNonProdApplyDept.getApplyDeptId());
}
catch
(
Exception
ex
){
ex
.
printStackTrace
();
message
=
ex
.
getMessage
();
// ex.printStackTrace();
}
return
message
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyController.java
View file @
7f9cc452
package
com
.
huigou
.
topsun
.
sap
.
nonProdApply
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyDeptApplication
;
import
com.huigou.topsun.sap.nonProdApply.domain.NonProdApplyBaseInfo
;
...
...
@@ -39,6 +41,8 @@ public class NonProdApplyController extends CommonController {
NonProdApplyApplication
nonProdApplyApplication
;
@Autowired
NonProdApplyDeptApplication
nonProdApplyDeptApplication
;
@Autowired
SapMutualEpLogApplication
sapMutualEpLogApplication
;
private
final
static
Logger
LOG
=
LoggerFactory
.
getLogger
(
NonProdApplyController
.
class
);
...
...
@@ -257,22 +261,40 @@ public class NonProdApplyController extends CommonController {
@ResponseBody
public
HashMap
<
String
,
Object
>
getSapProductApply
(
@RequestBody
ProdApplyFromSapVO
prodApplyFromSapVO
){
//SDO sdo = this.getSDO();
LOG
.
info
(
"接收SAP产品申请数据................."
);
HashMap
<
String
,
Object
>
messageMap
=
new
HashMap
<>();
messageMap
.
put
(
"Message_Status"
,
"S"
);
messageMap
.
put
(
"Message_Text"
,
"成功"
);
LOG
.
info
(
"接收SAP产品申请数据=={}"
,
prodApplyFromSapVO
);
LOG
.
info
(
"参数:=={}"
,
prodApplyFromSapVO
);
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"type"
,
"S"
);
resultMap
.
put
(
"message"
,
"成功"
);
resultMap
.
put
(
"businessType"
,
"接收SAP产品数据"
);
resultMap
.
put
(
"businessId"
,
prodApplyFromSapVO
.
getMatnr
().
substring
(
0
,
32
));
resultMap
.
put
(
"parameter"
,
JSON
.
toJSONString
(
prodApplyFromSapVO
));
String
message
=
""
;
try
{
//resultMap.put("sequence", resultMap.get("row"));
SapNonProdApplyDept
sapNonProdApplyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptByMatnr
(
prodApplyFromSapVO
.
getMatnr
());
if
(
sapNonProdApplyDept
!=
null
){
message
=
"产品编号"
+
prodApplyFromSapVO
.
getMatnr
()+
"已经存在!"
;
messageMap
.
put
(
"Message_Status"
,
"E"
);
messageMap
.
put
(
"Message_Text"
,
"产品编号"
+
prodApplyFromSapVO
.
getMatnr
()+
"已经存在!"
);
}
else
{
nonProdApplyApplication
.
saveProdApplyFromSapVO
(
prodApplyFromSapVO
);
messageMap
.
put
(
"Message_Text"
,
message
);
resultMap
.
put
(
"type"
,
"E"
);
}
else
{
message
=
nonProdApplyApplication
.
saveProdApplyFromSapVO
(
prodApplyFromSapVO
);
if
(
StringUtil
.
isNotBlank
(
message
)){
resultMap
.
put
(
"type"
,
"E"
);
}
}
}
catch
(
RuntimeException
e
){
resultMap
.
put
(
"message"
,
message
);
}
catch
(
Exception
e
){
messageMap
.
put
(
"Message_Status"
,
"E"
);
messageMap
.
put
(
"Message_Text"
,
e
);
resultMap
.
put
(
"type"
,
"E"
);
resultMap
.
put
(
"message"
,
e
.
getMessage
());
}
sapMutualEpLogApplication
.
saveSapMutualEpLog
(
resultMap
);
return
messageMap
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment