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
36e36d7a
Commit
36e36d7a
authored
Mar 01, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购信息记录维护接口
parent
b25b7223
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1580 additions
and
0 deletions
+1580
-0
purchaseInfoRecordDetail.js
...topsun/sap/purchaseInfoRecord/purchaseInfoRecordDetail.js
+235
-0
purchaseInfoRecordDetail.jsp
...opsun/sap/purchaseInfoRecord/purchaseInfoRecordDetail.jsp
+35
-0
purchaseInfoRecordList.js
...z/topsun/sap/purchaseInfoRecord/purchaseInfoRecordList.js
+255
-0
purchaseInfoRecordList.jsp
.../topsun/sap/purchaseInfoRecord/purchaseInfoRecordList.jsp
+30
-0
SapPurchaseInfoRecordApplication.java
...oRecord/application/SapPurchaseInfoRecordApplication.java
+21
-0
SapPurchaseInfoRecordItemApplication.java
...ord/application/SapPurchaseInfoRecordItemApplication.java
+25
-0
SapPurchaseInfoRecordApplicationImpl.java
...pplication/impl/SapPurchaseInfoRecordApplicationImpl.java
+152
-0
SapPurchaseInfoRecordItemApplicationImpl.java
...cation/impl/SapPurchaseInfoRecordItemApplicationImpl.java
+62
-0
SapPurchaseInfoRecordController.java
...nfoRecord/controller/SapPurchaseInfoRecordController.java
+65
-0
SapPurchaseInfoRecordItemController.java
...ecord/controller/SapPurchaseInfoRecordItemController.java
+38
-0
SapPurchaseInfoRecord.java
.../sap/purchaseInfoRecord/domain/SapPurchaseInfoRecord.java
+22
-0
SapPurchaseInfoRecordItem.java
.../purchaseInfoRecord/domain/SapPurchaseInfoRecordItem.java
+251
-0
SapResult.java
...uigou/topsun/sap/purchaseInfoRecord/domain/SapResult.java
+25
-0
SapPurchaseInfoRecordQueryRequest.java
...ecord/domain/query/SapPurchaseInfoRecordQueryRequest.java
+15
-0
SapPurchaseInfoRecordItemVo.java
...haseInfoRecord/domain/vo/SapPurchaseInfoRecordItemVo.java
+182
-0
SapPurchaseInfoRecordItemRepository.java
...ecord/repository/SapPurchaseInfoRecordItemRepository.java
+16
-0
SapPurchaseInfoRecordRepository.java
...nfoRecord/repository/SapPurchaseInfoRecordRepository.java
+12
-0
sapPurchaseInfoRecordProc.bpmn
...sun/sap/purchaseInfoRecord/sapPurchaseInfoRecordProc.bpmn
+111
-0
sapPurchaseInfoRecord.xml
...opsun/sap/sapPurchaseInfoRecord/sapPurchaseInfoRecord.xml
+18
-0
sapPurchaseInfoRecordItem.xml
...n/sap/sapPurchaseInfoRecord/sapPurchaseInfoRecordItem.xml
+10
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordDetail.js
0 → 100644
View file @
36e36d7a
var
itemGridManager
=
null
,
fillinDate
=
""
;
$
(
function
()
{
initItemGrid
();
bindEvent
();
});
function
bindEvent
()
{
fillinDate
=
$
(
"#fillinDate"
).
val
();
}
function
initItemGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
(){
UICtrl
.
addGridRow
(
itemGridManager
);
},
deleteHandler
:
function
(){
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapPurchaseInfoRecordItem/deleteSapPurchaseInfoRecordItem.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
},
});
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
getGridColumns
(),
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/sapPurchaseInfoRecordItem/querySapPurchaseInfoRecordItems.ajax'
,
parms
:{
sapPurchaseInfoRecordId
:
getId
()},
height
:
'99.6%'
,
heightDiff
:
-
4
,
sortName
:
'id'
,
sortOrder
:
'asc'
,
checkbox
:
true
,
usePager
:
true
,
rownumbers
:
true
,
enabledEdit
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
//autoApplyNextEditor:false,
toolbar
:
toolbarOptions
,
}
);
UICtrl
.
setSearchAreaToggle
(
itemGridManager
);
}
function
getGridColumns
()
{
var
columns
=
[];
columns
=
[
{
display
:
"语言"
,
name
:
"zyy"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"采购信息记录号"
,
name
:
"infnr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"采购组织"
,
name
:
"ekorg"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"供应商"
,
name
:
"lifnr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"名称1"
,
name
:
"name1"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"物料编码"
,
name
:
"matnr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"物料描述"
,
name
:
"maktx"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"物料组"
,
name
:
"matkl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"采购信息记录分类"
,
name
:
"esokz"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"采购组"
,
name
:
"ekgrp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"工厂"
,
name
:
"werks"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"生产版本"
,
name
:
"verid"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"净价"
,
name
:
"netpr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"货币码"
,
name
:
"waers"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"价格单位"
,
name
:
"peinh"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"订单价格单位(采购)"
,
name
:
"bprme"
,
width
:
"90"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
false
},
},
{
display
:
"销售/购买税代码"
,
name
:
"mwskz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
,
required
:
false
,}
},
{
display
:
"开始生效日期"
,
name
:
"datab"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'date'
},
},
{
display
:
"有效期至日期"
,
name
:
"datbi"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'date'
},
},
{
display
:
"等级数量"
,
name
:
"kstbm"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"销售员"
,
name
:
"verkf"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"电话"
,
name
:
"telf1"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"基本计量单位"
,
name
:
"meins"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"订单单位到基本单位转换的分母"
,
name
:
"umren"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"基本计量单位转换分子"
,
name
:
"umrez"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"原产地国"
,
name
:
"urzla"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"地区"
,
name
:
"regio"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"删除标志"
,
name
:
"loekz"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"排序字段"
,
name
:
"sortl"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"标准采购订单数量"
,
name
:
"norbm"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"最小采购订单数量"
,
name
:
"minbm"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"等级类型"
,
name
:
"stfkz"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
},
},
{
display
:
"计划交货时间"
,
name
:
"aplfz"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.99'
}
},
{
display
:
"业务标识"
,
name
:
"zflag"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
'基于收货的发票验证'
,
name
:
"webre"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"条件类型"
,
name
:
"kschl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},
{
display
:
"价格有效至"
,
name
:
"prdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'date'
,
required
:
false
}
},
{
display
:
"订单价格单位转换为订单单位的分母"
,
name
:
"bpumn"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"订单价格单位转换为订单单位的分子"
,
name
:
"bpumz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"条件等级计量单位"
,
name
:
"konms"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"价格"
,
name
:
"kbetr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"传输日期"
,
name
:
"sendTime"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'date'
}
}
]
return
columns
;
}
//获取数据保存的参数
function
getExtendedData
(
processAction
)
{
//回退、打回、转交时,不需要验证必填项是否已经填写;
if
(
processAction
==
ProcessAction
.
BACK
||
processAction
==
ProcessAction
.
REPLENISH
||
processAction
==
ProcessAction
.
TRANSMIT
)
{
//不验证
$
(
'#submitForm'
).
attr
(
'check'
,
false
);
}
var
extendedData
=
{};
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
if
(
_grid
)
{
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
true
});
if
(
!
datas
)
{
return
false
;
}
extendedData
.
sapPurchaseInfoRecordItems
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
}
function
getId
()
{
return
$
(
'#id'
).
val
();
}
function
setId
(
value
)
{
$
(
"#id"
).
val
(
value
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
_grid
.
options
.
parms
.
sapPurchaseInfoRecordId
=
value
;
}
function
reloadGrid
()
{
itemGridManager
.
loadData
();
}
function
getGridData
(){
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
true
});
return
datas
;
}
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordDetail.jsp
0 → 100644
View file @
36e36d7a
<%--采购申请--%>
<%@ page
contentType=
"text/html; charset=utf-8"
language=
"java"
%>
<%@ taglib
uri=
"/WEB-INF/taglib.tld"
prefix=
"x"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<html>
<head>
<x:base
include=
"layout,dialog,grid,tree,dateTime,combox,attachment,commonTree,comboDialog"
/>
<x:script
src=
"/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordDetail.js"
/>
</head>
<body>
<div
class=
"container-fluid"
>
<x:billTitle
title=
"采购信息记录维护申请"
needStatus=
"true"
needPerson=
"true"
/>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"id"
/>
<x:hidden
name=
"version"
/>
<x:hidden
name=
"billCode"
/>
<x:hidden
name=
"fillinDate"
/>
<x:hidden
name=
"fullId"
/>
<x:hidden
name=
"organId"
/>
<x:hidden
name=
"organName"
/>
<x:hidden
name=
"deptId"
/>
<x:hidden
name=
"deptName"
/>
<x:hidden
name=
"positionId"
/>
<x:hidden
name=
"positionName"
/>
<x:hidden
name=
"personMemberId"
/>
<x:hidden
name=
"personMemberName"
/>
<x:hidden
name=
"statusId"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
</div>
</div>
<div
id=
"maingrid"
></div>
</form>
</div>
</body>
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordList.js
0 → 100644
View file @
36e36d7a
This diff is collapsed.
Click to expand it.
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordList.jsp
0 → 100644
View file @
36e36d7a
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
%>
<%@taglib
uri=
"/WEB-INF/taglib.tld"
prefix=
"x"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<html>
<head>
<x:base
include=
"layout,dialog,grid,tree,dateTime,combox,attachment,commonTree,comboDialog"
/>
<script
src=
'
<c:url
value=
"/lib/jquery/jquery.comboDialog.js"
/>
'
type=
"text/javascript"
></script>
<script
src=
'
<c:url
value=
"/lib/jquery/jquery.commonTree.js"
/>
'
type=
"text/javascript"
></script>
<script
src=
'
<c:url
value=
"/lib/jquery/jquery.flexField.js"
/>
'
type=
"text/javascript"
></script>
<script
src=
'
<c:url
value=
"/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordList.js"
/>
'
type=
"text/javascript"
></script>
</head>
<body>
<div
class=
"container-fluid"
>
<div
id=
"layout"
>
<div
position=
"center"
title=
""
>
<x:title
title=
"搜索"
hideTable=
"queryMainForm"
/>
<form
class=
"hg-form ui-show"
method=
"post"
action=
""
id=
"queryMainForm"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"billCode"
label=
"采购信息记录编号"
labelCol=
"1"
/>
</div>
<x:searchButtons/>
</form>
<x:title
title=
"采购记录维护明细"
hideTable=
"#purchaseInfoRecordGrid"
name=
"list"
/>
<div
id=
"purchaseInfoRecordGrid"
style=
"margin:2px;"
></div>
</div>
</div>
</div>
</body>
</html>
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/application/SapPurchaseInfoRecordApplication.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
application
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecord
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.query.SapPurchaseInfoRecordQueryRequest
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:39
* @Description:
*/
public
interface
SapPurchaseInfoRecordApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/sapPurchaseInfoRecord/sapPurchaseInfoRecord.xml"
;
String
PROCESS_DEFINITION_KEY
=
"sapPurchaseInfoRecordProc"
;
Map
<
String
,
Object
>
slicedSapPurchaseInfoRecordList
(
SapPurchaseInfoRecordQueryRequest
queryRequest
);
SapPurchaseInfoRecord
loadSapPurchaseInfoRecord
(
String
id
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/application/SapPurchaseInfoRecordItemApplication.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
application
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecordItem
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.query.SapPurchaseInfoRecordQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:40
* @Description:
*/
public
interface
SapPurchaseInfoRecordItemApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/sapPurchaseInfoRecord/sapPurchaseInfoRecordItem.xml"
;
void
saveSapPurchaseInfoRecordItem
(
String
sapPurchaseInfoRecordId
,
List
<
SapPurchaseInfoRecordItem
>
sapPurchaseInfoRecordItems
);
Map
<
String
,
Object
>
querySapPurchaseInfoRecordItem
(
SapPurchaseInfoRecordQueryRequest
queryRequest
);
void
deleteByIds
(
List
<
String
>
ids
);
List
<
SapPurchaseInfoRecordItem
>
findBySapPurchaseInfoRecordId
(
String
sapPurchaseInfoRecordId
);
void
save
(
SapPurchaseInfoRecordItem
sapPurchaseInfoRecordItem
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/application/impl/SapPurchaseInfoRecordApplicationImpl.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
application
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.huigou.cache.SystemCache
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.common.HttpClient
;
import
com.huigou.topsun.sap.purchaseInfoRecord.application.SapPurchaseInfoRecordApplication
;
import
com.huigou.topsun.sap.purchaseInfoRecord.application.SapPurchaseInfoRecordItemApplication
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecord
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecordItem
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapResult
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.query.SapPurchaseInfoRecordQueryRequest
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.vo.SapPurchaseInfoRecordItemVo
;
import
com.huigou.topsun.sap.purchaseInfoRecord.repository.SapPurchaseInfoRecordRepository
;
import
com.huigou.topsun.sap.statsIndicators.domain.SapStatsIndicatorsResult
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.util.ClassHelper
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:40
* @Description:
*/
@Service
(
"sapPurchaseInfoRecordApplication"
)
public
class
SapPurchaseInfoRecordApplicationImpl
extends
FlowBroker
implements
SapPurchaseInfoRecordApplication
{
@Autowired
private
SapPurchaseInfoRecordRepository
sapPurchaseInfoRecordRepository
;
@Autowired
private
SapPurchaseInfoRecordItemApplication
sapPurchaseInfoRecordItemApplication
;
@Resource
private
HttpClient
httpClient
;
@Override
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
SapPurchaseInfoRecord
sapPurchaseInfoRecord
=
getBizEntity
(
SapPurchaseInfoRecord
.
class
);
if
(
sapPurchaseInfoRecord
.
isNew
())
{
sapPurchaseInfoRecord
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
}
else
{
sapPurchaseInfoRecord
=
(
SapPurchaseInfoRecord
)
commonDomainService
.
loadAndFillinProperties
(
sapPurchaseInfoRecord
);
}
sapPurchaseInfoRecord
=
sapPurchaseInfoRecordRepository
.
save
(
sapPurchaseInfoRecord
);
List
<
SapPurchaseInfoRecordItem
>
sapPurchaseInfoRecordItems
=
getBizEntities
(
SapPurchaseInfoRecordItem
.
class
,
"sapPurchaseInfoRecordItems"
);
sapPurchaseInfoRecordItemApplication
.
saveSapPurchaseInfoRecordItem
(
sapPurchaseInfoRecord
.
getId
(),
sapPurchaseInfoRecordItems
);
return
sapPurchaseInfoRecord
.
getId
();
}
@Override
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
// 返回业务数据给流程实例,
return
ClassHelper
.
toMap
(
sapPurchaseInfoRecordRepository
.
getOne
(
bizId
));
}
@Override
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
super
.
onEnd
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
SapPurchaseInfoRecord
sapPurchaseInfoRecord
=
sapPurchaseInfoRecordRepository
.
findOne
(
bizId
);
sapPurchaseInfoRecord
.
setStatusId
(
status
.
getId
());
sapPurchaseInfoRecordRepository
.
save
(
sapPurchaseInfoRecord
);
this
.
getSapPurchaseInfoRecordItemVo
(
bizId
);
}
public
void
getSapPurchaseInfoRecordItemVo
(
String
bizId
){
List
<
SapPurchaseInfoRecordItem
>
purchaseInfoRecordItemList
=
sapPurchaseInfoRecordItemApplication
.
findBySapPurchaseInfoRecordId
(
bizId
);
purchaseInfoRecordItemList
.
forEach
(
sapPurchaseInfoRecordItem
->
{
SapPurchaseInfoRecordItemVo
sapPurchaseInfoRecordItemVo
=
new
SapPurchaseInfoRecordItemVo
();
BeanUtil
.
copyProperties
(
sapPurchaseInfoRecordItem
,
sapPurchaseInfoRecordItemVo
);
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
if
(
sapPurchaseInfoRecordItem
.
getDatab
()
!=
null
){
String
datab
=
dateFormat
.
format
(
sapPurchaseInfoRecordItem
.
getDatab
());
sapPurchaseInfoRecordItemVo
.
setDatab
(
datab
);
}
if
(
sapPurchaseInfoRecordItem
.
getDatbi
()
!=
null
){
String
datbi
=
dateFormat
.
format
(
sapPurchaseInfoRecordItem
.
getDatbi
());
sapPurchaseInfoRecordItemVo
.
setDatbi
(
datbi
);
}
try
{
String
url
=
SystemCache
.
getParameter
(
"sap.PurchaseInfoRecord.url"
,
String
.
class
);
String
execute
=
httpClient
.
execute
(
sapPurchaseInfoRecordItemVo
,
url
);
List
<
SapResult
>
resultList
=
JSONObject
.
parseArray
(
execute
,
SapResult
.
class
);
SapResult
sapResult
=
resultList
.
get
(
0
);
if
(!
"S"
.
equals
(
sapResult
.
getTYPE
())){
throw
new
RuntimeException
(
"数据传输失败,"
+
sapResult
.
getMESSAGE
());
}
sapPurchaseInfoRecordItem
.
setTYPE
(
sapResult
.
getTYPE
());
sapPurchaseInfoRecordItem
.
setMESSAGE
(
sapResult
.
getMESSAGE
());
sapPurchaseInfoRecordItemApplication
.
save
(
sapPurchaseInfoRecordItem
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
});
}
@Override
protected
void
onAbortProcessInstance
(
DelegateExecution
delegateExecution
)
{
super
.
onAbortProcessInstance
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
SapPurchaseInfoRecord
sapPurchaseInfoRecord
=
sapPurchaseInfoRecordRepository
.
findOne
(
bizId
);
sapPurchaseInfoRecord
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
sapPurchaseInfoRecordRepository
.
save
(
sapPurchaseInfoRecord
);
}
/**
* @param delegateTask
* @param destActivityId 回退到的目标节点id
*/
@Override
protected
void
onBack
(
DelegateTask
delegateTask
,
String
destActivityId
)
{
super
.
onBack
(
delegateTask
,
destActivityId
);
if
(
"Apply"
.
equalsIgnoreCase
(
destActivityId
))
{
String
bizId
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
SapPurchaseInfoRecord
sapPurchaseInfoRecord
=
sapPurchaseInfoRecordRepository
.
findOne
(
bizId
);
sapPurchaseInfoRecord
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
sapPurchaseInfoRecordRepository
.
save
(
sapPurchaseInfoRecord
);
}
}
@Override
public
Map
<
String
,
Object
>
slicedSapPurchaseInfoRecordList
(
SapPurchaseInfoRecordQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"sapPurchaseInfoRecordList"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
queryModel
.
putDictionary
(
"status"
,
BizBillStatus
.
getMap
());
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
@Override
public
SapPurchaseInfoRecord
loadSapPurchaseInfoRecord
(
String
id
)
{
return
sapPurchaseInfoRecordRepository
.
findOne
(
id
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/application/impl/SapPurchaseInfoRecordItemApplicationImpl.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.purchaseInfoRecord.application.SapPurchaseInfoRecordItemApplication
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecordItem
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.query.SapPurchaseInfoRecordQueryRequest
;
import
com.huigou.topsun.sap.purchaseInfoRecord.repository.SapPurchaseInfoRecordItemRepository
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
com.huigou.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:40
* @Description:
*/
@Service
(
"sapPurchaseInfoRecordItemApplication"
)
public
class
SapPurchaseInfoRecordItemApplicationImpl
extends
BaseApplication
implements
SapPurchaseInfoRecordItemApplication
{
@Autowired
private
SapPurchaseInfoRecordItemRepository
sapPurchaseInfoRecordItemRepository
;
@Override
public
void
saveSapPurchaseInfoRecordItem
(
String
sapPurchaseInfoRecordId
,
List
<
SapPurchaseInfoRecordItem
>
sapPurchaseInfoRecordItems
)
{
sapPurchaseInfoRecordItems
.
forEach
(
sapPurchaseInfoRecordItem
->
{
sapPurchaseInfoRecordItem
.
setSapPurchaseInfoRecordId
(
sapPurchaseInfoRecordId
);
sapPurchaseInfoRecordItemRepository
.
save
(
sapPurchaseInfoRecordItem
);
});
}
@Override
public
Map
<
String
,
Object
>
querySapPurchaseInfoRecordItem
(
SapPurchaseInfoRecordQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getSapPurchaseInfoRecordId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"sapPurchaseInfoRecordItems"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
@Override
public
void
deleteByIds
(
List
<
String
>
ids
)
{
ids
.
forEach
(
id
->{
sapPurchaseInfoRecordItemRepository
.
delete
(
id
);
});
}
@Override
public
List
<
SapPurchaseInfoRecordItem
>
findBySapPurchaseInfoRecordId
(
String
sapPurchaseInfoRecordId
)
{
return
sapPurchaseInfoRecordItemRepository
.
findBySapPurchaseInfoRecordId
(
sapPurchaseInfoRecordId
);
}
@Override
public
void
save
(
SapPurchaseInfoRecordItem
sapPurchaseInfoRecordItem
)
{
sapPurchaseInfoRecordItemRepository
.
save
(
sapPurchaseInfoRecordItem
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/controller/SapPurchaseInfoRecordController.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
controller
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.sap.purchaseInfoRecord.application.SapPurchaseInfoRecordApplication
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecord
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.query.SapPurchaseInfoRecordQueryRequest
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
org.springframework.stereotype.Controller
;
import
javax.annotation.Resource
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:40
* @Description:
*/
@Controller
@ControllerMapping
(
"/sapPurchaseInfoRecord"
)
public
class
SapPurchaseInfoRecordController
extends
CommonController
{
@Override
protected
String
getPagePath
()
{
return
"/biz/topsun/sap/purchaseInfoRecord/"
;
}
@Resource
private
SapPurchaseInfoRecordApplication
sapPurchaseInfoRecordApplication
;
public
String
forwardSapPurchaseInfoRecordList
(){
return
forward
(
"purchaseInfoRecordList"
);
}
public
String
slicedSapPurchaseInfoRecordList
(){
SDO
sdo
=
this
.
getSDO
();
SapPurchaseInfoRecordQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
SapPurchaseInfoRecordQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
sapPurchaseInfoRecordApplication
.
slicedSapPurchaseInfoRecordList
(
queryRequest
);
return
toResult
(
map
);
}
public
String
forwardSapPurchaseInfoRecordDetail
(){
this
.
putAttribute
(
"processDefinitionKey"
,
SapPurchaseInfoRecordApplication
.
PROCESS_DEFINITION_KEY
);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
SapPurchaseInfoRecord
sapPurchaseInfoRecord
=
new
SapPurchaseInfoRecord
();
sapPurchaseInfoRecord
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
Operator
operator
=
getOperator
();
sapPurchaseInfoRecord
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
return
forward
(
"purchaseInfoRecordDetail"
,
sapPurchaseInfoRecord
);
}
public
String
showSapPurchaseInfoRecordDetail
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
SapPurchaseInfoRecord
sapPurchaseInfoRecord
=
sapPurchaseInfoRecordApplication
.
loadSapPurchaseInfoRecord
(
id
);
return
forward
(
"purchaseInfoRecordDetail"
,
sapPurchaseInfoRecord
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/controller/SapPurchaseInfoRecordItemController.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
controller
;
import
com.huigou.topsun.sap.purchaseInfoRecord.application.SapPurchaseInfoRecordItemApplication
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.query.SapPurchaseInfoRecordQueryRequest
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
org.springframework.stereotype.Controller
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:40
* @Description:
*/
@Controller
@ControllerMapping
(
"/sapPurchaseInfoRecordItem"
)
public
class
SapPurchaseInfoRecordItemController
extends
CommonController
{
@Resource
private
SapPurchaseInfoRecordItemApplication
sapPurchaseInfoRecordItemApplication
;
public
String
querySapPurchaseInfoRecordItems
(){
SDO
sdo
=
this
.
getSDO
();
SapPurchaseInfoRecordQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
SapPurchaseInfoRecordQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
sapPurchaseInfoRecordItemApplication
.
querySapPurchaseInfoRecordItem
(
queryRequest
);
return
toResult
(
map
);
}
public
String
deleteSapPurchaseInfoRecordItem
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
sapPurchaseInfoRecordItemApplication
.
deleteByIds
(
ids
);
return
success
();
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/domain/SapPurchaseInfoRecord.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
domain
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:35
* @Description:
*/
@Table
(
name
=
"sap_purchase_info_record"
)
@Entity
@Data
public
class
SapPurchaseInfoRecord
extends
FlowBillAbstractEntity
{
@Override
protected
String
getCodeRuleId
()
{
return
"purchaseInfoRecord"
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/domain/SapPurchaseInfoRecordItem.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
domain
;
import
com.huigou.data.domain.model.AbstractEntity
;
import
lombok.Data
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:35
* @Description:
*/
@Table
(
name
=
"sap_purchase_info_record_item"
)
@Entity
@Data
public
class
SapPurchaseInfoRecordItem
extends
AbstractEntity
{
/**
* 采购信息记录id
*/
@Column
(
name
=
"sap_purchase_info_record_id"
)
private
String
sapPurchaseInfoRecordId
;
/**
* 采购信息记录号
*/
@Column
(
name
=
"INFNR"
)
private
String
infnr
;
/**
* 采购组织
*/
@Column
(
name
=
"EKORG"
)
private
String
ekorg
;
/**
* 供应商
*/
@Column
(
name
=
"LIFNR"
)
private
String
lifnr
;
/**
* 名称 1
*/
@Column
(
name
=
"NAME1"
)
private
String
name1
;
/**
* 物料编码
*/
@Column
(
name
=
"MATNR"
)
private
String
matnr
;
/**
* 物料描述
*/
@Column
(
name
=
"MAKTX"
)
private
String
maktx
;
/**
* 物料组
*/
@Column
(
name
=
"MATKL"
)
private
String
matkl
;
/**
* 采购信息记录分类
*/
@Column
(
name
=
"ESOKZ"
)
private
String
esokz
;
/**
* 采购组
*/
@Column
(
name
=
"EKGRP"
)
private
String
ekgrp
;
/**
* 工厂
*/
@Column
(
name
=
"WERKS"
)
private
String
werks
;
/**
* 生产版本
*/
@Column
(
name
=
"VERID"
)
private
String
verid
;
/**
* 净价
*/
@Column
(
name
=
"NETPR"
)
private
BigDecimal
netpr
;
/**
* 货币码
*/
@Column
(
name
=
"WAERS"
)
private
String
waers
;
/**
* 价格单位
*/
@Column
(
name
=
"PEINH"
)
private
String
peinh
;
/**
* 订单价格单位(采购)
*/
@Column
(
name
=
"BPRME"
)
private
String
bprme
;
/**
* 销售/购买税代码
*/
@Column
(
name
=
"MWSKZ"
)
private
String
mwskz
;
/**
* 开始生效日期
*/
@Column
(
name
=
"DATAB"
)
private
Date
datab
;
/**
* 有效期至日期
*/
@Column
(
name
=
"DATBI"
)
private
Date
datbi
;
/**
* 等级数量
*/
@Column
(
name
=
"KSTBM"
)
private
BigDecimal
kstbm
;
/**
* 销售员
*/
@Column
(
name
=
"VERKF"
)
private
String
verkf
;
/**
* 电话
*/
@Column
(
name
=
"TELF1"
)
private
String
telf1
;
/**
* 基本计量单位
*/
@Column
(
name
=
"MEINS"
)
private
String
meins
;
/**
* 订单单位到基本单位转换的分母
*/
@Column
(
name
=
"UMREN"
)
private
BigDecimal
umren
;
/**
* 基本计量单位转换分子
*/
@Column
(
name
=
"UMREZ"
)
private
BigDecimal
umrez
;
/**
* 原产地国
*/
@Column
(
name
=
"URZLA"
)
private
String
urzla
;
/**
* 地区
*/
@Column
(
name
=
"REGIO"
)
private
String
regio
;
/**
* 删除标志
*/
@Column
(
name
=
"LOEKZ"
)
private
String
loekz
;
/**
* 排序字段
*/
@Column
(
name
=
"SORTL"
)
private
String
sortl
;
/**
* 标准采购订单数量
*/
@Column
(
name
=
"NORBM"
)
private
BigDecimal
norbm
;
/**
* 最小采购订单数量
*/
@Column
(
name
=
"MINBM"
)
private
BigDecimal
minbm
;
/**
* 等级类型
*/
@Column
(
name
=
"STFKZ"
)
private
String
stfkz
;
/**
* 计划交货时间(天)
*/
@Column
(
name
=
"APLFZ"
)
private
BigDecimal
aplfz
;
/**
* 传输日期
*/
@Column
(
name
=
"SEND_TIME"
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
private
Date
sendTime
;
/**
* 语言
*/
@Column
(
name
=
"ZYY"
)
private
String
zyy
;
/**
* 业务标识
*/
@Column
(
name
=
"ZFLAG"
)
private
String
zflag
;
/**
* 基于收货的发票验证
*/
@Column
(
name
=
"WEBRE"
)
private
String
webre
;
/**
* 条件类型
*/
@Column
(
name
=
"KSCHL"
)
private
String
kschl
;
/**
* 价格有效至
*/
@Column
(
name
=
"PRDAT"
)
private
Date
prdat
;
/**
* 订单价格单位转换为订单单位的分母
*/
@Column
(
name
=
"BPUMN"
)
private
BigDecimal
bpumn
;
/**
* 订单价格单位转换为订单单位的分子
*/
@Column
(
name
=
"BPUMZ"
)
private
BigDecimal
bpumz
;
/**
*条件等级计量单位
*/
@Column
(
name
=
"KONMS"
)
private
String
konms
;
/**
*价格
*/
@Column
(
name
=
"KBETR"
)
private
BigDecimal
kbetr
;
/**
* 消息类型
*/
@Column
(
name
=
"TYPE"
)
private
String
TYPE
;
/**
* 消息文本
*/
@Column
(
name
=
"MESSAGE"
)
private
String
MESSAGE
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/domain/SapResult.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
domain
;
import
lombok.Data
;
import
javax.persistence.*
;
import
java.io.Serializable
;
/**
*
* @TableName sap_stats_indicators_result
*/
@Data
public
class
SapResult
implements
Serializable
{
/**
* 消息类型
*/
private
String
TYPE
;
/**
* 消息文本
*/
private
String
MESSAGE
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/domain/query/SapPurchaseInfoRecordQueryRequest.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/18:08
* @Description:
*/
@Data
public
class
SapPurchaseInfoRecordQueryRequest
extends
QueryAbstractRequest
{
private
String
sapPurchaseInfoRecordId
;
private
String
billCode
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/domain/vo/SapPurchaseInfoRecordItemVo.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:35
* @Description:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
SapPurchaseInfoRecordItemVo
implements
Serializable
{
/**
* 采购信息记录号
*/
@JsonProperty
(
"INFNR"
)
private
String
infnr
;
/**
* 采购组织
*/
@JsonProperty
(
"EKORG"
)
private
String
ekorg
;
/**
* 供应商
*/
@JsonProperty
(
"LIFNR"
)
private
String
lifnr
;
/**
* 名称 1
*/
@JsonProperty
(
"NAME1"
)
private
String
name1
;
/**
* 物料编码
*/
@JsonProperty
(
"MATNR"
)
private
String
matnr
;
/**
* 物料描述
*/
@JsonProperty
(
"MAKTX"
)
private
String
maktx
;
/**
* 物料组
*/
@JsonProperty
(
"MATKL"
)
private
String
matkl
;
/**
* 采购信息记录分类
*/
@JsonProperty
(
"ESOKZ"
)
private
String
esokz
;
/**
* 采购组
*/
@JsonProperty
(
"EKGRP"
)
private
String
ekgrp
;
/**
* 工厂
*/
@JsonProperty
(
"WERKS"
)
private
String
werks
;
/**
* 生产版本
*/
@JsonProperty
(
"VERID"
)
private
String
verid
;
/**
* 净价
*/
@JsonProperty
(
"NETPR"
)
private
BigDecimal
netpr
;
/**
* 货币码
*/
@JsonProperty
(
"WAERS"
)
private
String
waers
;
/**
* 价格单位
*/
@JsonProperty
(
"PEINH"
)
private
String
peinh
;
/**
* 订单价格单位(采购)
*/
@JsonProperty
(
"BPRME"
)
private
String
bprme
;
/**
* 销售/购买税代码
*/
@JsonProperty
(
"MWSKZ"
)
private
String
mwskz
;
/**
* 开始生效日期
*/
@JsonProperty
(
"DATAB"
)
private
String
datab
;
/**
* 有效期至日期
*/
@JsonProperty
(
"DATBI"
)
private
String
datbi
;
/**
* 等级数量
*/
@JsonProperty
(
"KSTBM"
)
private
BigDecimal
kstbm
;
/**
* 销售员
*/
@JsonProperty
(
"VERKF"
)
private
String
verkf
;
/**
* 电话
*/
@JsonProperty
(
"TELF1"
)
private
String
telf1
;
/**
* 基本计量单位
*/
@JsonProperty
(
"MEINS"
)
private
String
meins
;
/**
* 订单单位到基本单位转换的分母
*/
@JsonProperty
(
"UMREN"
)
private
BigDecimal
umren
;
/**
* 基本计量单位转换分子
*/
@JsonProperty
(
"UMREZ"
)
private
BigDecimal
umrez
;
/**
* 原产地国
*/
@JsonProperty
(
"URZLA"
)
private
String
urzla
;
/**
* 地区
*/
@JsonProperty
(
"REGIO"
)
private
String
regio
;
/**
* 删除标志
*/
@JsonProperty
(
"LOEKZ"
)
private
String
loekz
;
/**
* 排序字段
*/
@JsonProperty
(
"SORTL"
)
private
String
sortl
;
/**
* 标准采购订单数量
*/
@JsonProperty
(
"NORBM"
)
private
BigDecimal
norbm
;
/**
* 最小采购订单数量
*/
@JsonProperty
(
"MINBM"
)
private
BigDecimal
minbm
;
/**
* 等级类型
*/
@JsonProperty
(
"STFKZ"
)
private
String
stfkz
;
/**
* 计划交货时间(天)
*/
@JsonProperty
(
"APLFZ"
)
private
Date
aplfz
;
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/repository/SapPurchaseInfoRecordItemRepository.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
repository
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecordItem
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:38
* @Description:
*/
public
interface
SapPurchaseInfoRecordItemRepository
extends
JpaRepository
<
SapPurchaseInfoRecordItem
,
String
>
{
List
<
SapPurchaseInfoRecordItem
>
findBySapPurchaseInfoRecordId
(
String
sapPurchaseInfoRecordId
);
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/repository/SapPurchaseInfoRecordRepository.java
0 → 100644
View file @
36e36d7a
package
com
.
huigou
.
topsun
.
sap
.
purchaseInfoRecord
.
repository
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecord
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @Auther: xin.lu
* @Date: 2024/02/28/15:37
* @Description:
*/
public
interface
SapPurchaseInfoRecordRepository
extends
JpaRepository
<
SapPurchaseInfoRecord
,
String
>
{
}
topsun/src/main/resources/config/bpm/topsun/sap/purchaseInfoRecord/sapPurchaseInfoRecordProc.bpmn
0 → 100644
View file @
36e36d7a
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti=
"http://activiti.org/bpmn"
xmlns:bpmndi=
"http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc=
"http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi=
"http://www.omg.org/spec/DD/20100524/DI"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
expressionLanguage=
"http://www.w3.org/1999/XPath"
targetNamespace=
"http://www.activiti.org/test"
>
<process
id=
"sapPurchaseInfoRecordProc"
name=
"采购信息记录维护申请"
isExecutable=
"true"
>
<extensionElements>
<activiti:executionListener
event=
"start"
delegateExpression=
"#{sapPurchaseInfoRecordApplication}"
></activiti:executionListener>
<activiti:executionListener
event=
"end"
delegateExpression=
"#{sapPurchaseInfoRecordApplication}"
></activiti:executionListener>
</extensionElements>
<startEvent
id=
"startevent1"
name=
"Start"
></startEvent>
<endEvent
id=
"endevent1"
name=
"End"
></endEvent>
<userTask
id=
"Apply"
name=
"采购信息记录维护申请"
activiti:formKey=
"sapPurchaseInfoRecord/showSapPurchaseInfoRecordDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{sapPurchaseInfoRecordApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{sapPurchaseInfoRecordApplication}"
></activiti:taskListener>
</extensionElements>
</userTask>
<userTask
id=
"Approve"
name=
"采购信息记录维护审批"
activiti:assignee=
"${assignee} "
activiti:formKey=
"sapPurchaseInfoRecord/showSapPurchaseInfoRecordDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{sapPurchaseInfoRecordApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{sapPurchaseInfoRecordApplication}"
></activiti:taskListener>
</extensionElements>
<multiInstanceLoopCharacteristics
isSequential=
"false"
activiti:collection=
"handlerList"
activiti:elementVariable=
"assignee"
>
<completionCondition>
${chiefApprovePassed}
</completionCondition>
</multiInstanceLoopCharacteristics>
</userTask>
<sequenceFlow
id=
"flow1"
sourceRef=
"startevent1"
targetRef=
"Apply"
></sequenceFlow>
<sequenceFlow
id=
"flow2"
sourceRef=
"Apply"
targetRef=
"Approve"
></sequenceFlow>
<exclusiveGateway
id=
"ApproveFinished"
name=
"审批结束"
></exclusiveGateway>
<sequenceFlow
id=
"flow3"
name=
"审批通过"
sourceRef=
"ApprovePassed"
targetRef=
"ApproveFinished"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[${approvePassed}]]>
</conditionExpression>
</sequenceFlow>
<sequenceFlow
id=
"flow4"
name=
"审批结束"
sourceRef=
"ApproveFinished"
targetRef=
"endevent1"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[${approveFinished}]]>
</conditionExpression>
</sequenceFlow>
<sequenceFlow
id=
"flow5"
name=
"审批未结束"
sourceRef=
"ApproveFinished"
targetRef=
"Approve"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[${!approveFinished}]]>
</conditionExpression>
</sequenceFlow>
<exclusiveGateway
id=
"ApprovePassed"
name=
"审批通过"
></exclusiveGateway>
<sequenceFlow
id=
"flow6"
sourceRef=
"Approve"
targetRef=
"ApprovePassed"
></sequenceFlow>
<sequenceFlow
id=
"flow9"
name=
"审批未通过"
sourceRef=
"ApprovePassed"
targetRef=
"Apply"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[${!approvePassed}]]>
</conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram
id=
"BPMNDiagram_sapPurchaseInfoRecordProc"
>
<bpmndi:BPMNPlane
bpmnElement=
"sapPurchaseInfoRecordProc"
id=
"BPMNPlane_sapPurchaseInfoRecordProc"
>
<bpmndi:BPMNShape
bpmnElement=
"startevent1"
id=
"BPMNShape_startevent1"
>
<omgdc:Bounds
height=
"35.0"
width=
"35.0"
x=
"355.0"
y=
"50.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"endevent1"
id=
"BPMNShape_endevent1"
>
<omgdc:Bounds
height=
"35.0"
width=
"35.0"
x=
"355.0"
y=
"550.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"Apply"
id=
"BPMNShape_Apply"
>
<omgdc:Bounds
height=
"55.0"
width=
"161.0"
x=
"292.0"
y=
"140.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"Approve"
id=
"BPMNShape_Approve"
>
<omgdc:Bounds
height=
"55.0"
width=
"161.0"
x=
"292.0"
y=
"240.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"ApproveFinished"
id=
"BPMNShape_ApproveFinished"
>
<omgdc:Bounds
height=
"40.0"
width=
"40.0"
x=
"352.0"
y=
"440.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"ApprovePassed"
id=
"BPMNShape_ApprovePassed"
>
<omgdc:Bounds
height=
"40.0"
width=
"40.0"
x=
"352.0"
y=
"349.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge
bpmnElement=
"flow1"
id=
"BPMNEdge_flow1"
>
<omgdi:waypoint
x=
"372.0"
y=
"85.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"372.0"
y=
"140.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow2"
id=
"BPMNEdge_flow2"
>
<omgdi:waypoint
x=
"372.0"
y=
"195.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"372.0"
y=
"240.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow3"
id=
"BPMNEdge_flow3"
>
<omgdi:waypoint
x=
"372.0"
y=
"389.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"372.0"
y=
"440.0"
></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"48.0"
x=
"320.0"
y=
"396.0"
></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow4"
id=
"BPMNEdge_flow4"
>
<omgdi:waypoint
x=
"372.0"
y=
"480.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"372.0"
y=
"550.0"
></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"48.0"
x=
"382.0"
y=
"489.0"
></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow5"
id=
"BPMNEdge_flow5"
>
<omgdi:waypoint
x=
"392.0"
y=
"460.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"519.0"
y=
"459.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"519.0"
y=
"317.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"519.0"
y=
"267.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"489.0"
y=
"267.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"453.0"
y=
"267.0"
></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"60.0"
x=
"459.0"
y=
"411.0"
></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow6"
id=
"BPMNEdge_flow6"
>
<omgdi:waypoint
x=
"372.0"
y=
"295.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"372.0"
y=
"349.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow9"
id=
"BPMNEdge_flow9"
>
<omgdi:waypoint
x=
"352.0"
y=
"369.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"231.0"
y=
"369.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"231.0"
y=
"167.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"292.0"
y=
"167.0"
></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"60.0"
x=
"257.0"
y=
"376.0"
></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
\ No newline at end of file
topsun/src/main/resources/config/topsun/sap/sapPurchaseInfoRecord/sapPurchaseInfoRecord.xml
0 → 100644
View file @
36e36d7a
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"sapPurchaseInfoRecordList"
label=
"SAP采购信息记录维护申请"
table=
"sap_purchase_info_record"
>
<sql-query>
select t.bill_code,t.person_member_name,t.dept_name,t.status,t.full_id,t.fillin_date,i.*
from sap_purchase_info_record t
left join sap_purchase_info_record_item i
on t.id = i.sap_purchase_info_record_id
where 1=1
</sql-query>
<condition
column=
"bill_code"
name=
"billCode"
type=
"java.lang.String"
symbol=
"like"
alias=
"t"
/>
<condition
column=
"lifnr"
name=
"lifnr"
type=
"java.lang.String"
symbol=
"like"
alias=
"i"
/>
<condition
column=
"matnr"
name=
"matnr"
type=
"java.lang.String"
symbol=
"like"
alias=
"i"
/>
<condition
column=
"esokz"
name=
"esokz"
type=
"java.lang.String"
symbol=
"like"
alias=
"i"
/>
<condition
column=
"werks"
name=
"werks"
type=
"java.lang.String"
symbol=
"like"
alias=
"i"
/>
</query>
</query-mappings>
\ No newline at end of file
topsun/src/main/resources/config/topsun/sap/sapPurchaseInfoRecord/sapPurchaseInfoRecordItem.xml
0 → 100644
View file @
36e36d7a
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"sapPurchaseInfoRecordItems"
label=
"SAP采购信息记录维护明细"
table=
"sap_purchase_info_record_item"
>
<sql-query>
select t.* from sap_purchase_info_record_item t
</sql-query>
<condition
column=
"SAP_PURCHASE_INFO_RECORD_ID"
name=
"sapPurchaseInfoRecordId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
</query-mappings>
\ No newline at end of file
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