Commit dc8ce040 authored by 顾俭's avatar 顾俭

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

parent 74182759
......@@ -32,7 +32,7 @@ public class DeliveryOrderReleaseService implements IDeliveryOrderReleaseService
@Autowired
private IBaseFetchService baseFetchService;
private Logger logger = LoggerFactory.getLogger(PoChgService.class);
private Logger logger = LoggerFactory.getLogger(DeliveryOrderReleaseService.class);
@Override
public String release(String xmlStream) {
......@@ -64,7 +64,7 @@ public class DeliveryOrderReleaseService implements IDeliveryOrderReleaseService
throw new Exception("查无此送货单" + doUid);
}
}
result = Result.of(dateTimeString, "0", "", stringBuilder.append("发布成功").toString());
result = Result.of(dateTimeString, "0", "", stringBuilder.append("送货单发布成功").toString());
} catch (Exception e) {
logger.error("error:", e);
......
......@@ -273,9 +273,11 @@ public class DeliveryOrderSendClient extends WebServiceClient {
if (response.getExecution().getStatus().getCode().equalsIgnoreCase("0")) {
// 是否更新发布状态
if (StringUtils.equalsIgnoreCase("Y", response.getExecution().getStatus().getProjectno())) {
logger.info("送货单{}审核更新发布状态", doMstFile.getDeliveryOrderUid());
updateConfirmAndRelease(doMstFile, CONFIRMED, RELEASED, true, "同步ERP成功");
return SyncResponse.of(SUCCESS_CODE, "同步ERP成功");
} else {
logger.info("送货单{}审核不更新发布状态", doMstFile.getDeliveryOrderUid());
updateConfirm(doMstFile, CONFIRMED, "提交审核成功");
return SyncResponse.of(SUCCESS_CODE, "提交审核成功");
}
......@@ -313,7 +315,7 @@ public class DeliveryOrderSendClient extends WebServiceClient {
DoMstFile newDoMstFile = doMstFileService.get(doMstFile.getId());
newDoMstFile.setConfirm(confirm);
newDoMstFile.setSentToErpInfo(details);
doMstFileService.update(newDoMstFile);
doMstFileService.updateNotCheckReleased(newDoMstFile);
}
@Transactional
......
......@@ -65,17 +65,17 @@ public class DoMstFileController extends AbstractController<DoMstFile, DoMstFile
} else {
service.release(doMstFile);
response = deliveryOrderSendClient.createClientAndSendDoMstFile(doMstFile);
}
if (response != null && response.getCode().equals(FAIL_CODE)) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
}
}
return response;
} catch (IOneServiceException e) {
throw new IOneWebRestfulException(e);
}
}
@ResourcePermission(values={Resource.UNDO_RELEASE})
@ResourcePermission(values = {Resource.UNDO_RELEASE})
@RequestMapping(value = "/unrelease/{id}", method = RequestMethod.POST)
public SyncResponse unrelease(@PathVariable Long id) throws IOneWebRestfulException {
try {
......@@ -100,7 +100,7 @@ public class DoMstFileController extends AbstractController<DoMstFile, DoMstFile
}
}
@ResourcePermission(values={Resource.VIEW})
@ResourcePermission(values = {Resource.VIEW})
@RequestMapping(value = "/checkDeliveryAmt/{id}", method = RequestMethod.GET)
public Map checkDeliveryAmt(@PathVariable Long id) throws IOneWebRestfulException {
try {
......@@ -125,7 +125,7 @@ public class DoMstFileController extends AbstractController<DoMstFile, DoMstFile
}
}
@ResourcePermission(values={Resource.UPDATE})
@ResourcePermission(values = {Resource.UPDATE})
@RequestMapping(value = "/fixNotEvenAmount/{id}", method = RequestMethod.POST)
public void fixNotEvenAmount(@PathVariable Long id) throws IOneWebRestfulException {
try {
......
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