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
339a0997
Commit
339a0997
authored
Jan 17, 2024
by
wanghang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
费用报销 流程改
parent
d3c18fc6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
44 deletions
+66
-44
costReimbursement.js
...app/biz/topsun/sap/costReimbursement/costReimbursement.js
+18
-15
costReimbursement.jsp
...pp/biz/topsun/sap/costReimbursement/costReimbursement.jsp
+8
-6
SapCostReimbursementApplication.java
...ursement/application/SapCostReimbursementApplication.java
+1
-1
SapCostReimbursementApplicationImpl.java
...application/impl/SapCostReimbursementApplicationImpl.java
+26
-18
SapCostReimbursementController.java
...mbursement/controller/SapCostReimbursementController.java
+2
-0
SapStatsIndicatorsApplicationImpl.java
...s/application/impl/SapStatsIndicatorsApplicationImpl.java
+1
-1
MyBaseUtil.java
topsun/src/main/java/com/huigou/topsun/util/MyBaseUtil.java
+10
-3
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/costReimbursement.js
View file @
339a0997
...
...
@@ -350,18 +350,21 @@ var tableArray = [
//创建表格(参数、列、插入的节点、数据源)
function
loadGrid
(
obj
)
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
tableArray
.
forEach
((
item
)
=>
{
UICtrl
.
addGridRow
(
item
.
gridManager
,
{
zepItemno
:
getZepItemNo
()});
});
},
deleteHandler
:
function
()
{
tableArray
.
forEach
((
item
)
=>
{
item
.
gridManager
.
deleteSelectedRow
();
});
}
});
var
toolbarOptions
=
null
;
// if(obj.node=="reimbursementApplierGrid") {
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
tableArray
.
forEach
((
item
)
=>
{
UICtrl
.
addGridRow
(
item
.
gridManager
,
{
zepItemno
:
getZepItemNo
()});
});
},
deleteHandler
:
function
()
{
tableArray
.
forEach
((
item
)
=>
{
item
.
gridManager
.
deleteSelectedRow
();
});
}
});
// }
obj
.
gridManager
=
UICtrl
.
grid
(
"#"
+
obj
.
node
,
{
columns
:
obj
.
columns
,
dataAction
:
"local"
,
...
...
@@ -371,8 +374,8 @@ function loadGrid(obj) {
toolbar
:
toolbarOptions
,
usePager
:
false
,
enabledEdit
:
true
,
width
:
"100%"
,
height
:
300
,
//
width: "100%",
//
height: 300,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
...
...
@@ -497,7 +500,7 @@ function getZepItemNo(){
if
(
result
.
length
>
0
){
//获取上一个节点的子序值
let
wornNo
=
parseInt
(
result
[
result
.
length
-
1
][
"zepItemno"
],
10
);
zepItemNo
=
(
"00"
+
(
wornNo
+
1
)).
slice
(
-
4
);
zepItemNo
=
(
"00"
+
(
wornNo
+
1
)).
slice
(
-
3
);
}
return
zepItemNo
;
}
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/costReimbursement.jsp
View file @
339a0997
...
...
@@ -25,21 +25,20 @@
<x:hidden
name=
"personMemberName"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"
kokrs
"
required=
"false"
label=
"EP流程单号"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"2"
/>
<x:inputC
name=
"
usnam"
required=
"fals
e"
label=
"付款申请创建日期"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"
zepNo
"
required=
"false"
label=
"EP流程单号"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"2"
/>
<x:inputC
name=
"
zepFcrdate"
required=
"false"
wrapper=
"dat
e"
label=
"付款申请创建日期"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFtype"
required=
"false"
label=
"EP付款申请类别"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"2"
wrapper=
"date"
/>
/>
<x:inputC
name=
"zepFtypename"
required=
"false"
label=
"EP付款申请类别名称"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"2"
wrapper=
"date"
/>
fieldCol=
"2"
/>
<x:inputC
name=
"bukrs"
required=
"false"
label=
"公司代码"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"butxt"
required=
"false"
label=
"公司代码名称"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepDepart"
required=
"false"
label=
"EP部门代码"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepDepartname"
required=
"false"
label=
"EP部门名称"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepAppli"
required=
"false"
label=
"EP流程申请人代码"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepAppliname"
required=
"false"
label=
"EP流程申请人"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFcrdate"
required=
"false"
label=
"付款申请创建日期"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFcrdate"
wrapper=
"date"
required=
"false"
label=
"付款申请创建日期"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepNo"
required=
"false"
label=
"EP流程单号"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepTxt"
required=
"false"
label=
"付款申请内容"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFtamount"
required=
"false"
label=
"申请总金额(本位币)"
labelCol=
"2"
fieldCol=
"2"
/>
...
...
@@ -54,14 +53,17 @@
</div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"报销人填写"
name=
"group"
/>
<div
id=
"reimbursementApplierGrid"
style=
"margin: 2px;"
>
</div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"财务审核填写"
name=
"group"
/>
<div
id=
"financialAuditGrid"
style=
"margin: 2px;"
>
</div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"资金岗填写"
name=
"group"
/>
<div
id=
"capitalPostGrid"
style=
"margin: 2px;"
>
</div>
</div>
...
...
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/application/SapCostReimbursementApplication.java
View file @
339a0997
...
...
@@ -23,5 +23,5 @@ public interface SapCostReimbursementApplication {
void
deleteSapCostReimbursementById
(
String
id
);
void
deleteSapCostReimbursementByIds
(
List
<
String
>
ids
);
//
void sendSapDate(String bizId);
void
sendSapDate
(
String
bizId
);
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/application/impl/SapCostReimbursementApplicationImpl.java
View file @
339a0997
...
...
@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Propagation;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -99,8 +100,7 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
sapCostReimbursement
.
setStatusId
(
status
.
getId
());
costReimbursementRepository
.
save
(
sapCostReimbursement
);
//审核完成、远程调用sap接口
// sendSapDate(bizId);
sendSapDate
(
bizId
);
}
@Override
...
...
@@ -155,26 +155,34 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
}
// /**
// * 远程调用sap接口,传递数据
// *
// * @param bizId
// */
// public void sendSapDate(String bizId) {
// SapStatsIndicators sapStatsIndicators = sapStatsIndicatorsRepository.findOne(bizId);
// if (sapStatsIndicators.getStatusId() == BizBillStatus.APPLYING.getId()) {
// throw new RuntimeException("本数据未经审批完成!");
// }
// List<SapStatsIndicatorsDetail> all = sapStatsIndicatorsDetailRepository.findAllByStatsIndicatorsId(bizId);
// List<Map<String, Object>> list = new ArrayList<>();
// ObjectMapper objectMapper = new ObjectMapper();
// Map<String, Object> map = MyBaseUtil.convertToMap(sapStatsIndicators);
// //封装参数
/**
* 远程调用sap接口,传递数据
*
* @param bizId
*/
public
void
sendSapDate
(
String
bizId
)
{
SapCostReimbursement
sapCostReimbursement
=
costReimbursementRepository
.
findOne
(
bizId
);
if
(
sapCostReimbursement
.
getStatusId
()
==
BizBillStatus
.
APPLYING
.
getId
())
{
throw
new
RuntimeException
(
"本数据未经审批完成!"
);
}
List
<
SapCostReimbursementDetail
>
all
=
costReimbursementDetailRepository
.
findAllByReimbursementBaseInfoId
(
bizId
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
Map
<
String
,
Object
>
map
=
MyBaseUtil
.
convertToMap
(
sapCostReimbursement
,
true
);
//封装参数
// for (SapStatsIndicatorsDetail sapStatsIndicatorsDetail : all) {
// Map<String, Object> detailMap = objectMapper.convertValue(sapStatsIndicatorsDetail, Map.class);
// map.put("ITEM", detailMap);
// list.add(map);
// }
// String url = "cud_kb31n/kb31n";
// SapStatsIndicatorsResult sapStatsIndicatorsResult = null;
// try {
...
...
@@ -199,6 +207,6 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
// sapStatsIndicatorsResult.setStatsIndicatorsId(bizId);
// sapStatsIndicatorsResultRepository.save(sapStatsIndicatorsResult);
// }
//
}
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/controller/SapCostReimbursementController.java
View file @
339a0997
...
...
@@ -47,10 +47,12 @@ public class SapCostReimbursementController extends CommonController {
//定义流程
this
.
putAttribute
(
"processDefinitionKey"
,
SapCostReimbursementApplication
.
PROCESS_DEFINITION_KEY
);
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
//定义流程环节的id
SapCostReimbursement
sapCostReimbursement
=
new
SapCostReimbursement
();
sapCostReimbursement
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
Operator
operator
=
getOperator
();
//获取当前操作员的详情信息
sapCostReimbursement
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
sapCostReimbursement
.
setZepNo
(
sapCostReimbursement
.
getBillCode
());
return
forward
(
"costReimbursement"
,
sapCostReimbursement
);
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/statsIndicators/application/impl/SapStatsIndicatorsApplicationImpl.java
View file @
339a0997
...
...
@@ -186,7 +186,7 @@ public class SapStatsIndicatorsApplicationImpl extends FlowBroker implements Sap
List
<
SapStatsIndicatorsDetail
>
all
=
sapStatsIndicatorsDetailRepository
.
findAllByStatsIndicatorsId
(
bizId
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
Map
<
String
,
Object
>
map
=
MyBaseUtil
.
convertToMap
(
sapStatsIndicators
);
Map
<
String
,
Object
>
map
=
MyBaseUtil
.
convertToMap
(
sapStatsIndicators
,
false
);
//封装参数
for
(
SapStatsIndicatorsDetail
sapStatsIndicatorsDetail
:
all
)
{
Map
<
String
,
Object
>
detailMap
=
objectMapper
.
convertValue
(
sapStatsIndicatorsDetail
,
Map
.
class
);
...
...
topsun/src/main/java/com/huigou/topsun/util/MyBaseUtil.java
View file @
339a0997
...
...
@@ -6,6 +6,7 @@ import com.huigou.topsun.proofing.domain.workInstruction.model.WorkInstructionMa
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.FatalBeanException
;
import
javax.persistence.Column
;
import
java.beans.Introspector
;
import
java.beans.PropertyDescriptor
;
import
java.lang.reflect.Method
;
...
...
@@ -127,10 +128,11 @@ public class MyBaseUtil {
/**
* 将一个对象转换为Map同时忽略它的基类
*
* @param object 要转换的对象
* @param object 要转换的对象
* @param useAnnoKey 是否使用注解的值作为Map的key
* @return 包含对象所有字段名和值的Map
*/
public
static
Map
<
String
,
Object
>
convertToMap
(
Object
object
)
{
public
static
Map
<
String
,
Object
>
convertToMap
(
Object
object
,
boolean
useAnnoKey
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Class
<?>
clazz
=
object
.
getClass
();
Arrays
.
stream
(
clazz
.
getDeclaredFields
())
...
...
@@ -139,6 +141,10 @@ public class MyBaseUtil {
try
{
String
fieldName
=
field
.
getName
();
Object
fieldValue
=
field
.
get
(
object
);
if
(
useAnnoKey
&&
field
.
isAnnotationPresent
(
Column
.
class
))
{
Column
column
=
field
.
getAnnotation
(
Column
.
class
);
fieldName
=
column
.
name
();
}
map
.
put
(
fieldName
,
fieldValue
);
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
...
...
@@ -177,9 +183,10 @@ public class MyBaseUtil {
MyBaseUtil
.
processNonNullProperties
(
workInstructionBaseInfo
,
map
);
Map
<
String
,
Object
>
map1
=
MyBaseUtil
.
convertToMap
(
workInstructionBaseInfo
);
Map
<
String
,
Object
>
map1
=
MyBaseUtil
.
convertToMap
(
workInstructionBaseInfo
,
true
);
System
.
out
.
println
(
map
);
System
.
out
.
println
(
map1
);
}
}
...
...
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