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
b2f482c0
Commit
b2f482c0
authored
May 16, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
付款申请时,把已使用过的采购发票号排除掉;新增打样工序报价流程
parent
63b63665
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
178 additions
and
18 deletions
+178
-18
processQuotedPriceDetail.js
...topsun/sap/processQuotedPrice/processQuotedPriceDetail.js
+38
-3
processQuotedPriceDetail.jsp
...opsun/sap/processQuotedPrice/processQuotedPriceDetail.jsp
+1
-0
ResourceSearchController.java
...om/huigou/topsun/controller/ResourceSearchController.java
+25
-13
EpApplication.java
...ava/com/huigou/topsun/ep/epApplication/EpApplication.java
+12
-0
EpApplicationImpl.java
...uigou/topsun/ep/epApplication/impl/EpApplicationImpl.java
+42
-0
DefaultHttpClient.java
.../java/com/huigou/topsun/sap/common/DefaultHttpClient.java
+16
-2
HttpClient.java
...rc/main/java/com/huigou/topsun/sap/common/HttpClient.java
+1
-0
SapCostReimbursementApplication.java
...ursement/application/SapCostReimbursementApplication.java
+3
-0
SapCostReimbursementApplicationImpl.java
...application/impl/SapCostReimbursementApplicationImpl.java
+7
-0
SapCostReimbursementController.java
...mbursement/controller/SapCostReimbursementController.java
+16
-0
ProcessQuotedPrice.java
...sun/sap/processQuotedPrice/domain/ProcessQuotedPrice.java
+8
-0
costReimbursement.xml
...config/topsun/sap/costReimbursement/costReimbursement.xml
+9
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/processQuotedPrice/processQuotedPriceDetail.js
View file @
b2f482c0
...
...
@@ -40,6 +40,11 @@ function loadItemGrid() {
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
// 添加一行表格
addHandler
:
function
()
{
var
processQuotedType
=
$
(
"#processQuotedType"
).
val
();
if
(
Public
.
isBlank
(
processQuotedType
)){
Public
.
tip
(
"请先选择工序报价类别"
);
return
false
;
}
UICtrl
.
addGridRow
(
itemGridManager
,
{
// 行号加一
...
...
@@ -180,17 +185,21 @@ function getOrderColumns(){
name
:
"sapProductSelect"
,
getParam
:
function
(
item
)
{
return
{
//filterValue:item.werks
processQuotedType
:
$
(
"#processQuotedType"
).
val
()
}
},
back
:
{
MATNR
:
"productCode"
,
MAKTX
:
"productName"
,
MSEHL
:
"unitName"
MSEHL
:
"unitName"
,
PROOFING_NO
:
"proofingNo"
}
},
}
},);
columns
.
push
({
display
:
"打样单号"
,
name
:
"proofingNo"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"产品名称"
,
name
:
"productName"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
...
...
@@ -210,7 +219,8 @@ function getOrderColumns(){
return
false
;
}
return
{
itemCode
:
item
.
productCode
itemCode
:
item
.
productCode
,
proofingNo
:
item
.
proofingNo
}
},
back
:
{
...
...
@@ -367,6 +377,7 @@ function getExtendedData(processAction) {
if
(
!
datas
)
{
return
false
;
}
checkProcessQuotedType
(
datas
);
extendedData
.
items
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
...
...
@@ -388,6 +399,7 @@ function checkConstraints(){
Public
.
tip
(
"报价单明细必填"
);
return
false
;
}
checkProcessQuotedType
(
datas
)
var
hasItemNumber
=
true
;
var
no
=
0
;
//如果没保存,从datas中取数据判断有没有报价规则
...
...
@@ -429,6 +441,29 @@ function checkConstraints(){
}
function
checkProcessQuotedType
(
datas
){
var
processQuotedType
=
$
(
"#processQuotedType"
).
val
();
if
(
"normal"
==
processQuotedType
){
for
(
let
i
=
0
;
i
<
datas
.
length
;
i
++
)
{
var
row
=
datas
[
i
];
//如果常规报价有打样单号,说明工序报价类型跟明细不对应
if
(
Public
.
isNotBlank
(
row
.
proofingNo
)){
Public
.
tip
(
"工序报价类别与报价单明细不一致,请修改!"
);
return
false
;
}
}
}
else
{
for
(
let
i
=
0
;
i
<
datas
.
length
;
i
++
)
{
var
row
=
datas
[
i
];
//如果常规报价有打样单号,说明工序报价类型跟明细不对应
if
(
Public
.
isBlank
(
row
.
proofingNo
)){
Public
.
tip
(
"工序报价类别与报价单明细不一致,请修改!"
);
return
false
;
}
}
}
}
function
bindEvent
(){
$
(
'#supplierName'
).
searchbox
({
type
:
"system"
,
name
:
"selectSuppliersDatas"
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/processQuotedPrice/processQuotedPriceDetail.jsp
View file @
b2f482c0
...
...
@@ -26,6 +26,7 @@
<x:hidden
name=
"personMemberName"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"processQuotedType"
label=
"工序报价类别"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
dictionary=
"processQuotedType"
/>
<x:hidden
name=
"supplier"
/>
<x:inputC
name=
"supplierName"
label=
"供应商"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"select"
/>
<x:inputC
name=
"quotedPriceDate"
label=
"报价日期"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"date"
/>
...
...
topsun/src/main/java/com/huigou/topsun/controller/ResourceSearchController.java
View file @
b2f482c0
...
...
@@ -301,21 +301,27 @@ public class ResourceSearchController {
@EasySearch
(
queryName
=
"sapProductSelect"
)
public
Map
<
String
,
Object
>
sapProductSelect
(
SDO
sdo
)
throws
IOException
{
String
param
=
sdo
.
getString
(
"paramValue"
);
SapDialogQuery
queryRequest
=
sdo
.
toObject
(
SapDialogQuery
.
class
);
List
<
Map
<
String
,
String
>>
mapList
=
sapMaterialApplication
.
getSapMaterial
(
queryRequest
);
if
(
CollectionUtil
.
isNotEmpty
(
mapList
)){
mapList
=
mapList
.
stream
()
.
filter
(
map
->
(
map
.
containsValue
(
"ZZCP"
)
||
map
.
containsValue
(
"ZBCP"
)
))
.
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
String
processQuotedType
=
sdo
.
getString
(
"processQuotedType"
);
if
(
"normal"
.
equals
(
processQuotedType
)){
//常规工序报价查询SAP物料信息
SapDialogQuery
queryRequest
=
sdo
.
toObject
(
SapDialogQuery
.
class
);
mapList
=
sapMaterialApplication
.
getSapMaterial
(
queryRequest
);
if
(
CollectionUtil
.
isNotEmpty
(
mapList
)){
mapList
=
mapList
.
stream
()
.
filter
(
map
->
(
map
.
containsValue
(
"ZZCP"
)
||
map
.
containsValue
(
"ZBCP"
)
))
.
collect
(
Collectors
.
toList
());
}
}
else
{
//打样工序报价查询EP打样产品信息
mapList
=
epApplication
.
queryEpProofingProduct
();
}
if
(
CollectionUtil
.
isNotEmpty
(
mapList
)){
if
(
StringUtil
.
isNotBlank
(
param
)){
//模糊条件过滤
mapList
=
mapList
.
stream
()
.
filter
(
map
->
map
.
values
().
stream
().
anyMatch
(
value
->
value
.
contains
(
param
)))
.
filter
(
map
->
map
.
values
().
stream
().
anyMatch
(
value
->
value
!=
null
&&
value
.
contains
(
param
)))
.
collect
(
Collectors
.
toList
());
}
}
...
...
@@ -328,6 +334,7 @@ public class ResourceSearchController {
Arrays
.
asList
(
new
QuerySchemeField
(
"工厂"
,
"WERKS"
,
"string"
,
60L
),
new
QuerySchemeField
(
"工厂名称"
,
"NAME1"
,
"string"
,
160L
),
new
QuerySchemeField
(
"打样单号"
,
"PROOFING_NO"
,
"string"
,
160L
),
new
QuerySchemeField
(
"物料编码"
,
"MATNR"
,
"string"
,
140L
),
new
QuerySchemeField
(
"物料名称"
,
"MAKTX"
,
"string"
,
400L
),
new
QuerySchemeField
(
"计量单位"
,
"MSEHL"
,
"string"
,
100L
),
...
...
@@ -685,11 +692,16 @@ public class ResourceSearchController {
@EasySearch
(
queryName
=
"selectEpProcess"
)
public
Map
<
String
,
Object
>
selectEpProcess
(
SDO
sdo
)
{
String
param
=
sdo
.
getString
(
"paramValue"
);
String
param
Value
=
sdo
.
getString
(
"paramValue"
);
String
itemCode
=
sdo
.
getString
(
"itemCode"
);
String
proofingNo
=
sdo
.
getString
(
"proofingNo"
);
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
mapList
=
epApplication
.
queryEpProductProcess
(
itemCode
);
return
sapDictionaryApplication
.
initEasySearchModel
(
mapList
,
param
,
sdo
);
if
(
StringUtil
.
isNotBlank
(
proofingNo
)){
//打样产品信息
mapList
=
epApplication
.
queryEpProductProcessByProofingNo
(
proofingNo
);
}
else
{
mapList
=
epApplication
.
queryEpProductProcess
(
itemCode
);
}
return
sapDictionaryApplication
.
initEasySearchModel
(
mapList
,
paramValue
,
sdo
);
}
@EasySearch
(
queryName
=
"selectEpBrandByItemCode"
)
...
...
topsun/src/main/java/com/huigou/topsun/ep/epApplication/EpApplication.java
View file @
b2f482c0
...
...
@@ -37,4 +37,16 @@ public interface EpApplication {
* @return
*/
List
<
Map
<
String
,
String
>>
queryEpBrandByItemCode
(
String
itemCode
);
/**
* 查询ep打样产品信息
*/
List
<
Map
<
String
,
String
>>
queryEpProofingProduct
();
/**
* 根据打样单号查询打样产品信息
* @param proofingNo
* @return
*/
List
<
Map
<
String
,
String
>>
queryEpProductProcessByProofingNo
(
String
proofingNo
);
}
topsun/src/main/java/com/huigou/topsun/ep/epApplication/impl/EpApplicationImpl.java
View file @
b2f482c0
...
...
@@ -158,4 +158,46 @@ public class EpApplicationImpl implements EpApplication {
}
return
mapList
;
}
@Override
public
List
<
Map
<
String
,
String
>>
queryEpProofingProduct
()
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
String
message
=
""
;
try
{
String
executeForEp
=
httpClient
.
executeHttpGetForEp
(
map
,
"pro/listPrototypeMake"
);
Map
<
String
,
Object
>
resultMap
=
JSONObject
.
parseObject
(
executeForEp
,
Map
.
class
);
if
(
"200"
.
equals
(
resultMap
.
get
(
"code"
).
toString
()))
{
ObjectMapper
objectMapper
=
SAPUtils
.
objectMapper
();
mapList
=
objectMapper
.
readValue
(
com
.
huigou
.
util
.
JSONUtil
.
toString
(
resultMap
.
get
(
"data"
)),
new
TypeReference
<
List
<
Map
<
String
,
String
>>>()
{});
}
else
{
message
=(
String
)
resultMap
.
get
(
"msg"
);
throw
new
RuntimeException
(
"查询EP打样产品信息出错:"
+
message
);
}
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"查询EP打样产品信息出错:"
+
e
.
getMessage
());
}
return
mapList
;
}
@Override
public
List
<
Map
<
String
,
String
>>
queryEpProductProcessByProofingNo
(
String
proofingNo
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
String
message
=
""
;
try
{
//md/mdItem/queryBrandByItemCode/{itemCode}
String
executeForEp
=
httpClient
.
executeHttpGetForEp
(
map
,
"pro/listProcessByPrototypeMakeCode?prototypeMakeCode="
+
proofingNo
);
Map
<
String
,
Object
>
resultMap
=
JSONObject
.
parseObject
(
executeForEp
,
Map
.
class
);
if
(
"200"
.
equals
(
resultMap
.
get
(
"code"
).
toString
()))
{
ObjectMapper
objectMapper
=
SAPUtils
.
objectMapper
();
mapList
=
objectMapper
.
readValue
(
com
.
huigou
.
util
.
JSONUtil
.
toString
(
resultMap
.
get
(
"data"
)),
new
TypeReference
<
List
<
Map
<
String
,
String
>>>()
{});
}
else
{
message
=(
String
)
resultMap
.
get
(
"msg"
);
}
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"查询工序出错:"
+
e
.
getMessage
());
}
return
mapList
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/common/DefaultHttpClient.java
View file @
b2f482c0
...
...
@@ -78,6 +78,20 @@ public class DefaultHttpClient extends BaseApplication implements HttpClient {
*/
@Override
public
String
executeForEp
(
Object
param
,
String
url
)
throws
IOException
{
return
this
.
buildHttpClient
(
param
,
getEPHttpUrlMsg
(
url
),
""
);
}
@Override
public
String
executeHttpGetForEp
(
Object
param
,
String
url
)
throws
IOException
{
return
this
.
buildHttpGetClient
(
param
,
getEPHttpUrlMsg
(
url
),
""
);
}
/**
* 返回URL拼接
* @param url
* @return
*/
public
String
getEPHttpUrlMsg
(
String
url
){
//系统接口地址
// ip地址
String
ip
=
SystemCache
.
getParameter
(
"ep.service.ip"
,
String
.
class
);
...
...
@@ -89,7 +103,7 @@ public class DefaultHttpClient extends BaseApplication implements HttpClient {
.
append
(
ip
)
.
append
(
applicationContext
)
.
append
(
url
);
return
this
.
buildHttpClient
(
param
,
String
.
valueOf
(
serverUrl
),
""
);
return
String
.
valueOf
(
serverUrl
);
}
/**
...
...
@@ -192,7 +206,7 @@ public class DefaultHttpClient extends BaseApplication implements HttpClient {
if
(
StringUtil
.
isNotBlank
(
usernameAndPassword
)){
get
.
addHeader
(
"Authorization"
,
"Basic "
+
Base64
.
getEncoder
().
encodeToString
(
usernameAndPassword
.
getBytes
()));
}
LOG
.
info
(
"
pos
t={}"
,
get
);
LOG
.
info
(
"
ge
t={}"
,
get
);
HttpResponse
response
;
String
responseText
=
""
;
try
{
...
...
topsun/src/main/java/com/huigou/topsun/sap/common/HttpClient.java
View file @
b2f482c0
...
...
@@ -19,6 +19,7 @@ public interface HttpClient {
public
String
execute
(
Object
param
,
String
url
)
throws
IOException
;
public
String
executeForEp
(
Object
param
,
String
url
)
throws
IOException
;
public
String
executeHttpGetForEp
(
Object
param
,
String
url
)
throws
IOException
;
public
String
executeForMes
(
Object
param
,
String
url
)
throws
IOException
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/application/SapCostReimbursementApplication.java
View file @
b2f482c0
...
...
@@ -37,4 +37,7 @@ public interface SapCostReimbursementApplication {
Map
<
String
,
Object
>
queryKostlByPersonCode
(
String
personCode
);
Map
<
String
,
Object
>
slicedAdvancePaymentList
(
SapCostReimbursementQueryRequest
queryRequest
);
List
<
Map
<
String
,
Object
>>
excludeCompletePartnerInvs
(
String
partner
);
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/application/impl/SapCostReimbursementApplicationImpl.java
View file @
b2f482c0
...
...
@@ -392,6 +392,13 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
model
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
excludeCompletePartnerInvs
(
String
partner
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"excludeCompletePartnerInvs"
);
String
sql
=
queryDescriptor
.
getSql
();
return
this
.
sqlExecutorDao
.
queryToListMap
(
sql
,
partner
);
}
public
void
makeACopyFor
(
SapCostReimbursement
reimbursement
)
{
// 流程结束给申请人发送抄送
List
<
String
>
executorIds
=
new
ArrayList
<>(
1
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/controller/SapCostReimbursementController.java
View file @
b2f482c0
...
...
@@ -19,6 +19,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -249,6 +250,21 @@ public class SapCostReimbursementController extends CommonController {
SDO
sdo
=
this
.
getSDO
();
SapCostReimbursementQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
SapCostReimbursementQueryRequest
.
class
);
List
<
Map
<
String
,
String
>>
mapList
=
sapPaymentApplication
.
getPartnerInvs
(
queryRequest
.
getBukrs
(),
queryRequest
.
getPartner
(),
queryRequest
.
getZepFtype
());
//查询申请中、审批中、已完成的发票号
List
<
Map
<
String
,
Object
>>
excludeCompletePartnerInvs
=
costReimbursementApplication
.
excludeCompletePartnerInvs
(
queryRequest
.
getPartner
());
//遍历mapList,把采购发票号相同的排除掉
if
(!
CollectionUtils
.
isEmpty
(
mapList
)
&&
!
CollectionUtils
.
isEmpty
(
excludeCompletePartnerInvs
)){
for
(
Map
<
String
,
String
>
stringStringMap
:
mapList
)
{
String
belnr2
=
stringStringMap
.
get
(
"BELNR2"
);
for
(
Map
<
String
,
Object
>
partnerInv
:
excludeCompletePartnerInvs
)
{
String
belnr2DB
=
(
String
)
partnerInv
.
get
(
"belnr2"
);
if
(
belnr2
.
equals
(
belnr2DB
)){
mapList
.
remove
(
stringStringMap
);
}
}
}
}
return
packGridDataAndResult
(
mapList
);
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/processQuotedPrice/domain/ProcessQuotedPrice.java
View file @
b2f482c0
...
...
@@ -56,6 +56,14 @@ public class ProcessQuotedPrice extends FlowBillAbstractEntity {
@Column
(
name
=
"remark"
)
private
String
remark
;
/**
* 工序报价类别
* normal 常规
* proofing 打样
*/
@Column
(
name
=
"process_quoted_type"
)
private
String
processQuotedType
;
@Override
protected
String
getCodeRuleId
()
{
return
"processQuotedPrice"
;
...
...
topsun/src/main/resources/config/topsun/sap/costReimbursement/costReimbursement.xml
View file @
b2f482c0
...
...
@@ -143,6 +143,15 @@
<condition
column=
"belnr1"
name=
"belnr1"
type=
"java.lang.String"
symbol=
"like"
alias=
"d"
/>
</query>
<query
name=
"excludeCompletePartnerInvs"
>
<sql-query>
SELECT d.BELNR2
FROM sap_cost_reimbursement_base_info b
LEFT JOIN sap_cost_reimbursement_detail d ON b.id = d.reimbursement_base_info_id
WHERE b.`status` IN ( 0, 1, 3 ) AND d.BELNR2 IS NOT NULL AND d.BELNR2 != '' AND b.PARTNER = ?
</sql-query>
</query>
</query-mappings>
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