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
14a5b67b
Commit
14a5b67b
authored
Jul 25, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料主数据的页面调整
parent
40f68f59
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
93 additions
and
10 deletions
+93
-10
nonProdApplyDetail.jsp
...webapp/biz/topsun/sap/nonProdApply/nonProdApplyDetail.jsp
+5
-0
nonProdApplyNext.js
...in/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
+23
-0
nonProdApplyNext.jsp
...n/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
+11
-5
NonProdApplyApplicationImpl.java
...odApply/application/impl/NonProdApplyApplicationImpl.java
+7
-3
NonProdApplyDeptApplicationImpl.java
...ply/application/impl/NonProdApplyDeptApplicationImpl.java
+5
-1
NonProdApplyController.java
...n/sap/nonProdApply/controller/NonProdApplyController.java
+1
-0
NonProdApplyNextController.java
...p/nonProdApply/controller/NonProdApplyNextController.java
+3
-1
SapPurchaseInfoRecordApplicationImpl.java
...pplication/impl/SapPurchaseInfoRecordApplicationImpl.java
+38
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyDetail.jsp
View file @
14a5b67b
...
...
@@ -59,7 +59,12 @@
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"genericName"
label=
"通用品名"
labelCol=
"1"
fieldCol=
"5"
/>
<c:if
test=
"
${
kind
==
'product'
}
"
>
<x:inputC
name=
"applicableStandard"
label=
"适用标准(国标)"
labelCol=
"1"
fieldCol=
"5"
/>
</c:if>
<c:if
test=
"
${
kind
!=
'product'
}
"
>
<x:inputC
name=
"applicableStandard"
label=
"适用行业标准"
labelCol=
"1"
fieldCol=
"5"
/>
</c:if>
<x:hidden
name=
"baseUnit"
/>
<x:inputC
name=
"baseUnitName"
label=
"基本计量单位"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:inputC
name=
"specifications"
label=
"规格"
labelCol=
"1"
fieldCol=
"2"
/>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
View file @
14a5b67b
...
...
@@ -26,6 +26,7 @@ function initializate() {
//物品类型 控制存储的序列号参数
$
(
"#mtart"
).
combox
({
onChange
:
function
(
data
)
{
storeDisplaySer
(
data
.
value
);
getBklas
(
data
.
value
);
}
});
//价格控制 控制财务核算的 不参与成本核算
...
...
@@ -435,6 +436,7 @@ function financialMustInput(flag) {
$
(
"#peinh"
).
val
(
"1000"
);
}
financialDisplayNcost
(
$
(
"#vprsv"
).
val
());
getBklas
(
$
(
'#mtart'
).
val
());
}
function
financialDisplayNcost
(
vprsv
)
{
// alert("-="+vprsv);
...
...
@@ -451,6 +453,27 @@ function financialDisplayNcost(vprsv) { // alert("-="+vprsv);
}
}
}
function
getBklas
(
mtart
){
//获取评估分类
if
(
mtart
==
'ZBCP'
){
$
(
'#bklas'
).
val
(
"7900"
);
}
else
if
(
mtart
==
'ZBPJ'
||
mtart
==
'ZBZP'
||
mtart
==
'ZCOM'
||
mtart
==
'ZECC'
||
mtart
==
'ZFBL'
||
mtart
==
'ZGMB'
||
mtart
==
'ZXHP'
||
mtart
==
'ZXNJ'
)
{
$
(
'#bklas'
).
val
(
"3001"
);
}
else
if
(
mtart
==
'ZKGL'
)
{
$
(
'#bklas'
).
val
(
"3000"
);
}
else
if
(
mtart
==
'ZMYP'
)
{
$
(
'#bklas'
).
val
(
"7930"
);
}
else
if
(
mtart
==
' ZSHB'
||
mtart
==
'ZZCP'
)
{
$
(
'#bklas'
).
val
(
"7920"
);
}
else
if
(
mtart
==
'ZSRV'
)
{
$
(
'#bklas'
).
val
(
"7940"
);
}
else
if
(
mtart
==
'ZYCL'
)
{
$
(
'#bklas'
).
val
(
"3000"
);
}
}
/**
* 表单提交
* @returns {boolean}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
View file @
14a5b67b
...
...
@@ -85,7 +85,12 @@
<div
class=
"hg-form-cols"
id=
"totalContentDiv"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"genericName"
label=
"通用品名"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"applicableStandard"
label=
"适用标准(国标)"
labelCol=
"1"
fieldCol=
"2"
/>
<c:if
test=
"
${
kind
==
'product'
}
"
>
<x:inputC
name=
"applicableStandard"
label=
"适用标准(国标)"
labelCol=
"1"
fieldCol=
"2"
/>
</c:if>
<c:if
test=
"
${
kind
!=
'product'
}
"
>
<x:inputC
name=
"applicableStandard"
label=
"适用行业标准"
labelCol=
"1"
fieldCol=
"2"
/>
</c:if>
<x:hidden
name=
"baseUnit"
/>
<x:inputC
name=
"baseUnitName"
label=
"基本计量单位"
labelCol=
"1"
fieldCol=
"2"
readonly=
"true"
/>
<x:inputC
name=
"specifications"
label=
"规格"
labelCol=
"1"
fieldCol=
"2"
/>
...
...
@@ -205,8 +210,8 @@
<x:selectC
name=
"ktgrm"
label=
"会计科目组"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
dictionary=
"ktgrm"
/>
<%--<x:selectC name="prodh" label="产品层级" labelCol="1" fieldCol="2" dictionary="productLevels"/>--%>
<x:inputC
name=
"prodh"
label=
"产品层级"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"mvgr1"
label=
"
版式
"
labelCol=
"1"
fieldCol=
"2"
/>
<x:
inputC
name=
"mvgr2"
label=
"品牌"
labelCol=
"1"
fieldCol=
"2"
disabled=
"true
"
/>
<x:inputC
name=
"mvgr1"
label=
"
品牌
"
labelCol=
"1"
fieldCol=
"2"
/>
<x:
selectC
name=
"mvgr2"
label=
"产品经营类型"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"mvgr2
"
/>
<x:inputC
name=
"mvgr3"
label=
"用途"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"mvgr4"
label=
"备用1"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"mvgr5"
label=
"备用2"
labelCol=
"1"
fieldCol=
"2"
/>
...
...
@@ -345,7 +350,8 @@
<x:title
title=
"财务核算"
name=
"group"
/>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"bklas"
label=
"评估分类"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"bklas"
/>
<!--x:selectC name="bklas" label="评估分类" labelCol="1" fieldCol="2" dictionary="bklas"/-->
<x:inputC
name=
"bklas"
label=
"评估分类"
labelCol=
"1"
fieldCol=
"2"
readonly=
"true"
/>
<!--x:inputC name="mlast" label="价格确定" labelCol="1" fieldCol="2" required="false"/-->
<x:selectC
name=
"mlast"
label=
"价格确定"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"mlast"
/>
...
...
@@ -356,7 +362,7 @@
<x:selectC
name=
"ncost"
label=
"不参与成本核算"
labelCol=
"2"
fieldCol=
"1"
dictionary=
"xchpf"
/>
</div>
<div
class=
"hg-form-row"
>
<x:
inputC
name=
"ekalr"
label=
"数量结构"
labelCol=
"1"
fieldCol=
"2
"
/>
<x:
selectC
name=
"ekalr"
label=
"数量结构"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"xchpf
"
/>
<x:selectC
name=
"hkmat"
label=
"物料来源"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"xchpf"
/>
<x:inputC
name=
"awsls"
label=
"差异码"
labelCol=
"1"
fieldCol=
"2"
/>
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyApplicationImpl.java
View file @
14a5b67b
...
...
@@ -611,7 +611,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
//保存基本信息的维护的待办
// saveDeptStaff(deptStaffList, nonProdApplyDept.getApplyDeptId(),genericName);
/* 改为推送给 货源专员
BsnMessageSponsor bsnMessageSponsor = new BsnMessageSponsor();
bsnMessageSponsor.setTaskSponsor(operator.getLoginUser().getId());
String genericName=nonProdApplyBaseInfo.getGenericName()!=null?nonProdApplyBaseInfo.getGenericName():"";
...
...
@@ -647,9 +647,13 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
List<BsnMessageExecute> executes =new ArrayList<>();
executes.add(messageExecute);
bsnMessageApplication
.
saveBsnMessageExecute
(
executes
);
bsnMessageApplication.saveBsnMessageExecute(executes);
*/
// bsnMessageApplication.publishTasks(sapNonProdApplyDept.getApplyDeptId());
Map
backMap
=
new
HashMap
();
backMap
.
put
(
"TYPE"
,
"P"
);
backMap
.
put
(
"title"
,
nonProdApplyBaseInfo
.
getBillCode
());
backMap
.
put
(
"positionCode"
,
"HYZY"
);
nonProdApplyDeptApplication
.
saveBsnMessageData
(
nonProdApplyBaseInfo
,
backMap
);
}
catch
(
Exception
ex
){
message
=
ex
.
getMessage
();
// ex.printStackTrace();
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyDeptApplicationImpl.java
View file @
14a5b67b
...
...
@@ -415,7 +415,9 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
if
(
"0"
.
equals
(
sapVO
.
getHkmat
())){
//物料来源 否 传递空
sapVO
.
setHkmat
(
""
);
}
if
(
"0"
.
equals
(
sapVO
.
getEkalr
())){
//数量结构 传递空
sapVO
.
setEkalr
(
""
);
}
if
(
baseInfo
.
getBusinessUsage
().
contains
(
"K"
)){
sapVO
.
setPstat
(
baseInfo
.
getBusinessUsage
());
}
else
{
...
...
@@ -593,6 +595,8 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
title
=
"("
+
title
+
")"
;
}
messageExecute
.
setTaskDescribe
(
genericName
+
sign
+
"待确认"
+
title
);
}
else
if
(
"P"
.
equals
(
backMap
.
get
(
"TYPE"
).
toString
()))
{
//产品数据
messageExecute
.
setTaskDescribe
(
genericName
+
sign
+
"数据维护"
);
}
bsnMessageApplication
.
saveBsnMessageSponsor
(
bsnMessageSponsor
);
messageExecute
.
setMessageSponsorId
(
bsnMessageSponsor
.
getId
());
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyController.java
View file @
14a5b67b
...
...
@@ -64,6 +64,7 @@ public class NonProdApplyController extends CommonController {
nonProdApplyBaseInfo
.
setMaintenanceType
(
"new"
);
nonProdApplyBaseInfo
.
setApplyType
(
"0"
);
nonProdApplyBaseInfo
.
setKind
(
"materiel"
);
this
.
putAttribute
(
"kind"
,
"materiel"
);
nonProdApplyBaseInfo
.
setCreatedDate
(
new
Date
());
if
(
StringUtil
.
isNotBlank
(
extended
))
{
//扩展流程
nonProdApplyBaseInfo
=
nonProdApplyApplication
.
loadNonProdApplyBaseInfoById
(
bizId
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyNextController.java
View file @
14a5b67b
...
...
@@ -149,6 +149,8 @@ public class NonProdApplyNextController extends CommonController {
}
if
(
"product"
.
equals
(
nonProdApplyDept
.
getKind
())){
this
.
putAttribute
(
"kind"
,
"product"
);
}
else
{
this
.
putAttribute
(
"kind"
,
"materiel"
);
}
return
forward
(
"nonProdApplyNext"
,
nonProdApplyDept
);
}
else
{
...
...
@@ -348,7 +350,7 @@ public class NonProdApplyNextController extends CommonController {
if
(
epResult
.
getData
()!=
null
){
nonProdApplyDept
.
setBrand
(
epResult
.
getData
().
getCode
());
nonProdApplyDept
.
setBrandName
(
epResult
.
getData
().
getName
());
nonProdApplyDept
.
setMvgr
2
(
epResult
.
getData
().
getCode
());
nonProdApplyDept
.
setMvgr
1
(
epResult
.
getData
().
getCode
());
}
}
else
{
throw
new
RuntimeException
(
"从EP查询品牌错误:"
+
epResult
.
getMsg
());
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseInfoRecord/application/impl/SapPurchaseInfoRecordApplicationImpl.java
View file @
14a5b67b
...
...
@@ -8,6 +8,8 @@ import com.huigou.cache.SystemCache;
import
com.huigou.data.domain.model.CommonDomainConstants
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.base.coderule.domain.model.CodeRule
;
import
com.huigou.topsun.base.coderule.repository.CodeRuleRepository
;
import
com.huigou.topsun.sap.common.HttpClient
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
import
com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursement
;
...
...
@@ -22,9 +24,11 @@ import com.huigou.topsun.sap.purchaseInfoRecord.repository.SapPurchaseInfoRecord
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.DateUtil
;
import
com.huigou.util.StringUtil
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -36,6 +40,7 @@ import java.text.SimpleDateFormat;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.regex.Pattern
;
/**
* @Auther: xin.lu
...
...
@@ -53,6 +58,8 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements
private
HttpClient
httpClient
;
@Autowired
SapMutualEpLogApplication
sapMutualEpLogApplication
;
@Autowired
private
CodeRuleRepository
codeRuleRepository
;
@Transactional
@Override
...
...
@@ -141,6 +148,28 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements
if
(
StringUtil
.
isBlank
(
sapPurchaseInfoRecordItemVo
.
getMeins
())){
sapPurchaseInfoRecordItemVo
.
setMeins
(
sapPurchaseInfoRecordItemVo
.
getBprme
());
}
//物料编码为空 排序字段 传SAP FYL+7位流水号
if
(
StringUtils
.
isBlank
(
sapPurchaseInfoRecordItemVo
.
getMatnr
())
&&
StringUtils
.
isBlank
(
sapPurchaseInfoRecordItemVo
.
getSortl
()))
{
synchronized
(
this
)
{
String
sql
=
"select t.* from code_rule t where t.RULE_KIND = ? for update"
;
CodeRule
codeRule
=
this
.
sqlExecutorDao
.
queryToObject
(
sql
,
CodeRule
.
class
,
"sortl"
);
Integer
currentValue
=
codeRule
.
getCurrentValue
();
if
(
currentValue
==
null
)
{
currentValue
=
0
;
}
currentValue
+=
1
;
codeRule
.
setCurrentValue
(
currentValue
);
codeRule
.
setLastModifiedDate
(
DateUtil
.
getTimestamp
());
codeRule
=
codeRuleRepository
.
save
(
codeRule
);
String
sortNo
=
codeRule
.
getPrefix
()
+
formatSerialNumber
(
currentValue
,
7
);
sapPurchaseInfoRecordItemVo
.
setSortl
(
sortNo
);
}
sapPurchaseInfoRecordItem
.
setSortl
(
sapPurchaseInfoRecordItemVo
.
getSortl
());
}
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
if
(
sapPurchaseInfoRecordItem
.
getDatab
()
!=
null
){
String
datab
=
dateFormat
.
format
(
sapPurchaseInfoRecordItem
.
getDatab
());
...
...
@@ -185,6 +214,15 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements
});
}
private
String
formatSerialNumber
(
Integer
serialNumber
,
int
length
)
{
String
result
=
String
.
valueOf
(
serialNumber
);
Assert
.
isTrue
(
result
.
length
()
<=
length
,
String
.
format
(
"流水号长度超出限制,设置长度:%s,实际长度:%s。"
,
length
,
result
.
length
()));
while
(
result
.
length
()
<
length
)
{
result
=
"0"
+
result
;
}
return
result
;
}
@Override
protected
void
onAbortProcessInstance
(
DelegateExecution
delegateExecution
)
{
super
.
onAbortProcessInstance
(
delegateExecution
);
...
...
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