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
b173ac1d
Commit
b173ac1d
authored
Mar 21, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品质异常报告审批
parent
01511da9
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1465 additions
and
0 deletions
+1465
-0
exceptionReportDetail.js
...p/biz/topsun/sap/exceptionReport/exceptionReportDetail.js
+207
-0
exceptionReportDetail.jsp
.../biz/topsun/sap/exceptionReport/exceptionReportDetail.jsp
+73
-0
exceptionReportList.js
...app/biz/topsun/sap/exceptionReport/exceptionReportList.js
+134
-0
exceptionReportList.jsp
...pp/biz/topsun/sap/exceptionReport/exceptionReportList.jsp
+30
-0
SapResult.java
...n/java/com/huigou/topsun/sap/common/domain/SapResult.java
+13
-0
ExceptionReportApplication.java
...ceptionReport/application/ExceptionReportApplication.java
+26
-0
ExceptionReportDutyPersonApplication.java
...ort/application/ExceptionReportDutyPersonApplication.java
+25
-0
ExceptionReportItemApplication.java
...ionReport/application/ExceptionReportItemApplication.java
+25
-0
ExceptionReportApplicationImpl.java
...port/application/impl/ExceptionReportApplicationImpl.java
+182
-0
ExceptionReportDutyPersonApplicationImpl.java
...cation/impl/ExceptionReportDutyPersonApplicationImpl.java
+62
-0
ExceptionReportItemApplicationImpl.java
.../application/impl/ExceptionReportItemApplicationImpl.java
+62
-0
ExceptionReportController.java
...exceptionReport/controller/ExceptionReportController.java
+142
-0
ExceptionReport.java
...ou/topsun/sap/exceptionReport/domain/ExceptionReport.java
+121
-0
ExceptionReportDutyPerson.java
...sap/exceptionReport/domain/ExceptionReportDutyPerson.java
+71
-0
ExceptionReportItem.java
...opsun/sap/exceptionReport/domain/ExceptionReportItem.java
+101
-0
ExceptionReportQueryRequest.java
...ptionReport/domain/query/ExceptionReportQueryRequest.java
+14
-0
ExceptionReportDutyPersonRepository.java
...eport/repository/ExceptionReportDutyPersonRepository.java
+15
-0
ExceptionReportItemRepository.java
...ptionReport/repository/ExceptionReportItemRepository.java
+15
-0
ExceptionReportRepository.java
...exceptionReport/repository/ExceptionReportRepository.java
+12
-0
exceptionReportProc.bpmn
...g/bpm/topsun/sap/exceptionReport/exceptionReportProc.bpmn
+111
-0
exceptionReport.xml
...ces/config/topsun/sap/exceptionReport/exceptionReport.xml
+24
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/exceptionReport/exceptionReportDetail.js
0 → 100644
View file @
b173ac1d
var
itemGridManager
,
dutyPersonGridManager
=
null
$
(
function
()
{
initItemGrid
();
initDutyPersonGridGrid
();
bindEvent
();
});
function
bindEvent
()
{
}
function
initItemGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
(){
UICtrl
.
addGridRow
(
itemGridManager
);
},
deleteHandler
:
function
(){
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'exceptionReport/deleteExceptionReport.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
},
});
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
getGridColumns
(),
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/exceptionReport/slicedExceptionReportItemList.ajax'
,
parms
:{
exceptionReportId
:
getId
()},
height
:
'300px'
,
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
:
"produceNo"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"产品编码"
,
name
:
"productCode"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"产品名称"
,
name
:
"productName"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"数量"
,
name
:
"number"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"单位"
,
name
:
"unitName"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"币别"
,
name
:
"currencyName"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"金额"
,
name
:
"money"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"转换成人民币金额"
,
name
:
"rmbMoney"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"出货日期"
,
name
:
"sendDate"
,
width
:
"200"
,
align
:
"left"
,
type
:
"date"
,
editor
:
{
type
:
"date"
}
}
]
return
columns
;
}
function
initDutyPersonGridGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
(){
UICtrl
.
addGridRow
(
dutyPersonGridManager
);
},
deleteHandler
:
function
(){
var
_grid
=
UICtrl
.
getGridManager
(
'#dutyPersonGrid'
);
DataUtil
.
delSelectedRows
({
action
:
'exceptionReport/deleteExceptionReportDutyPerson.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
},
});
dutyPersonGridManager
=
UICtrl
.
grid
(
'#dutyPersonGrid'
,
{
columns
:
getDutyPersonGridColumns
(),
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/exceptionReport/slicedExceptionReportDutyPersonList.ajax'
,
parms
:{
exceptionReportId
:
getId
()},
height
:
'300px'
,
heightDiff
:
-
4
,
sortName
:
'id'
,
sortOrder
:
'asc'
,
checkbox
:
true
,
usePager
:
true
,
rownumbers
:
true
,
enabledEdit
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
//autoApplyNextEditor:false,
toolbar
:
toolbarOptions
,
}
);
UICtrl
.
setSearchAreaToggle
(
dutyPersonGridManager
);
}
function
getDutyPersonGridColumns
()
{
var
columns
=
[];
columns
=
[
{
display
:
"工号/供应商编码/客户名编码"
,
name
:
"personNo"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"姓名/供应商名称/客户名"
,
name
:
"personName"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"部门/供应名称/客户名称"
,
name
:
"deptName"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"定责比例(%)"
,
name
:
"dutyRate"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
,
mask
:
'999.99'
}
},
{
display
:
"个人责任比例(%)"
,
name
:
"personDutyRate"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
,
mask
:
'999.99'
}
},
{
display
:
"责任金额"
,
name
:
"dutyMoney"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"备注"
,
name
:
"remark"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
}
},
]
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
.
exceptionReportItems
=
Public
.
encodeJSONURI
(
datas
);
}
var
_dutyPersonGrid
=
UICtrl
.
getGridManager
(
'#dutyPersonGrid'
);
if
(
_dutyPersonGrid
)
{
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_dutyPersonGrid
,
isAllData
:
true
});
if
(
!
datas
)
{
return
false
;
}
extendedData
.
personList
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
}
function
getId
()
{
return
$
(
'#id'
).
val
();
}
function
setId
(
value
)
{
$
(
"#id"
).
val
(
value
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
_grid
.
options
.
parms
.
exceptionReportId
=
value
;
var
_dutyPersonGrid
=
UICtrl
.
getGridManager
(
'#dutyPersonGrid'
);
_dutyPersonGrid
.
options
.
parms
.
exceptionReportId
=
value
;
}
function
reloadGrid
()
{
itemGridManager
.
loadData
();
dutyPersonGridManager
.
loadData
();
}
topsun-xt/src/main/webapp/biz/topsun/sap/exceptionReport/exceptionReportDetail.jsp
0 → 100644
View file @
b173ac1d
<%--采购申请--%>
<%@ 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/exceptionReport/exceptionReportDetail.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"
/>
<x:hidden
name=
"frgdt"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"exceptionType"
label=
"异常类型"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
dictionary=
"exceptionType"
/>
<x:inputC
name=
"reportDate"
label=
"呈报日期"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"date"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"customerName"
label=
"客户"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"customerOrderNo"
label=
"客户单号"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
</div>
</div>
<x:title
title=
"单号信息"
name=
"group"
hideTable=
"#info"
/>
<div
id=
"maingrid"
></div>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"exceptionState"
required=
"false"
label=
"异常陈诉"
maxLength=
"120"
labelCol=
"1"
fieldCol=
"9"
rows=
"3"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"exceptionReason"
required=
"false"
label=
"异常原因"
maxLength=
"120"
labelCol=
"1"
fieldCol=
"9"
rows=
"3"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"dealMethod"
required=
"false"
label=
"改善措施"
maxLength=
"120"
labelCol=
"1"
fieldCol=
"9"
rows=
"3"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"dutyDeptName"
label=
"责任部门"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
<x:hidden
name=
"dutyDept"
/>
<x:inputC
name=
"checkOperatorName"
label=
"校验员"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
<x:hidden
name=
"checkOperator"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"dealResult"
required=
"false"
label=
"处理结果"
maxLength=
"120"
labelCol=
"1"
fieldCol=
"9"
rows=
"3"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"manager"
label=
"单位主管"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
<x:inputC
name=
"deputyManager"
label=
"副理"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
<x:inputC
name=
"generalManager"
label=
"经理"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"remark"
required=
"false"
label=
"备注"
maxLength=
"120"
labelCol=
"1"
fieldCol=
"9"
rows=
"3"
/>
</div>
</div>
<x:title
title=
"责任人信息"
name=
"group"
hideTable=
"#info"
/>
<div
id=
"dutyPersonGrid"
></div>
</form>
</div>
</body>
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/exceptionReport/exceptionReportList.js
0 → 100644
View file @
b173ac1d
var
gridManager
=
null
,
refreshFlag
=
false
,
_roleId
=
null
,
purchaseSelectedList
=
[];
$
(
document
).
ready
(
function
()
{
initUI
();
initGrid
();
}
);
function
initUI
()
{
UICtrl
.
initDefaultLayout
();
}
function
initGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
addHandler
,
});
gridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
[
{
display
:
"状态"
,
name
:
"statusTextView"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
}
,
{
display
:
"id"
,
name
:
"id"
,
width
:
"140"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
}
,
{
display
:
"品质异常报告编号"
,
name
:
"billCode"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
,
{
display
:
"异常类型"
,
name
:
"exceptionTypeTextView"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
}
,
{
display
:
"呈报日期"
,
name
:
"reportDate"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
,
{
display
:
"客户名称/供应商名称"
,
name
:
"customerName"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
,
{
display
:
"客户单号"
,
name
:
"customerOrderNo"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
,
{
display
:
"异常陈诉"
,
name
:
"exceptionState"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
,
{
display
:
"改善措施"
,
name
:
"dealMethod"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
,
{
display
:
"异常原因"
,
name
:
"exceptionReason"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
,
{
display
:
"校验员"
,
name
:
"checkOperatorName"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
,
{
display
:
"处理结果"
,
name
:
"dealResult"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
,
{
display
:
"备注"
,
name
:
"remark"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"center"
}
],
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/exceptionReport/slicedExceptionReportList.ajax?'
,
//parms: {requireItemId: $("#prepareItemId").val()},
toolbar
:
toolbarOptions
,
width
:
'99.8%'
,
height
:
'100%'
,
pageSize
:
100
,
heightDiff
:
-
4
,
//sortName: 'lastModifiedDate',
//sortOrder: 'desc',
checkbox
:
true
,
usePager
:
true
,
rownumbers
:
true
,
enabledEdit
:
false
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
enableObjectBag
:
true
,
onSuccess
:
function
(
data
)
{
if
(
data
.
error
)
{
Public
.
tip
(
data
.
error
);
}
}
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
viewHandler
(
data
.
id
);
},
onAfterShowData
:
function
(
currentData
)
{
}
}
);
UICtrl
.
setSearchAreaToggle
(
gridManager
);
}
/**
* 查看品质异常报告详情
* @param id 品质异常报告id
* @returns {boolean}
*/
function
viewHandler
(
id
)
{
if
(
!
id
)
{
var
row
=
DataUtil
.
getSelectedRow
(
gridManager
);
if
(
!
row
)
{
return
row
;
}
id
=
row
.
id
;
}
UICtrl
.
addTabItem
({
tabid
:
'viewExceptionReport'
+
id
,
text
:
'查看品质异常报告'
,
url
:
web_app
.
name
+
'/exceptionReport/showExceptionReportDetail.job?isReadOnly=true&bizId='
+
id
});
}
function
addHandler
()
{
UICtrl
.
addTabItem
({
tabid
:
'addExceptionReport'
,
text
:
'新增品质异常报告'
,
url
:
web_app
.
name
+
'/exceptionReport/addExceptionReportDetail.job'
});
}
function
deleteHandler
()
{
var
rows
=
DataUtil
.
getObjectBagData
(
"maingrid"
);
if
(
!
rows
||
rows
.
length
<
1
)
{
Public
.
tip
(
'common.warning.nochoose'
);
return
;
}
var
ids
=
[];
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
var
row
=
rows
[
i
];
if
(
row
.
status
!=
0
)
{
Public
.
errorTip
(
'只能删除草稿状态的数据!'
);
return
;
}
ids
.
push
(
row
.
id
);
}
if
(
!
ids
)
{
return
;
}
Public
.
ajax
(
web_app
.
name
+
'/exceptionReport/deleteExceptionReport.ajax'
,
{
ids
:
$
.
toJSON
(
ids
)},
function
()
{
reloadGrid
();
});
}
function
reloadGrid
()
{
var
params
=
$
(
"#queryMainForm"
).
formToJSON
();
UICtrl
.
gridSearch
(
gridManager
,
params
);
}
function
query
(
obj
)
{
var
param
=
$
(
obj
).
formToJSON
();
UICtrl
.
gridSearch
(
gridManager
,
param
);
}
function
resetForm
(
obj
)
{
$
(
obj
).
formClean
();
}
topsun-xt/src/main/webapp/biz/topsun/sap/exceptionReport/exceptionReportList.jsp
0 → 100644
View file @
b173ac1d
<%@ 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/exceptionReport/exceptionReportList.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=
"#maingrid"
name=
"list"
/>
<div
id=
"maingrid"
style=
"margin:2px;"
></div>
</div>
</div>
</div>
</body>
</html>
topsun/src/main/java/com/huigou/topsun/sap/common/domain/SapResult.java
View file @
b173ac1d
...
@@ -27,6 +27,19 @@ public class SapResult implements Serializable {
...
@@ -27,6 +27,19 @@ public class SapResult implements Serializable {
*/
*/
private
String
MESSAGE_V1
;
private
String
MESSAGE_V1
;
/**
* 行项目号
*/
private
String
MESSAGE_V2
;
private
String
MESSAGE_V2
;
/**
* 凭证号
*/
private
String
MESSAGE_V3
;
/**
* 财年
*/
private
String
MESSAGE_V4
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/application/ExceptionReportApplication.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
application
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReport
;
import
com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/19:36
* @Description:
*/
public
interface
ExceptionReportApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/exceptionReport/exceptionReport.xml"
;
String
PROCESS_DEFINITION_KEY
=
"exceptionReportProc"
;
Map
<
String
,
Object
>
slicedExceptionReportList
(
ExceptionReportQueryRequest
queryRequest
);
ExceptionReport
findById
(
String
id
);
void
deleteById
(
String
id
);
ExceptionReport
saveExceptionReport
(
ExceptionReport
exceptionReport
);
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/application/ExceptionReportDutyPersonApplication.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
application
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportDutyPerson
;
import
com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/19:35
* @Description:
*/
public
interface
ExceptionReportDutyPersonApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/exceptionReport/exceptionReport.xml"
;
List
<
ExceptionReportDutyPerson
>
findByExceptionReportId
(
String
exceptionReportId
);
void
saveExceptionReportDutyPersonList
(
String
exceptionReportId
,
List
<
ExceptionReportDutyPerson
>
personList
);
Map
<
String
,
Object
>
slicedExceptionReportDutyPersonList
(
ExceptionReportQueryRequest
queryRequest
);
void
deleteByIds
(
List
<
String
>
ids
);
void
saveExceptionReportDutyPerson
(
ExceptionReportDutyPerson
exceptionReportDutyPerson
);
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/application/ExceptionReportItemApplication.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
application
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportItem
;
import
com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/19:35
* @Description:
*/
public
interface
ExceptionReportItemApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/exceptionReport/exceptionReport.xml"
;
List
<
ExceptionReportItem
>
findByExceptionReportId
(
String
exceptionReportId
);
void
saveExceptionReportItemList
(
String
exceptionReportId
,
List
<
ExceptionReportItem
>
exceptionReportItems
);
Map
<
String
,
Object
>
slicedExceptionReportItemList
(
ExceptionReportQueryRequest
queryRequest
);
void
deleteByIds
(
List
<
String
>
ids
);
void
saveExceptionReportItem
(
ExceptionReportItem
exceptionReportItem
);
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/application/impl/ExceptionReportApplicationImpl.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
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.exceptionReport.application.ExceptionReportApplication
;
import
com.huigou.topsun.sap.exceptionReport.application.ExceptionReportDutyPersonApplication
;
import
com.huigou.topsun.sap.exceptionReport.application.ExceptionReportItemApplication
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReport
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportDutyPerson
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportItem
;
import
com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest
;
import
com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportRepository
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.util.*
;
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.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/19:36
* @Description:
*/
@Service
(
"exceptionReportApplication"
)
public
class
ExceptionReportApplicationImpl
extends
FlowBroker
implements
ExceptionReportApplication
{
@Autowired
private
ExceptionReportRepository
exceptionReportRepository
;
@Autowired
private
ExceptionReportItemApplication
exceptionReportItemApplication
;
@Autowired
private
ExceptionReportDutyPersonApplication
exceptionReportDutyPersonApplication
;
@Override
public
Map
<
String
,
Object
>
slicedExceptionReportList
(
ExceptionReportQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"exceptionReport"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
queryModel
.
putDictionary
(
"status"
,
BizBillStatus
.
getMap
());
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
@Override
public
ExceptionReport
findById
(
String
id
)
{
return
exceptionReportRepository
.
findOne
(
id
);
}
@Override
public
void
deleteById
(
String
id
)
{
exceptionReportRepository
.
delete
(
id
);
}
@Override
public
ExceptionReport
saveExceptionReport
(
ExceptionReport
exceptionReport
)
{
return
exceptionReportRepository
.
save
(
exceptionReport
);
}
@Transactional
private
void
updateStatus
(
String
bizId
,
BizBillStatus
status
)
{
Assert
.
hasText
(
bizId
,
CommonDomainConstants
.
ID_NOT_BLANK
);
this
.
commonDomainService
.
updateStatus
(
ExceptionReport
.
class
,
bizId
,
status
.
getId
());
}
/**
* 保存业务数据
*/
@Override
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
ExceptionReport
exceptionReport
=
this
.
getBizEntity
(
ExceptionReport
.
class
);
List
<
ExceptionReportItem
>
exceptionReportItems
=
this
.
getBizEntities
(
ExceptionReportItem
.
class
,
"exceptionReportItems"
);
List
<
ExceptionReportDutyPerson
>
exceptionReportDutyPersonList
=
this
.
getBizEntities
(
ExceptionReportDutyPerson
.
class
,
"personList"
);
exceptionReport
=
this
.
saveExceptionReport
(
exceptionReport
);
this
.
exceptionReportItemApplication
.
saveExceptionReportItemList
(
exceptionReport
.
getId
(),
exceptionReportItems
);
this
.
exceptionReportDutyPersonApplication
.
saveExceptionReportDutyPersonList
(
exceptionReport
.
getId
(),
exceptionReportDutyPersonList
);
return
exceptionReport
.
getId
();
}
/**
* 获取流程参数
*/
@Override
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
return
ClassHelper
.
toMap
(
exceptionReportRepository
.
findOne
(
bizId
));
}
/**
* 删除流程实例事件
*/
@Override
protected
void
onDeleteProcessInstance
(
DelegateExecution
delegateExecution
)
{
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
deleteApplyAcceptance
(
bizId
);
}
/**
* 终止流程事件
*/
@Override
protected
void
onAbortProcessInstance
(
DelegateExecution
delegateExecution
)
{
super
.
onAbortProcessInstance
(
delegateExecution
);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
updateStatus
(
bizId
,
BizBillStatus
.
ABORTED
);
}
/**
* 流程结束事件
*/
@Override
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
super
.
onEnd
(
delegateExecution
);
BizBillStatus
status
=
BizBillStatus
.
COMPLETED
;
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
ExceptionReport
exceptionReport
=
this
.
findById
(
bizId
);
exceptionReport
.
setStatusId
(
status
.
getId
());
this
.
saveExceptionReport
(
exceptionReport
);
}
/**
* 流程撤销事件
**/
@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
onBack
(
DelegateTask
delegateTask
,
String
destActivityId
)
{
super
.
onBack
(
delegateTask
,
destActivityId
);
String
bizId
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
if
(
destActivityId
.
equalsIgnoreCase
(
"apply"
))
{
updateStatus
(
bizId
,
BizBillStatus
.
APPLYING
);
}
}
/**
* 回收事件
**/
@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
public
void
deleteApplyAcceptance
(
String
id
)
{
Assert
.
hasText
(
id
,
CommonDomainConstants
.
ID_NOT_BLANK
);
exceptionReportRepository
.
delete
(
id
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/application/impl/ExceptionReportDutyPersonApplicationImpl.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.exceptionReport.application.ExceptionReportDutyPersonApplication
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportDutyPerson
;
import
com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest
;
import
com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportDutyPersonRepository
;
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/03/20/19:36
* @Description: 品质异常报告责任人信息
*/
@Service
(
"exceptionReportDutyPersonApplication"
)
public
class
ExceptionReportDutyPersonApplicationImpl
extends
BaseApplication
implements
ExceptionReportDutyPersonApplication
{
@Autowired
private
ExceptionReportDutyPersonRepository
exceptionReportDutyPersonRepository
;
@Override
public
List
<
ExceptionReportDutyPerson
>
findByExceptionReportId
(
String
exceptionReportId
)
{
return
exceptionReportDutyPersonRepository
.
findByExceptionReportId
(
exceptionReportId
);
}
@Override
public
void
saveExceptionReportDutyPersonList
(
String
exceptionReportId
,
List
<
ExceptionReportDutyPerson
>
personList
)
{
for
(
ExceptionReportDutyPerson
exceptionReportDutyPerson
:
personList
)
{
exceptionReportDutyPerson
.
setExceptionReportId
(
exceptionReportId
);
exceptionReportDutyPersonRepository
.
save
(
exceptionReportDutyPerson
);
}
}
@Override
public
Map
<
String
,
Object
>
slicedExceptionReportDutyPersonList
(
ExceptionReportQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getExceptionReportId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"exceptionReportDutyPersons"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
@Override
public
void
deleteByIds
(
List
<
String
>
ids
)
{
for
(
String
id
:
ids
)
{
exceptionReportDutyPersonRepository
.
delete
(
id
);
}
}
@Override
public
void
saveExceptionReportDutyPerson
(
ExceptionReportDutyPerson
exceptionReportDutyPerson
)
{
exceptionReportDutyPersonRepository
.
save
(
exceptionReportDutyPerson
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/application/impl/ExceptionReportItemApplicationImpl.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.exceptionReport.application.ExceptionReportItemApplication
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportItem
;
import
com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest
;
import
com.huigou.topsun.sap.exceptionReport.repository.ExceptionReportItemRepository
;
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/03/20/19:36
* @Description: 品质异常报告订单信息
*/
@Service
(
"exceptionReportItemApplication"
)
public
class
ExceptionReportItemApplicationImpl
extends
BaseApplication
implements
ExceptionReportItemApplication
{
@Autowired
private
ExceptionReportItemRepository
exceptionReportItemRepository
;
@Override
public
List
<
ExceptionReportItem
>
findByExceptionReportId
(
String
exceptionReportId
)
{
return
exceptionReportItemRepository
.
findByExceptionReportId
(
exceptionReportId
);
}
@Override
public
void
saveExceptionReportItemList
(
String
exceptionReportId
,
List
<
ExceptionReportItem
>
exceptionReportItems
)
{
for
(
ExceptionReportItem
exceptionReportItem
:
exceptionReportItems
)
{
exceptionReportItem
.
setExceptionReportId
(
exceptionReportId
);
exceptionReportItemRepository
.
save
(
exceptionReportItem
);
}
}
@Override
public
Map
<
String
,
Object
>
slicedExceptionReportItemList
(
ExceptionReportQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getExceptionReportId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"exceptionReportItems"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
@Override
public
void
deleteByIds
(
List
<
String
>
ids
)
{
for
(
String
id
:
ids
)
{
exceptionReportItemRepository
.
delete
(
id
);
}
}
@Override
public
void
saveExceptionReportItem
(
ExceptionReportItem
exceptionReportItem
)
{
exceptionReportItemRepository
.
save
(
exceptionReportItem
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/controller/ExceptionReportController.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
controller
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.sap.exceptionReport.application.ExceptionReportApplication
;
import
com.huigou.topsun.sap.exceptionReport.application.ExceptionReportDutyPersonApplication
;
import
com.huigou.topsun.sap.exceptionReport.application.ExceptionReportItemApplication
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReport
;
import
com.huigou.topsun.sap.exceptionReport.domain.query.ExceptionReportQueryRequest
;
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.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/19:37
* @Description:
*/
@Controller
@ControllerMapping
(
"/exceptionReport"
)
public
class
ExceptionReportController
extends
CommonController
{
@Autowired
private
ExceptionReportApplication
exceptionReportApplication
;
@Autowired
private
ExceptionReportItemApplication
exceptionReportItemApplication
;
@Autowired
private
ExceptionReportDutyPersonApplication
exceptionReportDutyPersonApplication
;
@Override
protected
String
getPagePath
()
{
return
"/biz/topsun/sap/exceptionReport/"
;
}
/**
* 跳转到品质异常报告查询页面
* @return
*/
public
String
forwardExceptionReportList
(){
return
forward
(
"exceptionReportList"
);
}
/**
* 条件查询品质异常报告
* @return
*/
public
String
slicedExceptionReportList
(){
SDO
sdo
=
this
.
getSDO
();
ExceptionReportQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
ExceptionReportQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
exceptionReportApplication
.
slicedExceptionReportList
(
queryRequest
);
return
toResult
(
map
);
}
/**
* 跳转到新增品质异常报告页面
* @return
*/
public
String
addExceptionReportDetail
(){
this
.
putAttribute
(
"processDefinitionKey"
,
ExceptionReportApplication
.
PROCESS_DEFINITION_KEY
);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
ExceptionReport
exceptionReport
=
new
ExceptionReport
();
exceptionReport
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
Operator
operator
=
getOperator
();
exceptionReport
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
return
forward
(
"exceptionReportDetail"
,
exceptionReport
);
}
/**
* 跳转到品质异常报告详情页面
* @return
*/
public
String
showExceptionReportDetail
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
ExceptionReport
exceptionReport
=
exceptionReportApplication
.
findById
(
id
);
return
forward
(
"exceptionReportDetail"
,
exceptionReport
);
}
/**
* 删除品质异常报告
* @return
*/
public
String
deleteExceptionReport
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
for
(
String
id
:
ids
)
{
exceptionReportApplication
.
deleteById
(
id
);
}
return
success
();
}
/**
* 条件查询品质异常报告明细
* @return
*/
public
String
slicedExceptionReportItemList
(){
SDO
sdo
=
this
.
getSDO
();
ExceptionReportQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
ExceptionReportQueryRequest
.
class
);
return
toResult
(
exceptionReportItemApplication
.
slicedExceptionReportItemList
(
queryRequest
));
}
/**
* 删除品质异常报告明细
* @return
*/
public
String
deleteExceptionReportItem
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
exceptionReportItemApplication
.
deleteByIds
(
ids
);
return
success
();
}
/**
* 条件查询品质异常报告责任人
* @return
*/
public
String
slicedExceptionReportDutyPersonList
(){
SDO
sdo
=
this
.
getSDO
();
ExceptionReportQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
ExceptionReportQueryRequest
.
class
);
return
toResult
(
exceptionReportDutyPersonApplication
.
slicedExceptionReportDutyPersonList
(
queryRequest
));
}
/**
* 删除品质异常报告责任人
* @return
*/
public
String
deleteExceptionReportDutyPerson
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
exceptionReportDutyPersonApplication
.
deleteByIds
(
ids
);
return
success
();
}
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/domain/ExceptionReport.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
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/03/20/16:37
* @Description: 品质异常报告
*/
@Data
@Entity
@Table
(
name
=
"sap_exception_report"
)
public
class
ExceptionReport
extends
FlowBillAbstractEntity
{
/**
* 异常类型
*/
@Column
(
name
=
"exception_type"
)
private
String
exceptionType
;
/**
* 呈报日期
*/
@Column
(
name
=
"report_date"
)
private
Date
reportDate
;
/**
* 客户名称/供应商名称
*/
@Column
(
name
=
"customer_name"
)
private
String
customerName
;
/**
* 客户单号
*/
@Column
(
name
=
"customer_order_no"
)
private
String
customerOrderNo
;
/**
* 异常陈诉
*/
@Column
(
name
=
"exception_state"
)
private
String
exceptionState
;
/**
* 异常原因
*/
@Column
(
name
=
"exception_reason"
)
private
String
exceptionReason
;
/**
* 改善措施
*/
@Column
(
name
=
"deal_method"
)
private
String
dealMethod
;
/**
* 责任部门
*/
@Column
(
name
=
"duty_dept"
)
private
String
dutyDept
;
/**
* 责任部门名称
*/
@Column
(
name
=
"duty_dept_name"
)
private
String
dutyDeptName
;
/**
* 校验员
*/
@Column
(
name
=
"check_operator"
)
private
String
checkOperator
;
/**
* 校验员名称
*/
@Column
(
name
=
"check_operator_name"
)
private
String
checkOperatorName
;
/**
* 处理结果
*/
@Column
(
name
=
"deal_result"
)
private
String
dealResult
;
/**
* 单位主管
*/
@Column
(
name
=
"manager"
)
private
String
manager
;
/**
* 副理
*/
@Column
(
name
=
"deputy_manager"
)
private
String
deputyManager
;
/**
* 经理
*/
@Column
(
name
=
"general_manager"
)
private
String
generalManager
;
/**
* 备注
*/
@Column
(
name
=
"remark"
)
private
String
remark
;
@Override
protected
String
getCodeRuleId
()
{
return
"exceptionReport"
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/domain/ExceptionReportDutyPerson.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
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
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/16:37
* @Description: 品质异常报告责任人
*/
@Data
@Entity
@Table
(
name
=
"sap_exception_duty_person"
)
public
class
ExceptionReportDutyPerson
extends
AbstractEntity
{
/**
* 品质异常报告id
*/
@Column
(
name
=
"exception_report_id"
)
private
String
exceptionReportId
;
/**
* 工号/供应商编码/客户名编码
*/
@Column
(
name
=
"person_no"
)
private
String
personNo
;
/**
* 姓名/供应商名称/客户名
*/
@Column
(
name
=
"person_name"
)
private
String
personName
;
/**
* 部门名称
*/
@Column
(
name
=
"dept_name"
)
private
String
deptName
;
/**
* 定责比例
*/
@Column
(
name
=
"duty_rate"
)
private
BigDecimal
dutyRate
;
/**
* 个人责任比例
*/
@Column
(
name
=
"person_duty_rate"
)
private
BigDecimal
personDutyRate
;
/**
* 责任金额
*/
@Column
(
name
=
"duty_money"
)
private
BigDecimal
dutyMoney
;
/**
* 备注
*/
@Column
(
name
=
"remark"
)
private
String
remark
;
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/domain/ExceptionReportItem.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
domain
;
import
com.huigou.data.domain.model.AbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/17:05
* @Description: 品质异常报告明细
*/
@Data
@Entity
@Table
(
name
=
"sap_exception_report_item"
)
public
class
ExceptionReportItem
extends
AbstractEntity
{
/**
* 品质异常报告id
*/
@Column
(
name
=
"exception_report_id"
)
private
String
exceptionReportId
;
/**
* 生产单号/采购/外发单号
*/
@Column
(
name
=
"produce_no"
)
private
String
produceNo
;
/**
* 产品/原材料编码
*/
@Column
(
name
=
"product_code"
)
private
String
productCode
;
/**
* 产品/原材料名称
*/
@Column
(
name
=
"product_name"
)
private
String
productName
;
/**
* 单位
*/
@Column
(
name
=
"unit"
)
private
String
unit
;
/**
* 单位描述
*/
@Column
(
name
=
"unit_name"
)
private
String
unitName
;
/**
* 币别
*/
@Column
(
name
=
"currency"
)
private
String
currency
;
/**
* 币别描述
*/
@Column
(
name
=
"currency_name"
)
private
String
currencyName
;
/**
* 单价
*/
@Column
(
name
=
"price"
)
private
BigDecimal
price
;
/**
* 数量
*/
@Column
(
name
=
"number"
)
private
BigDecimal
number
;
/**
* 金额
*/
@Column
(
name
=
"money"
)
private
BigDecimal
money
;
/**
* 转换成人民币金额
*/
@Column
(
name
=
"rmb_money"
)
private
BigDecimal
rmbMoney
;
/**
* 出货日期
*/
@Column
(
name
=
"send_date"
)
private
Date
sendDate
;
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/domain/query/ExceptionReportQueryRequest.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/19:47
* @Description:
*/
@Data
public
class
ExceptionReportQueryRequest
extends
QueryAbstractRequest
{
private
String
exceptionReportId
;
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/repository/ExceptionReportDutyPersonRepository.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
repository
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportDutyPerson
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/19:35
* @Description:
*/
public
interface
ExceptionReportDutyPersonRepository
extends
JpaRepository
<
ExceptionReportDutyPerson
,
String
>
{
List
<
ExceptionReportDutyPerson
>
findByExceptionReportId
(
String
exceptionReportId
);
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/repository/ExceptionReportItemRepository.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
repository
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportItem
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/19:35
* @Description:
*/
public
interface
ExceptionReportItemRepository
extends
JpaRepository
<
ExceptionReportItem
,
String
>
{
List
<
ExceptionReportItem
>
findByExceptionReportId
(
String
exceptionReportId
);
}
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/repository/ExceptionReportRepository.java
0 → 100644
View file @
b173ac1d
package
com
.
huigou
.
topsun
.
sap
.
exceptionReport
.
repository
;
import
com.huigou.topsun.sap.exceptionReport.domain.ExceptionReport
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @Auther: xin.lu
* @Date: 2024/03/20/19:35
* @Description:
*/
public
interface
ExceptionReportRepository
extends
JpaRepository
<
ExceptionReport
,
String
>
{
}
topsun/src/main/resources/config/bpm/topsun/sap/exceptionReport/exceptionReportProc.bpmn
0 → 100644
View file @
b173ac1d
<?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=
"exceptionReportProc"
name=
"品质异常报告申请"
isExecutable=
"true"
>
<extensionElements>
<activiti:executionListener
event=
"start"
delegateExpression=
"#{exceptionReportApplication}"
></activiti:executionListener>
<activiti:executionListener
event=
"end"
delegateExpression=
"#{exceptionReportApplication}"
></activiti:executionListener>
</extensionElements>
<startEvent
id=
"startevent1"
name=
"Start"
></startEvent>
<endEvent
id=
"endevent1"
name=
"End"
></endEvent>
<userTask
id=
"Apply"
name=
"品质异常报告申请"
activiti:formKey=
"exceptionReport/showExceptionReportDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{exceptionReportApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{exceptionReportApplication}"
></activiti:taskListener>
</extensionElements>
</userTask>
<userTask
id=
"Approve"
name=
"品质异常报告审批"
activiti:assignee=
"${assignee} "
activiti:formKey=
"exceptionReport/showExceptionReportDetail.job"
>
<extensionElements>
<activiti:taskListener
event=
"all"
delegateExpression=
"#{exceptionReportApplication}"
></activiti:taskListener>
<activiti:taskListener
event=
"saveBizData"
delegateExpression=
"#{exceptionReportApplication}"
></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_exceptionReportProc"
>
<bpmndi:BPMNPlane
bpmnElement=
"exceptionReportProc"
id=
"BPMNPlane_exceptionReportProc"
>
<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/exceptionReport/exceptionReport.xml
0 → 100644
View file @
b173ac1d
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"exceptionReport"
label=
"品质异常报告"
table=
"sap_exception_report"
>
<sql-query>
select t.* from sap_exception_report t
</sql-query>
<condition
column=
"bill_code"
name=
"billCode"
type=
"java.lang.String"
symbol=
"like"
alias=
"t"
/>
</query>
<query
name=
"exceptionReportItems"
label=
"品质异常报告明细"
table=
"sap_exception_report_item"
>
<sql-query>
select t.* from sap_exception_report_item t
</sql-query>
<condition
column=
"exception_report_id"
name=
"exceptionReportId"
type=
"java.lang.String"
symbol=
"like"
alias=
"t"
/>
</query>
<query
name=
"exceptionReportDutyPersons"
label=
"品质异常报告"
table=
"sap_exception_duty_person"
>
<sql-query>
select t.* from sap_exception_duty_person t
</sql-query>
<condition
column=
"exception_report_id"
name=
"exceptionReportId"
type=
"java.lang.String"
symbol=
"like"
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