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
7fbc28dd
Commit
7fbc28dd
authored
Jun 26, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购信息记录增加导出功能;物料申请增加正反面图片,并流转
parent
1f729225
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
231 additions
and
30 deletions
+231
-30
epChangeFormList.js
.../src/main/webapp/biz/topsun/ep/change/epChangeFormList.js
+1
-1
materialApplyNext.jsp
.../webapp/biz/topsun/sap/nonProdApply/materialApplyNext.jsp
+1
-1
materialNameElement.js
...webapp/biz/topsun/sap/nonProdApply/materialNameElement.js
+1
-1
nonProdApplyDetail.js
.../webapp/biz/topsun/sap/nonProdApply/nonProdApplyDetail.js
+32
-0
nonProdApplyDetail.jsp
...webapp/biz/topsun/sap/nonProdApply/nonProdApplyDetail.jsp
+18
-0
nonProdApplyNext.js
...in/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
+17
-5
nonProdApplyNext.jsp
...n/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
+1
-1
purchaseInfoRecordList.js
...z/topsun/sap/purchaseInfoRecord/purchaseInfoRecordList.js
+8
-1
NonProdApplyApplication.java
...sap/nonProdApply/application/NonProdApplyApplication.java
+2
-1
NonProdApplyDeptApplication.java
...nonProdApply/application/NonProdApplyDeptApplication.java
+1
-1
NonProdApplyApplicationImpl.java
...odApply/application/impl/NonProdApplyApplicationImpl.java
+33
-4
NonProdApplyDeptApplicationImpl.java
...ply/application/impl/NonProdApplyDeptApplicationImpl.java
+1
-1
NonProdApplyController.java
...n/sap/nonProdApply/controller/NonProdApplyController.java
+102
-12
NonProdApplyDeptRepository.java
...p/nonProdApply/repository/NonProdApplyDeptRepository.java
+1
-1
SapPurchase.java
...va/com/huigou/topsun/sap/purchase/domain/SapPurchase.java
+12
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/ep/change/epChangeFormList.js
View file @
7fbc28dd
...
@@ -136,7 +136,7 @@ function copyQualityInfoRecord(){
...
@@ -136,7 +136,7 @@ function copyQualityInfoRecord(){
return
;
return
;
}
}
UICtrl
.
addTabItem
({
UICtrl
.
addTabItem
({
tabid
:
'epChangeForm'
,
tabid
:
'epChangeForm'
+
row
.
id
,
text
:
'新增变更申请/通知单'
,
text
:
'新增变更申请/通知单'
,
url
:
web_app
.
name
+
'/epChangeForm/copyEpChangeForm.job?id='
+
row
.
id
url
:
web_app
.
name
+
'/epChangeForm/copyEpChangeForm.job?id='
+
row
.
id
});
});
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/materialApplyNext.jsp
View file @
7fbc28dd
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
<%--<x:selectC name="mtposMara" label="项目类别组" labelCol="1" fieldCol="2" dictionary="mtposMara"/>--%>
<%--<x:selectC name="mtposMara" label="项目类别组" labelCol="1" fieldCol="2" dictionary="mtposMara"/>--%>
<x:hidden
name=
"mtposMara"
/>
<x:hidden
name=
"mtposMara"
/>
<x:inputC
name=
"maktx"
label=
"SAP物料名称"
required=
"true"
labelCol=
"1"
fieldCol=
"5"
maxLength=
"40"
/>
<x:inputC
name=
"maktx"
label=
"SAP物料名称"
required=
"true"
labelCol=
"1"
fieldCol=
"5"
maxLength=
"40"
/>
<x:inputC
name=
"groes"
label=
"规格"
required=
"
tru
e"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"groes"
label=
"规格"
required=
"
fals
e"
labelCol=
"1"
fieldCol=
"2"
/>
<x:hidden
name=
"xchpf"
/>
<x:hidden
name=
"xchpf"
/>
<!--x:inputC name="magrv" label="包装物料组" labelCol="1" fieldCol="2"/-->
<!--x:inputC name="magrv" label="包装物料组" labelCol="1" fieldCol="2"/-->
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/materialNameElement.js
View file @
7fbc28dd
...
@@ -32,7 +32,7 @@ function bindMaktx(){
...
@@ -32,7 +32,7 @@ function bindMaktx(){
formValues
.
push
(
inputValue
);
formValues
.
push
(
inputValue
);
}
}
});
});
let
result
=
formValues
.
join
(
'
_
'
);
let
result
=
formValues
.
join
(
''
);
//限定40个字符
//限定40个字符
result
=
result
.
substring
(
0
,
40
);
result
=
result
.
substring
(
0
,
40
);
$
(
"#materialNameElement #maktx"
).
val
(
result
);
$
(
"#materialNameElement #maktx"
).
val
(
result
);
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyDetail.js
View file @
7fbc28dd
...
@@ -114,4 +114,36 @@ function bindEvent(){
...
@@ -114,4 +114,36 @@ function bindEvent(){
$
(
'#baseUnitName'
).
val
(
data
.
MSEHL
);
$
(
'#baseUnitName'
).
val
(
data
.
MSEHL
);
}
}
});
});
//正面图片
var
_img
=
$
(
'#showFrontPicture'
);
var
_frontPicturePath
=
$
(
'#frontPicturePath'
).
val
();
if
(
Public
.
isNotBlank
(
_frontPicturePath
))
{
_img
[
0
].
src
=
$
.
getCSRFUrl
(
'attachment/downFileBySavePath.ajax'
,{
file
:
_frontPicturePath
});
}
$
(
'#addFrontPicture'
).
uploadButton
({
filetype
:
[
'jpg'
,
'gif'
,
'jpeg'
,
'png'
,
'bmp'
],
afterUpload
:
function
(
data
){
_img
[
0
].
src
=
$
.
getCSRFUrl
(
'attachmentDownFile.ajax'
,{
id
:
data
.
id
});
},
param
:
function
(){
return
{
bizCode
:
'frontPicture'
,
bizId
:
$
(
"#attbizId"
).
val
(),
flag
:
'false'
,
deleteOld
:
'true'
,
returnPath
:
'true'
};
}
});
//反面图片
var
back_img
=
$
(
'#showBackPicture'
);
var
_backPicturePath
=
$
(
'#backPicturePath'
).
val
();
if
(
Public
.
isNotBlank
(
_backPicturePath
))
{
back_img
[
0
].
src
=
$
.
getCSRFUrl
(
'attachment/downFileBySavePath.ajax'
,{
file
:
_backPicturePath
});
}
$
(
'#addBackPicture'
).
uploadButton
({
filetype
:
[
'jpg'
,
'gif'
,
'jpeg'
,
'png'
,
'bmp'
],
afterUpload
:
function
(
data
){
back_img
[
0
].
src
=
$
.
getCSRFUrl
(
'attachmentDownFile.ajax'
,{
id
:
data
.
id
});
},
param
:
function
(){
return
{
bizCode
:
'backPicture'
,
bizId
:
$
(
"#attbizId"
).
val
(),
flag
:
'false'
,
deleteOld
:
'true'
,
returnPath
:
'true'
};
}
});
}
}
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyDetail.jsp
View file @
7fbc28dd
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
<x:hidden
name=
"createdDate"
/>
<x:hidden
name=
"createdDate"
/>
<x:hidden
name=
"maktxRemZh"
/>
<x:hidden
name=
"maktxRemZh"
/>
<x:hidden
name=
"maktxRemEn"
/>
<x:hidden
name=
"maktxRemEn"
/>
<x:hidden
name=
"frontPicturePath"
/>
<x:hidden
name=
"backPicturePath"
/>
<%-- <x:hidden name="personMemberName"/>--%>
<%-- <x:hidden name="personMemberName"/>--%>
<x:title
title=
"申请人填写区域"
name=
"group"
/>
<x:title
title=
"申请人填写区域"
name=
"group"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-cols"
>
...
@@ -111,6 +113,22 @@
...
@@ -111,6 +113,22 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<div
style=
"text-align: left;margin-top:10px;"
>
<img
src=
'
<c:url
value=
"/images/photo.jpg"
/>
'
height=
'200'
width=
'170'
border=
0
id=
"showFrontPicture"
onerror=
"src='
<c:url
value=
"/images/photo.jpg"
/>
';"
/>
<img
src=
'
<c:url
value=
"/images/photo.jpg"
/>
'
height=
'200'
width=
'170'
border=
0
id=
"showBackPicture"
onerror=
"src='
<c:url
value=
"/images/photo.jpg"
/>
';"
/>
</div>
<div
style=
"text-align: left;margin-top:20px;"
>
<x:button
value=
"正面图片"
id=
"addFrontPicture"
icon=
"fa-hand-o-up"
/>
<x:button
value=
"反面图片"
id=
"addBackPicture"
icon=
"fa-hand-o-up"
/>
</div>
</div>
</div>
</form>
</form>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
View file @
7fbc28dd
...
@@ -18,11 +18,12 @@ function initializate() {
...
@@ -18,11 +18,12 @@ function initializate() {
UICtrl
.
disable
(
"#mtart"
)
UICtrl
.
disable
(
"#mtart"
)
UICtrl
.
setDisable
(
"#totalContentDiv"
);
UICtrl
.
setDisable
(
"#totalContentDiv"
);
coRowNum
=
$
(
"#busiLens"
).
val
();
coRowNum
=
$
(
"#busiLens"
).
val
();
initKlart
(
$
(
"#mtart"
).
val
());
var
mtart
=
$
(
"#mtart"
).
val
();
initRaube
(
$
(
"#mtart"
).
val
());
initKlart
(
mtart
);
initbstmi
(
$
(
"#mtart"
).
val
());
initRaube
(
mtart
);
initueetk
(
$
(
"#mtart"
).
val
());
initbstmi
(
mtart
);
initKunnrName
(
$
(
"#mtart"
).
val
());
initueetk
(
mtart
);
initKunnrName
(
mtart
);
//页面控制
//页面控制
UICtrl
.
enable
(
$
(
"#businessUsage"
));
UICtrl
.
enable
(
$
(
"#businessUsage"
));
UICtrl
.
enable
(
$
(
"#matklName"
));
UICtrl
.
enable
(
$
(
"#matklName"
));
...
@@ -182,6 +183,17 @@ function initializate() {
...
@@ -182,6 +183,17 @@ function initializate() {
var
lvorm
=
$
(
"#lvorm"
).
val
();
var
lvorm
=
$
(
"#lvorm"
).
val
();
bindEvent_lvorm
(
lvorm
)
bindEvent_lvorm
(
lvorm
)
}
}
//BPM不能修改产成品、半成品、设备类的产品名称、物料组、单位、规格
if
(
mtart
==
"ZBCP"
||
mtart
==
"ZZCP"
||
mtart
==
"ZSHB"
){
// UICtrl.disable("#matklTypeName");
// UICtrl.disable("#matklName");
// UICtrl.disable("#groes");
// UICtrl.disable("#spartName");
// UICtrl.disable("#meinsName");
// UICtrl.disable("#maktxRemZh");
// UICtrl.disable("#maktx");
}
}
}
function
initKlart
(
mtart
)
{
function
initKlart
(
mtart
)
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
View file @
7fbc28dd
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
<x:hidden
name=
"matklType"
/>
<x:hidden
name=
"matklType"
/>
<x:inputC
name=
"matklName"
label=
"物料组小类"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:inputC
name=
"matklName"
label=
"物料组小类"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:hidden
name=
"matkl"
/>
<x:hidden
name=
"matkl"
/>
<x:inputC
name=
"groes"
label=
"规格"
required=
"
tru
e"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"groes"
label=
"规格"
required=
"
fals
e"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"spartName"
label=
"产品组"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:inputC
name=
"spartName"
label=
"产品组"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:hidden
name=
"spart"
/>
<x:hidden
name=
"spart"
/>
<x:selectC
name=
"mtposMara"
label=
"项目类别组"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"mtposMara"
/>
<x:selectC
name=
"mtposMara"
label=
"项目类别组"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"mtposMara"
/>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordList.js
View file @
7fbc28dd
...
@@ -51,7 +51,8 @@ function initPurchaseListGrid() {
...
@@ -51,7 +51,8 @@ function initPurchaseListGrid() {
id
:
'cancelHandler'
,
text
:
"作废"
,
img
:
'fa-trash-o'
,
click
:
function
(){
id
:
'cancelHandler'
,
text
:
"作废"
,
img
:
'fa-trash-o'
,
click
:
function
(){
cancelHandlerInfoRecord
();
cancelHandlerInfoRecord
();
}
}
}
},
exportExcelHandler
:
exportExcelHandler
,
});
});
purchaseInfoRecordGridManager
=
UICtrl
.
grid
(
'#purchaseInfoRecordGrid'
,
{
purchaseInfoRecordGridManager
=
UICtrl
.
grid
(
'#purchaseInfoRecordGrid'
,
{
columns
:
[
columns
:
[
...
@@ -290,3 +291,9 @@ function cancelHandlerInfoRecord(){
...
@@ -290,3 +291,9 @@ function cancelHandlerInfoRecord(){
})
})
}
}
//导出Excel
function
exportExcelHandler
()
{
var
date
=
Public
.
formatDate
(
new
Date
(),
`%Y%M%D`
);
UICtrl
.
gridExport
(
purchaseInfoRecordGridManager
,{
fileName
:
"采购信息记录"
+
date
});
}
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/NonProdApplyApplication.java
View file @
7fbc28dd
package
com
.
huigou
.
topsun
.
sap
.
nonProdApply
.
application
;
package
com
.
huigou
.
topsun
.
sap
.
nonProdApply
.
application
;
import
com.huigou.topsun.sap.nonProdApply.domain.NonProdApplyBaseInfo
;
import
com.huigou.topsun.sap.nonProdApply.domain.NonProdApplyBaseInfo
;
import
com.huigou.topsun.sap.nonProdApply.domain.SapNonProdApplyDept
;
import
com.huigou.topsun.sap.nonProdApply.domain.query.NonProdApplyBaseInfoQueryRequest
;
import
com.huigou.topsun.sap.nonProdApply.domain.query.NonProdApplyBaseInfoQueryRequest
;
import
com.huigou.topsun.sap.nonProdApply.domain.vo.ProdApplyFromSapVO
;
import
com.huigou.topsun.sap.nonProdApply.domain.vo.ProdApplyFromSapVO
;
...
@@ -34,7 +35,7 @@ public interface NonProdApplyApplication{
...
@@ -34,7 +35,7 @@ public interface NonProdApplyApplication{
String
getChangeBusinessUsage
(
String
bizId
,
String
type
);
String
getChangeBusinessUsage
(
String
bizId
,
String
type
);
//保存来自SAP的产品申请
//保存来自SAP的产品申请
String
saveProdApplyFromSapVO
(
ProdApplyFromSapVO
prodApplyFromSapVO
);
String
saveProdApplyFromSapVO
(
ProdApplyFromSapVO
prodApplyFromSapVO
,
SapNonProdApplyDept
sapNonProdApplyDept
);
Map
<
String
,
Object
>
slicedNonApplyBaseInfoByMaktx
(
NonProdApplyBaseInfoQueryRequest
query
);
Map
<
String
,
Object
>
slicedNonApplyBaseInfoByMaktx
(
NonProdApplyBaseInfoQueryRequest
query
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/NonProdApplyDeptApplication.java
View file @
7fbc28dd
...
@@ -35,7 +35,7 @@ public interface NonProdApplyDeptApplication {
...
@@ -35,7 +35,7 @@ public interface NonProdApplyDeptApplication {
SapNonProdApplyDept
getNonProdApplyDeptByBaseInfoId
(
String
id
);
SapNonProdApplyDept
getNonProdApplyDeptByBaseInfoId
(
String
id
);
SapNonProdApplyDept
getNonProdApplyDeptByMatnr
(
String
matnr
);
List
<
SapNonProdApplyDept
>
getNonProdApplyDeptByMatnr
(
String
matnr
);
void
deleteSapNonProdApplyDept
(
SapNonProdApplyDept
sapNonProdApplyDept
);
void
deleteSapNonProdApplyDept
(
SapNonProdApplyDept
sapNonProdApplyDept
);
/**
/**
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyApplicationImpl.java
View file @
7fbc28dd
...
@@ -11,6 +11,7 @@ import com.huigou.cache.SystemCache;
...
@@ -11,6 +11,7 @@ import com.huigou.cache.SystemCache;
import
com.huigou.context.Operator
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.data.domain.model.CommonDomainConstants
;
import
com.huigou.data.domain.model.CommonDomainConstants
;
import
com.huigou.data.domain.model.Creator
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
...
@@ -36,6 +37,8 @@ import com.huigou.topsun.sap.nonProdApply.repository.NonProdApplyBaseInfoReposit
...
@@ -36,6 +37,8 @@ import com.huigou.topsun.sap.nonProdApply.repository.NonProdApplyBaseInfoReposit
import
com.huigou.topsun.sap.nonProdApply.repository.NonProdApplyDeptRepository
;
import
com.huigou.topsun.sap.nonProdApply.repository.NonProdApplyDeptRepository
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSale
;
import
com.huigou.topsun.sap.wasteSale.domain.WasteSale
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.doc.attachment.application.AttachmentApplication
;
import
com.huigou.uasp.bmp.doc.attachment.domain.model.Attachment
;
import
com.huigou.uasp.bmp.operator.OperatorApplication
;
import
com.huigou.uasp.bmp.operator.OperatorApplication
;
import
com.huigou.uasp.bmp.opm.repository.org.OrgRepository
;
import
com.huigou.uasp.bmp.opm.repository.org.OrgRepository
;
import
com.huigou.uasp.bpm.ApprovalParameter
;
import
com.huigou.uasp.bpm.ApprovalParameter
;
...
@@ -86,7 +89,8 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
...
@@ -86,7 +89,8 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
DefaultHttpClient
defaultHttpClient
;
DefaultHttpClient
defaultHttpClient
;
@Autowired
@Autowired
private
NonProdApplyDeptRepository
nonProdApplyDeptRepository
;
private
NonProdApplyDeptRepository
nonProdApplyDeptRepository
;
@Autowired
private
AttachmentApplication
attachmentApplication
;
@SneakyThrows
@SneakyThrows
@Transactional
(
propagation
=
Propagation
.
REQUIRES_NEW
)
@Transactional
(
propagation
=
Propagation
.
REQUIRES_NEW
)
@Override
@Override
...
@@ -261,6 +265,31 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
...
@@ -261,6 +265,31 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
nonProdApplyBaseInfo
.
setStatusId
(
status
.
getId
());
nonProdApplyBaseInfo
.
setStatusId
(
status
.
getId
());
nonProdApplyBaseInfo
.
setApprover
(
getOperator
().
getPersonMemberName
());
nonProdApplyBaseInfo
.
setApprover
(
getOperator
().
getPersonMemberName
());
nonProdApplyBaseInfo
.
setApprovalDate
(
new
Date
());
nonProdApplyBaseInfo
.
setApprovalDate
(
new
Date
());
//复制正反面图片
List
<
Attachment
>
frontAttachments
=
attachmentApplication
.
queryAttachments
(
"frontPicture"
,
nonProdApplyBaseInfo
.
getAttbizId
());
List
<
Attachment
>
backAttachments
=
attachmentApplication
.
queryAttachments
(
"backPicture"
,
nonProdApplyBaseInfo
.
getAttbizId
());
if
(
frontAttachments
.
size
()
>
0
)
{
Attachment
attachment
=
frontAttachments
.
get
(
0
);
Attachment
attachmentNew
=
new
Attachment
();
ClassHelper
.
copyProperties
(
attachment
,
attachmentNew
);
attachmentNew
.
setId
(
null
);
attachmentNew
.
setBizId
(
nonProdApplyBaseInfo
.
getId
());
Creator
creator
=
attachmentNew
.
getCreator
();
creator
.
setCreatedDate
(
new
Date
());
attachmentNew
.
setCreator
(
creator
);
attachmentApplication
.
saveAttachment
(
attachmentNew
);
}
if
(
backAttachments
.
size
()
>
0
)
{
Attachment
attachment
=
backAttachments
.
get
(
0
);
Attachment
attachmentNew
=
new
Attachment
();
ClassHelper
.
copyProperties
(
attachment
,
attachmentNew
);
attachmentNew
.
setId
(
null
);
attachmentNew
.
setBizId
(
nonProdApplyBaseInfo
.
getId
());
Creator
creator
=
attachmentNew
.
getCreator
();
creator
.
setCreatedDate
(
new
Date
());
attachmentNew
.
setCreator
(
creator
);
attachmentApplication
.
saveAttachment
(
attachmentNew
);
}
nonProdApplyBaseInfoRepository
.
save
(
nonProdApplyBaseInfo
);
nonProdApplyBaseInfoRepository
.
save
(
nonProdApplyBaseInfo
);
}
}
...
@@ -483,7 +512,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
...
@@ -483,7 +512,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
if
(!
"modify"
.
equals
(
maintenanceType
))
{
if
(!
"modify"
.
equals
(
maintenanceType
))
{
usedBusiness
+=
mapExd
.
get
(
"businessUsage"
).
toString
()
+
","
;
usedBusiness
+=
mapExd
.
get
(
"businessUsage"
).
toString
()
+
","
;
}
}
if
(!
"3"
.
equals
(
mapExd
.
get
(
"status"
).
toString
())){
if
(!
"3"
.
equals
(
mapExd
.
get
(
"status"
).
toString
())
&&
!
"5"
.
equals
(
mapExd
.
get
(
"status"
).
toString
())
){
isExistApplyStatus
=
true
;
isExistApplyStatus
=
true
;
maintenanceType
=
mapExd
.
get
(
"maintenanceType"
).
toString
().
equals
(
"extend"
)?
"扩展"
:
"变更"
;
maintenanceType
=
mapExd
.
get
(
"maintenanceType"
).
toString
().
equals
(
"extend"
)?
"扩展"
:
"变更"
;
break
;
break
;
...
@@ -500,7 +529,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
...
@@ -500,7 +529,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
@Override
@Override
@Transactional
@Transactional
public
String
saveProdApplyFromSapVO
(
ProdApplyFromSapVO
prodApplyFromSapVO
)
{
public
String
saveProdApplyFromSapVO
(
ProdApplyFromSapVO
prodApplyFromSapVO
,
SapNonProdApplyDept
sapNonProdApplyDept
)
{
//初始化用户信息
//初始化用户信息
String
createdById
=
SystemCache
.
getParameter
(
"adminPersonId"
,
String
.
class
);
String
createdById
=
SystemCache
.
getParameter
(
"adminPersonId"
,
String
.
class
);
...
@@ -508,7 +537,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
...
@@ -508,7 +537,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
String
message
=
""
;
String
message
=
""
;
try
{
try
{
NonProdApplyBaseInfo
nonProdApplyBaseInfo
=
new
NonProdApplyBaseInfo
();
NonProdApplyBaseInfo
nonProdApplyBaseInfo
=
new
NonProdApplyBaseInfo
();
SapNonProdApplyDept
sapNonProdApplyDept
=
new
SapNonProdApplyDept
();
ClassHelper
.
copyProperties
(
prodApplyFromSapVO
,
sapNonProdApplyDept
);
ClassHelper
.
copyProperties
(
prodApplyFromSapVO
,
sapNonProdApplyDept
);
ClassHelper
.
copyProperties
(
prodApplyFromSapVO
,
nonProdApplyBaseInfo
);
ClassHelper
.
copyProperties
(
prodApplyFromSapVO
,
nonProdApplyBaseInfo
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyDeptApplicationImpl.java
View file @
7fbc28dd
...
@@ -250,7 +250,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
...
@@ -250,7 +250,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
return
nonProdApplyDeptRepository
.
findByBaseInfoId
(
baseInfoId
);
return
nonProdApplyDeptRepository
.
findByBaseInfoId
(
baseInfoId
);
}
}
@Override
@Override
public
SapNonProdApplyDept
getNonProdApplyDeptByMatnr
(
String
matnr
){
public
List
<
SapNonProdApplyDept
>
getNonProdApplyDeptByMatnr
(
String
matnr
){
return
nonProdApplyDeptRepository
.
findByMatnr
(
matnr
);
return
nonProdApplyDeptRepository
.
findByMatnr
(
matnr
);
}
}
@Override
@Override
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyController.java
View file @
7fbc28dd
...
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.huigou.cache.DictUtil
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.context.Operator
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.data.domain.model.Creator
;
import
com.huigou.topsun.common.BillStatus
;
import
com.huigou.topsun.common.BillStatus
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyApplication
;
...
@@ -19,22 +20,25 @@ import com.huigou.topsun.sap.nonProdApply.domain.vo.ProdApplyFromSapVO;
...
@@ -19,22 +20,25 @@ import com.huigou.topsun.sap.nonProdApply.domain.vo.ProdApplyFromSapVO;
import
com.huigou.topsun.sap.nonProdApply.repository.MaterialNameElementRepository
;
import
com.huigou.topsun.sap.nonProdApply.repository.MaterialNameElementRepository
;
import
com.huigou.topsun.sap.purchaseApproval.controller.SapPurchaseApprovalController
;
import
com.huigou.topsun.sap.purchaseApproval.controller.SapPurchaseApprovalController
;
import
com.huigou.topsun.sap.purchaseApproval.domain.vo.SapPurchaseApprovalDto
;
import
com.huigou.topsun.sap.purchaseApproval.domain.vo.SapPurchaseApprovalDto
;
import
com.huigou.topsun.sap.sapApplication.application.SapDictionaryApplication
;
import
com.huigou.topsun.sap.suppliers.application.SuppliersDataApplication
;
import
com.huigou.topsun.sap.suppliers.application.SuppliersDataApplication
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.annotation.SkipAuth
;
import
com.huigou.uasp.annotation.SkipAuth
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.doc.attachment.application.AttachmentApplication
;
import
com.huigou.uasp.bmp.doc.attachment.domain.model.Attachment
;
import
com.huigou.uasp.bmp.opm.domain.model.access.Role
;
import
com.huigou.uasp.bmp.opm.domain.model.access.Role
;
import
com.huigou.uasp.bmp.opm.repository.org.RoleRepository
;
import
com.huigou.uasp.bmp.opm.repository.org.RoleRepository
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.CommonUtil
;
import
com.huigou.util.*
;
import
com.huigou.util.SDO
;
import
com.huigou.util.StringUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -56,6 +60,10 @@ public class NonProdApplyController extends CommonController {
...
@@ -56,6 +60,10 @@ public class NonProdApplyController extends CommonController {
RoleRepository
roleRepository
;
RoleRepository
roleRepository
;
@Autowired
@Autowired
private
MaterialNameElementRepository
materialNameElementRepository
;
private
MaterialNameElementRepository
materialNameElementRepository
;
@Resource
private
SapDictionaryApplication
sapDictionaryApplication
;
@Autowired
private
AttachmentApplication
attachmentApplication
;
private
final
static
Logger
LOG
=
LoggerFactory
.
getLogger
(
NonProdApplyController
.
class
);
private
final
static
Logger
LOG
=
LoggerFactory
.
getLogger
(
NonProdApplyController
.
class
);
...
@@ -144,6 +152,37 @@ public class NonProdApplyController extends CommonController {
...
@@ -144,6 +152,37 @@ public class NonProdApplyController extends CommonController {
nonProdApplyBaseInfo
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
nonProdApplyBaseInfo
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
Operator
operator
=
getOperator
();
//获取当前操作员的详情信息
Operator
operator
=
getOperator
();
//获取当前操作员的详情信息
nonProdApplyBaseInfo
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
nonProdApplyBaseInfo
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
if
(
StringUtil
.
isNotBlank
(
bizId
))
{
//复制正反面图片
List
<
Attachment
>
frontAttachments
=
attachmentApplication
.
queryAttachments
(
"frontPicture"
,
bizId
);
List
<
Attachment
>
backAttachments
=
attachmentApplication
.
queryAttachments
(
"backPicture"
,
bizId
);
if
(
frontAttachments
.
size
()
>
0
)
{
Attachment
attachment
=
frontAttachments
.
get
(
0
);
Attachment
attachmentNew
=
new
Attachment
();
ClassHelper
.
copyProperties
(
attachment
,
attachmentNew
);
attachmentNew
.
setId
(
null
);
attachmentNew
.
setBizId
(
nonProdApplyBaseInfo
.
getAttbizId
());
Creator
creator
=
attachmentNew
.
getCreator
();
creator
.
setCreatedDate
(
new
Date
());
attachmentNew
.
setCreator
(
creator
);
attachmentApplication
.
saveAttachment
(
attachmentNew
);
this
.
putAttribute
(
"frontPicturePath"
,
StringUtil
.
encode
(
attachment
.
getPath
()));
}
if
(
backAttachments
.
size
()
>
0
)
{
Attachment
attachment
=
backAttachments
.
get
(
0
);
Attachment
attachmentNew
=
new
Attachment
();
ClassHelper
.
copyProperties
(
attachment
,
attachmentNew
);
attachmentNew
.
setId
(
null
);
attachmentNew
.
setBizId
(
nonProdApplyBaseInfo
.
getAttbizId
());
Creator
creator
=
attachmentNew
.
getCreator
();
creator
.
setCreatedDate
(
new
Date
());
attachmentNew
.
setCreator
(
creator
);
attachmentApplication
.
saveAttachment
(
attachmentNew
);
this
.
putAttribute
(
"backPicturePath"
,
StringUtil
.
encode
(
attachment
.
getPath
()));
}
}
return
forward
(
"nonProdApplyDetail"
,
nonProdApplyBaseInfo
);
return
forward
(
"nonProdApplyDetail"
,
nonProdApplyBaseInfo
);
}
}
...
@@ -247,6 +286,17 @@ public class NonProdApplyController extends CommonController {
...
@@ -247,6 +286,17 @@ public class NonProdApplyController extends CommonController {
}
}
this
.
putAttribute
(
"businessUsageUnSeledList"
,
unMapTmp
);
this
.
putAttribute
(
"businessUsageUnSeledList"
,
unMapTmp
);
}
}
List
<
Attachment
>
frontAttachments
=
attachmentApplication
.
queryAttachments
(
"frontPicture"
,
nonProdApplyBaseInfo
.
getAttbizId
());
List
<
Attachment
>
backAttachments
=
attachmentApplication
.
queryAttachments
(
"backPicture"
,
nonProdApplyBaseInfo
.
getAttbizId
());
if
(
frontAttachments
.
size
()
>
0
)
{
Attachment
attachment
=
frontAttachments
.
get
(
0
);
this
.
putAttribute
(
"frontPicturePath"
,
StringUtil
.
encode
(
attachment
.
getPath
()));
}
if
(
backAttachments
.
size
()
>
0
)
{
Attachment
attachment
=
backAttachments
.
get
(
0
);
this
.
putAttribute
(
"backPicturePath"
,
StringUtil
.
encode
(
attachment
.
getPath
()));
}
Map
<
String
,
String
>
dictMapUsage
=
DictUtil
.
getDictionary
(
"serviceusage"
);
Map
<
String
,
String
>
dictMapUsage
=
DictUtil
.
getDictionary
(
"serviceusage"
);
String
dictMapUsages
=
""
;
String
dictMapUsages
=
""
;
for
(
Map
.
Entry
<
String
,
String
>
entry:
dictMapUsage
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
String
>
entry:
dictMapUsage
.
entrySet
())
{
...
@@ -285,25 +335,65 @@ public class NonProdApplyController extends CommonController {
...
@@ -285,25 +335,65 @@ public class NonProdApplyController extends CommonController {
messageMap
.
put
(
"CODE"
,
"S"
);
messageMap
.
put
(
"CODE"
,
"S"
);
messageMap
.
put
(
"MSG"
,
"成功"
);
messageMap
.
put
(
"MSG"
,
"成功"
);
messageMap
.
put
(
"DATA"
,
""
);
messageMap
.
put
(
"DATA"
,
""
);
LOG
.
info
(
"参数:=={}"
,
JSON
Object
.
toJSON
String
(
prodApplyFromSapVO
));
LOG
.
info
(
"参数:=={}"
,
JSON
Util
.
to
String
(
prodApplyFromSapVO
));
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"TYPE"
,
"S"
);
resultMap
.
put
(
"TYPE"
,
"S"
);
resultMap
.
put
(
"MESSAGE"
,
"成功"
);
resultMap
.
put
(
"MESSAGE"
,
"成功"
);
resultMap
.
put
(
"businessType"
,
"接收SAP产品数据"
);
resultMap
.
put
(
"businessType"
,
"接收SAP产品数据"
);
resultMap
.
put
(
"businessId"
,
prodApplyFromSapVO
.
getMatnr
().
length
()>
31
?
prodApplyFromSapVO
.
getMatnr
().
substring
(
0
,
31
):
prodApplyFromSapVO
.
getMatnr
());
resultMap
.
put
(
"businessId"
,
prodApplyFromSapVO
.
getMatnr
().
length
()>
31
?
prodApplyFromSapVO
.
getMatnr
().
substring
(
0
,
31
):
prodApplyFromSapVO
.
getMatnr
());
resultMap
.
put
(
"parameter"
,
JSON
.
toJSON
String
(
prodApplyFromSapVO
));
resultMap
.
put
(
"parameter"
,
JSON
Util
.
to
String
(
prodApplyFromSapVO
));
String
message
=
""
;
String
message
=
""
;
try
{
try
{
//resultMap.put("sequence", resultMap.get("row"));
//resultMap.put("sequence", resultMap.get("row"));
SapNonProdApplyDept
sapNonProdApplyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptByMatnr
(
prodApplyFromSapVO
.
getMatnr
());
//根据数据字典接口。查询物料组大类
if
(
sapNonProdApplyDept
!=
null
){
List
<
Map
<
String
,
String
>>
mapList
=
sapDictionaryApplication
.
getSapDictionary
(
"MATKL"
);
message
=
"产品编号"
+
prodApplyFromSapVO
.
getMatnr
()+
"已经存在!"
;
//获取物料组编码
messageMap
.
put
(
"CODE"
,
"E"
);
String
matkl
=
prodApplyFromSapVO
.
getMatkl
();
messageMap
.
put
(
"MSG"
,
message
);
String
matklType
=
""
;
resultMap
.
put
(
"TYPE"
,
"E"
);
String
matklTypeName
=
""
;
if
(
matkl
.
length
()
>
3
){
//截取前三位,是物料组大类编码
String
substring
=
matkl
.
substring
(
0
,
3
);
//获取物料组名称
List
<
Map
<
String
,
String
>>
matkl1
=
mapList
.
stream
()
.
filter
(
map
->
substring
.
equals
(
map
.
get
(
"MATKL"
)))
.
collect
(
Collectors
.
toList
());
if
(
matkl1
.
size
()
>
0
){
matklType
=
matkl1
.
get
(
0
).
get
(
"MATKL"
);
matklTypeName
=
matkl1
.
get
(
0
).
get
(
"WGBEZ"
);
}
}
else
{
matklType
=
matkl
;
matklTypeName
=
prodApplyFromSapVO
.
getMatklName
();
}
List
<
SapNonProdApplyDept
>
sapNonProdApplyDepts
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptByMatnr
(
prodApplyFromSapVO
.
getMatnr
());
if
(!
CollectionUtils
.
isEmpty
(
sapNonProdApplyDepts
)){
for
(
SapNonProdApplyDept
sapNonProdApplyDept
:
sapNonProdApplyDepts
)
{
//更新产品名称、物料组、单位、规格
sapNonProdApplyDept
.
setMaktx
(
prodApplyFromSapVO
.
getMaktx
());
sapNonProdApplyDept
.
setMaktxRemZh
(
prodApplyFromSapVO
.
getMaktxRemZh
());
sapNonProdApplyDept
.
setMeins
(
prodApplyFromSapVO
.
getMeins
());
sapNonProdApplyDept
.
setMeinsName
(
prodApplyFromSapVO
.
getMeinsName
());
sapNonProdApplyDept
.
setMatkl
(
prodApplyFromSapVO
.
getMatkl
());
sapNonProdApplyDept
.
setMatklName
(
prodApplyFromSapVO
.
getMatklName
());
sapNonProdApplyDept
.
setGroes
(
prodApplyFromSapVO
.
getGroes
());
sapNonProdApplyDept
.
setMaktxEn
(
prodApplyFromSapVO
.
getMaktxEn
());
sapNonProdApplyDept
.
setMatklType
(
matklType
);
sapNonProdApplyDept
.
setMatklTypeName
(
matklTypeName
);
nonProdApplyDeptApplication
.
save
(
sapNonProdApplyDept
);
}
// message="产品编号"+prodApplyFromSapVO.getMatnr()+"已经存在!";
// messageMap.put("CODE","E");
// messageMap.put("MSG",message);
// resultMap.put("TYPE", "E");
}
else
{
}
else
{
message
=
nonProdApplyApplication
.
saveProdApplyFromSapVO
(
prodApplyFromSapVO
);
SapNonProdApplyDept
sapNonProdApplyDept
=
new
SapNonProdApplyDept
();
sapNonProdApplyDept
.
setMatklType
(
matklType
);
sapNonProdApplyDept
.
setMatklTypeName
(
matklTypeName
);
message
=
nonProdApplyApplication
.
saveProdApplyFromSapVO
(
prodApplyFromSapVO
,
sapNonProdApplyDept
);
if
(
StringUtil
.
isNotBlank
(
message
)){
if
(
StringUtil
.
isNotBlank
(
message
)){
resultMap
.
put
(
"TYPE"
,
"E"
);
resultMap
.
put
(
"TYPE"
,
"E"
);
}
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/repository/NonProdApplyDeptRepository.java
View file @
7fbc28dd
...
@@ -11,7 +11,7 @@ public interface NonProdApplyDeptRepository extends JpaRepository<SapNonProdAppl
...
@@ -11,7 +11,7 @@ public interface NonProdApplyDeptRepository extends JpaRepository<SapNonProdAppl
SapNonProdApplyDept
findByBaseInfoId
(
String
baseInfoId
);
SapNonProdApplyDept
findByBaseInfoId
(
String
baseInfoId
);
SapNonProdApplyDept
findByApplyDeptId
(
String
applyDeptId
);
SapNonProdApplyDept
findByApplyDeptId
(
String
applyDeptId
);
SapNonProdApplyDept
findByMatnr
(
String
matnr
);
List
<
SapNonProdApplyDept
>
findByMatnr
(
String
matnr
);
List
<
SapNonProdApplyDept
>
findByMatnrAndWerks
(
String
matnr
,
String
werks
);
List
<
SapNonProdApplyDept
>
findByMatnrAndWerks
(
String
matnr
,
String
werks
);
List
<
SapNonProdApplyDept
>
findByMaktx
(
String
maktx
);
List
<
SapNonProdApplyDept
>
findByMaktx
(
String
maktx
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/domain/SapPurchase.java
View file @
7fbc28dd
...
@@ -3,6 +3,7 @@ package com.huigou.topsun.sap.purchase.domain;
...
@@ -3,6 +3,7 @@ package com.huigou.topsun.sap.purchase.domain;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
com.huigou.util.StringUtil
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -75,6 +76,17 @@ public class SapPurchase extends FlowBillAbstractEntity {
...
@@ -75,6 +76,17 @@ public class SapPurchase extends FlowBillAbstractEntity {
@Column
(
name
=
"kostl"
)
@Column
(
name
=
"kostl"
)
private
String
kostl
;
private
String
kostl
;
public
String
getKostl
()
{
return
kostl
;
}
public
void
setKostl
(
String
kostl
)
{
if
(
StringUtil
.
isBlank
(
kostl
))
{
return
;
}
this
.
kostl
=
kostl
;
}
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
@Override
...
...
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