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
16281b6c
Commit
16281b6c
authored
Jun 20, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成本中心编码校验控制;成本中心导入根据名称转换成编码;统计指标过账成本中心和订单必填其中一项
parent
1a847e99
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
4 deletions
+23
-4
sapCostCenterDetail.js
...n/webapp/biz/topsun/sap/costCenter/sapCostCenterDetail.js
+9
-0
statsIndicators.js
.../webapp/biz/topsun/sap/statsIndicators/statsIndicators.js
+3
-3
CostCenterDataExcelImport.java
...ostCenter/application/impl/CostCenterDataExcelImport.java
+9
-0
CostCenterController.java
...opsun/sap/costCenter/controller/CostCenterController.java
+1
-0
SuppliersDataApplicationImpl.java
...pliers/application/impl/SuppliersDataApplicationImpl.java
+1
-1
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/costCenter/sapCostCenterDetail.js
View file @
16281b6c
...
...
@@ -79,6 +79,15 @@ function getId() {
return
$
(
"#id"
).
val
();
}
function
getExtendedData
(
processAction
)
{
var
kostl
=
$
(
"#kostl"
).
val
();
if
(
kostl
.
length
!=
10
){
Public
.
tip
(
"成本中心编码只能是10位数,请检查"
)
return
false
;
}
return
true
;
}
function
checkConstraints
(){
var
kostl
=
$
(
"#kostl"
).
val
();
if
(
kostl
.
length
!=
10
){
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/statsIndicators/statsIndicators.js
View file @
16281b6c
...
...
@@ -70,7 +70,7 @@ function loadStatsIndicatorsDetailListGrid() {
{
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
tru
e
,
type
:
"select"
,
required
:
fals
e
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"queryCostCenter"
,
...
...
@@ -187,8 +187,8 @@ function getExtendedData(processAction) {
});
if
(
!
datas
)
{
return
false
;
}
else
if
(
datas
.
some
(
item
=>
item
.
ekostl
===
""
&&
item
.
e
aufnr
===
""
)){
const
nullItems
=
datas
.
filter
(
item
=>
item
.
ekostl
===
""
&&
item
.
e
aufnr
===
""
).
map
(
item
=>
item
.
zlenr
);
}
else
if
(
datas
.
some
(
item
=>
item
.
kostl
===
""
&&
item
.
aufnr
===
""
)){
const
nullItems
=
datas
.
filter
(
item
=>
item
.
kostl
===
""
&&
item
.
aufnr
===
""
).
map
(
item
=>
item
.
zlenr
);
Public
.
tip
(
"行号["
+
nullItems
.
join
(
","
)
+
"]成本中心or订单选择一栏填写"
);
return
false
;
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/costCenter/application/impl/CostCenterDataExcelImport.java
View file @
16281b6c
package
com
.
huigou
.
topsun
.
sap
.
costCenter
.
application
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.cache.SystemCache
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
...
...
@@ -56,12 +57,20 @@ public class CostCenterDataExcelImport implements ExcelImportInterface {
}
if
(
StringUtil
.
isBlank
(
tmpCostCenterData
.
getKosar
())){
throw
new
RuntimeException
(
"成本中心类型不能为空"
);
}
else
{
//根据名称转换成编码
String
value
=
DictUtil
.
getDictionaryDetailValue
(
"kosar"
,
tmpCostCenterData
.
getKosar
());
tmpCostCenterData
.
setKosar
(
value
);
}
if
(
StringUtil
.
isBlank
(
tmpCostCenterData
.
getKhinr
())){
throw
new
RuntimeException
(
"层次结构范围不能为空"
);
}
if
(
StringUtil
.
isBlank
(
tmpCostCenterData
.
getPrctr
())){
throw
new
RuntimeException
(
"利润中心不能为空"
);
}
else
{
//根据名称转换成编码
String
value
=
DictUtil
.
getDictionaryDetailValue
(
"prctr"
,
tmpCostCenterData
.
getPrctr
());
tmpCostCenterData
.
setPrctr
(
value
);
}
if
(
tmpCostCenterData
.
getDatab
()
==
null
){
throw
new
RuntimeException
(
"有效截至日不能为空"
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/costCenter/controller/CostCenterController.java
View file @
16281b6c
...
...
@@ -80,6 +80,7 @@ public class CostCenterController extends CommonController {
costCenter
.
setIsDelete
(
0
);
costCenter
.
setDatbi
(
DateUtil
.
getYearFirstDay
(
new
Date
()));
costCenter
.
setDatab
(
DateUtil
.
getDate
(
9999
,
12
,
31
));
costCenter
.
setIsCostCenterHis
(
"0"
);
return
forward
(
"sapCostCenterDetail"
,
costCenter
);
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/application/impl/SuppliersDataApplicationImpl.java
View file @
16281b6c
...
...
@@ -383,7 +383,7 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
SapResult
sapResult
=
sapResultList
.
get
(
0
);
resultMap
.
put
(
"sequence"
,
resultMap
.
get
(
"row"
));
if
(
"S"
.
equals
(
sapResult
.
getTYPE
())&&
"0"
.
equals
(
suppliersInfo
.
getApplyType
()))
{
suppliersInfo
.
setPartner
(
sapResult
.
getMESSAGE_V1
());
suppliersInfo
.
setPartner
(
sapResult
.
getMESSAGE_V1
()
.
substring
(
4
)
);
resultMap
.
put
(
"type"
,
sapResult
.
getTYPE
());
resultMap
.
put
(
"MESSAGE"
,
sapResult
.
getMESSAGE
());
suppliersInfoRepository
.
save
(
suppliersInfo
);
...
...
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