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
e747f47b
Commit
e747f47b
authored
Jul 03, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
呆滞物料修改
parent
5a85debe
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
422 additions
and
73 deletions
+422
-73
sapDullDetail.js
...n-xt/src/main/webapp/biz/topsun/sap/dull/sapDullDetail.js
+123
-31
sapDullDetail.jsp
...-xt/src/main/webapp/biz/topsun/sap/dull/sapDullDetail.jsp
+11
-10
sapDullList.js
topsun-xt/src/main/webapp/biz/topsun/sap/dull/sapDullList.js
+14
-5
sapDullList.jsp
...un-xt/src/main/webapp/biz/topsun/sap/dull/sapDullList.jsp
+3
-1
SapDullItemApplication.java
...u/topsun/sap/dull/application/SapDullItemApplication.java
+27
-0
SapDullApplicationImpl.java
...sun/sap/dull/application/impl/SapDullApplicationImpl.java
+28
-12
SapDullItemApplicationImpl.java
...sap/dull/application/impl/SapDullItemApplicationImpl.java
+64
-0
SapDullController.java
.../huigou/topsun/sap/dull/controller/SapDullController.java
+3
-6
SapDullItemController.java
...gou/topsun/sap/dull/controller/SapDullItemController.java
+40
-0
SapDull.java
.../main/java/com/huigou/topsun/sap/dull/domain/SapDull.java
+10
-8
SapDullItem.java
...n/java/com/huigou/topsun/sap/dull/domain/SapDullItem.java
+71
-0
SapDullQueryRequest.java
...gou/topsun/sap/dull/domain/query/SapDullQueryRequest.java
+2
-0
SapDullItemRepository.java
...gou/topsun/sap/dull/repository/SapDullItemRepository.java
+16
-0
dullItem.xml
...un/src/main/resources/config/topsun/sap/dull/dullItem.xml
+10
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/dull/sapDullDetail.js
View file @
e747f47b
...
...
@@ -2,10 +2,17 @@ var gridManager = null;
$
(
document
).
ready
(
function
()
{
initialize
();
loadGrid
();
bindEvent
();
});
function
initialize
(){
var
mainFileTable
=
$
(
'#sapDullInfoList'
).
fileList
();
mainFileTable
.
find
(
'table'
).
css
({
borderTopWidth
:
0
});
$
(
'#sapDullInfoList'
).
fileList
({
bizId
:
$
(
"#attbizId"
).
val
()
});
UICtrl
.
layout
(
"#layout"
,
{
leftWidth
:
3
});
}
...
...
@@ -21,35 +28,6 @@ function bindEvent(){
$
(
'#werksName'
).
val
(
data
.
NAME1
);
}
});
$
(
'#matnrName'
).
searchbox
({
type
:
"system"
,
name
:
"sapMaterialSelect"
,
getParam
:
function
(
item
)
{
return
{
/// fieldName: "sapMaterialSelect",
filterValue
:
$
(
'#werks'
).
val
()
}
},
onChange
:
function
(
value
,
data
)
{
$
(
'#matnr'
).
val
(
data
.
MATNR
);
$
(
'#matnrName'
).
val
(
data
.
MAKTX
);
}
});
/* $("#applyPersonName").orgTree({
filter: "ogn,dpt,pos,psm",
excludePos: 1, param: {orgKindId: "ogn,dpt,pos,psm"},
back: {text: "#applyPersonName",value :'#applyPerson'},
manageType: 'taskQuery,admin',
onChange:function(value,data){ //alert(data.name);
// $("#applyPerson").val(data.fullId);
// $("#applyPersonName").val(data.name);
}
});
*/
}
...
...
@@ -60,7 +38,11 @@ function bindEvent(){
*/
function
setId
(
id
)
{
$
(
"#id"
).
val
(
id
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
_grid
.
options
.
parms
.
sapDullId
=
id
;
$
(
'#sapDullInfoList'
).
fileList
({
bizId
:
id
});
}
/**
...
...
@@ -71,7 +53,117 @@ function getId() {
return
$
(
"#id"
).
val
()
||
""
;
}
function
loadGrid
()
{
var
toolbarOptions
=
null
;
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
gridManager
);
},
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapDullItem/deleteSapDullItems.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
}
// copyHandler: copyHandler
// impExcelDataHandler:{id:'impExcelData',img:'fa-table',text:'导入数据',click:impExcelDataHandler},
});
// }
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
{
display
:
"物料编码"
,
name
:
"matnr"
,
width
:
"160"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"sapMaterialSelect"
,
getParam
:
function
(
item
)
{
if
(
Public
.
isBlank
(
$
(
'#werks'
).
val
())){
Public
.
tip
(
"请先选择工厂!"
)
return
false
}
return
{
/// fieldName: "sapMaterialSelect",
filterValue
:
$
(
'#werks'
).
val
()
}
},
back
:
{
MATNR
:
"matnr"
,
MAKTX
:
"matnrName"
,
LGFSB
:
"store"
,
LGOBE
:
"storeName"
}
},
}
},
{
display
:
"物料名称"
,
name
:
"matnrName"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"库存地点"
,
name
:
"storeName"
,
width
:
"140"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"批次"
,
name
:
"batch"
,
width
:
"140"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"数量"
,
name
:
"quantity"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
,
mask
:
'nnnnnn.nn'
,
required
:
true
}
},
{
display
:
"呆滞天数"
,
name
:
"dullDays"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
,
mask
:
'nnnnnn'
,
required
:
true
}
},
{
display
:
"说明"
,
name
:
"remark"
,
width
:
360
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
}
}
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapDullItem/querySapDullItems.ajax'
,
pageSize
:
10
,
usePager
:
true
,
parms
:{
sapDullId
:
getId
()},
toolbar
:
toolbarOptions
,
enabledEdit
:
true
,
width
:
"100%"
,
height
:
"80%"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
});
UICtrl
.
setSearchAreaToggle
(
gridManager
);
}
function
reloadGrid
()
{
gridManager
.
loadData
();
}
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
.
items
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
}
topsun-xt/src/main/webapp/biz/topsun/sap/dull/sapDullDetail.jsp
View file @
e747f47b
...
...
@@ -12,6 +12,7 @@
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"id"
/>
<x:hidden
name=
"billCode"
/>
<x:hidden
name=
"attbizId"
/>
<x:hidden
name=
"fillinDate"
type=
"datetime"
/>
<x:hidden
name=
"fullId"
/>
...
...
@@ -28,19 +29,19 @@
<x:hidden
name=
"werks"
/>
<x:inputC
name=
"werksName"
required=
"true"
label=
"工厂"
labelCol=
"2"
wrapper=
"select"
fieldCol=
"4"
/>
<x:hidden
name=
"matnr"
/>
<x:inputC
name=
"matnrName"
required=
"true"
label=
"物料名称"
labelCol=
"2"
fieldCol=
"4"
wrapper=
"select"
/>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"batch"
required=
"false"
label=
"批次"
labelCol=
"2"
fieldCol=
"4"
/>
<x:inputC
name=
"dullDays"
required=
"false"
label=
"呆滞天数"
labelCol=
"2"
fieldCol=
"4"
mask=
"nnnnn"
/>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"remark"
required=
"false"
label=
"说明"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
</div>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"remark"
required=
"false"
label=
"备注"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
</div>
<div
class=
"blank_div clearfix"
></div>
<div
id=
"maingrid"
style=
"margin: 2px;"
>
</div>
<div
style=
"padding-top: 15px;"
>
<x:fileList
bizCode=
"sapDullInfo"
bizId=
"attbizId"
id=
"sapDullInfoList"
title=
"上传附件"
/>
</div>
</form>
</body>
</html>
topsun-xt/src/main/webapp/biz/topsun/sap/dull/sapDullList.js
View file @
e747f47b
...
...
@@ -6,7 +6,16 @@ $(document).ready(function () {
})
function
initUI
()
{
UICtrl
.
initDefaultLayout
();
$
(
'#werksName'
).
searchbox
({
type
:
"system"
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"WERKS"
}
},
onChange
:
function
(
value
,
data
)
{
$
(
'#werks'
).
val
(
data
.
WERKS
);
$
(
'#werksName'
).
val
(
data
.
NAME1
);
}
});
}
...
...
@@ -25,10 +34,10 @@ function loadGrid() {
{
display
:
"申请部门"
,
name
:
"deptName"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"工厂编码"
,
name
:
"werks"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"工厂名称"
,
name
:
"werksName"
,
width
:
220
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"物料编码"
,
name
:
"matnr"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"物料名称"
,
name
:
"matnrName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"批次"
,
name
:
"batch"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"呆滞天数"
,
name
:
"dullDays"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
//
{display: "物料编码", name: "matnr", width: 100, minWidth: 60, type: "string", align: "left"},
//
{display: "物料名称", name: "matnrName", width: 200, minWidth: 60, type: "string", align: "left"},
//
{display: "批次", name: "batch", width: 120, minWidth: 60, type: "string", align: "left"},
//
{display: "呆滞天数", name: "dullDays", width: 120, minWidth: 60, type: "string", align: "left"},
{
display
:
"说明"
,
name
:
"remark"
,
width
:
220
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
}
],
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/dull/sapDullList.jsp
View file @
e747f47b
...
...
@@ -19,7 +19,9 @@
<x:hidden
name=
"batchNumber"
value=
""
/>
<x:hidden
name=
"fullId"
/>
<x:inputC
name=
"billCode"
required=
"false"
label=
"申请单号"
labelCol=
"1"
/>
<x:inputC
name=
"matnrName"
required=
"false"
label=
"物料名称"
labelCol=
"1"
/>
<x:hidden
name=
"werks"
/>
<x:inputC
name=
"werksName"
required=
"false"
label=
"工厂"
labelCol=
"1"
wrapper=
"select"
fieldCol=
"4"
/>
<x:selectC
name=
"status"
label=
"审批状态"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"bizBillStatus"
/>
<x:searchButtons/>
</form>
...
...
topsun/src/main/java/com/huigou/topsun/sap/dull/application/SapDullItemApplication.java
0 → 100644
View file @
e747f47b
package
com
.
huigou
.
topsun
.
sap
.
dull
.
application
;
import
com.huigou.topsun.sap.componentSupply.domain.ComponentSupplyItem
;
import
com.huigou.topsun.sap.componentSupply.domain.query.ComponentSupplyQueryRequest
;
import
com.huigou.topsun.sap.dull.domain.SapDullItem
;
import
com.huigou.topsun.sap.dull.domain.query.SapDullQueryRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: LXH
* @Date: 2024/06/03/10:35
* @Description:
*/
public
interface
SapDullItemApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/sap/dull/dullItem.xml"
;
void
saveSapDullItems
(
String
sapDullId
,
List
<
SapDullItem
>
items
);
Map
<
String
,
Object
>
querySapDullItems
(
SapDullQueryRequest
queryRequest
);
void
deleteByIds
(
List
<
String
>
ids
);
List
<
SapDullItem
>
findBySapDullId
(
String
sapDullId
);
}
topsun/src/main/java/com/huigou/topsun/sap/dull/application/impl/SapDullApplicationImpl.java
View file @
e747f47b
...
...
@@ -5,9 +5,14 @@ import com.huigou.data.query.model.QueryDescriptor;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.base.coderule.application.CodeRuleApplication
;
import
com.huigou.topsun.sap.componentSupply.application.ComponentSupplyItemApplication
;
import
com.huigou.topsun.sap.componentSupply.domain.ComponentSupplyItem
;
import
com.huigou.topsun.sap.dull.application.SapDullApplication
;
import
com.huigou.topsun.sap.dull.application.SapDullItemApplication
;
import
com.huigou.topsun.sap.dull.domain.SapDull
;
import
com.huigou.topsun.sap.dull.domain.SapDullItem
;
import
com.huigou.topsun.sap.dull.domain.query.SapDullQueryRequest
;
import
com.huigou.topsun.sap.dull.repository.SapDullItemRepository
;
import
com.huigou.topsun.sap.dull.repository.SapDullRepository
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.doc.attachment.application.AttachmentApplication
;
...
...
@@ -30,7 +35,10 @@ import java.util.Map;
public
class
SapDullApplicationImpl
extends
FlowBroker
implements
SapDullApplication
{
@Autowired
private
SapDullRepository
sapDullRepository
;
@Autowired
private
SapDullItemApplication
sapDullItemApplication
;
@Autowired
private
SapDullItemRepository
sapDullItemRepository
;
// @Autowired
// private SapDullItemRepository sapDullItemRepository;
@Autowired
...
...
@@ -49,9 +57,9 @@ public class SapDullApplicationImpl extends FlowBroker implements SapDullApplica
queryModel
.
addCriteria
(
" and t.bill_code =:billCode"
);
queryModel
.
putParam
(
"billCode"
,
queryRequest
.
getBillCode
());
}
if
(
queryRequest
.
get
Matnr
()
!=
null
)
{
queryModel
.
addCriteria
(
" and t.
matnr like:matnr
"
);
queryModel
.
put
LikeParam
(
"matnr"
,
queryRequest
.
getMatnr
());
if
(
queryRequest
.
get
Werks
()
!=
null
)
{
queryModel
.
addCriteria
(
" and t.
werks =:werk
"
);
queryModel
.
put
Param
(
"werk"
,
queryRequest
.
getWerks
());
}
if
(
queryRequest
.
getMatnrName
()
!=
null
)
{
queryModel
.
addCriteria
(
" and t.matnr_name like:matnr"
);
...
...
@@ -72,8 +80,12 @@ public class SapDullApplicationImpl extends FlowBroker implements SapDullApplica
public
void
deleteByIds
(
List
<
String
>
ids
)
{
ids
.
forEach
(
id
->{
sapDullRepository
.
delete
(
id
);
List
<
SapDullItem
>
list
=
sapDullItemRepository
.
findBySapDullId
(
id
);
for
(
SapDullItem
sapDullItem:
list
){
sapDullItemRepository
.
delete
(
sapDullItem
);
}
});
}
@Override
...
...
@@ -125,16 +137,20 @@ public class SapDullApplicationImpl extends FlowBroker implements SapDullApplica
@Override
protected
String
saveBizAndApprovalData
()
{
super
.
saveBizAndApprovalData
();
SapDull
D
ull
=
getBizEntity
(
SapDull
.
class
);
if
(
D
ull
.
isNew
())
{
D
ull
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
SapDull
d
ull
=
getBizEntity
(
SapDull
.
class
);
if
(
d
ull
.
isNew
())
{
d
ull
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
}
else
{
Dull
=
(
SapDull
)
commonDomainService
.
loadAndFillinProperties
(
D
ull
);
dull
=
(
SapDull
)
commonDomainService
.
loadAndFillinProperties
(
d
ull
);
}
Dull
=
sapDullRepository
.
save
(
D
ull
);
dull
=
sapDullRepository
.
save
(
d
ull
);
return
Dull
.
getId
();
List
<
SapDullItem
>
items
=
getBizEntities
(
SapDullItem
.
class
,
"items"
);
if
(
items
.
size
()<
1
){
throw
new
IllegalArgumentException
(
"没有呆滞物料明细信息!"
);
}
sapDullItemApplication
.
saveSapDullItems
(
dull
.
getId
(),
items
);
return
dull
.
getId
();
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/dull/application/impl/SapDullItemApplicationImpl.java
0 → 100644
View file @
e747f47b
package
com
.
huigou
.
topsun
.
sap
.
dull
.
application
.
impl
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.dull.application.SapDullItemApplication
;
import
com.huigou.topsun.sap.dull.domain.SapDullItem
;
import
com.huigou.topsun.sap.dull.domain.query.SapDullQueryRequest
;
import
com.huigou.topsun.sap.dull.repository.SapDullItemRepository
;
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: LXH
* @Date: 2024/07/04/10:16
* @Description:
*/
@Service
(
"sapDullItemItemApplication"
)
public
class
SapDullItemApplicationImpl
extends
BaseApplication
implements
SapDullItemApplication
{
@Autowired
private
SapDullItemRepository
sapDullItemRepository
;
@Override
public
void
saveSapDullItems
(
String
sapDullId
,
List
<
SapDullItem
>
items
)
{
for
(
SapDullItem
item
:
items
)
{
item
.
setSapDullId
(
sapDullId
);
sapDullItemRepository
.
save
(
item
);
}
}
@Override
public
Map
<
String
,
Object
>
querySapDullItems
(
SapDullQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtil
.
isNotBlank
(
queryRequest
.
getSapDullId
())){
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"sapDullItems"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
if
(
queryRequest
.
getSapDullId
()
!=
null
)
{
queryModel
.
addCriteria
(
" and t.sap_dull_id =:sapDullId"
);
queryModel
.
putParam
(
"sapDullId"
,
queryRequest
.
getSapDullId
());
}
// queryModel.putDictionary("unit", DictUtil.getDictionary("SapDullUnit"));
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
map
;
}
@Override
public
void
deleteByIds
(
List
<
String
>
ids
)
{
ids
.
forEach
(
id
->{
sapDullItemRepository
.
delete
(
id
);
});
}
@Override
public
List
<
SapDullItem
>
findBySapDullId
(
String
sapDullId
)
{
return
sapDullItemRepository
.
findBySapDullId
(
sapDullId
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/dull/controller/SapDullController.java
View file @
e747f47b
...
...
@@ -10,6 +10,7 @@ import com.huigou.uasp.annotation.ControllerMapping;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.uasp.tool.dataimport.application.ExcelImportApplication
;
import
com.huigou.util.CommonUtil
;
import
com.huigou.util.SDO
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -52,10 +53,8 @@ public class SapDullController extends CommonController {
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
SapDull
sapDull
=
new
SapDull
();
sapDull
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
// sapDull.setAttbizId(CommonUtil.createGUID()); // 自动生成附件id
sapDull
.
setAttbizId
(
CommonUtil
.
createGUID
());
// 自动生成附件id
Operator
operator
=
getOperator
();
sapDull
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
// ExcelImportTemplate excelImportTemplate=excelImportApplication.loadExcelImportTemplateByCode("sapDullData");
...
...
@@ -65,9 +64,7 @@ public class SapDullController extends CommonController {
public
String
showDull
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
// this.putAttribute("attbizId", id); // 设置附件id
SapDull
sapDull
=
sapDullApplication
.
getDullById
(
id
);
// sapRetirement.setAttbizId(id);
return
forward
(
"sapDullDetail"
,
sapDull
);
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/dull/controller/SapDullItemController.java
0 → 100644
View file @
e747f47b
package
com
.
huigou
.
topsun
.
sap
.
dull
.
controller
;
import
com.huigou.topsun.sap.componentSupply.application.ComponentSupplyItemApplication
;
import
com.huigou.topsun.sap.componentSupply.domain.query.ComponentSupplyQueryRequest
;
import
com.huigou.topsun.sap.dull.application.SapDullItemApplication
;
import
com.huigou.topsun.sap.dull.domain.query.SapDullQueryRequest
;
import
com.huigou.uasp.annotation.ControllerMapping
;
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: LXH
* @Date: 2024/07/03 10:10
* @Description:
*/
@Controller
@ControllerMapping
(
"/sapDullItem"
)
public
class
SapDullItemController
extends
CommonController
{
@Autowired
private
SapDullItemApplication
sapDullItemApplication
;
public
String
querySapDullItems
(){
SDO
sdo
=
this
.
getSDO
();
SapDullQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
SapDullQueryRequest
.
class
);
Map
<
String
,
Object
>
map
=
sapDullItemApplication
.
querySapDullItems
(
queryRequest
);
return
toResult
(
map
);
}
public
String
deleteSapDullItems
(){
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
sapDullItemApplication
.
deleteByIds
(
ids
);
return
success
();
}
}
topsun/src/main/java/com/huigou/topsun/sap/dull/domain/SapDull.java
View file @
e747f47b
...
...
@@ -31,27 +31,29 @@ public class SapDull extends FlowBillAbstractEntity {
/*
* 物料
* */
@Column
(
name
=
"matnr"
)
private
String
matnr
;
//
@Column(name = "matnr")
//
private String matnr;
@Column
(
name
=
"matnr_name"
)
private
String
matnrName
;
//
@Column(name = "matnr_name")
//
private String matnrName;
/**
* 批次
*/
@Column
(
name
=
"batch"
)
private
String
batch
;
//
@Column(name = "batch")
//
private String batch;
@Column
(
name
=
"dull_days"
)
private
Integer
dullDays
;
//
@Column(name = "dull_days")
//
private Integer dullDays;
/**
* 说明
*/
@Column
(
name
=
"remark"
)
private
String
remark
;
@Column
(
name
=
"attbiz_id"
)
private
String
attbizId
;
@Override
protected
String
getCodeRuleId
()
{
...
...
topsun/src/main/java/com/huigou/topsun/sap/dull/domain/SapDullItem.java
0 → 100644
View file @
e747f47b
package
com
.
huigou
.
topsun
.
sap
.
dull
.
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
;
/**
* SAP呆滞物料明细
*
* @TableName sap_dull_item
*/
@Table
(
name
=
"sap_dull_item"
)
@Entity
@Data
public
class
SapDullItem
extends
AbstractEntity
{
/**
* SAP呆滞物料id
*/
@Column
(
name
=
"sap_dull_id"
)
private
String
sapDullId
;
/*
* 物料
* */
@Column
(
name
=
"matnr"
)
private
String
matnr
;
@Column
(
name
=
"matnr_name"
)
private
String
matnrName
;
/**
* 批次
*/
@Column
(
name
=
"batch"
)
private
String
batch
;
//天数
@Column
(
name
=
"dull_days"
)
private
Integer
dullDays
;
/**
* 数量
*/
@Column
(
name
=
"quantity"
)
private
BigDecimal
quantity
;
/**
* 库存地点
*/
@Column
(
name
=
"store"
)
private
String
store
;
/**
* 库存地点名称
*/
@Column
(
name
=
"store_name"
)
private
String
storeName
;
/**
* 说明
*/
@Column
(
name
=
"remark"
)
private
String
remark
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/dull/domain/query/SapDullQueryRequest.java
View file @
e747f47b
...
...
@@ -17,4 +17,6 @@ public class SapDullQueryRequest extends QueryAbstractRequest {
private
String
werks
;
private
String
werksName
;
private
String
status
;
private
String
sapDullId
;
}
topsun/src/main/java/com/huigou/topsun/sap/dull/repository/SapDullItemRepository.java
0 → 100644
View file @
e747f47b
package
com
.
huigou
.
topsun
.
sap
.
dull
.
repository
;
import
com.huigou.topsun.sap.componentSupply.domain.ComponentSupplyItem
;
import
com.huigou.topsun.sap.dull.domain.SapDullItem
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @Auther: LXH
* @Date: 2024/07/03/16:33
* @Description:
*/
public
interface
SapDullItemRepository
extends
JpaRepository
<
SapDullItem
,
String
>
{
List
<
SapDullItem
>
findBySapDullId
(
String
sapDullId
);
}
topsun/src/main/resources/config/topsun/sap/dull/dullItem.xml
0 → 100644
View file @
e747f47b
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query
name=
"sapDullItems"
label=
"呆滞物料明细"
table=
"sap_dull_item"
>
<sql-query>
select t.* from sap_dull_item t
</sql-query>
<condition
column=
"sap_dull_id"
name=
"sapDullId"
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