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
0489fe8d
Commit
0489fe8d
authored
Jul 25, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EP变更单bug修改
parent
14a5b67b
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
168 additions
and
51 deletions
+168
-51
epChangeFormDetail.js
...rc/main/webapp/biz/topsun/ep/change/epChangeFormDetail.js
+43
-37
EpChangeFormImplItemApplication.java
...p/change/application/EpChangeFormImplItemApplication.java
+4
-1
EpChangeFormStockItemApplication.java
.../change/application/EpChangeFormStockItemApplication.java
+4
-1
EpChangeFormApplicationImpl.java
.../change/application/impl/EpChangeFormApplicationImpl.java
+44
-2
EpChangeFormImplItemApplicationImpl.java
...application/impl/EpChangeFormImplItemApplicationImpl.java
+16
-2
EpChangeFormStockItemApplicationImpl.java
...pplication/impl/EpChangeFormStockItemApplicationImpl.java
+17
-2
EpChangeFormController.java
...u/topsun/ep/change/controller/EpChangeFormController.java
+5
-4
EpChangeFormImplItem.java
.../huigou/topsun/ep/change/domain/EpChangeFormImplItem.java
+12
-0
EpChangeFormStockItem.java
...huigou/topsun/ep/change/domain/EpChangeFormStockItem.java
+8
-2
EpChangeFormQueryRequest.java
...psun/ep/change/domain/query/EpChangeFormQueryRequest.java
+1
-0
epChangeForm.xml
...c/main/resources/config/topsun/ep/change/epChangeForm.xml
+14
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/ep/change/epChangeFormDetail.js
View file @
0489fe8d
...
...
@@ -38,7 +38,9 @@ function bindEvent(){
},
onChange
:
function
(
value
,
data
)
{
$
(
'#pd'
).
val
(
value
.
value
);
$
(
'#changedPd'
).
val
(
value
.
value
);
$
(
'#productName'
).
val
(
value
.
text
);
$
(
'#changedProductName'
).
val
(
value
.
text
);
}
});
...
...
@@ -83,33 +85,8 @@ function loadGrid() {
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
// {display : "部门",name : "deptName",width : 200,minWidth : 100,type : "string",align : "left",
// editor: { required : true, type: "dynamic",
// getEditor:function (row) {
// var org = "return { type:'tree',data:{name:'org',filter:'ogn',getParam:function(){return {orgRoot:'orgRoot',orgKindId:'ogn'};}},textField:'deptName',valueField:'deptId' }";
// org = (new Function(org))();
// return org;
// }
// }
// },
{
display
:
"部门"
,
name
:
"deptName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
// editor: {
// type: 'tree',
// required: true,
// data: {
// name: 'org',
// filter: 'dpt',
// minWidth: 250,
// getParam:function(){
// return {
// orgRoot: "orgRoot",
// orgKindId: "ogn,dpt"
// }
// },
// },
// textField: 'deptName'
// }
editor
:
{
type
:
'tree'
,
required
:
true
,
...
...
@@ -117,6 +94,9 @@ function loadGrid() {
name
:
'org'
,
filter
:
'dpt'
,
minWidth
:
250
,
param
:
{
orgRoot
:
"14636F3F48934EE7811768692A0AC5E1"
}
},
textField
:
'deptName'
,
valueField
:
'deptId'
...
...
@@ -133,7 +113,7 @@ function loadGrid() {
filter
:
'psm'
,
minWidth
:
250
,
param
:
{
orgRoot
:
"1
8FFF477AEEE4609B798015231B400C3
"
orgRoot
:
"1
4636F3F48934EE7811768692A0AC5E1
"
}
},
textField
:
'executor'
,
...
...
@@ -141,10 +121,17 @@ function loadGrid() {
}
},
{
display
:
"签名确认"
,
name
:
"confirm"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"签名确认"
,
name
:
"confirm
TextView
"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
type
:
'dictionary'
,
data
:
{
name
:
'confirm'
},
textField
:
'confirmTextView'
,
valueField
:
'confirm'
,
required
:
false
,
render
:
function
(
item
)
{
return
item
.
confirmTextView
;
}
},
},
{
display
:
"日期"
,
name
:
"date"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"left"
,
...
...
@@ -190,27 +177,46 @@ function loadStockGrid() {
stockGridManager
=
UICtrl
.
grid
(
"#stockMainGrid"
,
{
columns
:
[
{
display
:
"
部门
"
,
name
:
"deptName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"
仓库
"
,
name
:
"deptName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
type
:
'tree'
,
required
:
true
,
data
:
{
name
:
'org'
,
filter
:
'dpt'
,
minWidth
:
250
,
param
:
{
orgRoot
:
"14636F3F48934EE7811768692A0AC5E1"
}
},
textField
:
'deptName'
,
valueField
:
'deptId'
}
},
{
display
:
"专属原材料/半成品/在制品/成品数量(张)"
,
name
:
"desc"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"专属原材料/半成品/在制品/成品数量(张)"
,
name
:
"desc
ription
"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
},
{
display
:
"
确认人"
,
name
:
"confirm
"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"
签名确认"
,
name
:
"confirmTextView
"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
}
type
:
'dictionary'
,
data
:
{
name
:
'confirm'
},
textField
:
'confirmTextView'
,
valueField
:
'confirm'
,
// checkbox:true,
required
:
false
,
render
:
function
(
item
)
{
return
item
.
confirmTextView
;
}
},
},
{
display
:
"日期"
,
name
:
"date"
,
width
:
200
,
minWidth
:
60
,
type
:
"date"
,
align
:
"left"
,
display
:
"日期"
,
name
:
"date"
,
width
:
200
,
minWidth
:
60
,
type
:
"date
Time
"
,
align
:
"left"
,
editor
:
{
type
:
"
text
"
type
:
"
dateTime
"
}
}
],
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/application/EpChangeFormImplItemApplication.java
View file @
0489fe8d
package
com
.
huigou
.
topsun
.
ep
.
change
.
application
;
import
com.huigou.topsun.ep.change.domain.EpChangeFormImplItem
;
import
com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
...
...
@@ -10,7 +12,8 @@ import java.util.List;
* @Description:
*/
public
interface
EpChangeFormImplItemApplication
{
List
<
EpChangeFormImplItem
>
findByEpChangeFormId
(
String
epChangeFormId
);
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/ep/change/epChangeForm.xml"
;
Map
<
String
,
Object
>
findByEpChangeFormId
(
EpChangeFormQueryRequest
queryRequest
);
void
saveEpChangeFormImplItems
(
String
epChangeFormId
,
List
<
EpChangeFormImplItem
>
items
);
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/application/EpChangeFormStockItemApplication.java
View file @
0489fe8d
package
com
.
huigou
.
topsun
.
ep
.
change
.
application
;
import
com.huigou.topsun.ep.change.domain.EpChangeFormStockItem
;
import
com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
...
...
@@ -10,7 +12,8 @@ import java.util.List;
* @Description:
*/
public
interface
EpChangeFormStockItemApplication
{
List
<
EpChangeFormStockItem
>
findByEpChangeFormId
(
String
epChangeFormId
);
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/ep/change/epChangeForm.xml"
;
Map
<
String
,
Object
>
findByEpChangeFormId
(
EpChangeFormQueryRequest
queryRequest
);
void
saveEpChangeFormStockItems
(
String
epChangeFormId
,
List
<
EpChangeFormStockItem
>
epChangeFormStockItems
);
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/application/impl/EpChangeFormApplicationImpl.java
View file @
0489fe8d
package
com
.
huigou
.
topsun
.
ep
.
change
.
application
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.huigou.data.domain.model.CommonDomainConstants
;
...
...
@@ -12,14 +13,17 @@ import com.huigou.topsun.ep.change.domain.EpChangeForm;
import
com.huigou.topsun.ep.change.domain.EpChangeFormImplItem
;
import
com.huigou.topsun.ep.change.domain.EpChangeFormStockItem
;
import
com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest
;
import
com.huigou.topsun.ep.change.repository.EpChangeFormImplItemRepository
;
import
com.huigou.topsun.ep.change.repository.EpChangeFormRepository
;
import
com.huigou.topsun.ep.order.domain.EpSaleOrder
;
import
com.huigou.topsun.ep.order.domain.EpSaleOrderItem
;
import
com.huigou.topsun.ep.change.repository.EpChangeFormStockItemRepository
;
import
com.huigou.topsun.sap.common.HttpClient
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
import
com.huigou.topsun.sap.common.domain.EpResult
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.opm.domain.model.org.Org
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.uasp.bpm.engine.domain.model.ProcUnitHandler
;
import
com.huigou.uasp.bpm.engine.domain.model.TaskExtension
;
import
com.huigou.util.ClassHelper
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
...
...
@@ -48,6 +52,10 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
private
HttpClient
httpClient
;
@Autowired
SapMutualEpLogApplication
sapMutualEpLogApplication
;
@Autowired
private
EpChangeFormImplItemRepository
epChangeFormImplItemRepository
;
@Autowired
private
EpChangeFormStockItemRepository
epChangeFormStockItemRepository
;
@Override
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
...
...
@@ -92,6 +100,40 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
if
(
this
.
isApplyProcUnit
(
delegateTask
)
&&
this
.
getApprovalParameter
().
isAdvanceProcessAction
())
{
updateStatus
(
bizId
,
BizBillStatus
.
APPROVING
);
}
if
(
this
.
isApprovalProcUnit
(
delegateTask
)
&&
this
.
getApprovalParameter
().
isAdvanceProcessAction
()){
TaskExtension
te
=
actApplication
.
loadRuntimeTaskExtension
(
delegateTask
.
getId
());
cn
.
hutool
.
core
.
lang
.
Assert
.
notNull
(
te
,
String
.
format
(
"未查询到流程任务【%s】的扩展信息"
,
delegateTask
.
getId
()));
// 获取流程任务对应的审批环节信息
ProcUnitHandler
procUnitHandler
=
procUnitHandlerApplication
.
loadProcUnitHandler
(
te
.
getProcUnitHandlerId
());
String
subProcUnitId
=
procUnitHandler
.
getSubProcUnitId
();
//查询到审批人组织信息
String
fullId
=
delegateTask
.
getAssignee
();
Org
org
=
orgApplication
.
loadOrgByFullId
(
fullId
);
if
(
ObjectUtil
.
isNotNull
(
org
)){
if
(
"executor"
.
equals
(
subProcUnitId
)){
//匹配部门执行人审批完,更新确认状态是时间
List
<
EpChangeFormImplItem
>
formImplItemList
=
epChangeFormImplItemRepository
.
findByEpChangeFormId
(
bizId
);
for
(
EpChangeFormImplItem
epChangeFormImplItem
:
formImplItemList
)
{
if
(
org
.
getId
().
equals
(
epChangeFormImplItem
.
getExecutorId
())){
epChangeFormImplItem
.
setConfirm
(
"1"
);
epChangeFormImplItem
.
setDate
(
new
Date
());
}
}
changeFormImplItemApplication
.
saveEpChangeFormImplItems
(
bizId
,
formImplItemList
);
}
if
(
"store"
.
equals
(
subProcUnitId
)){
//匹配仓库环节审批完,更新确认状态是时间
List
<
EpChangeFormStockItem
>
stockItemList
=
epChangeFormStockItemRepository
.
findByEpChangeFormId
(
bizId
);
for
(
EpChangeFormStockItem
epChangeFormStockItem
:
stockItemList
)
{
if
(
org
.
getDeptId
().
equals
(
epChangeFormStockItem
.
getDeptId
())){
epChangeFormStockItem
.
setConfirm
(
"1"
);
epChangeFormStockItem
.
setDate
(
new
Date
());
}
}
changeFormStockItemApplication
.
saveEpChangeFormStockItems
(
bizId
,
stockItemList
);
}
}
}
}
/**
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/application/impl/EpChangeFormImplItemApplicationImpl.java
View file @
0489fe8d
package
com
.
huigou
.
topsun
.
ep
.
change
.
application
.
impl
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.ep.change.application.EpChangeFormImplItemApplication
;
import
com.huigou.topsun.ep.change.domain.EpChangeFormImplItem
;
import
com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest
;
import
com.huigou.topsun.ep.change.repository.EpChangeFormImplItemRepository
;
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
...
...
@@ -19,8 +26,15 @@ public class EpChangeFormImplItemApplicationImpl extends BaseApplication impleme
@Autowired
private
EpChangeFormImplItemRepository
changeFormImplItemRepository
;
@Override
public
List
<
EpChangeFormImplItem
>
findByEpChangeFormId
(
String
epChangeFormId
)
{
return
changeFormImplItemRepository
.
findByEpChangeFormId
(
epChangeFormId
);
public
Map
<
String
,
Object
>
findByEpChangeFormId
(
EpChangeFormQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getEpChangeFormId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"epChangeFormImplItem"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
queryModel
.
putDictionary
(
"confirm"
,
DictUtil
.
getDictionary
(
"confirm"
));
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
@Override
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/application/impl/EpChangeFormStockItemApplicationImpl.java
View file @
0489fe8d
package
com
.
huigou
.
topsun
.
ep
.
change
.
application
.
impl
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.ep.change.application.EpChangeFormStockItemApplication
;
import
com.huigou.topsun.ep.change.domain.EpChangeFormStockItem
;
import
com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest
;
import
com.huigou.topsun.ep.change.repository.EpChangeFormStockItemRepository
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
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
...
...
@@ -19,8 +27,15 @@ public class EpChangeFormStockItemApplicationImpl extends BaseApplication implem
@Autowired
private
EpChangeFormStockItemRepository
changeFormStockItemRepository
;
@Override
public
List
<
EpChangeFormStockItem
>
findByEpChangeFormId
(
String
epChangeFormId
)
{
return
changeFormStockItemRepository
.
findByEpChangeFormId
(
epChangeFormId
);
public
Map
<
String
,
Object
>
findByEpChangeFormId
(
EpChangeFormQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getEpChangeFormId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"epChangeFormStockItem"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
queryModel
.
putDictionary
(
"confirm"
,
DictUtil
.
getDictionary
(
"confirm"
));
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
@Override
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/controller/EpChangeFormController.java
View file @
0489fe8d
...
...
@@ -72,14 +72,15 @@ public class EpChangeFormController extends CommonController {
public
String
slicedEpChangeFormImplItems
(){
SDO
sdo
=
this
.
getSDO
();
String
epChangeFormId
=
sdo
.
getString
(
"epChangeFormId"
);
return
packGridDataAndResult
(
changeFormImplItemApplication
.
findByEpChangeFormId
(
epChangeFormId
));
EpChangeFormQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
EpChangeFormQueryRequest
.
class
);
return
toResult
(
changeFormImplItemApplication
.
findByEpChangeFormId
(
queryRequest
));
}
public
String
slicedEpChangeFormStockItems
(){
SDO
sdo
=
this
.
getSDO
();
String
epChangeFormId
=
sdo
.
getString
(
"epChangeFormId"
);
return
packGridDataAndResult
(
changeFormStockItemApplication
.
findByEpChangeFormId
(
epChangeFormId
));
EpChangeFormQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
EpChangeFormQueryRequest
.
class
);
//String epChangeFormId = sdo.getString("epChangeFormId");
return
toResult
(
changeFormStockItemApplication
.
findByEpChangeFormId
(
queryRequest
));
}
public
String
deleteEpChangeFormImplItem
(){
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/domain/EpChangeFormImplItem.java
View file @
0489fe8d
...
...
@@ -19,6 +19,12 @@ import java.util.Date;
public
class
EpChangeFormImplItem
extends
AbstractEntity
{
@Column
(
name
=
"ep_change_form_id"
)
private
String
epChangeFormId
;
/**
* 部门
*/
@Column
(
name
=
"dept_id"
)
private
String
deptId
;
/**
* 部门
*/
...
...
@@ -31,6 +37,12 @@ public class EpChangeFormImplItem extends AbstractEntity {
@Column
(
name
=
"executor"
)
private
String
executor
;
/**
* 执行人
*/
@Column
(
name
=
"executor_id"
)
private
String
executorId
;
/**
* 签名确认
*/
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/domain/EpChangeFormStockItem.java
View file @
0489fe8d
...
...
@@ -25,11 +25,17 @@ public class EpChangeFormStockItem extends AbstractEntity {
@Column
(
name
=
"dept_name"
)
private
String
deptName
;
/**
* 部门
*/
@Column
(
name
=
"dept_id"
)
private
String
deptId
;
/**
* 专属原材料/半成品/在制品/成品数量(张)
*/
@Column
(
name
=
"desc"
)
private
String
desc
;
@Column
(
name
=
"desc
ription
"
)
private
String
desc
ription
;
/**
* 确认人
...
...
topsun/src/main/java/com/huigou/topsun/ep/change/domain/query/EpChangeFormQueryRequest.java
View file @
0489fe8d
...
...
@@ -11,4 +11,5 @@ import lombok.Data;
@Data
public
class
EpChangeFormQueryRequest
extends
QueryAbstractRequest
{
private
String
billCode
;
private
String
epChangeFormId
;
}
topsun/src/main/resources/config/topsun/ep/change/epChangeForm.xml
View file @
0489fe8d
...
...
@@ -14,4 +14,18 @@
<condition
column=
"ep_sale_order_id"
name=
"epSaleOrderId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"epChangeFormStockItem"
>
<sql-query>
select t.* from ep_change_form_stock_item t where 1=1
</sql-query>
<condition
column=
"ep_change_form_id"
name=
"epChangeFormId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"epChangeFormImplItem"
>
<sql-query>
select t.* from ep_change_form_impl_item t where 1=1
</sql-query>
<condition
column=
"ep_change_form_id"
name=
"epChangeFormId"
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