Browse Source

凯和单航次配船修改

lazhaoqian 3 years ago
parent
commit
d78fc62c06

+ 7 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehouseBillsMapper.java

@@ -216,12 +216,18 @@ public interface TWarehouseBillsMapper extends BaseMapper<TWarehouseBills> {
      * @param fVessel 船名
      * @param fVoyage 航次
      * @param fCargoPlanning 是否配船
+     * @param fLoadportid 起运港
+     * @param fDestportid 目的港
+     * @param fLaneid 航线
      * @return
      */
     public int updateTWarehousebillsByIds(@Param("fIds") Long[] fIds,
                                           @Param("fVessel") Long fVessel,
                                           @Param("fVoyage") Long fVoyage,
-                                          @Param("fCargoPlanning") Long fCargoPlanning);
+                                          @Param("fCargoPlanning") Long fCargoPlanning,
+                                          @Param("fLoadportid") Long fLoadportid,
+                                          @Param("fDestportid")Long fDestportid,
+                                          @Param("fLaneid")Integer fLaneid);
 
     /**
      * 凯和单航次配船

+ 3 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -5443,7 +5443,9 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             }
         }
         //一致批量更改船名航次
-        int i = tWarehouseBillsMapper.updateTWarehousebillsByIds(fIds, fVessel, fVoyage,fCargoPlanning);
+        TVoyage voyage = tVoyageMapper.selectTVoyageById(fVoyage);
+        int i = tWarehouseBillsMapper.updateTWarehousebillsByIds(fIds, fVessel, fVoyage,fCargoPlanning,voyage.getfPortofloadid(),voyage.getfDistinationid()
+        ,voyage.getfLaneid());
         if (i>= 1){
             return AjaxResult.success();
         }else {

+ 3 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -2588,6 +2588,9 @@
             <if test="fVessel != null">f_vslid = #{fVessel},</if>
             <if test="fVoyage != null">f_voyid = #{fVoyage},</if>
             <if test="fCargoPlanning != null">f_cargo_planning = #{fCargoPlanning},</if>
+            <if test="fLoadportid != null">f_loadportid = #{fLoadportid},</if>
+            <if test="fDestportid != null">f_destportid = #{fDestportid},</if>
+            <if test="fLaneid != null">f_laneid = #{fLaneid},</if>
         </trim>
         where f_id in
         <foreach item="fId" collection="fIds" open="(" separator="," close=")">