Prechádzať zdrojové kódy

调整陆运问题,修改仓库 撤回时 若没有流水号则 不回收

阿伏兔 4 rokov pred
rodič
commit
340c76ca6b

+ 0 - 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseGoodsTransferController.java

@@ -51,14 +51,6 @@ public class TWarehouseGoodsTransferController extends BaseController {
 
 
     /**
-     * 查询货转详情主表列表
-     */
-    @GetMapping("/getWarehouseGoodsTransfer")
-    public String getWarehouseInStockBillsNo(TWarehouseBills tWarehouseBills) {
-        return itWarehouseBillsService.getWarehouseInStockBillsNo(tWarehouseBills);
-    }
-
-    /**
      * 导出货转详情主表列表
      */
     @PreAuthorize("@ss.hasPermi('warehouseBusiness:goodsTransfer:export')")

+ 0 - 9
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseInStockController.java

@@ -37,15 +37,6 @@ public class TWarehouseInStockController extends BaseController {
     private ITWarehouseBillsService itWarehouseBillsService;
 
     /**
-     * 查询出库详情主表列表
-     */
-    @GetMapping("/getWarehouseInStock")
-    @DataScope(deptAlias = "d", userAlias = "u")
-    public String getWarehouseInStockBillsNo(TWarehouseBills tWarehouseBills) {
-        return itWarehouseBillsService.getWarehouseInStockBillsNo(tWarehouseBills);
-    }
-
-    /**
      * 查询入库详情主表列表
      */
     @PreAuthorize("@ss.hasPermi('warehouseBusiness:inStock:list')")

+ 0 - 9
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseStockTransferController.java

@@ -37,15 +37,6 @@ public class TWarehouseStockTransferController extends BaseController {
     private ITWarehouseBillsService itWarehouseBillsService;
 
     /**
-     * 查询出库详情主表列表
-     */
-    @GetMapping("/getWarehouseStockTransfer")
-    @DataScope(deptAlias = "d", userAlias = "u")
-    public String getWarehouseStockTransferBillsNo(TWarehouseBills tWarehouseBills) {
-        return itWarehouseBillsService.getWarehouseInStockBillsNo(tWarehouseBills);
-    }
-
-    /**
      * 查询入库详情主表列表
      */
     @PreAuthorize("@ss.hasPermi('warehouseBusiness:stockTransfer:list')")

+ 13 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/Ftmsorderbills.java

@@ -222,6 +222,11 @@ public class Ftmsorderbills extends BaseEntity {
     private String remarks;
 
     /**
+     * 派车状态
+     */
+    private String planBillStatus;
+
+    /**
      * 接单状态
      */
     private Long orderStatus;
@@ -275,6 +280,14 @@ public class Ftmsorderbills extends BaseEntity {
     /** 车队id */
     private Long fleetId;
 
+    public String getPlanBillStatus() {
+        return planBillStatus;
+    }
+
+    public void setPlanBillStatus(String planBillStatus) {
+        this.planBillStatus = planBillStatus;
+    }
+
     public Long getFleetId() {
         return fleetId;
     }

+ 11 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/VehicleLedgerExcel.java

@@ -102,6 +102,9 @@ public class VehicleLedgerExcel {
     @Excel(name = "车利润")
     private BigDecimal profitCar;
 
+    @Excel(name = "单据类型")
+    private String billKind;
+
     /**
      *  检索条件:结算单位
      */
@@ -132,6 +135,14 @@ public class VehicleLedgerExcel {
      */
     private String invStatus;
 
+    public String getBillKind() {
+        return billKind;
+    }
+
+    public void setBillKind(String billKind) {
+        this.billKind = billKind;
+    }
+
     public Long gettCorpId() {
         return tCorpId;
     }

+ 3 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillscarsServiceImpl.java

@@ -444,6 +444,9 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
         long pId = tmsorderbillscars.getId();
         long orgId = tmsorderbillscars.getOrgId();
         Ftmsorderbillscars ftmsorderbillscars = ftmsorderbillscarsMapper.selectftmsorderbillscarsById(pId);
+        if (StringUtils.isNull(tmsorderbillscars.getAcceptDate())) {
+            return AjaxResult.error("该运单未填写接单日期");
+        }
         if (ftmsorderbillscars.getOrderStatus() < 60L) {
             return AjaxResult.error("运单状态异常该运单未回单:" + ftmsorderbillscars.getBillStatus());
         }

+ 1 - 1
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillsMapper.xml

@@ -207,7 +207,7 @@
             AND f.bill_status LIKE "%${billStatus}%"
         </if>
         ${params.dataScope}
-        ORDER BY f.id desc
+        ORDER BY f.bill_status, f.id asc
     </select>
 
     <select id="selectftmsorderbillsById" parameterType="Long" resultMap="ftmsorderbillsResult">

+ 4 - 1
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillsplansMapper.xml

@@ -132,6 +132,9 @@
             <if test="goodsId != null and goodsId != 0">
                 AND f.goods_id = #{goodsId}
             </if>
+            <if test="planBillStatus != null and planBillStatus != ''">
+                AND plan.bill_status = #{planBillStatus}
+            </if>
             <if test="mblno != null and mblno != ''">
                 AND f.mblno LIKE "%${mblno}%"
             </if>
@@ -147,7 +150,7 @@
             <if test="billStatus != null and billStatus != ''">
                 AND f.bill_status LIKE "%${billStatus}%"
             </if>
-        ORDER BY plan.id desc
+        ORDER BY plan.bill_status, plan.id asc
     </select>
 
     <select id="selectftmsorderbillsplansCountList" parameterType="ftmsorderbillsplans" resultType="int">

+ 24 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseBills.java

@@ -485,6 +485,12 @@ public class TWarehouseBills extends BaseEntity {
     @Excel(name = "箱量")
     private String fCntval;
 
+    /**
+     * 箱使日期
+     */
+    @Excel(name = "箱使日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date freeContainerDate;
+
     //起运港中文名
     private String loadportidName;
     //目的港中文名
@@ -529,6 +535,8 @@ public class TWarehouseBills extends BaseEntity {
     private String corpName;
     //查询时间区间
     private List<String> cLoadDate;
+    //查询箱使日期时间区间
+    private List<String> freeContainerList;
     //应收款信息
     private List<TWarehousebillsfees> tWarehousebillsfeesDr;
     //应付款信息
@@ -1411,6 +1419,22 @@ public class TWarehouseBills extends BaseEntity {
         this.fCartype = fCartype;
     }
 
+    public Date getFreeContainerDate() {
+        return freeContainerDate;
+    }
+
+    public void setFreeContainerDate(Date freeContainerDate) {
+        this.freeContainerDate = freeContainerDate;
+    }
+
+    public List<String> getFreeContainerList() {
+        return freeContainerList;
+    }
+
+    public void setFreeContainerList(List<String> freeContainerList) {
+        this.freeContainerList = freeContainerList;
+    }
+
     @Override
     public String toString() {
         return "TWarehouseBills{" +

+ 0 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseBillsService.java

@@ -137,8 +137,6 @@ public interface ITWarehouseBillsService {
      */
     public int deleteTWarehousebillsById(Long fId);
 
-    String getWarehouseInStockBillsNo(TWarehouseBills tWarehouseBills);
-
     String getWarehouseOutStockBillsNo(TWarehouseBills tWarehouseBills);
 
     /**

+ 5 - 9
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -3603,12 +3603,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     }
 
     @Override
-    public String getWarehouseInStockBillsNo(TWarehouseBills tWarehouseBills) {
-
-        return null;
-    }
-
-    @Override
     public String getWarehouseOutStockBillsNo(TWarehouseBills tWarehouseBills) {
         return null;
     }
@@ -3697,7 +3691,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
          * 流水号回收
          *  1、 获取所有流水号
          */
-        List<String> SerialNumberList = new ArrayList<>();
+        List<String> serialNumberList = new ArrayList<>();
         if (StringUtils.isNotEmpty(warehousebillsitemsList)) {
             int i = 1;
             for (TWarehousebillsitems wb : warehousebillsitemsList) {
@@ -3705,7 +3699,9 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 if ("1".equals(goods.getIfCntrno()) && StringUtils.isNull(wb.getfCntrno())) {
                     return AjaxResult.error("仓库明细第"+i+"行未找到箱号");
                 }
-                SerialNumberList.add(wb.getfSerialNumber()); // 流水号回收
+                if (StringUtils.isNotNull(wb.getfSerialNumber())) {
+                    serialNumberList.add(wb.getfSerialNumber()); // 流水号回收
+                }
                 // 查询库存总账
                 TWhgenleg tWhgenle = queryTWhgenleg(tWarehousebills, wb, goods.getIfCntrno());
                 if ("SJRKRevoke".equals(billsType)) { // 撤销 入库
@@ -3806,7 +3802,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
              *  2、 流水号去重
              *  3、 添加到 billno_del
              */
-            List<String> serialNumberNewList = delRepeat(SerialNumberList);
+            List<String> serialNumberNewList = delRepeat(serialNumberList);
             serialNumberNewList.forEach(item -> {
                 BillnoDel billnoDel = new BillnoDel();
                 billnoDel.setBillType(item.substring(0, 2));

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

@@ -89,6 +89,7 @@
         <result property="fPaymode" column="f_paymode"/>
         <result property="fLaneid" column="f_laneid"/>
         <result property="fCntval" column="f_cntval"/>
+        <result property="freeContainerDate" column="free_container_date"/>
     </resultMap>
 
     <sql id="selectTWarehousebillsVo">
@@ -98,8 +99,8 @@
         f_billtype, f_billstatus, f_items_status, del_flag, create_by, create_time, update_by, update_time, remark, f_billing_deadline, f_product_name, f_review_date,
         f_truckno, f_driver_name, f_driver_tel, f_driver_id_car, f_business_type, f_labour, f_fleet, f_inwarehouseid, f_bstime, f_cartype, f_goodsid, f_new_trademodeid,
         f_loadportid, f_destportid, f_serviceitems, f_invoceobj, f_sign, f_detentioncargo, f_booksmarks, f_shippername, f_shipperattn, f_shippertel, f_consigneername,
-        f_consigneeattn, f_consigneetel, f_insurance, f_insuranceamt, f_closedate, f_docmentdate, f_vslid, f_voyid, f_typeid, f_paymode, f_laneid, f_cntval
-        from t_warehousebills
+        f_consigneeattn, f_consigneetel, f_insurance, f_insuranceamt, f_closedate, f_docmentdate, f_vslid, f_voyid, f_typeid, f_paymode, f_laneid, f_cntval,
+        free_container_date from t_warehousebills
     </sql>
 
     <select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult">
@@ -198,7 +199,8 @@
             bill.f_grossweight AS fGrossweight,
             bill.f_product_name AS fProductName,
             bill.f_billing_deadline AS fBillingDeadline,
-            CASE WHEN bill.f_billstatus = '1' THEN '录入'
+            bill.free_container_date AS freeContainerDate,
+        CASE WHEN bill.f_billstatus = '1' THEN '录入'
             WHEN bill.f_billstatus = '2' THEN '暂存'
             WHEN bill.f_billstatus = '3' THEN '驳回'
             WHEN bill.f_billstatus = '4' THEN '请核'
@@ -291,6 +293,12 @@
             <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
                 and bill.f_bsdate &lt;= #{timeInterval[1]}
             </if>
+            <if test='freeContainerList != null and freeContainerList[0] != null and freeContainerList[0]!= ""'>
+                and bill.free_container_date &gt;= #{freeContainerList[0]}
+            </if>
+            <if test='freeContainerList != null and freeContainerList[1] != null and freeContainerList[1]!= ""'>
+                and bill.free_container_date &lt;= #{freeContainerList[1]}
+            </if>
             <if test="fGoodsid != null  and fGoodsid != ''">and item.f_goodsid = #{fGoodsid}</if>
             <if test="fContacts != null  and fContacts != ''">and bill.f_contacts = #{fContacts}</if>
             <if test="fTel != null  and fTel != ''">and bill.f_tel = #{fTel}</if>
@@ -380,6 +388,7 @@
         bill.f_grossweight AS fGrossweight,
         bill.f_product_name AS fProductName,
         bill.f_billing_deadline AS fBillingDeadline,
+        bill.free_container_date AS freeContainerDate,
         CASE
         WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '1' THEN '录入'
         WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '2' THEN '暂存'
@@ -447,6 +456,12 @@
             <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
                 and bill.f_bsdate &lt;= #{timeInterval[1]}
             </if>
+            <if test='freeContainerList != null and freeContainerList[0] != null and freeContainerList[0]!= ""'>
+                and bill.free_container_date &gt;= #{freeContainerList[0]}
+            </if>
+            <if test='freeContainerList != null and freeContainerList[1] != null and freeContainerList[1]!= ""'>
+                and bill.free_container_date &lt;= #{freeContainerList[1]}
+            </if>
             <if test="fGoodsid != null  and fGoodsid != ''">and item.f_goodsid = #{fGoodsid}</if>
             <if test="fContacts != null  and fContacts != ''">and bill.f_contacts = #{fContacts}</if>
             <if test="fTel != null  and fTel != ''">and bill.f_tel = #{fTel}</if>
@@ -817,6 +832,7 @@
             <if test="fPaymode != null">f_paymode,</if>
             <if test="fLaneid != null">f_laneid,</if>
             <if test="fCntval != null">f_cntval,</if>
+            <if test="freeContainerDate != null">free_container_date,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fBillno != null">#{fBillno},</if>
@@ -902,6 +918,7 @@
             <if test="fPaymode != null">#{fPaymode},</if>
             <if test="fLaneid != null">#{fLaneid},</if>
             <if test="fCntval != null">#{fCntval},</if>
+            <if test="freeContainerDate != null">#{freeContainerDate},</if>
         </trim>
     </insert>
 
@@ -991,9 +1008,11 @@
             <if test="fPaymode != null">f_paymode = #{fPaymode},</if>
             <if test="fLaneid != null">f_laneid = #{fLaneid},</if>
             <if test="fCntval != null">f_cntval = #{fCntval},</if>
+            <if test="freeContainerDate != null">free_container_date = #{freeContainerDate},</if>
         </trim>
         where f_id = #{fId}
     </update>
+
     <update id="updateKaHeOrder" parameterType="TWarehousebills">
         update t_warehousebills
         <trim prefix="SET" suffixOverrides=",">
@@ -1081,6 +1100,7 @@
             <if test="fPaymode != null">f_paymode = #{fPaymode},</if>
             <if test="fLaneid != null">f_laneid = #{fLaneid},</if>
             <if test="fTypeid != null">f_typeid = #{fTypeid},</if>
+            <if test="freeContainerDate != null">free_container_date = #{freeContainerDate},</if>
         </trim>
         where f_id = #{fId}
     </update>