wms过账修改3

master
mengjiao 1 month ago
parent cc6f1f0046
commit baf72a2715

@ -173,4 +173,6 @@ public interface OdsProcureOutOrderMapper {
String selectwmsFpStorageNewsTS(String formattedDate);
List<OdsProcureOutOrder> selectWmsOdsProcureReturnOrderByproduceCode(@Param("order")OdsProcureOutOrder order);
List<OdsProcureOutOrder> selectWmsOdsProcureOutOrderByIDsTS(List<OdsProcureOutOrder> orderList);
}

@ -1571,7 +1571,7 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
//先根据出库单获取
// * 退料的移动类型为 262
// * 领料的移动类型为 261
List<OdsProcureOutOrder> orderList1 = odsProcureOutOrderMapper.selectWmsOdsProcureOutOrderByIDs(orderList);
List<OdsProcureOutOrder> orderList1 = odsProcureOutOrderMapper.selectWmsOdsProcureOutOrderByIDsTS(orderList);
List<OdsProcureOutOrder> orderList2 = new ArrayList<>();//非反冲
List<Map<String, Object>> mapList = new ArrayList<>();//非反冲
List<SapBackflushMPQuery> sapMaterialPostingFCList = new ArrayList<>();//反冲

@ -848,6 +848,53 @@
</foreach>
AND (COALESCE ( wms_ods_procure_out_order.Out_Number, 0 ) - COALESCE ( wms_ods_procure_out_order.Sap_Number, 0 ))>0
</select>
<select id="selectWmsOdsProcureOutOrderByIDsTS" resultMap="OdsProcureOutOrderResult">
SELECT DISTINCT
wms_ods_procure_out_order_special.Site_code,
wms_ods_procure_out_order_special.ID,
wms_ods_procure_out_order_special.Produce_Code,
wms_ods_procure_out_order_special.Material_Code,
wms_ods_procure_out_order_special.Material_Desc,
wms_ods_procure_out_order_special.Plan_Date,
wms_ods_procure_out_order_special.Plan_Number,
wms_ods_procure_out_order_special.Unit,
COALESCE ( wms_ods_procure_out_order_special.Out_Number, 0 ) - COALESCE ( wms_ods_procure_out_order_special.Sap_Number, 0 ) AS Out_Number,
wms_raw_mission_out.user_defined2 Loc_Code,
wms_ods_procure_out_order_special.Loc_Desc,
wms_ods_procure_out_order_special.Production_Line_Desc,
wms_ods_procure_out_order_special.Production_Line_Code,
wms_ods_procure_out_order_special.Order_Status,
wms_ods_procure_out_order_special.User_Defined1,
wms_ods_procure_out_order_special.User_Defined2,
wms_ods_procure_out_order_special.User_Defined3,
wms_ods_procure_out_order_special.User_Defined4,
wms_ods_procure_out_order_special.User_Defined5,
wms_ods_procure_out_order_special.User_Defined6,
wms_ods_procure_out_order_special.User_Defined7,
wms_ods_procure_out_order_special.User_Defined8,
wms_ods_procure_out_order_special.User_Defined9,
wms_ods_procure_out_order_special.User_Defined10,
wms_ods_procure_out_order_special.User_Defined11,
wms_ods_procure_out_order_special.Supplier_Code,
wms_ods_procure_out_order_special.Supplier_Name,
wms_ods_procure_out_order_special.Create_By,
wms_ods_procure_out_order_special.Create_Date,
wms_ods_procure_out_order_special.Last_Update_By,
wms_ods_procure_out_order_special.Last_Update_Date,
wms_ods_procure_out_order_special.Active,
wms_ods_procure_out_order_special.Enterprise_Id,
COALESCE ( wms_ods_procure_out_order_special.Sap_Number, 0 ) AS Sap_Number,
wms_ods_procure_out_order_special.Enterprise_Code
FROM
wms_ods_procure_out_order_special
LEFT JOIN wms_raw_mission_out ON wms_raw_mission_out.prd_order = wms_ods_procure_out_order_special.Produce_Code
AND wms_raw_mission_out.material_code = wms_ods_procure_out_order_special.Material_Code
WHERE wms_ods_procure_out_order_special.ID IN
<foreach item="odsProcureOutOrder" collection="list" open="(" separator="," close=")">
#{odsProcureOutOrder.ID}
</foreach>
AND (COALESCE ( wms_ods_procure_out_order_special.Out_Number, 0 ) - COALESCE ( wms_ods_procure_out_order_special.Sap_Number, 0 ))>0
</select>
<select id="selectWmsOdsProcureReturnOrderByID" resultMap="OdsProcureOutOrderResult">
SELECT DISTINCT
wms_ods_procure_return_order.Site_code,

Loading…
Cancel
Save