Merge remote-tracking branch 'origin/main'

This commit is contained in:
mzr 2025-06-06 11:25:59 +08:00
commit 112602e3c9
1 changed files with 6 additions and 7 deletions

View File

@ -196,16 +196,15 @@ public class AfterApproveRuleSyncMes implements IRule<PMOAggVO> {
private void syncOrderItemToMes(PMOHeadVO head, PMOItemVO item) throws BusinessException { private void syncOrderItemToMes(PMOHeadVO head, PMOItemVO item) throws BusinessException {
JSONObject data = new JSONObject(); JSONObject data = new JSONObject();
String vbillcode = head.getVbillcode(); // µ¥¾ÝºÅ String vbillcode = head.getVbillcode(); // µ¥¾ÝºÅ
String itemRow = item.getVrowno(); // 行号 String itemRow = item.getVrowno(); // 行号 obmlog.info("开始为生产订单 " + vbillcode + "" + itemRow + " 构建同步MES数据。");
obmlog.info("开始为生产订单 " + vbillcode + "" + itemRow + " 构建同步MES数据。"); // orderNo String 生产订单号+行号 vbillcode+itemRow
String orderNoWithRow = vbillcode + itemRow;
// orderNo String 生产订单号 vbillcode if (orderNoWithRow.length() > 18) {
if (vbillcode.length() > 18) { throw new BusinessException("MES同步要求:生产订单 " + vbillcode + "" + itemRow + " 单据号+行号长度不能超过18位当前长度" + orderNoWithRow.length());
throw new BusinessException("MES同步要求:生产订单 " + vbillcode + "" + itemRow + " 单据号长度不能超过18位。");
} }
data.put("orderNo", vbillcode); data.put("orderNo", orderNoWithRow);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");