Browse Source

2026-01-27

销售发货/退货的MESCCode改为oaOrderNo-transactionId
master
fengyuan_yang 1 month ago
parent
commit
bb8a8f9185
  1. 4
      src/main/java/com/gaotao/modules/erp/service/impl/ErpInterfaceServiceImpl.java
  2. 2
      src/main/java/com/gaotao/modules/stock/entity/StockTransactionLogEntity.java
  3. 5
      src/main/resources/mapper/stock/StockTransactionLogDao.xml

4
src/main/java/com/gaotao/modules/erp/service/impl/ErpInterfaceServiceImpl.java

@ -484,8 +484,10 @@ public class ErpInterfaceServiceImpl implements ErpInterfaceService {
headEntity.setOrderref7(""); // CMemo headEntity.setOrderref7(""); // CMemo
headEntity.setOrderref8(""); // CDepCode headEntity.setOrderref8(""); // CDepCode
} else if ("GetSaveSalesOut".equals(interfaceName) || "GetSaveSalesReturn".equals(interfaceName)) { } else if ("GetSaveSalesOut".equals(interfaceName) || "GetSaveSalesReturn".equals(interfaceName)) {
String oaOrderNo = nullToEmpty(firstLog.getOaOrderNo());
String orderref1Value = oaOrderNo + "-" + (firstLog.getTransactionId() != null ? firstLog.getTransactionId() : "");
// 销售出库/销售退货 // 销售出库/销售退货
headEntity.setOrderref1(nullToEmpty(firstLog.getTransactionId())); // MESCCode
headEntity.setOrderref1(orderref1Value); // MESCCode
headEntity.setOrderref2(kdType); // KdType headEntity.setOrderref2(kdType); // KdType
headEntity.setOrderref3(formatDate(firstLog.getTransactionDate())); // DDate headEntity.setOrderref3(formatDate(firstLog.getTransactionDate())); // DDate
headEntity.setOrderref4(""); // CBusType headEntity.setOrderref4(""); // CBusType

2
src/main/java/com/gaotao/modules/stock/entity/StockTransactionLogEntity.java

@ -105,6 +105,8 @@ public class StockTransactionLogEntity implements Serializable {
private String erpOrderNo; private String erpOrderNo;
private String rowNo; private String rowNo;
private String oaOrderNo;
} }

5
src/main/resources/mapper/stock/StockTransactionLogDao.xml

@ -34,7 +34,8 @@
batch_flag AS batchFlag, batch_flag AS batchFlag,
sum(piece_qty) as pieceQty, -- 件数 sum(piece_qty) as pieceQty, -- 件数
erp_order_no AS erpOrderNo, erp_order_no AS erpOrderNo,
ROW_NUMBER() OVER (ORDER BY document_no, batch_flag) as rowNo
ROW_NUMBER() OVER (ORDER BY document_no, batch_flag) as rowNo,
oa_order_no as oaOrderNo
FROM StockTransactionLog WITH(NOLOCK) FROM StockTransactionLog WITH(NOLOCK)
WHERE site = #{site} WHERE site = #{site}
AND bu_no = #{buNo} AND bu_no = #{buNo}
@ -43,7 +44,7 @@
transaction_id,site, bu_no , document_type , document_no , order_line_no , order_no , part_no , transaction_type , transaction_id,site, bu_no , document_type , document_no , order_line_no , order_no , part_no , transaction_type ,
warehouse_id , location_id , transaction_date , transaction_by , orderref1, orderref2, remarks, warehouse_id , location_id , transaction_date , transaction_by , orderref1, orderref2, remarks,
synced_flag , synced_time , synced_error_msg , department_id , document_no_type , bom_item_no , synced_flag , synced_time , synced_error_msg , department_id , document_no_type , bom_item_no ,
umid, interface_name , batch_flag ,erp_order_no
umid, interface_name , batch_flag ,erp_order_no, oa_order_no
</select> </select>

Loading…
Cancel
Save