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
824579e3
Commit
824579e3
authored
Feb 27, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ECN变更单复制功能
parent
7e74ab78
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
126 additions
and
14 deletions
+126
-14
epChangeFormDetail.js
...rc/main/webapp/biz/topsun/ep/change/epChangeFormDetail.js
+2
-2
epChangeFormDetail.jsp
...c/main/webapp/biz/topsun/ep/change/epChangeFormDetail.jsp
+1
-0
epChangeFormList.js
.../src/main/webapp/biz/topsun/ep/change/epChangeFormList.js
+17
-0
epMaterialChangeFormDetail.js
...webapp/biz/topsun/ep/change/epMaterialChangeFormDetail.js
+2
-2
epMaterialChangeFormDetail.jsp
...ebapp/biz/topsun/ep/change/epMaterialChangeFormDetail.jsp
+1
-0
EpChangeFormImplItemApplication.java
...p/change/application/EpChangeFormImplItemApplication.java
+2
-0
EpChangeFormStockItemApplication.java
.../change/application/EpChangeFormStockItemApplication.java
+2
-0
EpChangeFormImplItemApplicationImpl.java
...application/impl/EpChangeFormImplItemApplicationImpl.java
+8
-0
EpChangeFormStockItemApplicationImpl.java
...pplication/impl/EpChangeFormStockItemApplicationImpl.java
+8
-0
EpChangeFormController.java
...u/topsun/ep/change/controller/EpChangeFormController.java
+54
-3
EpChangeFormQueryRequest.java
...psun/ep/change/domain/query/EpChangeFormQueryRequest.java
+1
-0
epChangeForm.xml
...c/main/resources/config/topsun/ep/change/epChangeForm.xml
+28
-7
No files found.
topsun-xt/src/main/webapp/biz/topsun/ep/change/epChangeFormDetail.js
View file @
824579e3
...
...
@@ -251,7 +251,7 @@ function loadGrid() {
url
:
web_app
.
name
+
'/epChangeForm/slicedEpChangeFormImplItems.ajax'
,
pageSize
:
10
,
usePager
:
true
,
parms
:{
epChangeFormId
:
getId
()},
parms
:{
epChangeFormId
:
getId
()
,
oldId
:
$
(
'#oldId'
).
val
()
},
toolbar
:
toolbarOptions
,
enabledEdit
:
true
,
width
:
"100%"
,
...
...
@@ -358,7 +358,7 @@ function loadStockGrid() {
url
:
web_app
.
name
+
'/epChangeForm/slicedEpChangeFormStockItems.ajax'
,
pageSize
:
10
,
usePager
:
true
,
parms
:{
epChangeFormId
:
getId
()},
parms
:{
epChangeFormId
:
getId
()
,
oldId
:
$
(
'#oldId'
).
val
()
},
toolbar
:
toolbarOptions
,
enabledEdit
:
true
,
width
:
"100%"
,
...
...
topsun-xt/src/main/webapp/biz/topsun/ep/change/epChangeFormDetail.jsp
View file @
824579e3
...
...
@@ -23,6 +23,7 @@
<x:hidden
name=
"personMemberId"
/>
<x:hidden
name=
"personMemberName"
/>
<x:hidden
name=
"statusId"
/>
<x:hidden
name=
"oldId"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"changeNo"
required=
"true"
label=
"变更序号"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"2"
/>
...
...
topsun-xt/src/main/webapp/biz/topsun/ep/change/epChangeFormList.js
View file @
824579e3
...
...
@@ -25,6 +25,11 @@ function loadGrid() {
printHandler
();
}
},
copyHandler
:{
id
:
'copyHandler'
,
text
:
"复制"
,
img
:
'fa-clipboard'
,
click
:
function
(){
copyQualityInfoRecord
();
}
}
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
...
...
@@ -124,3 +129,15 @@ function printHandler(){
var
url
=
'/epChangeForm/print.load'
;
Public
.
openPostWindow
(
web_app
.
name
+
url
,{
id
:
row
.
id
});
}
function
copyQualityInfoRecord
(){
var
row
=
gridManager
.
getSelectedRow
();
if
(
!
row
)
{
return
;
}
UICtrl
.
addTabItem
({
tabid
:
'epChangeForm'
,
text
:
'新增变更申请/通知单'
,
url
:
web_app
.
name
+
'/epChangeForm/copyEpChangeForm.job?id='
+
row
.
id
});
}
topsun-xt/src/main/webapp/biz/topsun/ep/change/epMaterialChangeFormDetail.js
View file @
824579e3
...
...
@@ -171,7 +171,7 @@ function loadGrid() {
url
:
web_app
.
name
+
'/epChangeForm/slicedEpChangeFormImplItems.ajax'
,
pageSize
:
10
,
usePager
:
true
,
parms
:{
epChangeFormId
:
getId
()},
parms
:{
epChangeFormId
:
getId
()
,
oldId
:
$
(
'#oldId'
).
val
()
},
toolbar
:
toolbarOptions
,
enabledEdit
:
true
,
width
:
"100%"
,
...
...
@@ -278,7 +278,7 @@ function loadStockGrid() {
url
:
web_app
.
name
+
'/epChangeForm/slicedEpChangeFormStockItems.ajax'
,
pageSize
:
10
,
usePager
:
true
,
parms
:{
epChangeFormId
:
getId
()},
parms
:{
epChangeFormId
:
getId
()
,
oldId
:
$
(
'#oldId'
).
val
()
},
toolbar
:
toolbarOptions
,
enabledEdit
:
true
,
width
:
"100%"
,
...
...
topsun-xt/src/main/webapp/biz/topsun/ep/change/epMaterialChangeFormDetail.jsp
View file @
824579e3
...
...
@@ -23,6 +23,7 @@
<x:hidden
name=
"personMemberId"
/>
<x:hidden
name=
"personMemberName"
/>
<x:hidden
name=
"statusId"
/>
<x:hidden
name=
"oldId"
/>
<x:hidden
name=
"reasonForChange"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/application/EpChangeFormImplItemApplication.java
View file @
824579e3
...
...
@@ -18,4 +18,6 @@ public interface EpChangeFormImplItemApplication {
void
saveEpChangeFormImplItems
(
String
epChangeFormId
,
List
<
EpChangeFormImplItem
>
items
);
void
deleteItems
(
List
<
String
>
ids
);
Map
<
String
,
Object
>
findByOldId
(
EpChangeFormQueryRequest
queryRequest
);
}
topsun/src/main/java/com/huigou/topsun/ep/change/application/EpChangeFormStockItemApplication.java
View file @
824579e3
...
...
@@ -18,4 +18,6 @@ public interface EpChangeFormStockItemApplication {
void
saveEpChangeFormStockItems
(
String
epChangeFormId
,
List
<
EpChangeFormStockItem
>
epChangeFormStockItems
);
void
deleteItems
(
List
<
String
>
ids
);
Map
<
String
,
Object
>
findByOldId
(
EpChangeFormQueryRequest
queryRequest
);
}
topsun/src/main/java/com/huigou/topsun/ep/change/application/impl/EpChangeFormImplItemApplicationImpl.java
View file @
824579e3
...
...
@@ -51,4 +51,12 @@ public class EpChangeFormImplItemApplicationImpl extends BaseApplication impleme
changeFormImplItemRepository
.
delete
(
id
);
}
}
@Override
public
Map
<
String
,
Object
>
findByOldId
(
EpChangeFormQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"epChangeFormItemByOldId"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
queryModel
.
putDictionary
(
"confirm"
,
DictUtil
.
getDictionary
(
"confirm"
));
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
}
topsun/src/main/java/com/huigou/topsun/ep/change/application/impl/EpChangeFormStockItemApplicationImpl.java
View file @
824579e3
...
...
@@ -52,4 +52,12 @@ public class EpChangeFormStockItemApplicationImpl extends BaseApplication implem
changeFormStockItemRepository
.
delete
(
id
);
}
}
@Override
public
Map
<
String
,
Object
>
findByOldId
(
EpChangeFormQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"epChangeFormStockItemByOldId"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
queryModel
.
putDictionary
(
"confirm"
,
DictUtil
.
getDictionary
(
"confirm"
));
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
}
topsun/src/main/java/com/huigou/topsun/ep/change/controller/EpChangeFormController.java
View file @
824579e3
...
...
@@ -8,11 +8,15 @@ 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.sap.purchaseInfoRecord.application.SapPurchaseInfoRecordApplication
;
import
com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecord
;
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.ClassHelper
;
import
com.huigou.util.SDO
;
import
com.huigou.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -93,14 +97,27 @@ public class EpChangeFormController extends CommonController {
public
String
slicedEpChangeFormImplItems
(){
SDO
sdo
=
this
.
getSDO
();
EpChangeFormQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
EpChangeFormQueryRequest
.
class
);
return
toResult
(
changeFormImplItemApplication
.
findByEpChangeFormId
(
queryRequest
));
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getEpChangeFormId
())){
map
=
changeFormImplItemApplication
.
findByEpChangeFormId
(
queryRequest
);
}
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getOldId
())
&&
StringUtil
.
isBlank
(
queryRequest
.
getEpChangeFormId
())){
map
=
changeFormImplItemApplication
.
findByOldId
(
queryRequest
);
}
return
toResult
(
map
);
}
public
String
slicedEpChangeFormStockItems
(){
SDO
sdo
=
this
.
getSDO
();
EpChangeFormQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
EpChangeFormQueryRequest
.
class
);
//String epChangeFormId = sdo.getString("epChangeFormId");
return
toResult
(
changeFormStockItemApplication
.
findByEpChangeFormId
(
queryRequest
));
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getEpChangeFormId
())){
map
=
changeFormStockItemApplication
.
findByEpChangeFormId
(
queryRequest
);
}
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getOldId
())
&&
StringUtil
.
isBlank
(
queryRequest
.
getEpChangeFormId
())){
map
=
changeFormStockItemApplication
.
findByOldId
(
queryRequest
);
}
return
toResult
(
map
);
}
public
String
deleteEpChangeFormImplItem
(){
...
...
@@ -130,4 +147,38 @@ public class EpChangeFormController extends CommonController {
String
pintPage
=
String
.
format
((
String
)
map
.
get
(
"printPage"
));
return
outputAndProcUnitHandlerPDF
(
pintPage
,
id
,
map
);
}
/**
* 复制功能
* @return
*/
public
String
copyEpChangeForm
(){
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getString
(
"id"
);
this
.
putAttribute
(
"oldId"
,
id
);
this
.
putAttribute
(
"processDefinitionKey"
,
EpChangeFormApplication
.
PROCESS_DEFINITION_KEY
);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
EpChangeForm
epChangeFormDb
=
epChangeFormApplication
.
findEpChangeFormById
(
id
);
EpChangeForm
epChangeForm
=
new
EpChangeForm
();
ClassHelper
.
copyProperties
(
epChangeFormDb
,
epChangeForm
);
epChangeForm
.
setId
(
""
);
epChangeForm
.
setBillCode
(
""
);
epChangeForm
.
setCode
(
""
);
epChangeForm
.
setMsg
(
""
);
epChangeForm
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
Operator
operator
=
getOperator
();
epChangeForm
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
Map
<
String
,
String
>
reasonForChange
=
new
HashMap
<>();
if
(
""
.
equals
(
epChangeForm
.
getReasonForChange
())){
return
forward
(
"epMaterialChangeFormDetail"
,
epChangeForm
);
}
else
{
reasonForChange
=
DictUtil
.
getDictionary
(
"reasonForChange"
);
this
.
putAttribute
(
"reasonForChangeList"
,
reasonForChange
);
return
forward
(
"epChangeFormDetail"
,
epChangeForm
);
}
}
}
topsun/src/main/java/com/huigou/topsun/ep/change/domain/query/EpChangeFormQueryRequest.java
View file @
824579e3
...
...
@@ -13,4 +13,5 @@ public class EpChangeFormQueryRequest extends QueryAbstractRequest {
private
String
billCode
;
private
String
epChangeFormId
;
private
String
id
;
private
String
oldId
;
}
topsun/src/main/resources/config/topsun/ep/change/epChangeForm.xml
View file @
824579e3
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"epChangeForm"
label=
"EP
销售订
单"
table=
"ep_change_form"
>
<query
name=
"epChangeForm"
label=
"EP
变更
单"
table=
"ep_change_form"
>
<sql-query>
select t.* from ep_change_form t
</sql-query>
...
...
@@ -8,18 +8,25 @@
<condition
column=
"id"
name=
"id"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"ep
SaleOrderItems"
label=
"EP销售订单明细"
table=
"ep_sale_order_i
tem"
>
<query
name=
"ep
ChangeFormStockI
tem"
>
<sql-query>
select t.* from ep_
sale_order_item t
select t.* from ep_
change_form_stock_item t where 1=1
</sql-query>
<condition
column=
"ep_
sale_order_id"
name=
"epSaleOrder
Id"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
<condition
column=
"ep_
change_form_id"
name=
"epChangeForm
Id"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"epChangeFormStockItem"
>
<query
name=
"epChangeFormStockItem
ByOldId
"
>
<sql-query>
select t.* from ep_change_form_stock_item t where 1=1
select t.dept_id,
t.dept_name,
t.description,
t.confirm,
t.date,
t.executor_id,
t.executor,
t.comments from ep_change_form_stock_item t where 1=1
</sql-query>
<condition
column=
"ep_change_form_id"
name=
"
epChangeForm
Id"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
<condition
column=
"ep_change_form_id"
name=
"
old
Id"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"epChangeFormImplItem"
>
...
...
@@ -29,6 +36,20 @@
<condition
column=
"ep_change_form_id"
name=
"epChangeFormId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"epChangeFormItemByOldId"
>
<sql-query>
select t.dept_id,
t.dept_name,
t.executor_id,
t.executor,
t.confirm,
t.date,
t.follow_matter,
t.comments from ep_change_form_impl_item t where 1=1
</sql-query>
<condition
column=
"ep_change_form_id"
name=
"oldId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"queryApprovalPersons"
>
<sql-query>
<!--SELECT
...
...
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