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
6146f2cc
Commit
6146f2cc
authored
Nov 01, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工序报价流程审批、打印功能
parent
11fd06cc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
2213 additions
and
1 deletion
+2213
-1
processQuotedPriceDetail.js
...topsun/sap/processQuotedPrice/processQuotedPriceDetail.js
+404
-0
processQuotedPriceDetail.jsp
...opsun/sap/processQuotedPrice/processQuotedPriceDetail.jsp
+50
-0
processQuotedPriceList.js
...z/topsun/sap/processQuotedPrice/processQuotedPriceList.js
+221
-0
processQuotedPriceList.jsp
.../topsun/sap/processQuotedPrice/processQuotedPriceList.jsp
+42
-0
processQuotedPriceNumber.js
...topsun/sap/processQuotedPrice/processQuotedPriceNumber.js
+113
-0
processQuotedPriceNumber.jsp
...opsun/sap/processQuotedPrice/processQuotedPriceNumber.jsp
+17
-0
processQuotedPrice.ftl
.../main/webapp/template/print/topsun/processQuotedPrice.ftl
+131
-0
ResourceSearchController.java
...om/huigou/topsun/controller/ResourceSearchController.java
+54
-1
EpApplication.java
...ava/com/huigou/topsun/ep/epApplication/EpApplication.java
+7
-0
EpApplicationImpl.java
...uigou/topsun/ep/epApplication/impl/EpApplicationImpl.java
+21
-0
ProcessQuotedPriceApplication.java
...uotedPrice/application/ProcessQuotedPriceApplication.java
+21
-0
ProcessQuotedPriceItemApplication.java
...dPrice/application/ProcessQuotedPriceItemApplication.java
+37
-0
ProcessQuotedPriceItemNumberApplication.java
.../application/ProcessQuotedPriceItemNumberApplication.java
+24
-0
ProcessQuotedPriceApplicationImpl.java
...e/application/impl/ProcessQuotedPriceApplicationImpl.java
+174
-0
ProcessQuotedPriceItemApplicationImpl.java
...plication/impl/ProcessQuotedPriceItemApplicationImpl.java
+146
-0
ProcessQuotedPriceItemNumberApplicationImpl.java
...ion/impl/ProcessQuotedPriceItemNumberApplicationImpl.java
+69
-0
ProcessQuotedPriceController.java
...sQuotedPrice/controller/ProcessQuotedPriceController.java
+159
-0
ProcessQuotedPrice.java
...sun/sap/processQuotedPrice/domain/ProcessQuotedPrice.java
+63
-0
ProcessQuotedPriceItem.java
...sap/processQuotedPrice/domain/ProcessQuotedPriceItem.java
+122
-0
ProcessQuotedPriceItemNumber.java
...ocessQuotedPrice/domain/ProcessQuotedPriceItemNumber.java
+74
-0
ProcessQuotedPriceQueryRequest.java
...tedPrice/domain/query/ProcessQuotedPriceQueryRequest.java
+19
-0
ProcessQuotedPricePrintVo.java
...ocessQuotedPrice/domain/vo/ProcessQuotedPricePrintVo.java
+54
-0
ProcessQuotedPriceItemNumberRepository.java
...ce/repository/ProcessQuotedPriceItemNumberRepository.java
+15
-0
ProcessQuotedPriceItemRepository.java
...tedPrice/repository/ProcessQuotedPriceItemRepository.java
+23
-0
ProcessQuotedPriceRepository.java
...sQuotedPrice/repository/ProcessQuotedPriceRepository.java
+13
-0
processQuotedPrice.bpmn
...bpm/topsun/sap/processQuotedPrice/processQuotedPrice.bpmn
+111
-0
processQuotedPrice.xml
...nfig/topsun/sap/processQuotedPrice/processQuotedPrice.xml
+29
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/processQuotedPrice/processQuotedPriceDetail.js
0 → 100644
View file @
6146f2cc
This diff is collapsed.
Click to expand it.
topsun-xt/src/main/webapp/biz/topsun/sap/processQuotedPrice/processQuotedPriceDetail.jsp
0 → 100644
View file @
6146f2cc
<%@ 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,combox,commonTree,date,attachment"
/>
<x:script
src=
'/biz/topsun/sap/processQuotedPrice/processQuotedPriceDetail.js'
/>
</head>
<body>
<x:billTitle
title=
"工序报价申请"
needStatus=
"false"
needPerson=
"true"
/>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"id"
/>
<x:hidden
name=
"sId"
/>
<x:hidden
name=
"applyType"
/>
<x:hidden
name=
"billCode"
/>
<x:hidden
name=
"fillinDate"
type=
"datetime"
/>
<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=
"statusId"
/>
<x:hidden
name=
"personMemberName"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:hidden
name=
"supplier"
/>
<x:inputC
name=
"supplierName"
label=
"供应商"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"select"
/>
<x:inputC
name=
"quotedPriceDate"
label=
"报价日期"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"date"
/>
</div>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"payMethod"
label=
"支付方式"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
dictionary=
"zwels"
/>
<x:hidden
name=
"currency"
/>
<x:inputC
name=
"currencyName"
label=
"币别"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"select"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"remark"
label=
"备注"
labelCol=
"1"
fieldCol=
"11"
required=
"true"
rows=
"3"
/>
</div>
</div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"报价单明细"
name=
"group"
/>
<div
id=
"itemGrid"
style=
"margin: 2px;"
></div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"数量区间"
name=
"group"
/>
<div
id=
"itemNumberClickGrid"
style=
"margin: 2px;"
></div>
</form>
</body>
</html>
topsun-xt/src/main/webapp/biz/topsun/sap/processQuotedPrice/processQuotedPriceList.js
0 → 100644
View file @
6146f2cc
var
gridManager
=
null
;
var
refreshFlag
=
false
;
$
(
document
).
ready
(
function
()
{
initializateUI
()
loadProcessQuotedPriceListGrid
();
bindEvent
();
})
function
initializateUI
()
{
UICtrl
.
layout
(
"#layout"
,
{
leftWidth
:
3
});
}
function
loadProcessQuotedPriceListGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
(){
addHandler
()
}
});
gridManager
=
UICtrl
.
grid
(
"#processQuotedPriceGrid"
,
{
columns
:
[
{
display
:
"申请单编号"
,
name
:
"billCode"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"申请状态"
,
name
:
"statusTextView"
,
width
:
60
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"申请日期"
,
name
:
"fillinDate"
,
width
:
120
,
minWidth
:
60
,
type
:
"datetime"
,
align
:
"left"
},
{
display
:
"供应商"
,
name
:
"supplierName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"报价日期"
,
name
:
"quotedPriceDate"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"支付方式"
,
name
:
"payMethodTextView"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"报价币别"
,
name
:
"currencyName"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"备注"
,
name
:
"remark"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"申请人"
,
name
:
"personMemberName"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"申请部门"
,
name
:
"deptName"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
],
dataAction
:
"server"
,
_tableKey
:
'processQuotedPrice'
,
_local
:
true
,
url
:
web_app
.
name
+
'/processQuotedPrice/slicedProcessQuotedPriceList.ajax'
,
pageSize
:
20
,
usePager
:
true
,
toolbar
:
toolbarOptions
,
detail
:
{
onShowDetail
:
showUseBill
},
sortName
:
"fillinDate"
,
sortOrder
:
'desc'
,
width
:
"100%"
,
height
:
"100%"
,
heightDiff
:
-
8
,
checkbox
:
false
,
async
:
false
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
doView
(
data
.
id
);
},
});
UICtrl
.
setSearchAreaToggle
(
gridManager
);
}
function
bindEvent
(){
$
(
"#deptName"
).
orgTree
({
filter
:
"dpt"
,
excludePos
:
0
,
param
:
{
orgKindId
:
"ogn,dpt"
,
orgRoot
:
'14636F3F48934EE7811768692A0AC5E1'
},
back
:
{
text
:
"#deptName"
,
value
:
'#deptName'
},
});
$
(
"#personMemberName"
).
orgTree
({
filter
:
"psm"
,
excludePos
:
0
,
param
:
{
orgKindId
:
"ogn,dpt,pos,psm"
,
orgRoot
:
'14636F3F48934EE7811768692A0AC5E1'
},
back
:
{
text
:
"#personMemberName"
,
value
:
'#personMemberId'
},
});
//产品类别
$
(
'#productTypeName'
).
searchbox
({
type
:
"system"
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKL"
}
},
onChange
:
function
(
value
,
data
)
{
$
(
'#productType'
).
val
(
data
.
MATKL
);
$
(
'#productTypeName'
).
val
(
data
.
WGBEZ
);
}
});
}
function
query
(
obj
)
{
var
param
=
$
(
obj
).
formToJSON
();
UICtrl
.
gridSearch
(
gridManager
,
param
);
}
function
reloadGrid
()
{
gridManager
.
loadData
();
}
function
resetForm
(
obj
)
{
$
(
obj
).
formClean
();
}
function
addHandler
()
{
UICtrl
.
addTabItem
({
tabid
:
'processQuotedPriceApply'
,
text
:
"工序报价申请"
,
url
:
web_app
.
name
+
'/processQuotedPrice/forwardProcessQuotedPriceDetail.job'
});
}
function
doView
(
processQuotedPriceId
)
{
UICtrl
.
addTabItem
({
tabid
:
'processQuotedPrice'
+
processQuotedPriceId
,
text
:
"工序报价申请明细"
,
url
:
web_app
.
name
+
'/processQuotedPrice/showProcessQuotedPriceDetail.job?isReadOnly=true&bizId='
+
processQuotedPriceId
});
}
function
showUseBill
(
row
,
panel
){
if
(
!
row
.
id
)
return
;
var
gridId
=
'test'
+
row
.
id
;
gridId
=
gridId
.
replace
(
/
[
-
]
/g
,
'_'
);
var
grid
=
$
(
'<div id="'
+
gridId
+
'"></div'
)
Public
.
ajax
(
web_app
.
name
+
"/processQuotedPrice/queryProcessQuotedPriceItems.ajax"
,
{
processQuotedPriceId
:
row
.
id
},
function
(
res
){
$
(
panel
).
append
(
grid
);
var
planGrid
=
UICtrl
.
grid
(
grid
,{
columns
:
getItemColumns
(),
dataAction
:
'local'
,
detail
:
{
onShowDetail
:
showItemNumber
},
checkbox
:
false
,
width
:
'100%'
,
height
:
'10%'
,
usePager
:
false
,
heightDiff
:
-
5
,
data
:
res
});
});
}
function
getItemColumns
(){
var
columns
=
[];
// columns.push({
// display: "操作", name: "bindAnln1", width: 150, minWidth: 60, type: "string", align: "left",
// render: function (item) {
// var html = [];
// html.push('<a class="bindAnln1" href="javascript:void(0);"');
// html.push(' data-id="', item.id, '"');
// html.push(' data-code="', item.productCode, '"');
// html.push(' data-process="', item.outProcess, '">');
// html.push('<i class="fa fa-location-arrow"></i> ');
// html.push('报价规则');
// html.push('</a>');
// return html.join('');
// }
// },)
columns
.
push
({
display
:
"项次"
,
name
:
"itemNo"
,
width
:
60
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
});
columns
.
push
({
display
:
"启用/禁用"
,
name
:
"status"
,
width
:
80
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
render
:
function
(
item
)
{
return
UICtrl
.
getStatusInfo
(
item
.
status
);
}
});
columns
.
push
({
display
:
"产品编码"
,
name
:
"productCode"
,
width
:
160
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"产品名称"
,
name
:
"productName"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"外发工序"
,
name
:
"outProcessName"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"机台"
,
name
:
"machineTool"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
});
columns
.
push
({
display
:
"印刷色数"
,
name
:
"printColor"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
});
columns
.
push
({
display
:
"库存名称"
,
name
:
"storeName"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"备注"
,
name
:
"remark"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"禁用人"
,
name
:
"disablePersonName"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"禁用时间"
,
name
:
"disableDate"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"禁用原因"
,
name
:
"disableReason"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
return
columns
;
}
function
showItemNumber
(
row
,
panel
){
if
(
!
row
.
id
)
return
;
var
gridId
=
'test'
+
row
.
id
;
gridId
=
gridId
.
replace
(
/
[
-
]
/g
,
'_'
);
var
grid
=
$
(
'<div id="'
+
gridId
+
'"></div'
)
Public
.
ajax
(
web_app
.
name
+
"/processQuotedPrice/queryProcessQuotedPriceItemNumbers.ajax"
,
{
processQuotedPriceItemId
:
row
.
id
},
function
(
res
){
$
(
panel
).
append
(
grid
);
var
planGrid
=
UICtrl
.
grid
(
grid
,{
columns
:
[
{
display
:
"数量起"
,
name
:
"numberFrom"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
},
{
display
:
"数量止"
,
name
:
"numberTo"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
},
{
display
:
"数量区间"
,
name
:
"numberSection"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
},
{
display
:
"备注"
,
name
:
"remark"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
},
{
display
:
"含税单价"
,
name
:
"unitPrice"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
},
{
display
:
" 不含税单价"
,
name
:
"excludeTaxPrice"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
},
{
display
:
"最低消费"
,
name
:
"minimum"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
},
{
display
:
"loss数"
,
name
:
"lossNumber"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
},
],
dataAction
:
'local'
,
checkbox
:
false
,
width
:
'100%'
,
height
:
'10%'
,
usePager
:
false
,
heightDiff
:
-
5
,
data
:
res
});
});
}
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/processQuotedPrice/processQuotedPriceList.jsp
0 → 100644
View file @
6146f2cc
<%@ 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/processQuotedPrice/processQuotedPriceList.js'
/>
</head>
<body>
<div
class=
"container-fluid"
>
<div
id=
"layout"
>
<div
position=
"center"
title=
"工序报价查询"
>
<x:title
title=
"common.button.search"
hideTable=
"queryMainForm"
isHide=
"true"
/>
<form
class=
"hg-form ui-hide"
method=
"post"
action=
""
id=
"queryMainForm"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"billCode"
required=
"false"
label=
"申请单号"
labelCol=
"1"
/>
<x:inputC
name=
"deptName"
required=
"false"
label=
"申请部门"
labelCol=
"1"
wrapper=
"select"
/>
<x:hidden
name=
"deptId"
/>
<x:inputC
name=
"personMemberName"
required=
"false"
label=
"申请人"
labelCol=
"1"
wrapper=
"select"
/>
<x:hidden
name=
"personMemberId"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"productCode"
required=
"false"
label=
"产品编码"
labelCol=
"1"
/>
<x:inputC
name=
"productName"
required=
"false"
label=
"产品名称"
labelCol=
"1"
fieldCol=
"5"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"fillinDateBegin"
required=
"false"
label=
"录入日期"
labelCol=
"1"
wrapper=
"date"
/>
<x:inputC
name=
"fillinDateEnd"
required=
"false"
label=
"-"
labelCol=
"0"
wrapper=
"date"
/>
</div>
<div
class=
"hg-form-row"
>
<x:checkboxListC
name=
"statusKind"
label=
"单据状态"
list=
"statusKindsList"
labelCol=
"1"
fieldCol=
"3"
/>
</div>
<x:searchButtons/>
</form>
<div
class=
"blank_div clearfix"
></div>
<div
id=
"processQuotedPriceGrid"
style=
"margin: 2px;"
></div>
<div
id=
"itemGrid"
style=
"margin: 2px;"
></div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/processQuotedPrice/processQuotedPriceNumber.js
0 → 100644
View file @
6146f2cc
var
itemNumberGridManager
=
null
,
refreshFlag
=
false
;
$
(
document
).
ready
(
function
()
{
initUI
();
loadItemNumberGrid
();
}
);
function
initUI
()
{
UICtrl
.
initDefaultLayout
();
}
function
loadItemNumberGrid
()
{
var
toolbarOptions
=
null
;
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
// 添加一行表格
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
itemNumberGridManager
)},
// 删除
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#itemNumberGrid'
);
DataUtil
.
delSelectedRows
({
action
:
'processQuotedPrice/deleteProcessQuotedPriceItemNumber.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
itemNumberGridManager
.
loadData
();
}
});
}
});
// 表格
itemNumberGridManager
=
UICtrl
.
grid
(
"#itemNumberGrid"
,
{
gridManager
:
null
,
columns
:
[
{
display
:
"数量起"
,
name
:
"numberFrom"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"数量止"
,
name
:
"numberTo"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"数量区间"
,
name
:
"numberSection"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
render
:
function
(
item
){
return
item
.
numberFrom
+
"<"
+
"数量"
+
(
Public
.
isBlank
(
item
.
numberTo
)
?
""
:
"<="
+
item
.
numberTo
)
}
},
{
display
:
"备注"
,
name
:
"remark"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"含税单价"
,
name
:
"unitPrice"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
required
:
true
,
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
" 不含税单价"
,
name
:
"excludeTaxPrice"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"最低消费"
,
name
:
"minimum"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"loss数"
,
name
:
"lossNumber"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.999'
}
},
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/processQuotedPrice/queryProcessQuotedPriceItemNumbers.ajax'
,
parms
:
{
processQuotedPriceItemId
:
$
(
"#itemId"
).
val
()},
pageSize
:
20
,
usePager
:
true
,
sortName
:
"numberFrom"
,
sortOrder
:
"asc"
,
toolbar
:
toolbarOptions
,
enabledEdit
:
canEdit
,
width
:
"98%"
,
height
:
"300px"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
});
UICtrl
.
setSearchAreaToggle
(
itemNumberGridManager
);
}
function
reloadItemNumberGrid
()
{
itemNumberGridManager
.
loadData
();
}
function
query
(
obj
)
{
var
param
=
$
(
obj
).
formToJSON
();
UICtrl
.
gridSearch
(
itemNumberGridManager
,
param
);
}
function
resetForm
(
obj
)
{
$
(
obj
).
formClean
();
}
topsun-xt/src/main/webapp/biz/topsun/sap/processQuotedPrice/processQuotedPriceNumber.jsp
0 → 100644
View file @
6146f2cc
<%--采购申请--%>
<%@ 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"
/>
<script
src=
'
<c:url
value=
"/biz/topsun/sap/processQuotedPrice/processQuotedPriceNumber.js"
/>
'
type=
"text/javascript"
></script>
</head>
<body>
<div
class=
"container-fluid"
>
<x:hidden
name=
"itemId"
/>
<x:hidden
name=
"productCode"
/>
<x:hidden
name=
"outProcess"
/>
<div
id=
"itemNumberGrid"
></div>
</div>
</body>
\ No newline at end of file
topsun-xt/src/main/webapp/template/print/topsun/processQuotedPrice.ftl
0 → 100644
View file @
6146f2cc
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<head>
<title>
外发报价单
</title>
<
#
include
"/
print
/
commonStyleTemplate
.
ftl
"
/>
<style
type=
"text/css"
>
td
{
font-size
:
12px
;
}
</style>
</head>
<body>
<!-- 页眉部分 -->
<div
style=
"font-size: 20px;text-align: center; margin-top: 0px"
>
广州新时代印刷有限公司
</div>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
"40%"
/>
<col
width=
"10%"
/>
<col
width=
"40%"
/>
</colgroup>
<tr>
<td
class=
"right"
>
电 话:020-36201781/020-36201368
</td>
<td>
</td>
<td
class=
"left"
>
地 址:广州市白云区江高小塘南路68号
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
"40%"
/>
<col
width=
"10%"
/>
<col
width=
"40%"
/>
</colgroup>
<tr>
<td
class=
"right"
>
传 真:020-36343118/020-36201962
</td>
<td>
</td>
<td
class=
"left"
>
E_Mail:gzbaoshen@gzbaoshen.com
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'100%'
/>
</colgroup>
<tr>
<td
style=
"font-size: 20px;text-align: center;margin-top: 0.5cm"
>
报价单
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'40%'
/>
<col
width=
'20%'
/>
<col
width=
'40%'
/>
</colgroup>
<tr>
<td
class=
"left"
>
TO:广州市宝绅科技应用有限公司
</td>
<td
class=
"left"
>
黄小姐
</td>
<td
class=
"left"
>
报价单号:${billCode?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'5%'
/>
<col
width=
'10%'
/>
<col
width=
'30%'
/>
<col
width=
'5%'
/>
<col
width=
'10%'
/>
<col
width=
'10%'
/>
<col
width=
'10%'
/>
<col
width=
'20%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
项次
</td>
<td
class=
"center"
>
产品编码
</td>
<td
class=
"center"
>
产品名称
</td>
<td
class=
"center"
>
单位
</td>
<td
class=
"center"
>
数量区间
</td>
<td
class=
"center"
>
含税单价
</td>
<td
class=
"center"
>
不含税单价
</td>
<td
class=
"center"
>
备注
</td>
</tr>
<
#
if
printVoList
??
&&
printVoList
?
size
gt
0
>
<
#
list
printVoList
as
detail
>
<tr>
<td
class=
"center"
>
${detail.itemNo?default("")?html}
</td>
<td
class=
"center"
>
${detail.productCode?default("")?html}
</td>
<td
class=
"center"
>
${detail.productName?default("")?html}
</td>
<td
class=
"center"
>
${detail.unitName?default("")?html}
</td>
<td
class=
"center"
>
${detail.numberSection?default("")?html}
</td>
<td
class=
"center"
>
${detail.unitPrice?default("")?html}
</td>
<td
class=
"center"
>
${detail.excludeTaxPrice?default("")?html}
</td>
<td
class=
"center"
>
${detail.remark?default("")?html}
</td>
</tr>
</
#
list>
<
#
else
>
<tr>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
</tr>
</
#
if>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'100%'
/>
</colgroup>
<tr>
<td
class=
"left"
>
备注:${remark?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'50%'
/>
<col
width=
"50%"
/>
</colgroup>
<tr>
<td
class=
"text-center"
>
客户签名:
</td>
<td
class=
"text-center"
>
报价人:${personMemberName?default("")?html}
</td>
</tr>
</table>
</body>
</html>
topsun/src/main/java/com/huigou/topsun/controller/ResourceSearchController.java
View file @
6146f2cc
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.topsun.ep.epApplication.EpApplication
;
import
com.huigou.topsun.sap.sapApplication.application.*
;
import
com.huigou.topsun.sap.sapApplication.domain.query.SapDialogOrderQuery
;
import
com.huigou.topsun.sap.sapApplication.domain.query.SapDialogQuery
;
...
...
@@ -53,6 +54,8 @@ public class ResourceSearchController {
private
SapBankInfoApplication
sapBankInfoApplication
;
@Autowired
private
SuppliersDataApplication
suppliersDataApplication
;
@Autowired
private
EpApplication
epApplication
;
@EasySearch
(
queryName
=
"knttp"
)
public
Map
<
String
,
Object
>
knttpSelect
(
SDO
sdo
){
...
...
@@ -287,6 +290,47 @@ public class ResourceSearchController {
return
model
;
}
@EasySearch
(
queryName
=
"sapProductSelect"
)
public
Map
<
String
,
Object
>
sapProductSelect
(
SDO
sdo
)
throws
IOException
{
String
param
=
sdo
.
getString
(
"paramValue"
);
SapDialogQuery
queryRequest
=
sdo
.
toObject
(
SapDialogQuery
.
class
);
List
<
Map
<
String
,
String
>>
mapList
=
sapMaterialApplication
.
getSapMaterial
(
queryRequest
);
if
(
CollectionUtil
.
isNotEmpty
(
mapList
)){
mapList
=
mapList
.
stream
()
.
filter
(
map
->
map
.
containsValue
(
"ZZCP"
))
.
collect
(
Collectors
.
toList
());
}
if
(
CollectionUtil
.
isNotEmpty
(
mapList
)){
if
(
StringUtil
.
isNotBlank
(
param
)){
//模糊条件过滤
mapList
=
mapList
.
stream
()
.
filter
(
map
->
map
.
values
().
stream
().
anyMatch
(
value
->
value
.
contains
(
param
)))
.
collect
(
Collectors
.
toList
());
}
}
Integer
intPage
=
sdo
.
getInteger
(
"intPage"
,
1
);
Integer
pageSize
=
sdo
.
getInteger
(
"pageSize"
,
10
);
PageRequest
pageRequest
=
new
PageRequest
(
intPage
-
1
,
pageSize
);
EasySearchParse
easySearchParse
=
new
EasySearchParse
();
List
<
QuerySchemeField
>
fields
=
Arrays
.
asList
(
new
QuerySchemeField
(
"工厂"
,
"WERKS"
,
"string"
,
60L
),
new
QuerySchemeField
(
"工厂名称"
,
"NAME1"
,
"string"
,
160L
),
new
QuerySchemeField
(
"物料编码"
,
"MATNR"
,
"string"
,
140L
),
new
QuerySchemeField
(
"物料名称"
,
"MAKTX"
,
"string"
,
400L
),
new
QuerySchemeField
(
"计量单位"
,
"MSEHL"
,
"string"
,
100L
),
new
QuerySchemeField
(
"物料分类描述"
,
"MTBEZ"
,
"string"
,
60L
)
//new QuerySchemeField("库存地点", "LGFSB", "string", 100L),
//new QuerySchemeField("库存地点名称", "LGOBE", "string", 200L)
);
easySearchParse
.
setFields
(
fields
);
easySearchParse
.
setWidth
(
700L
);
MemEasySearcher
<
Map
<
String
,
String
>>
memEasySearcher
=
new
MemEasySearcherImpl
<>();
Map
<
String
,
Object
>
model
=
memEasySearcher
.
search
(
mapList
,
easySearchParse
,
pageRequest
,
null
);
return
model
;
}
@EasySearch
(
queryName
=
"sapCustomerOrderSelect"
)
public
Map
<
String
,
Object
>
sapCustomerOrderSelect
(
SDO
sdo
)
throws
IOException
{
String
param
=
sdo
.
getString
(
"paramValue"
);
...
...
@@ -582,7 +626,7 @@ public class ResourceSearchController {
}
@EasySearch
(
queryName
=
"selectSuppliersDatas"
)
public
Map
<
String
,
Object
>
getSuppliersDatas
(
SDO
sdo
)
throws
IOException
{
public
Map
<
String
,
Object
>
getSuppliersDatas
(
SDO
sdo
)
{
String
param
=
sdo
.
getString
(
"paramValue"
);
String
PARTNER
=
sdo
.
getString
(
"PARTNER"
);
// String ZEP_BPTYPE = sdo.getString("ZEP_BPTYPE");
...
...
@@ -591,4 +635,13 @@ public class ResourceSearchController {
return
sapDictionaryApplication
.
initEasySearchModel
(
mapList
,
param
,
sdo
);
}
@EasySearch
(
queryName
=
"selectEpProcess"
)
public
Map
<
String
,
Object
>
selectEpProcess
(
SDO
sdo
)
{
String
param
=
sdo
.
getString
(
"paramValue"
);
String
itemCode
=
sdo
.
getString
(
"itemCode"
);
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
mapList
=
epApplication
.
queryEpProductProcess
(
itemCode
);
return
sapDictionaryApplication
.
initEasySearchModel
(
mapList
,
param
,
sdo
);
}
}
topsun/src/main/java/com/huigou/topsun/ep/epApplication/EpApplication.java
View file @
6146f2cc
...
...
@@ -23,4 +23,11 @@ public interface EpApplication {
* @return
*/
EpProductInfoVo
queryEpProductInfo
(
String
matnr2
);
/**
* 根据产品编码查询工序
* @param itemCode
* @return
*/
List
<
Map
<
String
,
String
>>
queryEpProductProcess
(
String
itemCode
);
}
topsun/src/main/java/com/huigou/topsun/ep/epApplication/impl/EpApplicationImpl.java
View file @
6146f2cc
...
...
@@ -106,4 +106,25 @@ public class EpApplicationImpl implements EpApplication {
}
return
epProductInfoVo
;
}
@Override
public
List
<
Map
<
String
,
String
>>
queryEpProductProcess
(
String
itemCode
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
String
message
=
""
;
try
{
//md/mdItem/queryBrandByItemCode/{itemCode}
String
executeForEp
=
httpClient
.
executeForEp
(
map
,
"md/mdItem/queryProcessByItemCode/"
+
itemCode
);
Map
<
String
,
Object
>
resultMap
=
JSONObject
.
parseObject
(
executeForEp
,
Map
.
class
);
if
(
"200"
.
equals
(
resultMap
.
get
(
"code"
).
toString
()))
{
ObjectMapper
objectMapper
=
SAPUtils
.
objectMapper
();
mapList
=
objectMapper
.
readValue
(
com
.
huigou
.
util
.
JSONUtil
.
toString
(
resultMap
.
get
(
"data"
)),
new
TypeReference
<
List
<
Map
<
String
,
String
>>>()
{});
}
else
{
message
=(
String
)
resultMap
.
get
(
"msg"
);
}
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"查询工序出错:"
+
e
.
getMessage
());
}
return
mapList
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/application/ProcessQuotedPriceApplication.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
application
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPrice
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.query.ProcessQuotedPriceQueryRequest
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:10
* @Description:
*/
public
interface
ProcessQuotedPriceApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/processQuotedPrice/processQuotedPrice.xml"
;
String
PROCESS_DEFINITION_KEY
=
"processQuotedPriceProc"
;
Map
<
String
,
Object
>
slicedProcessQuotedPriceList
(
ProcessQuotedPriceQueryRequest
queryRequest
);
ProcessQuotedPrice
loadProcessQuotedPrice
(
String
id
);
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/application/ProcessQuotedPriceItemApplication.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
application
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPriceItem
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.query.ProcessQuotedPriceQueryRequest
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:10
* @Description:
*/
public
interface
ProcessQuotedPriceItemApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/processQuotedPrice/processQuotedPrice.xml"
;
void
saveProcessQuotedPriceItems
(
String
processQuotedPriceId
,
List
<
ProcessQuotedPriceItem
>
processQuotedPriceItems
);
Map
<
String
,
Object
>
queryProcessQuotedPriceItems
(
ProcessQuotedPriceQueryRequest
queryRequest
);
void
deleteByIds
(
List
<
String
>
ids
);
List
<
ProcessQuotedPriceItem
>
findByProcessQuotedPriceId
(
String
processQuotedPriceId
);
void
updateProcessQuotedPriceItemStatus
(
List
<
String
>
ids
,
String
status
);
Map
<
String
,
Object
>
print
(
String
id
);
/**
* 根据产品编码和工序查询产品数量区间的含税单价
* @param productCode
* @param outProcess
* @param number
* @return
*/
BigDecimal
findPriceByProductAndProcess
(
String
productCode
,
String
outProcess
,
BigDecimal
number
);
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/application/ProcessQuotedPriceItemNumberApplication.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
application
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPriceItem
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPriceItemNumber
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.query.ProcessQuotedPriceQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:10
* @Description:
*/
public
interface
ProcessQuotedPriceItemNumberApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/processQuotedPrice/processQuotedPrice.xml"
;
void
saveProcessQuotedPriceItemNumbers
(
String
processQuotedPriceItemId
,
List
<
ProcessQuotedPriceItemNumber
>
processQuotedPriceOrderItemNumbers
);
Map
<
String
,
Object
>
queryProcessQuotedPriceItemNumbers
(
ProcessQuotedPriceQueryRequest
queryRequest
);
void
deleteByIds
(
List
<
String
>
ids
);
List
<
ProcessQuotedPriceItemNumber
>
findByProcessQuotedPriceItemId
(
String
processQuotedPriceItemId
);
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/application/impl/ProcessQuotedPriceApplicationImpl.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
application
.
impl
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.data.domain.model.CommonDomainConstants
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPrice
;
import
com.huigou.topsun.sap.processQuotedPrice.application.ProcessQuotedPriceItemApplication
;
import
com.huigou.topsun.sap.processQuotedPrice.application.ProcessQuotedPriceItemNumberApplication
;
import
com.huigou.topsun.sap.processQuotedPrice.application.ProcessQuotedPriceApplication
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPriceItem
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.query.ProcessQuotedPriceQueryRequest
;
import
com.huigou.topsun.sap.processQuotedPrice.repository.ProcessQuotedPriceRepository
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.DateUtil
;
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
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:17
* @Description:
*/
@Service
(
"processQuotedPriceApplication"
)
public
class
ProcessQuotedPriceApplicationImpl
extends
FlowBroker
implements
ProcessQuotedPriceApplication
{
@Autowired
private
ProcessQuotedPriceRepository
processQuotedPriceRepository
;
@Autowired
private
ProcessQuotedPriceItemApplication
processQuotedPriceItemApplication
;
@Override
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
ProcessQuotedPrice
processQuotedPrice
=
getBizEntity
(
ProcessQuotedPrice
.
class
);
if
(
processQuotedPrice
.
isNew
())
{
processQuotedPrice
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
}
else
{
processQuotedPrice
=
(
ProcessQuotedPrice
)
commonDomainService
.
loadAndFillinProperties
(
processQuotedPrice
);
}
processQuotedPrice
=
processQuotedPriceRepository
.
save
(
processQuotedPrice
);
//保存工单明细
List
<
ProcessQuotedPriceItem
>
items
=
getBizEntities
(
ProcessQuotedPriceItem
.
class
,
"items"
);
processQuotedPriceItemApplication
.
saveProcessQuotedPriceItems
(
processQuotedPrice
.
getId
(),
items
);
return
processQuotedPrice
.
getId
();
}
/**
* 设置任务名称
*/
@Override
protected
void
setTaskDescription
(
DelegateTask
delegateTask
)
{
String
bizId
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
delegateTask
.
setDescription
(
this
.
getApprovalSubjectName
(
bizId
));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private
String
getApprovalSubjectName
(
String
bizId
)
{
ProcessQuotedPrice
processQuotedPrice
=
this
.
processQuotedPriceRepository
.
findOne
(
bizId
);
//查询 单据日期
String
fillinDateStr
=
DateUtil
.
getDateFormat
(
"yyyy-MM-dd HH:mm:ss"
,
processQuotedPrice
.
getFillinDate
());
//设置标题
return
String
.
format
(
"%s-%s(%s)"
,
"工序外协报价"
,
processQuotedPrice
.
getBillCode
(),
fillinDateStr
);
}
@Override
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
// 返回业务数据给流程实例,
return
ClassHelper
.
toMap
(
processQuotedPriceRepository
.
getOne
(
bizId
));
}
/**
* 流程撤销事件
**/
@Override
protected
void
onRecallProcessInstance
(
DelegateExecution
delegateExecution
)
{
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
// 修改单据状态为申请
updateStatus
(
bizId
,
BizBillStatus
.
APPLYING
);
}
/**
* 任务完成前执行
*/
@Override
protected
void
onBeforeComplete
(
DelegateTask
delegateTask
)
{
super
.
onBeforeComplete
(
delegateTask
);
String
bizId
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
if
(
this
.
isApplyProcUnit
(
delegateTask
)
&&
this
.
getApprovalParameter
().
isAdvanceProcessAction
())
{
updateStatus
(
bizId
,
BizBillStatus
.
APPROVING
);
}
}
/**
* 回收事件
**/
@Override
protected
void
onWithdraw
(
DelegateTask
delegateTask
,
String
destActivityId
)
{
super
.
onWithdraw
(
delegateTask
,
destActivityId
);
String
bizId
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
if
(
destActivityId
.
equalsIgnoreCase
(
"apply"
))
{
updateStatus
(
bizId
,
BizBillStatus
.
APPLYING
);
}
}
@Transactional
protected
void
updateStatus
(
String
bizId
,
BizBillStatus
status
)
{
Assert
.
hasText
(
bizId
,
CommonDomainConstants
.
ID_NOT_BLANK
);
this
.
commonDomainService
.
updateStatus
(
ProcessQuotedPrice
.
class
,
bizId
,
status
.
getId
());
}
@Override
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
super
.
onEnd
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
ProcessQuotedPrice
processQuotedPrice
=
processQuotedPriceRepository
.
findOne
(
bizId
);
processQuotedPrice
.
setStatusId
(
status
.
getId
());
processQuotedPriceRepository
.
save
(
processQuotedPrice
);
}
@Override
protected
void
onAbortProcessInstance
(
DelegateExecution
delegateExecution
)
{
super
.
onAbortProcessInstance
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
ProcessQuotedPrice
processQuotedPrice
=
processQuotedPriceRepository
.
findOne
(
bizId
);
processQuotedPrice
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
processQuotedPriceRepository
.
save
(
processQuotedPrice
);
}
/**
* @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
();
ProcessQuotedPrice
processQuotedPrice
=
processQuotedPriceRepository
.
findOne
(
bizId
);
processQuotedPrice
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
processQuotedPriceRepository
.
save
(
processQuotedPrice
);
}
}
@Override
public
Map
<
String
,
Object
>
slicedProcessQuotedPriceList
(
ProcessQuotedPriceQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"slicedProcessQuotedPriceList"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
queryModel
.
putDictionary
(
"status"
,
BizBillStatus
.
getMap
());
queryModel
.
putDictionary
(
"payMethod"
,
DictUtil
.
getDictionary
(
"zwels"
));
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
@Override
public
ProcessQuotedPrice
loadProcessQuotedPrice
(
String
id
)
{
return
processQuotedPriceRepository
.
findOne
(
id
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/application/impl/ProcessQuotedPriceItemApplicationImpl.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
application
.
impl
;
import
com.huigou.data.domain.model.AbstractEntity
;
import
com.huigou.data.domain.query.QueryPageRequest
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.processQuotedPrice.application.ProcessQuotedPriceItemApplication
;
import
com.huigou.topsun.sap.processQuotedPrice.application.ProcessQuotedPriceItemNumberApplication
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPrice
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPriceItem
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPriceItemNumber
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.query.ProcessQuotedPriceQueryRequest
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.vo.ProcessQuotedPricePrintVo
;
import
com.huigou.topsun.sap.processQuotedPrice.repository.ProcessQuotedPriceItemRepository
;
import
com.huigou.topsun.sap.processQuotedPrice.repository.ProcessQuotedPriceRepository
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.StringUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:17
* @Description:
*/
@Service
(
"processQuotedPriceItemApplication"
)
public
class
ProcessQuotedPriceItemApplicationImpl
extends
BaseApplication
implements
ProcessQuotedPriceItemApplication
{
@Autowired
private
ProcessQuotedPriceItemRepository
processQuotedPriceItemRepository
;
@Autowired
private
ProcessQuotedPriceItemNumberApplication
processQuotedPriceItemNumberApplication
;
@Autowired
private
ProcessQuotedPriceRepository
processQuotedPriceRepository
;
@Override
public
void
saveProcessQuotedPriceItems
(
String
processQuotedPriceId
,
List
<
ProcessQuotedPriceItem
>
processQuotedPriceItems
)
{
for
(
ProcessQuotedPriceItem
processQuotedPriceItem
:
processQuotedPriceItems
)
{
processQuotedPriceItem
.
setProcessQuotedPriceId
(
processQuotedPriceId
);
processQuotedPriceItemRepository
.
save
(
processQuotedPriceItem
);
//保存明细价格区间
List
<
Map
<
String
,
Object
>>
numberList
=
processQuotedPriceItem
.
getNumberList
();
if
(!
CollectionUtils
.
isEmpty
(
numberList
)){
List
<
ProcessQuotedPriceItemNumber
>
itemNumberList
=
numberList
.
stream
()
.
map
(
itemNumberMap
->
{
ProcessQuotedPriceItemNumber
priceItemNumber
=
ClassHelper
.
fromMap
(
ProcessQuotedPriceItemNumber
.
class
,
itemNumberMap
);
priceItemNumber
.
setId
((
String
)
itemNumberMap
.
get
(
"id"
));
return
priceItemNumber
;
}).
collect
(
Collectors
.
toList
());
processQuotedPriceItemNumberApplication
.
saveProcessQuotedPriceItemNumbers
(
processQuotedPriceItem
.
getId
(),
itemNumberList
);
}
}
}
@Override
public
Map
<
String
,
Object
>
queryProcessQuotedPriceItems
(
ProcessQuotedPriceQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getProcessQuotedPriceId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"processQuotedPriceItems"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
@Override
public
void
deleteByIds
(
List
<
String
>
ids
)
{
ids
.
forEach
(
id
->{
//先删除明细下的报价规则
List
<
ProcessQuotedPriceItemNumber
>
itemNumberList
=
processQuotedPriceItemNumberApplication
.
findByProcessQuotedPriceItemId
(
id
);
if
(!
CollectionUtils
.
isEmpty
(
itemNumberList
)){
List
<
String
>
itemNumberIds
=
itemNumberList
.
stream
()
.
map
(
AbstractEntity:
:
getId
).
collect
(
Collectors
.
toList
());
processQuotedPriceItemNumberApplication
.
deleteByIds
(
itemNumberIds
);
}
//再删除报价明细
processQuotedPriceItemRepository
.
delete
(
id
);
});
}
@Override
public
List
<
ProcessQuotedPriceItem
>
findByProcessQuotedPriceId
(
String
processQuotedPriceId
)
{
return
processQuotedPriceItemRepository
.
findByProcessQuotedPriceId
(
processQuotedPriceId
);
}
@Override
public
void
updateProcessQuotedPriceItemStatus
(
List
<
String
>
ids
,
String
status
)
{
List
<
ProcessQuotedPriceItem
>
priceItemList
=
processQuotedPriceItemRepository
.
findAll
(
ids
);
for
(
ProcessQuotedPriceItem
processQuotedPriceItem
:
priceItemList
)
{
processQuotedPriceItem
.
setStatus
(
status
);
}
processQuotedPriceItemRepository
.
save
(
priceItemList
);
}
@Override
public
Map
<
String
,
Object
>
print
(
String
id
)
{
ProcessQuotedPriceItem
quotedPriceItem
=
processQuotedPriceItemRepository
.
findOne
(
id
);
ProcessQuotedPrice
quotedPrice
=
processQuotedPriceRepository
.
findOne
(
quotedPriceItem
.
getProcessQuotedPriceId
());
Map
<
String
,
Object
>
map
=
ClassHelper
.
beanToMap
(
quotedPrice
);
List
<
ProcessQuotedPriceItemNumber
>
itemNumberList
=
processQuotedPriceItemNumberApplication
.
findByProcessQuotedPriceItemId
(
quotedPriceItem
.
getId
());
itemNumberList
=
itemNumberList
.
stream
()
.
sorted
(
Comparator
.
comparing
(
ProcessQuotedPriceItemNumber:
:
getNumberFrom
)).
collect
(
Collectors
.
toList
());
List
<
ProcessQuotedPricePrintVo
>
printVoList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
itemNumberList
.
size
();
i
++)
{
ProcessQuotedPriceItemNumber
itemNumber
=
itemNumberList
.
get
(
i
);
ProcessQuotedPricePrintVo
pricePrintVo
=
new
ProcessQuotedPricePrintVo
();
ClassHelper
.
copyProperties
(
itemNumber
,
pricePrintVo
);
pricePrintVo
.
setProductCode
(
quotedPriceItem
.
getProductCode
());
pricePrintVo
.
setProductName
(
quotedPriceItem
.
getProductName
());
pricePrintVo
.
setUnitName
(
quotedPriceItem
.
getUnitName
());
pricePrintVo
.
setItemNo
(
String
.
valueOf
(
i
+
1
));
printVoList
.
add
(
pricePrintVo
);
}
map
.
put
(
"printVoList"
,
printVoList
);
return
map
;
}
@Override
public
BigDecimal
findPriceByProductAndProcess
(
String
productCode
,
String
outProcess
,
BigDecimal
number
)
{
ProcessQuotedPriceItem
quotedPriceItem
=
processQuotedPriceItemRepository
.
findByProductCodeAndOutProcess
(
productCode
,
outProcess
);
BigDecimal
price
=
BigDecimal
.
ZERO
;
if
(
quotedPriceItem
!=
null
){
List
<
ProcessQuotedPriceItemNumber
>
numberList
=
processQuotedPriceItemNumberApplication
.
findByProcessQuotedPriceItemId
(
quotedPriceItem
.
getId
());
List
<
BigDecimal
>
decimals
=
numberList
.
stream
()
.
filter
(
processQuotedPriceItemNumber
->
(
processQuotedPriceItemNumber
.
getNumberFrom
().
compareTo
(
number
)
<
0
&&
processQuotedPriceItemNumber
.
getNumberTo
().
compareTo
(
number
)
>=
0
))
.
map
(
ProcessQuotedPriceItemNumber:
:
getUnitPrice
).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
decimals
)){
price
=
decimals
.
get
(
0
);
}
}
return
price
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/application/impl/ProcessQuotedPriceItemNumberApplicationImpl.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.processQuotedPrice.application.ProcessQuotedPriceItemNumberApplication
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPriceItemNumber
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.query.ProcessQuotedPriceQueryRequest
;
import
com.huigou.topsun.sap.processQuotedPrice.repository.ProcessQuotedPriceItemNumberRepository
;
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.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:18
* @Description:
*/
@Service
(
"processQuotedPriceItemNumberApplication"
)
public
class
ProcessQuotedPriceItemNumberApplicationImpl
extends
BaseApplication
implements
ProcessQuotedPriceItemNumberApplication
{
@Autowired
private
ProcessQuotedPriceItemNumberRepository
processQuotedPriceItemNumberRepository
;
@Override
public
void
saveProcessQuotedPriceItemNumbers
(
String
processQuotedPriceItemId
,
List
<
ProcessQuotedPriceItemNumber
>
processQuotedPriceOrderItemNumbers
)
{
for
(
ProcessQuotedPriceItemNumber
processQuotedPriceOrderItemNumber
:
processQuotedPriceOrderItemNumbers
)
{
processQuotedPriceOrderItemNumber
.
setProcessQuotedPriceItemId
(
processQuotedPriceItemId
);
if
(
processQuotedPriceOrderItemNumber
.
getNumberFrom
()
==
null
){
processQuotedPriceOrderItemNumber
.
setNumberFrom
(
BigDecimal
.
ZERO
);
}
//拼接数量区间:100<数量<=200
processQuotedPriceOrderItemNumber
.
setNumberSection
(
processQuotedPriceOrderItemNumber
.
getNumberFrom
()+
"<数量"
+
((
processQuotedPriceOrderItemNumber
.
getNumberTo
()
==
null
)
?
""
:
"<="
+
processQuotedPriceOrderItemNumber
.
getNumberTo
()));
processQuotedPriceItemNumberRepository
.
save
(
processQuotedPriceOrderItemNumber
);
}
}
@Override
public
Map
<
String
,
Object
>
queryProcessQuotedPriceItemNumbers
(
ProcessQuotedPriceQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getProcessQuotedPriceItemId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"processQuotedPriceItemNumbers"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
@Override
public
void
deleteByIds
(
List
<
String
>
ids
)
{
ids
.
forEach
(
id
->{
processQuotedPriceItemNumberRepository
.
delete
(
id
);
});
}
@Override
public
List
<
ProcessQuotedPriceItemNumber
>
findByProcessQuotedPriceItemId
(
String
processQuotedPriceItemId
)
{
return
processQuotedPriceItemNumberRepository
.
findByProcessQuotedPriceItemId
(
processQuotedPriceItemId
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/controller/ProcessQuotedPriceController.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
controller
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.common.BillStatus
;
import
com.huigou.topsun.sap.processQuotedPrice.application.ProcessQuotedPriceApplication
;
import
com.huigou.topsun.sap.processQuotedPrice.application.ProcessQuotedPriceItemNumberApplication
;
import
com.huigou.topsun.sap.processQuotedPrice.application.ProcessQuotedPriceItemApplication
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPrice
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPriceItemNumber
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.query.ProcessQuotedPriceQueryRequest
;
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
com.huigou.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:09
* @Description:
*/
@Controller
@ControllerMapping
(
"/processQuotedPrice"
)
public
class
ProcessQuotedPriceController
extends
CommonController
{
@Override
protected
String
getPagePath
()
{
return
"/biz/topsun/sap/processQuotedPrice/"
;
}
@Autowired
private
ProcessQuotedPriceApplication
processQuotedPriceApplication
;
@Autowired
private
ProcessQuotedPriceItemApplication
processQuotedPriceItemApplication
;
@Autowired
private
ProcessQuotedPriceItemNumberApplication
processQuotedPriceItemNumberApplication
;
public
String
forwardProcessQuotedPriceList
(){
this
.
putAttribute
(
"statusKindsList"
,
BillStatus
.
getValidMap
());
return
forward
(
"processQuotedPriceList"
);
}
public
String
slicedProcessQuotedPriceList
(){
SDO
sdo
=
this
.
getSDO
();
ProcessQuotedPriceQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
ProcessQuotedPriceQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
processQuotedPriceApplication
.
slicedProcessQuotedPriceList
(
queryRequest
);
return
toResult
(
map
);
}
public
String
forwardProcessQuotedPriceDetail
(){
this
.
putAttribute
(
"processDefinitionKey"
,
ProcessQuotedPriceApplication
.
PROCESS_DEFINITION_KEY
);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
ProcessQuotedPrice
processQuotedPrice
=
new
ProcessQuotedPrice
();
processQuotedPrice
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
Operator
operator
=
getOperator
();
processQuotedPrice
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
return
forward
(
"processQuotedPriceDetail"
,
processQuotedPrice
);
}
public
String
showProcessQuotedPriceDetail
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
ProcessQuotedPrice
processQuotedPrice
=
processQuotedPriceApplication
.
loadProcessQuotedPrice
(
id
);
return
forward
(
"processQuotedPriceDetail"
,
processQuotedPrice
);
}
public
String
queryProcessQuotedPriceItems
(){
SDO
sdo
=
this
.
getSDO
();
ProcessQuotedPriceQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
ProcessQuotedPriceQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
this
.
processQuotedPriceItemApplication
.
queryProcessQuotedPriceItems
(
queryRequest
);
return
toResult
(
map
);
}
public
String
deleteProcessQuotedPriceItem
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
processQuotedPriceItemApplication
.
deleteByIds
(
ids
);
return
success
();
}
public
String
queryProcessQuotedPriceItemNumbers
(){
SDO
sdo
=
this
.
getSDO
();
ProcessQuotedPriceQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
ProcessQuotedPriceQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
this
.
processQuotedPriceItemNumberApplication
.
queryProcessQuotedPriceItemNumbers
(
queryRequest
);
return
toResult
(
map
);
}
public
String
deleteProcessQuotedPriceItemNumber
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
processQuotedPriceItemNumberApplication
.
deleteByIds
(
ids
);
return
success
();
}
public
String
showBindProcessQuotedPrice
(){
SDO
sdo
=
this
.
getSDO
();
String
string
=
sdo
.
getString
(
"itemId"
);
String
productCode
=
sdo
.
getString
(
"productCode"
);
String
outProcess
=
sdo
.
getString
(
"outProcess"
);
this
.
putAttribute
(
"string"
,
string
);
this
.
putAttribute
(
"productCode"
,
productCode
);
this
.
putAttribute
(
"outProcess"
,
outProcess
);
return
forward
(
"processQuotedPriceNumber"
);
}
/**
* 单独保存数量区间报价
* @return
*/
public
String
saveProcessQuotedPriceItemNumber
(){
SDO
sdo
=
this
.
getSDO
();
String
itemId
=
sdo
.
getString
(
"itemId"
);
List
<
ProcessQuotedPriceItemNumber
>
numberList
=
sdo
.
getList
(
"numberList"
,
ProcessQuotedPriceItemNumber
.
class
);
processQuotedPriceItemNumberApplication
.
saveProcessQuotedPriceItemNumbers
(
itemId
,
numberList
);
return
success
();
}
/**
* 启用、禁用报价单明细
* @return
*/
public
String
updateProcessQuotedPriceItemStatus
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
String
status
=
sdo
.
getString
(
"status"
);
processQuotedPriceItemApplication
.
updateProcessQuotedPriceItemStatus
(
ids
,
status
);
return
success
();
}
public
String
print
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getId
();
Map
<
String
,
Object
>
map
=
this
.
processQuotedPriceItemApplication
.
print
(
id
);
String
pintPage
=
String
.
format
(
"/print/topsun/processQuotedPrice.ftl"
);
return
outputAndProcUnitHandlerPDF
(
pintPage
,
id
,
map
);
}
public
String
findPriceByProductAndProcess
(){
SDO
sdo
=
this
.
getSDO
();
String
productCode
=
sdo
.
getString
(
"productCode"
);
String
outProcess
=
sdo
.
getString
(
"outProcess"
);
String
number
=
sdo
.
getString
(
"number"
);
BigDecimal
price
=
BigDecimal
.
ZERO
;
if
(
StringUtil
.
isNotBlank
(
number
)){
price
=
this
.
processQuotedPriceItemApplication
.
findPriceByProductAndProcess
(
productCode
,
outProcess
,
new
BigDecimal
(
number
));
}
return
success
(
price
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/domain/ProcessQuotedPrice.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
domain
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
java.util.Date
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/13:47
* @Description: 工序报价
*/
@Data
@Entity
@Table
(
name
=
"sap_process_quoted_price"
)
public
class
ProcessQuotedPrice
extends
FlowBillAbstractEntity
{
/**
* 供应商
*/
@Column
(
name
=
"supplier"
)
private
String
supplier
;
@Column
(
name
=
"supplier_name"
)
private
String
supplierName
;
/**
* 报价日期
*/
@Column
(
name
=
"quoted_price_date"
)
private
Date
quotedPriceDate
;
/**
* 支付方式
*/
@Column
(
name
=
"pay_method"
)
private
String
payMethod
;
/**
* 币别
*/
@Column
(
name
=
"currency"
)
private
String
currency
;
/**
* 币别描述
*/
@Column
(
name
=
"currency_name"
)
private
String
currencyName
;
/**
* 备注
*/
@Column
(
name
=
"remark"
)
private
String
remark
;
@Override
protected
String
getCodeRuleId
()
{
return
"processQuotedPrice"
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/domain/ProcessQuotedPriceItem.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
domain
;
import
com.huigou.data.domain.model.AbstractEntity
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/13:47
* @Description: 工序报价明细
*/
@Data
@Entity
@Table
(
name
=
"sap_process_quoted_price_item"
)
public
class
ProcessQuotedPriceItem
extends
AbstractEntity
{
@Column
(
name
=
"process_quoted_price_id"
)
private
String
processQuotedPriceId
;
/**
* 项次
*/
@Column
(
name
=
"item_no"
)
private
String
itemNo
;
/**
* 启用 1
* 禁用 0
*/
@Column
(
name
=
"status"
)
private
String
status
;
/**
* 外发工序
*/
@Column
(
name
=
"out_process"
)
private
String
outProcess
;
/**
* 外发工序描述
*/
@Column
(
name
=
"out_process_name"
)
private
String
outProcessName
;
/**
* 机台
*/
@Column
(
name
=
"machine_tool"
)
private
String
machineTool
;
/**
* 印刷色素
*/
@Column
(
name
=
"print_color"
)
private
String
printColor
;
/**
* 产品编码
*/
@Column
(
name
=
"product_code"
)
private
String
productCode
;
/**
* 产品名称
*/
@Column
(
name
=
"product_name"
)
private
String
productName
;
/**
* 单位
*/
@Column
(
name
=
"unit_name"
)
private
String
unitName
;
/**
* 库存名称
*/
@Column
(
name
=
"store_name"
)
private
String
storeName
;
/**
* 备注
*/
@Column
(
name
=
"remark"
)
private
String
remark
;
/**
* 禁用人id
*/
@Column
(
name
=
"disable_person_id"
)
private
String
disablePersonId
;
/**
* 禁用人
*/
@Column
(
name
=
"disable_person_name"
)
private
String
disablePersonName
;
/**
* 禁用时间
*/
@Column
(
name
=
"disable_date"
)
private
Date
disableDate
;
/**
* 禁用原因
*/
@Column
(
name
=
"disable_reason"
)
private
String
disableReason
;
@Transient
private
List
<
Map
<
String
,
Object
>>
numberList
;
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/domain/ProcessQuotedPriceItemNumber.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
domain
;
import
com.huigou.data.domain.model.AbstractEntity
;
import
lombok.Builder
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.ws.rs.DefaultValue
;
import
java.math.BigDecimal
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/13:47
* @Description: 工序报价明细数量区间
*/
@Data
@Entity
@Table
(
name
=
"sap_process_quoted_price_item_number"
)
public
class
ProcessQuotedPriceItemNumber
extends
AbstractEntity
{
@Column
(
name
=
"process_quoted_price_item_id"
)
private
String
processQuotedPriceItemId
;
/**
* 数量起
*/
@Column
(
name
=
"number_from"
)
private
BigDecimal
numberFrom
;
/**
* 数量止
*/
@Column
(
name
=
"number_to"
)
private
BigDecimal
numberTo
;
/**
* 数量区间
*/
@Column
(
name
=
"number_section"
)
private
String
numberSection
;
/**
* 备注
*/
@Column
(
name
=
"remark"
)
private
String
remark
;
/**
* 含税单价
*/
@Column
(
name
=
"unit_price"
)
private
BigDecimal
unitPrice
;
/**
* 不含税单价
*/
@Column
(
name
=
"exclude_tax_price"
)
private
BigDecimal
excludeTaxPrice
;
/**
* 最低消费
*/
@Column
(
name
=
"minimum"
)
private
BigDecimal
minimum
;
/**
* LOSS数
*/
@Column
(
name
=
"loss_number"
)
private
BigDecimal
lossNumber
;
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/domain/query/ProcessQuotedPriceQueryRequest.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:10
* @Description:
*/
@Data
public
class
ProcessQuotedPriceQueryRequest
extends
QueryAbstractRequest
{
private
String
billCode
;
private
String
processQuotedPriceId
;
private
String
processQuotedPriceItemId
;
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/domain/vo/ProcessQuotedPricePrintVo.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
domain
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @Auther: xin.lu
* @Date: 2024/11/01/11:20
* @Description:
*/
@Data
public
class
ProcessQuotedPricePrintVo
implements
Serializable
{
/**
* 项次
*/
private
String
itemNo
;
/**
* 产品编码
*/
private
String
productCode
;
/**
* 产品名称
*/
private
String
productName
;
/**
* 单位
*/
private
String
unitName
;
/**
* 数量区间
*/
private
String
numberSection
;
/**
* 备注
*/
private
String
remark
;
/**
* 含税单价
*/
private
BigDecimal
unitPrice
;
/**
* 不含税单价
*/
private
BigDecimal
excludeTaxPrice
;
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/repository/ProcessQuotedPriceItemNumberRepository.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
repository
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPriceItemNumber
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:08
* @Description:
*/
public
interface
ProcessQuotedPriceItemNumberRepository
extends
JpaRepository
<
ProcessQuotedPriceItemNumber
,
String
>
{
List
<
ProcessQuotedPriceItemNumber
>
findByProcessQuotedPriceItemId
(
String
processQuotedPriceItemId
);
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/repository/ProcessQuotedPriceItemRepository.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
repository
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPriceItem
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:07
* @Description:
*/
public
interface
ProcessQuotedPriceItemRepository
extends
JpaRepository
<
ProcessQuotedPriceItem
,
String
>
{
List
<
ProcessQuotedPriceItem
>
findByProcessQuotedPriceId
(
String
processQuotedPriceId
);
/**
* 根据产品编码和工序编码查询报价明细
* @param productCode
* @param outProcess
* @return
*/
ProcessQuotedPriceItem
findByProductCodeAndOutProcess
(
String
productCode
,
String
outProcess
);
}
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/repository/ProcessQuotedPriceRepository.java
0 → 100644
View file @
6146f2cc
package
com
.
huigou
.
topsun
.
sap
.
processQuotedPrice
.
repository
;
import
com.huigou.topsun.sap.processQuotedPrice.domain.ProcessQuotedPrice
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:06
* @Description:
*/
public
interface
ProcessQuotedPriceRepository
extends
JpaRepository
<
ProcessQuotedPrice
,
String
>
{
}
topsun/src/main/resources/config/bpm/topsun/sap/processQuotedPrice/processQuotedPrice.bpmn
0 → 100644
View file @
6146f2cc
<?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=
"processQuotedPriceProc"
name=
"工序报价"
isExecutable=
"true"
>
<extensionElements>
<activiti:executionListener
event=
"start"
delegateExpression=
"#{processQuotedPriceApplication}"
></activiti:executionListener>
<activiti:executionListener
event=
"end"
delegateExpression=
"#{processQuotedPriceApplication}"
></activiti:executionListener>
</extensionElements>
<startEvent
id=
"startevent1"
name=
"Start"
></startEvent>
<endEvent
id=
"endevent1"
name=
"End"
></endEvent>
<userTask
id=
"Apply"
name=
"工序报价申请"
activiti:formKey=
"processQuotedPrice/showProcessQuotedPriceDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{processQuotedPriceApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{processQuotedPriceApplication}"
></activiti:taskListener>
</extensionElements>
</userTask>
<userTask
id=
"Approve"
name=
"工序报价审批"
activiti:assignee=
"${assignee} "
activiti:formKey=
"processQuotedPrice/showProcessQuotedPriceDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{processQuotedPriceApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{processQuotedPriceApplication}"
></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_processQuotedPriceProc"
>
<bpmndi:BPMNPlane
bpmnElement=
"processQuotedPriceProc"
id=
"BPMNPlane_processQuotedPriceProc"
>
<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/processQuotedPrice/processQuotedPrice.xml
0 → 100644
View file @
6146f2cc
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"slicedProcessQuotedPriceList"
table=
"sap_process_quoted_price"
>
<sql-query>
SELECT t.* FROM sap_process_quoted_price t
</sql-query>
<condition
column=
"bill_code"
name=
"billCode"
type=
"java.lang.String"
symbol=
"like"
alias=
"t"
/>
<condition
column=
"dept_id"
name=
"deptId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
<condition
column=
"person_member_id"
name=
"personMemberId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
<condition
column=
"fillin_date"
name=
"fillinDateBegin"
type=
"java.util.Date"
symbol=
">="
alias=
"t"
/>
<condition
column=
"fillin_date"
name=
"fillinDateEnd"
type=
"java.util.Date"
symbol=
"<="
alias=
"t"
/>
<condition
column=
"status"
name=
"statusKind"
type=
"java.lang.Integer"
symbol=
"in"
alias=
"t"
/>
</query>
<query
name=
"processQuotedPriceItems"
label=
"报价单明细"
table=
"sap_process_quoted_price_item"
>
<sql-query>
select t.*,"" as numberList from sap_process_quoted_price_item t where 1=1
</sql-query>
<condition
column=
"process_quoted_price_id"
name=
"processQuotedPriceId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"processQuotedPriceItemNumbers"
label=
"报价单明细数量区间"
table=
"sap_process_quoted_price_item_number"
>
<sql-query>
select t.* from sap_process_quoted_price_item_number t where 1=1
</sql-query>
<condition
column=
"process_quoted_price_item_id"
name=
"processQuotedPriceItemId"
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