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
67a4f76d
Commit
67a4f76d
authored
Sep 10, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ECN变更单优化
parent
be8d87ab
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
723 additions
and
108 deletions
+723
-108
epChangeFormDetail.js
...rc/main/webapp/biz/topsun/ep/change/epChangeFormDetail.js
+156
-57
epChangeFormDetail.jsp
...c/main/webapp/biz/topsun/ep/change/epChangeFormDetail.jsp
+20
-15
epChangeFormList.js
.../src/main/webapp/biz/topsun/ep/change/epChangeFormList.js
+22
-6
epMaterialChangeFormDetail.js
...webapp/biz/topsun/ep/change/epMaterialChangeFormDetail.js
+323
-0
epMaterialChangeFormDetail.jsp
...ebapp/biz/topsun/ep/change/epMaterialChangeFormDetail.jsp
+82
-0
epSaleOrderCancelList.js
...webapp/biz/topsun/ep/epSaleOrder/epSaleOrderCancelList.js
+2
-0
epSaleOrderList.js
.../main/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderList.js
+17
-12
bsnLogo.png
topsun-xt/src/main/webapp/images/bsnLogo.png
+0
-0
epChangeForm.ftl
...xt/src/main/webapp/template/print/topsun/epChangeForm.ftl
+12
-14
Function.java
topsun/src/main/java/com/huigou/topsun/common/Function.java
+11
-0
EpChangeFormController.java
...u/topsun/ep/change/controller/EpChangeFormController.java
+43
-4
EpChangeForm.java
...java/com/huigou/topsun/ep/change/domain/EpChangeForm.java
+23
-0
EpChangeFormStockItem.java
...huigou/topsun/ep/change/domain/EpChangeFormStockItem.java
+12
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/ep/change/epChangeFormDetail.js
View file @
67a4f76d
This diff is collapsed.
Click to expand it.
topsun-xt/src/main/webapp/biz/topsun/ep/change/epChangeFormDetail.jsp
View file @
67a4f76d
...
...
@@ -25,15 +25,19 @@
<x:hidden
name=
"statusId"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"
fillinDate"
required=
"false"
readonly=
"true"
label=
"日期"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"2"
wrapper=
"dateTime"
/>
<x:inputC
name=
"
changeNo"
required=
"true"
label=
"变更序号"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"2"
/>
<x:inputC
name=
"brandName"
required=
"false"
label=
"品牌名称"
labelCol=
"2"
fieldCol=
"2"
wrapper=
"select"
/>
<x:hidden
name=
"brandCode"
/>
<x:inputC
name=
"deptNameAndPersonName"
required=
"false"
readonly=
"true"
label=
"变更申请部门/姓名"
labelCol=
"2"
fieldCol=
"2"
/>
<x:hidden
name=
"changePersonId"
/>
<x:inputC
name=
"changePerson"
required=
"false"
label=
"变更申请部门/姓名"
labelCol=
"2"
fieldCol=
"2"
wrapper=
"select"
/>
</div>
<div
class=
"hg-form-row"
>
<x:checkboxListC
name=
"reasonForChange"
dictionary=
"reasonForChange
"
required=
"true"
label=
"变更原因"
labelCol=
"2"
fieldCol=
"6"
/>
<x:checkboxListC
name=
"reasonForChange"
list=
"reasonForChangeList
"
required=
"true"
label=
"变更原因"
labelCol=
"2"
fieldCol=
"6"
/>
<x:inputC
name=
"otherReasonDesc"
required=
"false"
label=
"其他原因描述"
labelCol=
"2"
fieldCol=
"2"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"changeMatter"
required=
"false"
label=
"变更事项"
rows=
"3"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"reasonDesc"
required=
"false"
label=
"原因描述"
rows=
"3"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
...
...
@@ -45,27 +49,28 @@
<x:inputC
name=
"pd"
required=
"true"
label=
"产品代号"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"10"
wrapper=
"select"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"productName"
required=
"true"
label=
"产品名称"
labelCol=
"2"
fieldCol=
"10"
readonly=
"true"
/>
<x:inputC
name=
"productName"
required=
"true"
label=
"产品名称"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"process"
required=
"true"
label=
"制程工艺"
labelCol=
"2"
fieldCol=
"10"
wrapper=
"select"
/>
<x:inputC
name=
"process"
required=
"true"
label=
"制程工艺"
labelCol=
"2"
fieldCol=
"10"
/>
<x:hidden
name=
"productionSolutionId"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"otherProcess"
required=
"true"
label=
"涉及成品编码"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"material"
required=
"true"
label=
"原材料"
labelCol=
"2"
fieldCol=
"10"
rows=
"3"
readonly=
"true"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"oldMaterial"
required=
"true"
label=
"旧原材料库存"
labelCol=
"2"
fieldCol=
"10"
rows=
"3"
/>
<x:textareaC
name=
"material"
required=
"true"
label=
"原材料"
labelCol=
"2"
fieldCol=
"10"
rows=
"3"
/>
</div>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="otherProcess" required="false" label="涉及成品编码" labelCol="2" fieldCol="10"/>--%>
<%-- </div>--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:textareaC name="oldMaterial" required="false" label="旧原材料库存" labelCol="2" fieldCol="10" rows="3"/>--%>
<%-- </div>--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="othersMaterialStore" required="false" label="涉及原材料成品库存" labelCol="2" fieldCol="10"/>--%>
<%-- </div>--%>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"others"
required=
"true"
label=
"其他"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"othersMaterialStore"
required=
"true"
label=
"涉及原材料成品库存"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<x:title
title=
"REVISED SPEC 变更后产品信息"
name=
"group"
/>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"changedPd"
required=
"true"
label=
"产品代号"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"10"
/>
...
...
topsun-xt/src/main/webapp/biz/topsun/ep/change/epChangeFormList.js
View file @
67a4f76d
...
...
@@ -10,7 +10,12 @@ function initUI() {
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
addHandler
,
productAddHandler
:
{
id
:
'productAddHandler'
,
img
:
'fa-cog'
,
text
:
'成品变更'
,
click
:
function
(){
productAddHandler
();
}},
materialAddHandler
:
{
id
:
'materialAddHandler'
,
img
:
'fa-cog'
,
text
:
'原材料变更'
,
click
:
function
(){
materialAddHandler
();
}},
exportExcelHandler
:
function
()
{
UICtrl
.
gridExport
(
gridManager
);
},
...
...
@@ -22,10 +27,13 @@ function loadGrid() {
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
{
display
:
"序号"
,
name
:
"changeNo"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"单据编号"
,
name
:
"billCode"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"变更
原因"
,
name
:
"reasonForChangeTextView"
,
width
:
15
0
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"变更
事项"
,
name
:
"changeMatter"
,
width
:
20
0
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"产品代号"
,
name
:
"pd"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"产品名称"
,
name
:
"productName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"变更原因"
,
name
:
"reasonForChangeTextView"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"变更原因"
,
name
:
"reasonDesc"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"审批状态"
,
name
:
"statusTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"创建日期"
,
name
:
"fillinDate"
,
width
:
120
,
minWidth
:
60
,
type
:
"date"
,
align
:
"left"
},
{
display
:
"申请人"
,
name
:
"personMemberName"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
...
...
@@ -65,11 +73,19 @@ function resetForm(obj) {
$
(
obj
).
formClean
();
}
function
addHandler
()
{
function
productAddHandler
()
{
UICtrl
.
addTabItem
({
tabid
:
'epProductChangeForm'
,
text
:
"新增成品变更申请/通知单"
,
url
:
web_app
.
name
+
'/epChangeForm/forwardEpChangeFormDetail.job?type=product'
});
}
function
materialAddHandler
()
{
UICtrl
.
addTabItem
({
tabid
:
'epChangeForm'
,
text
:
"新增变更申请/通知单"
,
url
:
web_app
.
name
+
'/epChangeForm/forwardEpChangeFormDetail.job'
tabid
:
'ep
Material
ChangeForm'
,
text
:
"新增
原材料
变更申请/通知单"
,
url
:
web_app
.
name
+
'/epChangeForm/forwardEpChangeFormDetail.job
?type=material
'
});
}
...
...
topsun-xt/src/main/webapp/biz/topsun/ep/change/epMaterialChangeFormDetail.js
0 → 100644
View file @
67a4f76d
This diff is collapsed.
Click to expand it.
topsun-xt/src/main/webapp/biz/topsun/ep/change/epMaterialChangeFormDetail.jsp
0 → 100644
View file @
67a4f76d
<%@ 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"
/>
<x:script
src=
'/biz/topsun/ep/change/epMaterialChangeFormDetail.js'
/>
</head>
<body>
<div
class=
"container-fluid"
>
<x:billTitle
title=
"宝绅内部原材料变更申请/通知单"
needStatus=
"false"
needPerson=
"true"
/>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"id"
/>
<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=
"personMemberName"
/>
<x:hidden
name=
"statusId"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"changeNo"
required=
"true"
label=
"变更序号"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"2"
/>
<x:hidden
name=
"changePersonId"
/>
<x:inputC
name=
"changePerson"
required=
"false"
label=
"变更申请部门/姓名"
labelCol=
"2"
fieldCol=
"2"
wrapper=
"select"
/>
</div>
<div
class=
"hg-form-row"
>
<x:checkboxListC
name=
"reasonForChange"
list=
"reasonForChangeList"
required=
"true"
label=
"变更原因"
labelCol=
"2"
fieldCol=
"6"
/>
<x:inputC
name=
"otherReasonDesc"
required=
"false"
label=
"其他原因描述"
labelCol=
"2"
fieldCol=
"2"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"changeMatter"
required=
"false"
label=
"变更事项"
rows=
"3"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"reasonDesc"
required=
"false"
label=
"原因描述"
rows=
"3"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<div
class=
"hg-form-row"
>
<x:checkboxListC
name=
"changeEffective"
dictionary=
"changeEffective"
required=
"true"
label=
"生效日期"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<x:title
title=
"CURRENT SPEC 目前产品信息"
name=
"group"
/>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"pd"
required=
"true"
label=
"产品代号"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"10"
wrapper=
"select"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"productName"
required=
"true"
label=
"产品名称"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"otherProcess"
required=
"false"
label=
"涉及成品编码"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"oldMaterial"
required=
"false"
label=
"旧原材料库存"
labelCol=
"2"
fieldCol=
"10"
rows=
"3"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"othersMaterialStore"
required=
"false"
label=
"涉及原材料成品库存"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<x:title
title=
"REVISED SPEC 变更后产品信息"
name=
"group"
/>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"changedPd"
required=
"true"
label=
"产品代号"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"10"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"changedProductName"
required=
"true"
label=
"产品名称"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
</div>
<div
style=
"padding-top: 15px;"
>
<x:fileList
bizCode=
"change"
bizId=
"id"
id=
"changeList"
title=
"附件"
/>
</div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"Implementation 执行人(版具/模具等)"
name=
"group"
/>
<div
id=
"maingrid"
style=
"margin: 2px;"
></div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"Stock / Inventory 库存"
name=
"group"
/>
<div
id=
"stockMainGrid"
style=
"margin: 2px;"
></div>
</form>
</div>
</body>
</html>
topsun-xt/src/main/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderCancelList.js
View file @
67a4f76d
...
...
@@ -26,6 +26,8 @@ function loadGrid() {
{
display
:
"状态码"
,
name
:
"code"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"消息"
,
name
:
"msg"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
],
_tableKey
:
'epSaleOrderCancel'
,
_local
:
true
,
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/epSaleOrderCancel/slicedEpSaleOrderCancelList.ajax'
,
pageSize
:
20
,
...
...
topsun-xt/src/main/webapp/biz/topsun/ep/epSaleOrder/epSaleOrderList.js
View file @
67a4f76d
...
...
@@ -8,12 +8,7 @@ function initUI() {
UICtrl
.
initDefaultLayout
();
}
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
//addHandler: addHandler,
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
var
defaultcols
=
[
{
display
:
"单据编号"
,
name
:
"billCode"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"创建日期"
,
name
:
"fillinDate"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"申请人"
,
name
:
"personMemberName"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
...
...
@@ -24,7 +19,16 @@ function loadGrid() {
{
display
:
"审批状态"
,
name
:
"statusTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"状态码"
,
name
:
"code"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"消息"
,
name
:
"msg"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
],
]
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
//addHandler: addHandler,
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
defaultcols
,
_tableKey
:
'epSaleOrder'
,
_local
:
true
,
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/epSaleOrder/slicedEpSaleOrderList.ajax'
,
pageSize
:
20
,
...
...
@@ -43,6 +47,7 @@ function loadGrid() {
UICtrl
.
setSearchAreaToggle
(
gridManager
);
}
function
query
(
obj
)
{
var
param
=
$
(
obj
).
formToJSON
();
UICtrl
.
gridSearch
(
gridManager
,
param
);
...
...
topsun-xt/src/main/webapp/images/bsnLogo.png
0 → 100644
View file @
67a4f76d
19 KB
topsun-xt/src/main/webapp/template/print/topsun/epChangeForm.ftl
View file @
67a4f76d
...
...
@@ -14,8 +14,8 @@
<body>
<div
class=
"billTitle"
>
<span
style=
"position: absolute"
>
<img
src=
"${bsnPng}"
></img
>
<span
style=
"position: absolute
;margin-left: 50px
"
>
<img
src=
'data:image/jpg;base64,${bsnPng}'
width=
"100px"
/
>
</span>
宝绅内部变更申请/通知单
</div>
<div
class=
"billTitle"
>
Specification Change Form
</div>
...
...
@@ -59,28 +59,26 @@
<col
width=
'100%'
/>
</colgroup>
<tr>
<td
class=
"left"
>
${reasonForChange?default("")?html}
<span
style=
"text-decoration: underline"
>
${otherReasonDesc?default("")?html}
</span>
</td>
<td
class=
"left"
>
${reasonForChange?default("")?html}
</td>
<td
class=
"left"
>
${otherReasonDesc?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'17%'
/>
<col
width=
'83%'
/>
<col
width=
'100%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
CHANGE EFFECTIVE 生效日期:
</td>
<td
class=
"left"
>
${changeEffective?default("")?html}
</td>
<td
class=
"left"
>
CHANGE EFFECTIVE 生效日期:
<span
style=
"text-decoration: underline"
>
${changeEffective?default("")?html}
</span>
</td>
</tr>
</table>
<div
class=
"title"
style=
"background: #CC8F81;text-align: center"
>
Change Details 变更内容
</div>
<div
class=
"title"
style=
"background: yellow;text-align: left"
>
CURRENT SPEC 目前产品信息
</div>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'
17
%'
/>
<col
width=
'
83
%'
/>
<col
width=
'
22
%'
/>
<col
width=
'
78
%'
/>
</colgroup>
<tr>
<td
class=
"left"
>
...
...
@@ -112,8 +110,8 @@
<div
class=
"title"
style=
"background: yellow;text-align: left"
>
REVISED SPEC 变更后产品信息
</div>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'
17
%'
/>
<col
width=
'
83
%'
/>
<col
width=
'
22
%'
/>
<col
width=
'
78
%'
/>
</colgroup>
<tr>
<td
class=
"left"
>
...
...
topsun/src/main/java/com/huigou/topsun/common/Function.java
View file @
67a4f76d
...
...
@@ -123,4 +123,15 @@ public class Function extends AbstractDaoFunction {
}
return
orgUnits
;
}
/**
* 根据业务主表id查询审批人
* @param bizId
* @return
*/
public
List
<
OrgUnit
>
fundApproval
(
String
bizId
){
Assert
.
hasText
(
bizId
,
"参数id不能为空。"
);
String
sql
=
this
.
getSqlByname
(
"fundApproval"
);
return
this
.
sqlExecutorDao
.
queryToList
(
sql
,
OrgUnit
.
class
,
bizId
);
}
}
topsun/src/main/java/com/huigou/topsun/ep/change/controller/EpChangeFormController.java
View file @
67a4f76d
package
com
.
huigou
.
topsun
.
ep
.
change
.
controller
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.cache.SystemCache
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
...
...
@@ -9,19 +10,27 @@ import com.huigou.topsun.ep.change.application.EpChangeFormImplItemApplication;
import
com.huigou.topsun.ep.change.application.EpChangeFormStockItemApplication
;
import
com.huigou.topsun.ep.change.domain.EpChangeForm
;
import
com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest
;
import
com.huigou.topsun.ep.order.controller.EpSaleOrderCancelController
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.engine.application.ActApplication
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
sun.misc.BASE64Encoder
;
import
javax.annotation.Resource
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -33,6 +42,7 @@ import java.util.Map;
@Controller
@ControllerMapping
(
"/epChangeForm"
)
public
class
EpChangeFormController
extends
CommonController
{
private
final
static
Logger
LOG
=
LoggerFactory
.
getLogger
(
EpChangeFormController
.
class
);
@Override
protected
String
getPagePath
()
{
return
"/biz/topsun/ep/change/"
;
...
...
@@ -69,13 +79,33 @@ public class EpChangeFormController extends CommonController {
*/
Operator
operator
=
getOperator
();
epChangeForm
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
Map
<
String
,
String
>
reasonForChange
=
new
HashMap
<>();
String
type
=
this
.
getSDO
().
getString
(
"type"
);
if
(
"product"
.
equals
(
type
)){
reasonForChange
=
DictUtil
.
getDictionary
(
"reasonForChange"
);
reasonForChange
.
remove
(
"MATERIAL CHANGE"
);
this
.
putAttribute
(
"reasonForChangeList"
,
reasonForChange
);
return
forward
(
"epChangeFormDetail"
,
epChangeForm
);
}
else
{
reasonForChange
.
put
(
"MATERIAL CHANGE"
,
"原材料变更"
);
this
.
putAttribute
(
"reasonForChangeList"
,
reasonForChange
);
return
forward
(
"epMaterialChangeFormDetail"
,
epChangeForm
);
}
}
public
String
showEpChangeFormDetail
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
EpChangeForm
epChangeForm
=
epChangeFormApplication
.
findEpChangeFormById
(
id
);
Map
<
String
,
String
>
reasonForChange
=
new
HashMap
<>();
if
(
"MATERIAL CHANGE"
.
equals
(
epChangeForm
.
getReasonForChange
())){
reasonForChange
.
put
(
"MATERIAL CHANGE"
,
"原材料变更"
);
this
.
putAttribute
(
"reasonForChangeList"
,
reasonForChange
);
return
forward
(
"epMaterialChangeFormDetail"
,
epChangeForm
);
}
reasonForChange
=
DictUtil
.
getDictionary
(
"reasonForChange"
);
reasonForChange
.
remove
(
"MATERIAL CHANGE"
);
this
.
putAttribute
(
"reasonForChangeList"
,
reasonForChange
);
return
forward
(
"epChangeFormDetail"
,
epChangeForm
);
}
...
...
@@ -140,8 +170,18 @@ public class EpChangeFormController extends CommonController {
effective
.
append
(
" √ "
).
append
(
s
).
append
(
" "
).
append
(
stringListTextView
.
get
(
i
));
}
map
.
put
(
"changeEffective"
,
effective
.
toString
());
File
file
=
new
File
(
"bsn.png"
);
map
.
put
(
"bsnPng"
,
file
);
File
file
=
new
File
(
SystemCache
.
getRealPath
()
+
"/images/bsnLogo.png"
);
try
{
FileInputStream
inputFile
=
new
FileInputStream
(
file
);
byte
[]
buffer
=
new
byte
[
inputFile
.
available
()];
inputFile
.
read
(
buffer
);
inputFile
.
close
();
BASE64Encoder
base64Encoder
=
new
BASE64Encoder
();
String
encode
=
base64Encoder
.
encode
(
buffer
);
map
.
put
(
"bsnPng"
,
encode
);
}
catch
(
Exception
e
)
{
LOG
.
error
(
"异常信息:"
+
e
.
getMessage
());
}
// 获取Grid数据
QueryPageRequest
pageModel
=
queryRequest
.
getPageModel
();
pageModel
.
setPageSize
(
20
);
...
...
@@ -149,7 +189,6 @@ public class EpChangeFormController extends CommonController {
queryRequest
.
setEpChangeFormId
(
id
);
Map
<
String
,
Object
>
implItemMap
=
changeFormImplItemApplication
.
findByEpChangeFormId
(
queryRequest
);
Map
<
String
,
Object
>
stockItemMap
=
changeFormStockItemApplication
.
findByEpChangeFormId
(
queryRequest
);
Map
<
String
,
Object
>
queriedApprovalHistory
=
actApplication
.
queryApprovalHistoryByBizId
(
id
);
List
<
Map
<
String
,
Object
>>
mapList
=
this
.
epChangeFormApplication
.
queryApprovalPersons
(
id
);
List
<
Map
<
String
,
Object
>>
implItemMaps
=
(
List
<
Map
<
String
,
Object
>>)
implItemMap
.
get
(
"Rows"
);
List
<
Map
<
String
,
Object
>>
stockItemMaps
=
(
List
<
Map
<
String
,
Object
>>)
stockItemMap
.
get
(
"Rows"
);
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/domain/EpChangeForm.java
View file @
67a4f76d
...
...
@@ -150,6 +150,29 @@ public class EpChangeForm extends FlowBillAbstractEntity {
@Column
(
name
=
"msg"
)
private
String
msg
;
/**
* 变更人员id
*/
@Column
(
name
=
"change_person_id"
)
private
String
changePersonId
;
/**
* 变更人员
*/
@Column
(
name
=
"change_person"
)
private
String
changePerson
;
/**
* 变更单排序
*/
@Column
(
name
=
"change_no"
)
private
String
changeNo
;
/**
* 变更事项
*/
@Column
(
name
=
"change_matter"
)
private
String
changeMatter
;
@Override
protected
String
getCodeRuleId
()
{
return
"epChangeForm"
;
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/domain/EpChangeFormStockItem.java
View file @
67a4f76d
...
...
@@ -37,6 +37,18 @@ public class EpChangeFormStockItem extends AbstractEntity {
@Column
(
name
=
"description"
)
private
String
description
;
/**
* 执行人
*/
@Column
(
name
=
"executor"
)
private
String
executor
;
/**
* 执行人
*/
@Column
(
name
=
"executor_id"
)
private
String
executorId
;
/**
* 确认人
*/
...
...
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