Prechádzať zdrojové kódy

调整回先保存采购入库单,再调拨

wanfa99 2 rokov pred
rodič
commit
0b6a962d75

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/mapper/PurchaseWarehousingMapper.java

@@ -174,7 +174,7 @@ public interface PurchaseWarehousingMapper extends BaseMapper<PurchaseWarehousin
      * @Param [rowmId]
      * @return java.util.Map<java.lang.String,java.lang.Object>
      */
-    Map<String,Object> getOMMODetails(@Param("rowmId")String rowmId);
+    //Map<String,Object> getOMMODetails(@Param("rowmId")String rowmId);
 
     /**
      * @Author chenchuang

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/mapper/xml/PurchaseWarehousingMapper.xml

@@ -366,9 +366,9 @@
         update PO_Podetails set iReceivedQTY=#{map.iReceivedQTY} where ID=#{map.ID}
     </update>
 
-    <select id="getOMMODetails" parameterType="java.lang.String" resultType="java.util.HashMap">
-        select * from OM_MODetails where MODetailsID=#{rowmId}
-    </select>
+<!--    <select id="getOMMODetails" parameterType="java.lang.String" resultType="java.util.HashMap">-->
+<!--        select * from OM_MODetails where MODetailsID=#{rowmId}-->
+<!--    </select>-->
     <update id="updateOMMODetailsfreceivedqty" parameterType="java.util.HashMap">
         update OM_MODetails set iReceivedQTY=#{map.freceivedqty} where MODetailsID=#{map.ID}
     </update>

+ 5 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/service/impl/PurchaseWarehousingServiceImpl.java

@@ -310,10 +310,13 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
                                 String moDetailId=String.valueOf(itemMap.get("moDetailId"));//委外订单行id
                                 //获取来源订单号
                                 Map<String,Object> omMoDetails=this.baseMapper.getOMMoDetails(moDetailId);
+                                if(null==omMoDetails||omMoDetails.isEmpty()){
+                                    throw new RuntimeException("获取委外订单行信息失败");
+                                }
                                 itemMap.put("iordercode",omMoDetails.get("csoordercode"));//来源订单号
                                 rowmId=String.valueOf(itemMap.get("moDetailId"));
                                 //获取订单行数据
-                                Map<String,Object> mapOMMODetails=this.baseMapper.getOMMODetails(rowmId);
+                                Map<String,Object> mapOMMODetails=this.baseMapper.getOMMoDetails(rowmId);
                                 if(mapOMMODetails!=null){
                                     //获取订单行的价格字段
                                     getCost(itemMap,mapOMMODetails);
@@ -750,7 +753,7 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
             for(Map<String,Object> recordsMap:rdRecords01List){
                 Map<String,Object> vouchsMap=new HashMap<>();
                 //获取下游委外订单行数据
-                Map<String,Object> mapOMMODetails=this.baseMapper.getOMMODetails(String.valueOf(recordsMap.get("downstreamRowId")));//1
+                Map<String,Object> mapOMMODetails=this.baseMapper.getOMMoDetails(String.valueOf(recordsMap.get("downstreamRowId")));//1
                 if(mapOMMODetails==null){
                     throw new RuntimeException("第"+vI+"行未找到对应下游委外订单表体行");
                 }