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
4c42be93
Commit
4c42be93
authored
Jan 08, 2024
by
赵汉亭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成本中心新增、冻结接口完成
parent
817f7fd4
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
242 additions
and
115 deletions
+242
-115
sapCostCenterDetail.jsp
.../webapp/biz/topsun/sap/costCenter/sapCostCenterDetail.jsp
+8
-9
sapCostCenterList.js
...ain/webapp/biz/topsun/sap/costCenter/sapCostCenterList.js
+23
-2
sapCostCenterList.jsp
...in/webapp/biz/topsun/sap/costCenter/sapCostCenterList.jsp
+4
-4
CostCenterApplication.java
...sun/sap/costCenter/application/CostCenterApplication.java
+3
-0
CostCenterApplicationImpl.java
...ostCenter/application/impl/CostCenterApplicationImpl.java
+72
-0
CostCenterController.java
...opsun/sap/costCenter/controller/CostCenterController.java
+12
-0
CostCenter.java
...a/com/huigou/topsun/sap/costCenter/domain/CostCenter.java
+8
-3
CostCenterQueryRequest.java
...n/sap/costCenter/domain/query/CostCenterQueryRequest.java
+2
-2
returnJSON.json
...a/com/huigou/topsun/sap/costCenter/domain/returnJSON.json
+22
-16
CostCenterMessageVo.java
.../topsun/sap/costCenter/domain/vo/CostCenterMessageVo.java
+48
-0
CostCenterReturnVo.java
...u/topsun/sap/costCenter/domain/vo/CostCenterReturnVo.java
+22
-65
CostCenterVo.java
.../huigou/topsun/sap/costCenter/domain/vo/CostCenterVo.java
+2
-6
SapPriceMasterDataApplicationImpl.java
...a/application/impl/SapPriceMasterDataApplicationImpl.java
+15
-7
costCenter.xml
...ain/resources/config/topsun/sap/costCenter/costCenter.xml
+1
-1
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/costCenter/sapCostCenterDetail.jsp
View file @
4c42be93
...
@@ -33,16 +33,15 @@
...
@@ -33,16 +33,15 @@
<x:hidden
name=
"statusId"
/>
<x:hidden
name=
"statusId"
/>
<div
class=
"hg-form-row"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"kostl"
required=
"true"
label=
"成本中心编码"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"kostl"
required=
"true"
label=
"成本中心编码"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"ktext"
required=
"
tru
e"
label=
"名称"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"ktext"
required=
"
fals
e"
label=
"名称"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"ltext"
required=
"
tru
e"
label=
"描述"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"ltext"
required=
"
fals
e"
label=
"描述"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:selectC
name=
"kosar"
required=
"false"
label=
"成本中心类型"
labelCol=
"2"
dictionary=
"KOSAR"
fieldCol=
"4"
/>
<x:selectC
name=
"kosar"
required=
"false"
label=
"成本中心类型"
labelCol=
"2"
dictionary=
"KOSAR"
fieldCol=
"4"
/>
<x:inputC
name=
"datab"
required=
"true"
label=
"有限期自"
labelCol=
"2"
wrapper=
"date"
fieldCol=
"4"
value=
"2024-01-01"
/>
<x:inputC
name=
"datab"
required=
"false"
label=
"有限期自"
labelCol=
"2"
wrapper=
"date"
fieldCol=
"4"
value=
"2024-01-01"
/>
<x:inputC
name=
"datbi"
required=
"true"
label=
"有限截止日"
labelCol=
"2"
wrapper=
"date"
fieldCol=
"4"
value=
"9999-12-31"
/>
<x:inputC
name=
"datbi"
required=
"false"
label=
"有限截止日"
labelCol=
"2"
wrapper=
"date"
fieldCol=
"4"
value=
"9999-12-31"
/>
<x:inputC
name=
"verak"
required=
"true"
label=
"负责人"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"verak"
required=
"false"
label=
"负责人"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:selectC
name=
"prctr"
required=
"true"
label=
"利润中心"
labelCol=
"2"
dictionary=
"PRCTR"
fieldCol=
"4"
/>
<x:selectC
name=
"prctr"
required=
"false"
label=
"利润中心"
labelCol=
"2"
dictionary=
"PRCTR"
fieldCol=
"4"
/>
<x:selectC
name=
"formType"
required=
"true"
label=
"业务类型"
labelCol=
"2"
dictionary=
"formType"
fieldCol=
"4"
/>
<x:inputC
name=
"telePhone"
required=
"false"
label=
"联系方式"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"telePhone"
required=
"true"
label=
"联系方式"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"reason"
required=
"false"
label=
"原因"
labelCol=
"2"
maxLength=
"255"
fieldCol=
"4"
/>
<x:inputC
name=
"reason"
required=
"true"
label=
"原因"
labelCol=
"2"
maxLength=
"255"
fieldCol=
"4"
/>
</div>
</div>
<div
class=
"blank_div clearfix"
></div>
<div
class=
"blank_div clearfix"
></div>
</form>
</form>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costCenter/sapCostCenterList.js
View file @
4c42be93
...
@@ -19,6 +19,7 @@ function loadCostCenterListGrid() {
...
@@ -19,6 +19,7 @@ function loadCostCenterListGrid() {
updateHandler
();
updateHandler
();
},
},
deleteHandler
:
deleteHandler
,
deleteHandler
:
deleteHandler
,
disableHandler
:
disableHandler
,
});
});
gridManager
=
UICtrl
.
grid
(
"#sapCostCenterListGrid"
,
{
gridManager
=
UICtrl
.
grid
(
"#sapCostCenterListGrid"
,
{
columns
:
[
columns
:
[
...
@@ -35,7 +36,16 @@ function loadCostCenterListGrid() {
...
@@ -35,7 +36,16 @@ function loadCostCenterListGrid() {
{
display
:
"联系方式"
,
name
:
"telePhone"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"联系方式"
,
name
:
"telePhone"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"申请日期"
,
name
:
"fillinDate"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"申请日期"
,
name
:
"fillinDate"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"原因"
,
name
:
"reason"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"原因"
,
name
:
"reason"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"状态"
,
name
:
"isDelete"
,
width
:
60
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
render
:
function
(
item
)
{
return
UICtrl
.
getStatusInfo
(
item
.
isDelete
);
}
},
{
display
:
"消息类型"
,
name
:
"typeTextView"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"消息编号"
,
name
:
"NUMBER"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"消息文本"
,
name
:
"MESSAGE"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"应用程序日志"
,
name
:
"LOG_NO"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
],
],
dataAction
:
"server"
,
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapCostCenter/slicedCostCenterList.ajax'
,
url
:
web_app
.
name
+
'/sapCostCenter/slicedCostCenterList.ajax'
,
...
@@ -87,7 +97,7 @@ function updateHandler(row) {
...
@@ -87,7 +97,7 @@ function updateHandler(row) {
UICtrl
.
addTabItem
({
UICtrl
.
addTabItem
({
tabid
:
'CostCenterDetail'
,
tabid
:
'CostCenterDetail'
,
text
:
"修改成本中心"
,
text
:
"修改成本中心"
,
url
:
web_app
.
name
+
'/sapCostCenter/showCostCenterDetail.do?id='
+
row
.
id
url
:
web_app
.
name
+
'/sapCostCenter/showCostCenterDetail.do?id='
+
row
.
id
})
})
}
}
...
@@ -102,3 +112,14 @@ function deleteHandler() {
...
@@ -102,3 +112,14 @@ function deleteHandler() {
});
});
}
}
// 冻结按钮
function
disableHandler
()
{
DataUtil
.
updateById
({
action
:
'sapCostCenter/updateCostCenterStatus.ajax'
,
gridManager
:
gridManager
,
idFieldName
:
'id'
,
param
:
{
status
:
0
},
message
:
'common.confirm.disable'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
}
topsun-xt/src/main/webapp/biz/topsun/sap/costCenter/sapCostCenterList.jsp
View file @
4c42be93
...
@@ -21,10 +21,10 @@
...
@@ -21,10 +21,10 @@
<div
id=
"layout"
>
<div
id=
"layout"
>
<div
position=
"center"
title=
"成本中心"
>
<div
position=
"center"
title=
"成本中心"
>
<x:title
title=
"common.button.search"
hideTable=
"queryMainForm"
isHide=
"true"
/>
<x:title
title=
"common.button.search"
hideTable=
"queryMainForm"
isHide=
"true"
/>
<form
class=
"hg-form ui-hide"
method=
"post"
action=
""
id=
"queryMainForm"
>
<%-- <form class="hg-form ui-hide" method="post" action="" id="queryMainForm">--%
>
<x:inputC
name=
"ruleKind"
required=
"false"
label=
"成本中心名称"
labelCol=
"1"
/
>
<%-- <x:inputC name="ruleKind" required="false" label="成本中心名称" labelCol="1"/>--%
>
<x:searchButtons /
>
<%-- <x:searchButtons />--%
>
</form
>
<%-- </form>--%
>
<div
class=
"blank_div clearfix"
></div>
<div
class=
"blank_div clearfix"
></div>
<div
id=
"sapCostCenterListGrid"
style=
"margin: 2px;"
></div>
<div
id=
"sapCostCenterListGrid"
style=
"margin: 2px;"
></div>
</div>
</div>
...
...
topsun/src/main/java/com/huigou/topsun/sap/costCenter/application/CostCenterApplication.java
View file @
4c42be93
...
@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.costCenter.application;
...
@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.costCenter.application;
import
com.huigou.topsun.sap.costCenter.domain.CostCenter
;
import
com.huigou.topsun.sap.costCenter.domain.CostCenter
;
import
com.huigou.topsun.sap.costCenter.domain.query.CostCenterQueryRequest
;
import
com.huigou.topsun.sap.costCenter.domain.query.CostCenterQueryRequest
;
import
com.huigou.topsun.sap.costCenter.domain.vo.CostCenterMessageVo
;
import
com.huigou.topsun.sap.costCenter.domain.vo.CostCenterVo
;
import
com.huigou.topsun.sap.costCenter.domain.vo.CostCenterVo
;
import
java.util.List
;
import
java.util.List
;
...
@@ -32,4 +33,6 @@ public interface CostCenterApplication {
...
@@ -32,4 +33,6 @@ public interface CostCenterApplication {
CostCenterVo
saveAndUpdate
(
CostCenter
costCenter
);
CostCenterVo
saveAndUpdate
(
CostCenter
costCenter
);
Map
<
String
,
Object
>
slicedCostCenterList
(
CostCenterQueryRequest
queryRequest
);
Map
<
String
,
Object
>
slicedCostCenterList
(
CostCenterQueryRequest
queryRequest
);
int
updateCostCenterStatus
(
List
<
String
>
ids
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/costCenter/application/impl/CostCenterApplicationImpl.java
View file @
4c42be93
package
com
.
huigou
.
topsun
.
sap
.
costCenter
.
application
.
impl
;
package
com
.
huigou
.
topsun
.
sap
.
costCenter
.
application
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.cache.SystemCache
;
import
com.huigou.context.Operator
;
import
com.huigou.context.Operator
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.common.HttpClient
;
import
com.huigou.topsun.sap.costCenter.application.CostCenterApplication
;
import
com.huigou.topsun.sap.costCenter.application.CostCenterApplication
;
import
com.huigou.topsun.sap.costCenter.domain.CostCenter
;
import
com.huigou.topsun.sap.costCenter.domain.CostCenter
;
import
com.huigou.topsun.sap.costCenter.domain.query.CostCenterQueryRequest
;
import
com.huigou.topsun.sap.costCenter.domain.query.CostCenterQueryRequest
;
import
com.huigou.topsun.sap.costCenter.domain.vo.CostCenterMessageVo
;
import
com.huigou.topsun.sap.costCenter.domain.vo.CostCenterReturnVo
;
import
com.huigou.topsun.sap.costCenter.domain.vo.CostCenterReturnVo
;
import
com.huigou.topsun.sap.costCenter.domain.vo.CostCenterVo
;
import
com.huigou.topsun.sap.costCenter.domain.vo.CostCenterVo
;
import
com.huigou.topsun.sap.costCenter.repository.CostCenterRepository
;
import
com.huigou.topsun.sap.costCenter.repository.CostCenterRepository
;
...
@@ -21,8 +25,10 @@ import org.springframework.beans.BeanUtils;
...
@@ -21,8 +25,10 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicInteger
;
/**
/**
* @Auther: xin.lu
* @Auther: xin.lu
...
@@ -35,12 +41,16 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
...
@@ -35,12 +41,16 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
@Autowired
@Autowired
private
CostCenterRepository
costCenterRepository
;
private
CostCenterRepository
costCenterRepository
;
@Autowired
private
HttpClient
httpClient
;
@Override
@Override
public
Map
<
String
,
Object
>
getCostCenterList
(
CostCenterQueryRequest
costCenterQueryRequest
)
{
public
Map
<
String
,
Object
>
getCostCenterList
(
CostCenterQueryRequest
costCenterQueryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"costCenter"
);
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"costCenter"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
costCenterQueryRequest
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
costCenterQueryRequest
);
queryModel
.
putDictionary
(
"kosar"
,
DictUtil
.
getDictionary
(
"KOSAR"
));
queryModel
.
putDictionary
(
"kosar"
,
DictUtil
.
getDictionary
(
"KOSAR"
));
queryModel
.
putDictionary
(
"prctr"
,
DictUtil
.
getDictionary
(
"PRCTR"
));
queryModel
.
putDictionary
(
"prctr"
,
DictUtil
.
getDictionary
(
"PRCTR"
));
queryModel
.
putDictionary
(
"TYPE"
,
DictUtil
.
getDictionary
(
"TYPE"
));
Map
<
String
,
Object
>
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
Map
<
String
,
Object
>
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
return
map
;
return
map
;
}
}
...
@@ -81,6 +91,32 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
...
@@ -81,6 +91,32 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
}
@Override
public
int
updateCostCenterStatus
(
List
<
String
>
ids
)
{
AtomicInteger
flog
=
new
AtomicInteger
();
ids
.
forEach
(
id
->
{
CostCenter
costCenter
=
costCenterRepository
.
findOne
(
id
);
String
returnJSON
=
new
StringBuilder
().
append
(
"["
)
.
append
(
"{"
)
.
append
(
"'ZYWLX':'F',"
)
.
append
(
"'KOSTL':'"
).
append
(
costCenter
.
getKostl
()).
append
(
"'"
)
.
append
(
"}"
)
.
append
(
"]"
)
.
toString
().
replaceAll
(
"'"
,
"\""
);
CostCenterMessageVo
costCenterMessageVo
=
send
(
returnJSON
);
if
(!
ObjectUtil
.
isEmpty
(
costCenterMessageVo
)
||
costCenterMessageVo
.
getTYPE
()
==
"S"
)
{
// 冻结成功,修改状态
costCenter
.
setIsDelete
(
0
);
flog
.
getAndIncrement
();
}
BeanUtils
.
copyProperties
(
costCenterMessageVo
,
costCenter
);
costCenterRepository
.
save
(
costCenter
);
});
if
(
ids
.
size
()
==
flog
.
intValue
())
return
1
;
return
0
;
}
@Override
@Override
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
super
.
onEnd
(
delegateExecution
);
super
.
onEnd
(
delegateExecution
);
...
@@ -92,6 +128,26 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
...
@@ -92,6 +128,26 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
// 封装JSON数据
// 封装JSON数据
String
returnJSON
=
getReturnVo
(
costCenter
);
String
returnJSON
=
getReturnVo
(
costCenter
);
// 向SAP发送数据
CostCenterMessageVo
send
=
send
(
returnJSON
);
}
/**
* 向SAP发送数据
*
* @param returnJSON
* @return 返回的消息
*/
private
CostCenterMessageVo
send
(
String
returnJSON
)
{
String
url
=
SystemCache
.
getParameter
(
"sap.service.costCent.url"
,
String
.
class
);
CostCenterMessageVo
costCenterMessageVo
;
try
{
String
execute
=
httpClient
.
execute
(
returnJSON
,
url
);
costCenterMessageVo
=
new
ObjectMapper
().
readValue
(
execute
,
CostCenterMessageVo
.
class
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
costCenterMessageVo
;
}
}
/**
/**
...
@@ -144,6 +200,22 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
...
@@ -144,6 +200,22 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
Operator
operator
=
this
.
getOperator
();
Operator
operator
=
this
.
getOperator
();
BeanUtils
.
copyProperties
(
operator
,
costCenter
);
BeanUtils
.
copyProperties
(
operator
,
costCenter
);
costCenter
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
costCenter
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
costCenter
.
setIsDelete
(
1
);
// 向SAP发送新增数据
CostCenterReturnVo
costCenterReturnVo
=
new
CostCenterReturnVo
();
BeanUtils
.
copyProperties
(
costCenter
,
costCenterReturnVo
);
costCenterReturnVo
.
setZYWLX
(
"A"
);
String
returnJson
=
null
;
try
{
returnJson
=
new
ObjectMapper
().
writeValueAsString
(
costCenterReturnVo
);
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
e
);
}
// 发送
CostCenterMessageVo
costCenterMessageVo
=
send
(
returnJson
);
BeanUtils
.
copyProperties
(
costCenterMessageVo
,
costCenter
);
}
else
{
}
else
{
costCenter
=
(
CostCenter
)
commonDomainService
.
loadAndFillinProperties
(
costCenter
);
costCenter
=
(
CostCenter
)
commonDomainService
.
loadAndFillinProperties
(
costCenter
);
}
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/costCenter/controller/CostCenterController.java
View file @
4c42be93
...
@@ -156,4 +156,16 @@ public class CostCenterController extends CommonController {
...
@@ -156,4 +156,16 @@ public class CostCenterController extends CommonController {
Map
<
String
,
Object
>
model
=
memEasySearcher
.
search
(
mapList
,
easySearchParse
,
pageRequest
,
null
);
Map
<
String
,
Object
>
model
=
memEasySearcher
.
search
(
mapList
,
easySearchParse
,
pageRequest
,
null
);
return
model
;
return
model
;
}
}
/**
* 冻结成本中心
*/
public
String
updateCostCenterStatus
()
{
// TODO 需要向ICP发送冻结信息
List
<
String
>
ids
=
this
.
getSDO
().
getIds
();
int
flog
=
costCenterApplication
.
updateCostCenterStatus
(
ids
);
if
(
flog
==
1
)
return
success
();
return
error
(
"失败"
);
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/CostCenter.java
View file @
4c42be93
package
com
.
huigou
.
topsun
.
sap
.
costCenter
.
domain
;
package
com
.
huigou
.
topsun
.
sap
.
costCenter
.
domain
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
com.topsunit.query.annotations.Dictionary
;
import
com.topsunit.query.annotations.Dictionary
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -80,9 +81,8 @@ public class CostCenter extends FlowBillAbstractEntity {
...
@@ -80,9 +81,8 @@ public class CostCenter extends FlowBillAbstractEntity {
/**
/**
* 业务类型
* 业务类型
*/
*/
@Column
(
name
=
"form_type"
)
@Column
(
name
=
"is_delete"
)
@Dictionary
(
"formType"
)
private
int
isDelete
;
private
String
formType
;
/**
/**
* 创建原因 CHAR 100 手工输入
* 创建原因 CHAR 100 手工输入
...
@@ -102,6 +102,8 @@ public class CostCenter extends FlowBillAbstractEntity {
...
@@ -102,6 +102,8 @@ public class CostCenter extends FlowBillAbstractEntity {
* 消息类型: S 成功,E 错误,W 警告,I 信息,A 中断
* 消息类型: S 成功,E 错误,W 警告,I 信息,A 中断
*/
*/
@Column
(
name
=
"TYPE"
)
@Column
(
name
=
"TYPE"
)
@Dictionary
(
"TYPE"
)
@JsonProperty
(
"TYPE"
)
private
String
TYPE
;
private
String
TYPE
;
/**
/**
* 消息类__ID
* 消息类__ID
...
@@ -112,16 +114,19 @@ public class CostCenter extends FlowBillAbstractEntity {
...
@@ -112,16 +114,19 @@ public class CostCenter extends FlowBillAbstractEntity {
* 消息编号
* 消息编号
*/
*/
@Column
(
name
=
"NUMBER"
)
@Column
(
name
=
"NUMBER"
)
@JsonProperty
(
"NUMBER"
)
private
BigDecimal
NUMBER
;
private
BigDecimal
NUMBER
;
/**
/**
* 消息文本
* 消息文本
*/
*/
@Column
(
name
=
"MESSAGE"
)
@Column
(
name
=
"MESSAGE"
)
@JsonProperty
(
"MESSAGE"
)
private
String
MESSAGE
;
private
String
MESSAGE
;
/**
/**
* 应用程序日志,日志号
* 应用程序日志,日志号
*/
*/
@Column
(
name
=
"LOG_NO"
)
@Column
(
name
=
"LOG_NO"
)
@JsonProperty
(
"LOG_NO"
)
private
String
LOG_NO
;
private
String
LOG_NO
;
@Override
@Override
...
...
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/query/CostCenterQueryRequest.java
View file @
4c42be93
...
@@ -65,9 +65,9 @@ public class CostCenterQueryRequest extends QueryAbstractRequest {
...
@@ -65,9 +65,9 @@ public class CostCenterQueryRequest extends QueryAbstractRequest {
private
String
prctr
;
private
String
prctr
;
/**
/**
*
业务类型
*
冻结0 启用1
*/
*/
private
String
formTyp
e
;
private
String
is_delet
e
;
/**
/**
* 创建原因 CHAR 100 手工输入
* 创建原因 CHAR 100 手工输入
...
...
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/returnJSON.json
View file @
4c42be93
{
[
"KOSTL"
:
"1"
,
{
"DATAB"
:
"2023.12.28"
,
"ZYWLX"
:
"F"
,
"DATBI"
:
"2023.12.31"
,
"KOSTL"
:
"666666"
"KTEXT"
:
"1"
,
},
"LTEXT"
:
"1"
,
{
"VERAK"
:
"1"
,
"KOSTL"
:
"1"
,
"KOSAR"
:
"E"
,
"DATAB"
:
"2023.12.28"
,
"PRCTR"
:
"10001001"
,
"DATBI"
:
"2023.12.31"
,
"formType"
:
"add"
,
"KTEXT"
:
"1"
,
"reason"
:
"1"
,
"LTEXT"
:
"1"
,
"fillinDate"
:
1703821440000
,
"VERAK"
:
"1"
,
"deptName"
:
"测试使用部门"
,
"KOSAR"
:
"E"
,
"personMemberName"
:
"系统管理员"
,
"PRCTR"
:
"10001001"
,
"telePhone"
:
"1"
"formType"
:
"add"
,
}
"reason"
:
"1"
,
\ No newline at end of file
"fillinDate"
:
1703821440000
,
"deptName"
:
"测试使用部门"
,
"personMemberName"
:
"系统管理员"
,
"telePhone"
:
"1"
}
]
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/vo/CostCenterMessageVo.java
0 → 100644
View file @
4c42be93
package
com
.
huigou
.
topsun
.
sap
.
costCenter
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.math.BigDecimal
;
/**
* title:
* author:ZHT
* date:2024/1/8
* description:
* 成本中心SAP返回消息封装类
*/
@Data
public
class
CostCenterMessageVo
{
/**
* 消息类型: S 成功,E 错误,W 警告,I 信息,A 中断
*/
@Column
(
name
=
"TYPE"
)
@JsonProperty
(
"TYPE"
)
private
String
TYPE
;
/**
* 消息类__ID
*/
@Column
(
name
=
"message_id"
)
@JsonProperty
(
"ID"
)
private
String
messageId
;
/**
* 消息编号
*/
@Column
(
name
=
"NUMBER"
)
@JsonProperty
(
"NUMBER"
)
private
BigDecimal
NUMBER
;
/**
* 消息文本
*/
@Column
(
name
=
"MESSAGE"
)
@JsonProperty
(
"MESSAGE"
)
private
String
MESSAGE
;
/**
* 应用程序日志,日志号
*/
@Column
(
name
=
"LOG_NO"
)
@JsonProperty
(
"LOG_NO"
)
private
String
LOG_NO
;
}
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/vo/CostCenterReturnVo.java
View file @
4c42be93
...
@@ -12,9 +12,14 @@ import java.util.Date;
...
@@ -12,9 +12,14 @@ import java.util.Date;
* author:ZHT
* author:ZHT
* date:2023/12/29
* date:2023/12/29
* description:
* description:
* 成本中心新增-返回给SAP的封装类
*/
*/
@JsonIgnoreProperties
@JsonIgnoreProperties
public
class
CostCenterReturnVo
implements
Serializable
{
public
class
CostCenterReturnVo
implements
Serializable
{
/**
* 业务类型
*/
private
String
ZYWLX
;
/**
/**
* 成本中心编码
* 成本中心编码
...
@@ -73,29 +78,13 @@ public class CostCenterReturnVo implements Serializable {
...
@@ -73,29 +78,13 @@ public class CostCenterReturnVo implements Serializable {
@JsonProperty
(
"PRCTR"
)
@JsonProperty
(
"PRCTR"
)
private
String
prctr
;
private
String
prctr
;
/**
public
String
getZYWLX
()
{
* 业务类型
return
ZYWLX
;
*/
}
@JsonProperty
(
"formType"
)
private
String
formType
;
/**
* 创建原因 CHAR 100 手工输入
*/
@JsonProperty
(
"reason"
)
private
String
reason
;
@JsonProperty
(
"fillinDate"
)
private
Date
fillinDate
;
@JsonProperty
(
"deptName"
)
private
String
deptName
;
@JsonProperty
(
"personMemberName"
)
private
String
personMemberName
;
@JsonProperty
(
"telePhone"
)
public
void
setZYWLX
(
String
ZYWLX
)
{
private
String
telePhone
;
this
.
ZYWLX
=
ZYWLX
;
}
public
String
getKostl
()
{
public
String
getKostl
()
{
return
kostl
;
return
kostl
;
...
@@ -161,51 +150,19 @@ public class CostCenterReturnVo implements Serializable {
...
@@ -161,51 +150,19 @@ public class CostCenterReturnVo implements Serializable {
this
.
prctr
=
prctr
;
this
.
prctr
=
prctr
;
}
}
public
String
getFormType
()
{
public
CostCenterReturnVo
(
String
ZYWLX
,
String
kostl
,
Date
datab
,
Date
datbi
,
String
ktext
,
String
ltext
,
String
verak
,
String
kosar
,
String
prctr
)
{
return
formType
;
}
public
void
setFormType
(
String
formType
)
{
this
.
formType
=
formType
;
}
public
String
getReason
()
{
return
reason
;
}
public
void
setReason
(
String
reason
)
{
this
.
reason
=
reason
;
}
public
Date
getFillinDate
()
{
this
.
ZYWLX
=
ZYWLX
;
return
fillinDate
;
this
.
kostl
=
kostl
;
}
this
.
datab
=
datab
;
this
.
datbi
=
datbi
;
public
void
setFillinDate
(
Date
fillinDate
)
{
this
.
ktext
=
ktext
;
this
.
fillinDate
=
fillinDate
;
this
.
ltext
=
ltext
;
}
this
.
verak
=
verak
;
this
.
kosar
=
kosar
;
public
String
getDeptName
()
{
this
.
prctr
=
prctr
;
return
deptName
;
}
public
void
setDeptName
(
String
deptName
)
{
this
.
deptName
=
deptName
;
}
public
String
getPersonMemberName
()
{
return
personMemberName
;
}
public
void
setPersonMemberName
(
String
personMemberName
)
{
this
.
personMemberName
=
personMemberName
;
}
public
String
getTelePhone
()
{
return
telePhone
;
}
}
public
void
setTelePhone
(
String
telePhone
)
{
public
CostCenterReturnVo
()
{
this
.
telePhone
=
telePhone
;
}
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/costCenter/domain/vo/CostCenterVo.java
View file @
4c42be93
...
@@ -2,12 +2,8 @@ package com.huigou.topsun.sap.costCenter.domain.vo;
...
@@ -2,12 +2,8 @@ package com.huigou.topsun.sap.costCenter.domain.vo;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.huigou.topsun.sap.costCenter.domain.CostCenter
;
import
com.huigou.topsun.sap.costCenter.domain.CostCenter
;
import
com.topsunit.query.annotations.Dictionary
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -71,9 +67,9 @@ public class CostCenterVo implements Serializable {
...
@@ -71,9 +67,9 @@ public class CostCenterVo implements Serializable {
private
String
prctr
;
private
String
prctr
;
/**
/**
*
业务类型
*
冻结0 启用1
*/
*/
private
String
formTyp
e
;
private
int
isDelet
e
;
/**
/**
* 创建原因 CHAR 100 手工输入
* 创建原因 CHAR 100 手工输入
...
...
topsun/src/main/java/com/huigou/topsun/sap/priceMasterData/application/impl/SapPriceMasterDataApplicationImpl.java
View file @
4c42be93
...
@@ -153,17 +153,25 @@ public class SapPriceMasterDataApplicationImpl extends FlowBroker implements Sap
...
@@ -153,17 +153,25 @@ public class SapPriceMasterDataApplicationImpl extends FlowBroker implements Sap
param
.
put
(
"VTWEG"
,
queryRequest
.
getVtweg
());
param
.
put
(
"VTWEG"
,
queryRequest
.
getVtweg
());
param
.
put
(
"KUNNR"
,
queryRequest
.
getKunnr
());
param
.
put
(
"KUNNR"
,
queryRequest
.
getKunnr
());
param
.
put
(
"MATNR"
,
queryRequest
.
getMatnr
());
param
.
put
(
"MATNR"
,
queryRequest
.
getMatnr
());
String
[]
strings
=
new
String
[
1
];
try
{
strings
[
0
]
=
new
ObjectMapper
().
writeValueAsString
(
param
);
strings
.
toString
();
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
e
);
}
StringBuilder
stringBuilder
=
new
StringBuilder
();
StringBuilder
stringBuilder
=
new
StringBuilder
();
stringBuilder
.
append
(
"["
)
stringBuilder
.
append
(
"["
)
.
append
(
"{"
)
.
append
(
"{"
)
.
append
(
"KSCHL:"
).
append
(
queryRequest
.
getKschl
()).
append
(
","
)
.
append
(
"'KSCHL':'"
).
append
(
queryRequest
.
getKschl
()).
append
(
"',"
)
.
append
(
"VKORG:"
).
append
(
queryRequest
.
getVkorg
()).
append
(
","
)
.
append
(
"'VKORG':'"
).
append
(
queryRequest
.
getVkorg
()).
append
(
"',"
)
.
append
(
"VTWEG:"
).
append
(
queryRequest
.
getVtweg
()).
append
(
","
)
.
append
(
"'VTWEG':'"
).
append
(
queryRequest
.
getVtweg
()).
append
(
"',"
)
.
append
(
"KUNNR:"
).
append
(
queryRequest
.
getKunnr
()).
append
(
","
)
.
append
(
"'KUNNR':'"
).
append
(
queryRequest
.
getKunnr
()).
append
(
"',"
)
.
append
(
"MATNR:"
).
append
(
queryRequest
.
getMatnr
())
.
append
(
"'MATNR':'"
).
append
(
queryRequest
.
getMatnr
())
.
append
(
"}"
)
.
append
(
"'}"
)
.
append
(
"]"
);
.
append
(
"]"
)
.
toString
().
replaceAll
(
"'"
,
"\""
);
List
<
SapPriceMasterDataItem
>
sapPriceMasterDataItemList
=
null
;
List
<
SapPriceMasterDataItem
>
sapPriceMasterDataItemList
=
null
;
try
{
try
{
// 调用接口,获取返回数据
// 调用接口,获取返回数据
...
...
topsun/src/main/resources/config/topsun/sap/costCenter/costCenter.xml
View file @
4c42be93
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<query-mappings>
<query-mappings>
<query
name=
"costCenter"
label=
"成本中心表"
table=
"sap_cost_center"
>
<query
name=
"costCenter"
label=
"成本中心表"
table=
"sap_cost_center"
>
<sql-query>
<sql-query>
select t.* from sap_cost_center t
select t.* from sap_cost_center t
where t.is_delete = 1
</sql-query>
</sql-query>
</query>
</query>
...
...
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