Commit 2b8d26af authored by 顾俭's avatar 顾俭

审核后返回是否发布标示 & 背景图

parent e8dd0794
...@@ -23,8 +23,7 @@ import java.util.List; ...@@ -23,8 +23,7 @@ import java.util.List;
import static com.i1.erp.base.web.dto.SyncResponseCode.FAIL_CODE; import static com.i1.erp.base.web.dto.SyncResponseCode.FAIL_CODE;
import static com.i1.erp.base.web.dto.SyncResponseCode.SUCCESS_CODE; import static com.i1.erp.base.web.dto.SyncResponseCode.SUCCESS_CODE;
import static com.i1.srm.deliveryOrder.dao.entity.DoMstFile.CONFIRMED; import static com.i1.srm.deliveryOrder.dao.entity.DoMstFile.*;
import static com.i1.srm.deliveryOrder.dao.entity.DoMstFile.UNCONFIRMED;
import static com.i1.srm.utils.SafeType.safeString; import static com.i1.srm.utils.SafeType.safeString;
@Component @Component
...@@ -272,8 +271,14 @@ public class DeliveryOrderSendClient extends WebServiceClient { ...@@ -272,8 +271,14 @@ public class DeliveryOrderSendClient 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")) {
updateConfirm(doMstFile, CONFIRMED, "提交审核成功"); // 是否更新发布状态
return SyncResponse.of(SUCCESS_CODE, "提交审核成功"); if (StringUtils.equalsIgnoreCase("Y", response.getExecution().getStatus().getProjectno())) {
updateConfirmAndRelease(doMstFile, CONFIRMED, RELEASED, true, "同步ERP成功");
return SyncResponse.of(SUCCESS_CODE, "同步ERP成功");
} else {
updateConfirm(doMstFile, CONFIRMED, "提交审核成功");
return SyncResponse.of(SUCCESS_CODE, "提交审核成功");
}
} else { } else {
String errorDetails = String.format("审核失败码:%s, 原因:%s,SQL:%s", String errorDetails = String.format("审核失败码:%s, 原因:%s,SQL:%s",
safeString(response.getExecution().getStatus().getCode()), safeString(response.getExecution().getStatus().getCode()),
...@@ -305,11 +310,19 @@ public class DeliveryOrderSendClient extends WebServiceClient { ...@@ -305,11 +310,19 @@ public class DeliveryOrderSendClient extends WebServiceClient {
@Transactional @Transactional
public void updateConfirm(DoMstFile doMstFile, String confirm, String details) throws IOneServiceException { public void updateConfirm(DoMstFile doMstFile, String confirm, String details) throws IOneServiceException {
// 因为调用ERP审核的时候,ERP调用了SRM发布接口,变成了已发布,所以重新获取一下,再更新审核状态
DoMstFile newDoMstFile = doMstFileService.get(doMstFile.getId()); DoMstFile newDoMstFile = doMstFileService.get(doMstFile.getId());
logger.info("送货单{}审核更新:更新前发布状态{},审核状态{}", newDoMstFile.getDeliveryOrderUid(), newDoMstFile.getReleased(), newDoMstFile.getConfirm());
newDoMstFile.setConfirm(confirm); newDoMstFile.setConfirm(confirm);
newDoMstFile.setSentToErpInfo(details); newDoMstFile.setSentToErpInfo(details);
doMstFileService.update(newDoMstFile); doMstFileService.update(newDoMstFile);
} }
@Transactional
public void updateConfirmAndRelease(DoMstFile doMstFile, String confirm, String release, boolean status, String details) throws IOneServiceException {
DoMstFile newDoMstFile = doMstFileService.get(doMstFile.getId());
newDoMstFile.setConfirm(confirm);
newDoMstFile.setReleased(release);
newDoMstFile.setSentToErp(status);
newDoMstFile.setSentToErpInfo(details);
doMstFileService.update(newDoMstFile);
}
} }
\ No newline at end of file
...@@ -17,8 +17,11 @@ ...@@ -17,8 +17,11 @@
</head> </head>
<body class="hold-transition login-page"> <body class="hold-transition login-page">
<div class="login-box"> <div class="login-box">
<div class="login-logo"> <div class="login-logo" style="color:white;">
<b></b>ESRM <!--<b ></b>ESRM-->
<span class="logo-mini">
<img style="width: 220px;" src="img/login_sm.png"/>
</span>
</div> </div>
<div class="login-box-body"> <div class="login-box-body">
<p class="login-box-msg">请输入用户名和密码登录</p> <p class="login-box-msg">请输入用户名和密码登录</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment