Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
srm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
aship
srm
Commits
64d23bdd
Commit
64d23bdd
authored
Oct 17, 2019
by
顾俭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
防伪码送货单审核更新已交数量+=发货数量
parent
e6b5f255
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
DeliveryOrderSendClient.java
...ain/java/com/i1/erp/deo/soap/DeliveryOrderSendClient.java
+31
-0
DeliveryOrderWithdrawClient.java
...java/com/i1/erp/deo/soap/DeliveryOrderWithdrawClient.java
+1
-0
DoMstFileController.java
...ava/com/i1/srm/deliveryOrder/web/DoMstFileController.java
+1
-0
No files found.
src/main/java/com/i1/erp/deo/soap/DeliveryOrderSendClient.java
View file @
64d23bdd
...
@@ -6,8 +6,14 @@ import com.i1.erp.base.web.dto.SyncResponse;
...
@@ -6,8 +6,14 @@ import com.i1.erp.base.web.dto.SyncResponse;
import
com.i1.erp.deo.service.IDeliveryOrderSendService
;
import
com.i1.erp.deo.service.IDeliveryOrderSendService
;
import
com.i1.erp.entity.request.Request
;
import
com.i1.erp.entity.request.Request
;
import
com.i1.erp.entity.response.Response
;
import
com.i1.erp.entity.response.Response
;
import
com.i1.srm.am.entity.Flag
;
import
com.i1.srm.am.service.IFunctionFlagsService
;
import
com.i1.srm.deliveryOrder.dao.IDoDtlFileDao
;
import
com.i1.srm.deliveryOrder.dao.entity.DoDtlFile
;
import
com.i1.srm.deliveryOrder.dao.entity.DoMstFile
;
import
com.i1.srm.deliveryOrder.dao.entity.DoMstFile
;
import
com.i1.srm.deliveryOrder.service.IDoMstFileService
;
import
com.i1.srm.deliveryOrder.service.IDoMstFileService
;
import
com.i1.srm.purchaseOrder.dao.IPoDtlFileDao
;
import
com.i1.srm.utils.SafeType
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.cxf.endpoint.Client
;
import
org.apache.cxf.endpoint.Client
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -18,6 +24,7 @@ import org.springframework.stereotype.Component;
...
@@ -18,6 +24,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
tw.com.dsc.tiptop.tiptopservicegateway.*
;
import
tw.com.dsc.tiptop.tiptopservicegateway.*
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
...
@@ -58,6 +65,15 @@ public class DeliveryOrderSendClient extends WebServiceClient {
...
@@ -58,6 +65,15 @@ public class DeliveryOrderSendClient extends WebServiceClient {
@Autowired
@Autowired
private
TIPTOPServiceGateWayPortType
tiptopWsProxy
;
private
TIPTOPServiceGateWayPortType
tiptopWsProxy
;
@Autowired
private
IFunctionFlagsService
flagsService
;
@Autowired
private
IDoDtlFileDao
doDtlFileDao
;
@Autowired
private
IPoDtlFileDao
poDtlFileDao
;
/**
/**
* Send released delivery orders to ERP every one min.
* Send released delivery orders to ERP every one min.
*/
*/
...
@@ -275,10 +291,12 @@ public class DeliveryOrderSendClient extends WebServiceClient {
...
@@ -275,10 +291,12 @@ public class DeliveryOrderSendClient extends WebServiceClient {
if
(
StringUtils
.
equalsIgnoreCase
(
"Y"
,
response
.
getExecution
().
getStatus
().
getProjectno
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
"Y"
,
response
.
getExecution
().
getStatus
().
getProjectno
()))
{
logger
.
info
(
"送货单{}审核更新发布状态"
,
doMstFile
.
getDeliveryOrderUid
());
logger
.
info
(
"送货单{}审核更新发布状态"
,
doMstFile
.
getDeliveryOrderUid
());
updateConfirmAndRelease
(
doMstFile
,
CONFIRMED
,
RELEASED
,
true
,
"同步ERP成功"
);
updateConfirmAndRelease
(
doMstFile
,
CONFIRMED
,
RELEASED
,
true
,
"同步ERP成功"
);
updatePoDtlDeliveredAmount
(
doMstFile
);
return
SyncResponse
.
of
(
SUCCESS_CODE
,
"同步ERP成功"
);
return
SyncResponse
.
of
(
SUCCESS_CODE
,
"同步ERP成功"
);
}
else
{
}
else
{
logger
.
info
(
"送货单{}审核不更新发布状态"
,
doMstFile
.
getDeliveryOrderUid
());
logger
.
info
(
"送货单{}审核不更新发布状态"
,
doMstFile
.
getDeliveryOrderUid
());
updateConfirm
(
doMstFile
,
CONFIRMED
,
"提交审核成功"
);
updateConfirm
(
doMstFile
,
CONFIRMED
,
"提交审核成功"
);
updatePoDtlDeliveredAmount
(
doMstFile
);
return
SyncResponse
.
of
(
SUCCESS_CODE
,
"提交审核成功"
);
return
SyncResponse
.
of
(
SUCCESS_CODE
,
"提交审核成功"
);
}
}
}
else
{
}
else
{
...
@@ -327,4 +345,17 @@ public class DeliveryOrderSendClient extends WebServiceClient {
...
@@ -327,4 +345,17 @@ public class DeliveryOrderSendClient extends WebServiceClient {
newDoMstFile
.
setSentToErpInfo
(
details
);
newDoMstFile
.
setSentToErpInfo
(
details
);
doMstFileService
.
updateNotCheckReleased
(
newDoMstFile
);
doMstFileService
.
updateNotCheckReleased
(
newDoMstFile
);
}
}
@Transactional
public
void
updatePoDtlDeliveredAmount
(
DoMstFile
doMstFile
)
{
if
(
flagsService
.
isEnabled
(
Flag
.
UPDATE_DELIVERED_AMOUNT_FROM_SRM
.
name
()))
{
List
<
DoDtlFile
>
doDtlFiles
=
doDtlFileDao
.
findAllByDoMstId
(
doMstFile
.
getId
());
for
(
DoDtlFile
doDtlFile
:
doDtlFiles
)
{
//update the delivered amount for purchase order
BigDecimal
currentDeliveredAmount
=
SafeType
.
safeBigDecimal
(
doDtlFile
.
getPoDtl
().
getDeliveredAmount
());
doDtlFile
.
getPoDtl
().
setDeliveredAmount
(
currentDeliveredAmount
.
add
(
SafeType
.
safeBigDecimal
(
doDtlFile
.
getDeliveryAmount
())));
poDtlFileDao
.
save
(
doDtlFile
.
getPoDtl
());
}
}
}
}
}
\ No newline at end of file
src/main/java/com/i1/erp/deo/soap/DeliveryOrderWithdrawClient.java
View file @
64d23bdd
...
@@ -130,6 +130,7 @@ public class DeliveryOrderWithdrawClient extends WebServiceClient {
...
@@ -130,6 +130,7 @@ public class DeliveryOrderWithdrawClient extends WebServiceClient {
Response
response
=
convertXMLToObject
(
originalResponse
.
getResponse
(),
Response
.
class
);
Response
response
=
convertXMLToObject
(
originalResponse
.
getResponse
(),
Response
.
class
);
if
(
response
.
getExecution
().
getStatus
().
getCode
().
equalsIgnoreCase
(
"0"
))
{
if
(
response
.
getExecution
().
getStatus
().
getCode
().
equalsIgnoreCase
(
"0"
))
{
// 已交数量会扣减发货数量
doMstFileService
.
unrelease
(
doMstFile
);
doMstFileService
.
unrelease
(
doMstFile
);
logger
.
info
(
"送货单撤销发布成功"
);
logger
.
info
(
"送货单撤销发布成功"
);
return
SyncResponse
.
of
(
SUCCESS_CODE
,
"送货单撤销发布成功"
);
return
SyncResponse
.
of
(
SUCCESS_CODE
,
"送货单撤销发布成功"
);
...
...
src/main/java/com/i1/srm/deliveryOrder/web/DoMstFileController.java
View file @
64d23bdd
...
@@ -61,6 +61,7 @@ public class DoMstFileController extends AbstractController<DoMstFile, DoMstFile
...
@@ -61,6 +61,7 @@ public class DoMstFileController extends AbstractController<DoMstFile, DoMstFile
if
(
CONFIRMED
.
equals
(
doMstFile
.
getConfirm
()))
{
if
(
CONFIRMED
.
equals
(
doMstFile
.
getConfirm
()))
{
throw
new
IOneServiceException
(
"该送货单已经审核,请重新获取查看"
);
throw
new
IOneServiceException
(
"该送货单已经审核,请重新获取查看"
);
}
}
// 需要把发货数量加到采购已交数量上 updatePoDtlDeliveredAmount
response
=
deliveryOrderSendClient
.
createClientAndSendDoMstFileBarcode
(
doMstFile
);
response
=
deliveryOrderSendClient
.
createClientAndSendDoMstFileBarcode
(
doMstFile
);
}
else
{
}
else
{
service
.
release
(
doMstFile
);
service
.
release
(
doMstFile
);
...
...
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