Pārlūkot izejas kodu

凯和商务端修改订单

lazhaoqian 4 gadi atpakaļ
vecāks
revīzija
303c13d777

+ 3 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/KHTWarehousebillsController.java

@@ -185,7 +185,7 @@ public class KHTWarehousebillsController extends BaseController
      * @return
      */
     //@PreAuthorize("@ss.hasPermi('warehouse:warehousebills:submitMakingMessage')")
-    @Log(title = "凯和订单", businessType = BusinessType.INSERT)
+    //@Log(title = "凯和订单", businessType = BusinessType.INSERT)
     @PostMapping("/submitMakingMessage")
     public AjaxResult submitMakingMessage(@RequestParam String tWarehousebills,
                                       @RequestParam String tWarehousebillsCntritems)
@@ -207,7 +207,7 @@ public class KHTWarehousebillsController extends BaseController
      * 修改凯和订单
      */
     @PreAuthorize("@ss.hasPermi('warehouse:warehousebills:edit')")
-    @Log(title = "凯和订单", businessType = BusinessType.UPDATE)
+    //@Log(title = "凯和订单", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TWarehouseBills tWarehousebills)
     {
@@ -382,7 +382,7 @@ public class KHTWarehousebillsController extends BaseController
      * @param tWarehousebills
      * @return
      */
-    @Log(title = "凯和订单", businessType = BusinessType.INSERT)
+    @Log(title = "凯和订单获取提单号", businessType = BusinessType.INSERT)
     @PostMapping("/getMblno")
     public AjaxResult getMblno(@RequestBody TWarehouseBills tWarehousebills)
     {

+ 6 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/KHUpdateOrderMessage.java

@@ -31,10 +31,14 @@ public class KHUpdateOrderMessage {
     //修改订单申请审批 XGDD 471
     //修改完后提交审批 XGTJ 472
     //删除订单申请审批 DDSC 473
+    @PostMapping("/orderExamine")
     public AjaxResult orderExamine(@RequestBody TWarehouseBills tWarehouseBills){
         if (StringUtils.isNull(tWarehouseBills.getfBilltype())){
             return AjaxResult.error("提交审核类型不能为空");
         }
+        if (tWarehouseBills.getfId() == null){
+            return AjaxResult.error("请选择数据后再请核");
+        }
         LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
         return tWarehousebillsService.orderExamine(tWarehouseBills,loginUser);
     }
@@ -43,8 +47,8 @@ public class KHUpdateOrderMessage {
     public AjaxResult waybillChanges(@RequestParam(value = "tWarehousebills") String tWarehousebills,
                                               @RequestParam(value = "tWarehousebillsCntr",required = false) String tWarehousebillsCntr,
                                               @RequestParam(value = "tWarehousebillsCntritems",required = false) String tWarehousebillsCntritems,
-                                              @RequestParam("tWarehousebillsfeesCr") String tWarehousebillsfeesCr,
-                                              @RequestParam("tWarehousebillsfeesDr") String tWarehousebillsfeesDr){
+                                              @RequestParam(value = "tWarehousebillsfeesCr",required = false) String tWarehousebillsfeesCr,
+                                              @RequestParam(value = "tWarehousebillsfeesDr",required = false) String tWarehousebillsfeesDr){
         if (StringUtils.isEmpty(tWarehousebills)){
             return AjaxResult.error("未找到订单主表信息,请确认");
         }

+ 4 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/approvalFlow/service/impl/AuditPathsServiceImpl.java

@@ -561,6 +561,10 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
                         TWarehouseBills tWarehouseBills = new TWarehouseBills();
                         tWarehouseBills.setfId(auditItems.getBillId());
                         tWarehouseBills.setfSubmitUpdate(fettle);
+                        if (fettle == 6L){
+                            tWarehouseBills.setfUpdeteStatus(2L);
+                            tWarehouseBills.setfSubmitUpdate(2L);
+                        }
                         tWarehouseBillsMapper.updateKaHeOrder(tWarehouseBills);
                     } else if (auditItems.getActId() == 473) {
                         if ("T".equals(at.getIffinalItem())) {

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehouseBillsMapper.java

@@ -147,6 +147,11 @@ public interface TWarehouseBillsMapper extends BaseMapper<TWarehouseBills> {
      * @return
      */
     public List<Map<String,Object>> ruoYiVersionOrderList(TWarehouseBills tWarehouseBills);
+    /**
+     * 后台管理系统查询订单
+     * @return
+     */
+    public List<Map<String,Object>> ruoYiVersionOrderList1(TWarehouseBills tWarehouseBills);
 
     /**
      * 根据id获取订单信息

+ 37 - 24
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -2259,7 +2259,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         } else {
             warehouseBills.setCreateBy(loginUser.getUser().getUserName());
         }
-        return tWarehouseBillsMapper.ruoYiVersionOrderList(warehouseBills);
+        return tWarehouseBillsMapper.ruoYiVersionOrderList1(warehouseBills);
     }
 
     @Override
@@ -4795,7 +4795,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         Long billStatus = 2L;
         //判断能否提交审核
         boolean b = this.judgmentMessage(tWarehouseBills.getfBilltype(), fPid);
-        if (b = false){
+        if (b == false){
             return AjaxResult.error("已提交审核请勿重复提交审核");
         }
         TWarehouseBills warehouseBills = tWarehouseBillsMapper.selectTWarehousebillsById(fPid);
@@ -4838,10 +4838,21 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         housebills.setfId(fPid);
         if ("XGDD".equals(tWarehouseBills.getfBilltype())) {
             housebills.setfUpdeteStatus(billStatus);
+            if (billStatus.longValue() == 6L){
+                AjaxResult orderMessage = this.copyKhOrderMessage(fPid);
+                String string = orderMessage.get("code").toString();
+                if ("500".equals(string)) {
+                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                    return orderMessage;
+                }
+            }
         }else if ("XGTJ".equals(tWarehouseBills.getfBilltype())) {
             housebills.setfSubmitUpdate(billStatus);
         }else if ("DDSC".equals(tWarehouseBills.getfBilltype())) {
            housebills.setfDeleteStatus(billStatus);
+           if (billStatus.longValue() == 6L){
+               housebills.setDelFlag("1");
+           }
         }
         int i = tWarehouseBillsMapper.updateKaHeOrder(housebills);
         if (i <= 0){
@@ -4858,7 +4869,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             // 存储委托方(货权方)
             auditItems.setRefno1(warehouseBills.getfCorpid() + "");
             // 存储业务类型(业务类型)
-            auditItems.setRefno2(warehouseBills.getfBilltype());
+            auditItems.setRefno2(tWarehouseBills.getfBilltype());
             // 存储提单号(提单号)
             if (StringUtils.isNotEmpty(warehouseBills.getfMblno())) {
                 auditItems.setRefno3(warehouseBills.getfMblno());
@@ -4896,6 +4907,15 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         TWarehouseBills warehouseBills = JSONArray.parseObject(tWarehousebills, TWarehouseBills.class);
         warehouseBills.setUpdateBy(userName);
         warehouseBills.setUpdateTime(date);
+        TWarehouseBills tWarehousebillsById = tWarehouseBillsMapper.selectTWarehousebillsById(warehouseBills.getfId());
+        if (tWarehousebillsById.getfUpdeteStatus().longValue() != 6L){
+            return AjaxResult.error("修改审批未通过,请提交审批并且审批通过后再保存修改");
+        }
+        if (tWarehousebillsById.getfSubmitUpdate().longValue() == 4L
+        || tWarehousebillsById.getfSubmitUpdate().longValue() == 5L
+        || tWarehousebillsById.getfSubmitUpdate().longValue() == 6L){
+            return AjaxResult.error("修改已提交审批,不支持修改");
+        }
         int i = tWarehouseBillsMapper.updateKaHeOrder(warehouseBills);
         if (i<= 0){
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@@ -5002,28 +5022,21 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
      * @return
      */
     public boolean judgmentMessage(String billType,Long fid){
-        boolean flag = false;
         TWarehouseBills warehouseBills = tWarehouseBillsMapper.selectTWarehousebillsById(fid);
-        if ("XGDD".equals(billType)) {
-            if (warehouseBills.getfUpdeteStatus() == 2
-            || warehouseBills.getfUpdeteStatus() == 3){
-                flag = true;
-                return flag;
-            }
-        }else if ("XGTJ".equals(billType)) {
-            if (warehouseBills.getfSubmitUpdate() == 2
-                    || warehouseBills.getfSubmitUpdate() == 3){
-                flag = true;
-                return flag;
-            }
-        }else if ("DDSC".equals(billType)) {
-            if (warehouseBills.getfDeleteStatus() == 2
-                    || warehouseBills.getfDeleteStatus() == 3){
-                flag = true;
-                return flag;
-            }
-        }
-        return flag;
+        if ("XGDD".equals(billType) && warehouseBills.getfUpdeteStatus() == 2L) {
+            return true;
+        }else if ("XGDD".equals(billType) && warehouseBills.getfUpdeteStatus() == 3L) {
+            return true;
+        } else if ("XGTJ".equals(billType) && warehouseBills.getfSubmitUpdate() == 2L) {
+            return true;
+        }else if ("XGTJ".equals(billType) && warehouseBills.getfSubmitUpdate() == 3L) {
+            return true;
+        } else if ("DDSC".equals(billType) && warehouseBills.getfDeleteStatus() == 2L) {
+            return true;
+        } else if ("DDSC".equals(billType) && warehouseBills.getfDeleteStatus() == 3L) {
+            return true;
+        }
+        return false;
     }
 
     /**

+ 286 - 21
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -126,8 +126,7 @@
         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, f_business_attribution, f_supervision_unit, f_declaration_elements, f_part_number, f_ifinspection, f_value, f_weighing_date,
         f_ifsampling, send_sample_date, f_ifweight_recovery, weight_recovery_date, warehouse_status, f_times ,f_date_changed, f_chargetype,f_weigh_weight,
-               f_predict_branch,f_grade,f_delivery_details,f_salesman_id,f_itemstatus from t_warehousebills
-        f_ifsampling, send_sample_date, f_ifweight_recovery, weight_recovery_date, warehouse_status, f_times ,f_date_changed, f_updete_status, f_submit_update, f_delete_status from t_warehousebills
+               f_predict_branch,f_grade,f_delivery_details,f_salesman_id,f_itemstatus,f_updete_status, f_submit_update, f_delete_status from t_warehousebills
     </sql>
 
     <select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult">
@@ -1491,7 +1490,10 @@
             tw.f_paymode,
             sda.dict_label paymodeName,
             tw.f_laneid,
-            tr.f_name laneidName
+            tr.f_name laneidName,
+            tw.f_updete_status,
+            tw.f_submit_update,
+            tw.f_delete_status
         FROM t_warehousebills tw
             LEFT JOIN t_address address ON address.f_id = tw.f_loadportid
             LEFT JOIN t_address ta ON ta.f_id = tw.f_loadportid
@@ -1513,6 +1515,7 @@
             LEFT JOIN t_voyage ty ON ty.f_id = tw.f_voyid
         <where>
             tw.f_typeid = '1'
+            and tw.del_flag = '0'
             <if test="fId != null">and tw.f_id = #{fId}</if>
             <if test="fBillno != null  and fBillno != ''">and tw.f_billno = #{fBillno}</if>
             <if test="fCustomsdeclartion != null  and fCustomsdeclartion != ''">and tw.f_customsdeclartion =#{fCustomsdeclartion}</if>
@@ -1621,41 +1624,65 @@
         tc.f_no fNo,
         tv.f_name vslName,
         ty.f_no voyNo,
-        tw.f_corpid,
+        tw.f_corpid fCorpid,
         tp.f_name corpName,
         tw.create_by createBy,
         tw.create_time createTime,
-        tw.f_loadportid,
+        tw.f_loadportid fLoadportid,
         tre.f_name loadportName,
-        tw.f_destportid,
+        tw.f_destportid fDestportid,
         ts.f_name  destportName,
         tc.f_name goodsName,
         CASE
 
-        WHEN tw.f_billstatus = '1' THEN
+        WHEN tw.f_billstatus = '1' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '下单新建'
-        WHEN tw.f_billstatus = '2' THEN
+        WHEN tw.f_billstatus = '2' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '下单暂存'
-        WHEN tw.f_billstatus = '3' THEN
+        WHEN tw.f_billstatus = '3' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '下单驳回'
-        WHEN tw.f_billstatus = '4' THEN
+        WHEN tw.f_billstatus = '4' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '下单提交'
-        WHEN tw.f_billstatus = '5' THEN
+        WHEN tw.f_billstatus = '5' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '下单审批中'
-        WHEN tw.f_billstatus = '6' THEN
+        WHEN tw.f_billstatus = '6' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '下单审批通过'
-        WHEN tw.f_billstatus = '7' THEN
+        WHEN tw.f_billstatus = '7' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '配船暂存'
-        WHEN tw.f_billstatus = '8' THEN
+        WHEN tw.f_billstatus = '8' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '配船驳回'
-        WHEN tw.f_billstatus = '9' THEN
+        WHEN tw.f_billstatus = '9' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '配船提交'
-        WHEN tw.f_billstatus = '10' THEN
+        WHEN tw.f_billstatus = '10' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '配船审批中'
-        WHEN tw.f_billstatus = '11' THEN
+        WHEN tw.f_billstatus = '11' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '配船审批通过'
-        WHEN tw.f_billstatus = '12' THEN
+        WHEN tw.f_billstatus = '12' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
         '运单变更'
+        WHEN  tw.f_updete_status = '3'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '运单修改驳回'
+        WHEN  tw.f_updete_status = '4'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '运单修改提交'
+        WHEN  tw.f_updete_status = '5'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '运单修改审批中'
+        WHEN  tw.f_updete_status = '6'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '运单修改通过'
+        WHEN  tw.f_submit_update = '3' and tw.f_delete_status = '2' THEN
+        '修改提交驳回'
+        WHEN  tw.f_submit_update = '4' and tw.f_delete_status = '2' THEN
+        '修改提交审批'
+        WHEN  tw.f_submit_update = '5' and tw.f_delete_status = '2' THEN
+        '修改提交审批中'
+        WHEN  tw.f_submit_update = '6' and tw.f_delete_status = '2' THEN
+        '修改提交通过'
+        WHEN  tw.f_delete_status = '3' THEN
+        '运单删除驳回'
+        WHEN  tw.f_delete_status = '4' THEN
+        '运单删除提交'
+        WHEN  tw.f_delete_status = '5' THEN
+        '运单删除审批中'
+        WHEN  tw.f_delete_status = '6' THEN
+        '运单删除通过'
         END AS fBillstatus,
         CASE
         WHEN tf.f_billstatus = '1' THEN
@@ -1670,7 +1697,10 @@
         '审批中'
         WHEN tf.f_billstatus = '6' THEN
         '审批通过'
-        END AS moneyStatus
+        END AS moneyStatus,
+        tw.f_updete_status fUpdeteStatus,
+        tw.f_submit_update fSubmitUpdate,
+        tw.f_delete_status fDeleteStatus
         FROM
         t_warehousebills tw
         LEFT JOIN t_address ta ON ta.f_id = tw.f_laneid
@@ -1696,7 +1726,239 @@
         LEFT JOIN (SELECT f_pid,f_billstatus FROM t_warehousebillsfees GROUP BY f_pid,f_billstatus)tf ON tf.f_pid = tw.f_id
         <where>
             tw.f_typeid = '1'
-            tw.del_flag = '0'
+            and tw.del_flag = '0'
+            <if test="fId != null">and tw.f_id = #{fId}</if>
+            <if test="fBillno != null  and fBillno != ''">and tw.f_billno = #{fBillno}</if>
+            <if test="fCustomsdeclartion != null  and fCustomsdeclartion != ''">and tw.f_customsdeclartion =
+                #{fCustomsdeclartion}
+            </if>
+            <if test="fOriginalbillno != null  and fOriginalbillno != ''">and tw.f_originalbillno = #{fOriginalbillno}
+            </if>
+            <if test="fDeptid != null ">and tw.f_deptid = #{fDeptid}</if>
+            <if test="fBsdeptid != null ">and tw.f_bsdeptid = #{fBsdeptid}</if>
+            <if test="fContacts != null  and fContacts != ''">and tw.f_contacts = #{fContacts}</if>
+            <if test="fTel != null  and fTel != ''">and tw.f_tel = #{fTel}</if>
+            <if test="fCorpid != null ">and tw.f_corpid = #{fCorpid}</if>
+            <if test="fTocorpid != null ">and tw.f_tocorpid = #{fTocorpid}</if>
+            <if test="fStltypeid != null ">and tw.f_stltypeid = #{fStltypeid}</if>
+            <if test="fBscorpno != null  and fBscorpno != ''">and tw.f_bscorpno = #{fBscorpno}</if>
+            <if test="fWarehouseid != null ">and tw.f_warehouseid = #{fWarehouseid}</if>
+            <if test="fStorekeeper != null  and fStorekeeper != ''">and tw.f_storekeeper = #{fStorekeeper}</if>
+            <if test="fChargedate != null ">and tw.f_chargedate = #{fChargedate}</if>
+            <if test="fBsdate != null ">and tw.f_bsdate = #{fBsdate}</if>
+            <if test="fPlanqty != null ">and tw.f_planqty = #{fPlanqty}</if>
+            <if test="fPlangrossweight != null ">and tw.f_plangrossweight = #{fPlangrossweight}</if>
+            <if test="fPlannetweight != null ">and tw.f_plannetweight = #{fPlannetweight}</if>
+            <if test="fPlanvolumn != null ">and tw.f_planvolumn = #{fPlanvolumn}</if>
+            <if test="fQty != null ">and tw.f_qty = #{fQty}</if>
+            <if test="fGrossweight != null ">and tw.f_grossweight = #{fGrossweight}</if>
+            <if test="fNetweight != null ">and tw.f_netweight = #{fNetweight}</if>
+            <if test="fVolumn != null ">and tw.f_volumn = #{fVolumn}</if>
+            <if test="fBillingway != null ">and tw.f_billingway = #{fBillingway}</if>
+            <if test="fTrademodeid != null ">and tw.f_trademodeid = #{fTrademodeid}</if>
+            <if test="fSbu != null ">and tw.f_sbu = #{fSbu}</if>
+            <if test="fFeetunit != null  and fFeetunit != ''">and tw.f_feetunit = #{fFeetunit}</if>
+            <if test="fMblno != null  and fMblno != ''">and tw.f_mblno = #{fMblno}</if>
+            <if test="fMarks != null  and fMarks != ''">and tw.f_marks = #{fMarks}</if>
+            <if test="fVslvoy != null  and fVslvoy != ''">and tw.f_vslvoy = #{fVslvoy}</if>
+            <if test="fEta != null ">and tw.f_eta = #{fEta}</if>
+            <if test="fCustomno != null  and fCustomno != ''">and tw.f_customno = #{fCustomno}</if>
+            <if test="fIfweigh != null  and fIfweigh != ''">and tw.f_ifweigh = #{fIfweigh}</if>
+            <if test="fIfpledge != null  and fIfpledge != ''">and tw.f_ifpledge = #{fIfpledge}</if>
+            <if test="fIfdamage != null  and fIfdamage != ''">and tw.f_ifdamage = #{fIfdamage}</if>
+            <if test="fBankcorpid != null  and fBankcorpid != ''">and tw.f_bankcorpid = #{fBankcorpid}</if>
+            <if test="fBilltype != null  and fBilltype != ''">and tw.f_billtype = #{fBilltype}</if>
+            <if test="fBillstatus != null ">and tw.f_billstatus = #{fBillstatus}</if>
+            <if test="fItemsStatus != null ">and tw.f_items_status = #{fItemsStatus}</if>
+            <if test="fBillingDeadline != null ">and tw.f_billing_deadline = #{fBillingDeadline}</if>
+            <if test="fProductName != null  and fProductName != ''">and tw.f_product_name like concat('%',
+                #{fProductName}, '%')
+            </if>
+            <if test="fReviewDate != null ">and tw.f_review_date = #{fReviewDate}</if>
+            <if test="fTruckno != null  and fTruckno != ''">and tw.f_truckno = #{fTruckno}</if>
+            <if test="fDriverName != null  and fDriverName != ''">and tw.f_driver_name like concat('%', #{fDriverName},
+                '%')
+            </if>
+            <if test="fDriverTel != null  and fDriverTel != ''">and tw.f_driver_tel = #{fDriverTel}</if>
+            <if test="fDriverIdCar != null  and fDriverIdCar != ''">and tw.f_driver_id_car = #{fDriverIdCar}</if>
+            <if test="fBusinessType != null  and fBusinessType != ''">and tw.f_business_type = #{fBusinessType}</if>
+            <if test="fLabour != null ">and tw.f_labour = #{fLabour}</if>
+            <if test="fFleet != null ">and tw.f_fleet = #{fFleet}</if>
+            <if test="fInwarehouseid != null ">and tw.f_inwarehouseid = #{fInwarehouseid}</if>
+            <if test="fBstime != null ">and tw.f_bstime = #{fBstime}</if>
+            <if test="fCartype != null ">and tw.f_cartype = #{fCartype}</if>
+            <if test="fGoodsid != null ">and tw.f_goodsid = #{fGoodsid}</if>
+            <if test="fNewTrademodeid != null ">and tw.f_new_trademodeid = #{fNewTrademodeid}</if>
+            <if test="fLoadportid != null ">and tw.f_loadportid = #{fLoadportid}</if>
+            <if test="fDestportid != null ">and tw.f_destportid = #{fDestportid}</if>
+            <if test="fServiceitems != null  and fServiceitems != ''">and tw.f_serviceitems = #{fServiceitems}</if>
+            <if test="fInvoceobj != null  and fInvoceobj != ''">and tw.f_invoceobj = #{fInvoceobj}</if>
+            <if test="fSign != null ">and tw.f_sign = #{fSign}</if>
+            <if test="fDetentioncargo != null ">and tw.f_detentioncargo = #{fDetentioncargo}</if>
+            <if test="fBooksmarks != null  and fBooksmarks != ''">and tw.f_booksmarks = #{fBooksmarks}</if>
+            <if test="fShippername != null  and fShippername != ''">and tw.f_shippername like concat('%',
+                #{fShippername}, '%')
+            </if>
+            <if test="fShipperattn != null  and fShipperattn != ''">and tw.f_shipperattn = #{fShipperattn}</if>
+            <if test="fShippertel != null  and fShippertel != ''">and tw.f_shippertel = #{fShippertel}</if>
+            <if test="fConsigneername != null  and fConsigneername != ''">and tw.f_consigneername like concat('%',
+                #{fConsigneername}, '%')
+            </if>
+            <if test="fConsigneeattn != null  and fConsigneeattn != ''">and tw.f_consigneeattn = #{fConsigneeattn}</if>
+            <if test="fConsigneetel != null  and fConsigneetel != ''">and tw.f_consigneetel = #{fConsigneetel}</if>
+            <if test="fInsurance != null  and fInsurance != ''">and tw.f_insurance = #{fInsurance}</if>
+            <if test="fInsuranceamt != null ">and tw.f_insuranceamt = #{fInsuranceamt}</if>
+            <if test="fClosedate != null ">and tw.f_closedate = #{fClosedate}</if>
+            <if test="fDocmentdate != null ">and tw.f_docmentdate = #{fDocmentdate}</if>
+            <if test="fVslid != null ">and tw.f_vslid = #{fVslid}</if>
+            <if test="fVoyid != null ">and tw.f_voyid = #{fVoyid}</if>
+            <if test="fTypeid != null ">and tw.f_typeid = #{fTypeid}</if>
+            <if test="fPaymode != null">and tw.f_paymode = #{fPaymode},</if>
+            <if test="fLaneid != null">and tw.f_laneid = #{fLaneid},</if>
+            <if test='startTime != null'>
+                and tw.create_time &gt;= #{startTime}
+            </if>
+            <if test='endTime != null'>
+                and tw.create_time &lt;= #{endTime}
+            </if>
+            <if test="fCntrid != null ">and tc.f_cntrid = #{fCntrid}</if>
+            <if test="fCntrcount != null ">and tc.f_cntrcount = #{fCntrcount}</if>
+            <if test="vslidName != null  and vslidName != ''">and tv.f_name like concat('%',
+                #{vslidName}, '%')
+            </if>
+            <if test="voyidName != null  and voyidName != ''">and ty.f_no like concat('%',
+                #{voyidName}, '%')
+            </if>
+            <if test="boxNumber != null  and boxNumber != ''">and tc.f_no like concat('%',
+                #{voyidName}, '%')
+            </if>
+            <if test="createBy != null  and createBy != ''">and tw.create_by = #{createBy}</if>
+            <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
+                and tw.f_bsdate &gt;= #{cLoadDate[0]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
+                and tw.f_bsdate &lt;= #{cLoadDate[1]}
+            </if>
+        </where>
+        ORDER BY tw.create_time DESC, tw.f_id DESC
+    </select>
+    <select id="ruoYiVersionOrderList1" parameterType="TWarehousebills" resultType="map">
+        SELECT
+        tw.f_id fId,
+        tw.f_billno fBillno,
+        tw.f_mblno fMblno,
+        sd.dict_label fServiceitems,
+        tw.f_consigneername fConsigneername,
+        ta.f_name fName,
+        tw.f_bsdate fBsdate,
+        tc.f_cntrcount fCntrcount,
+        tc.f_no fNo,
+        tv.f_name vslName,
+        ty.f_no voyNo,
+        tw.f_corpid fCorpid,
+        tp.f_name corpName,
+        tw.create_by createBy,
+        tw.create_time createTime,
+        tw.f_loadportid fLoadportid,
+        tre.f_name loadportName,
+        tw.f_destportid fDestportid,
+        ts.f_name  destportName,
+        tc.f_name goodsName,
+        tw.f_billstatus fBillstatus,
+        CASE
+
+        WHEN tw.f_billstatus = '1' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '下单新建'
+        WHEN tw.f_billstatus = '2' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '下单暂存'
+        WHEN tw.f_billstatus = '3' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '下单驳回'
+        WHEN tw.f_billstatus = '4' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '下单提交'
+        WHEN tw.f_billstatus = '5' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '下单审批中'
+        WHEN tw.f_billstatus = '6' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '下单审批通过'
+        WHEN tw.f_billstatus = '7' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '配船暂存'
+        WHEN tw.f_billstatus = '8' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '配船驳回'
+        WHEN tw.f_billstatus = '9' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '配船提交'
+        WHEN tw.f_billstatus = '10' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '配船审批中'
+        WHEN tw.f_billstatus = '11' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '配船审批通过'
+        WHEN tw.f_billstatus = '12' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '运单变更'
+        WHEN  tw.f_updete_status = '3'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '运单修改驳回'
+        WHEN  tw.f_updete_status = '4'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '运单修改提交'
+        WHEN  tw.f_updete_status = '5'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '运单修改审批中'
+        WHEN  tw.f_updete_status = '6'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN
+        '运单修改通过'
+        WHEN  tw.f_submit_update = '3' and tw.f_delete_status = '2' THEN
+        '修改提交驳回'
+        WHEN  tw.f_submit_update = '4' and tw.f_delete_status = '2' THEN
+        '修改提交审批'
+        WHEN  tw.f_submit_update = '5' and tw.f_delete_status = '2' THEN
+        '修改提交审批中'
+        WHEN  tw.f_submit_update = '6' and tw.f_delete_status = '2' THEN
+        '修改提交通过'
+        WHEN  tw.f_delete_status = '3' THEN
+        '运单删除驳回'
+        WHEN  tw.f_delete_status = '4' THEN
+        '运单删除提交'
+        WHEN  tw.f_delete_status = '5' THEN
+        '运单删除审批中'
+        WHEN  tw.f_delete_status = '6' THEN
+        '运单删除通过'
+        END AS fBillstatusName,
+        CASE
+        WHEN tf.f_billstatus = '1' THEN
+        '新建'
+        WHEN tf.f_billstatus = '2' THEN
+        '暂存'
+        WHEN tf.f_billstatus = '3' THEN
+        '驳回'
+        WHEN tf.f_billstatus = '4' THEN
+        '提交'
+        WHEN tf.f_billstatus = '5' THEN
+        '审批中'
+        WHEN tf.f_billstatus = '6' THEN
+        '审批通过'
+        END AS moneyStatus,
+        tw.f_updete_status fUpdeteStatus,
+        tw.f_submit_update fSubmitUpdate,
+        tw.f_delete_status fDeleteStatus
+        FROM
+        t_warehousebills tw
+        LEFT JOIN t_address ta ON ta.f_id = tw.f_laneid
+        LEFT JOIN t_address tre ON tre.f_id = tw.f_loadportid
+        LEFT JOIN t_address ts ON ts.f_id = tw.f_destportid
+        LEFT JOIN sys_dict_data sd ON sd.dict_value = tw.f_serviceitems
+        AND sd.dict_type = 'f_serviceitems'
+        LEFT JOIN t_vessel tv ON tw.f_vslid = tv.f_id
+        LEFT JOIN t_voyage ty ON tw.f_voyid = ty.f_id
+        LEFT JOIN t_corps tp ON tw.f_corpid = tp.f_id
+        LEFT JOIN (
+        SELECT
+        th.f_pid,
+        th.f_cntrcount,
+        tr.f_no,
+        th.f_cntrid,
+        tg.f_name
+        FROM
+        t_warehousebills_cntr th
+        LEFT JOIN t_cntr tr ON th.f_cntrid = tr.f_id
+        LEFT JOIN t_goods tg ON th.f_goodsid = tg.f_id
+        ) tc ON tc.f_pid = tw.f_id
+        LEFT JOIN (SELECT f_pid,f_billstatus FROM t_warehousebillsfees GROUP BY f_pid,f_billstatus)tf ON tf.f_pid = tw.f_id
+        <where>
+            tw.f_typeid = '1'
+            and tw.del_flag = '0'
             <if test="fId != null">and tw.f_id = #{fId}</if>
             <if test="fBillno != null  and fBillno != ''">and tw.f_billno = #{fBillno}</if>
             <if test="fCustomsdeclartion != null  and fCustomsdeclartion != ''">and tw.f_customsdeclartion =
@@ -1908,7 +2170,10 @@
                tw.f_paymode,
                sda.dict_label paymodeName,
                tw.f_laneid,
-               tr.f_name      laneidName
+               tr.f_name      laneidName,
+               tw.f_updete_status,
+               tw.f_submit_update,
+               tw.f_delete_status
         FROM t_warehousebills tw
                  LEFT JOIN t_address address ON address.f_id = tw.f_loadportid
                  LEFT JOIN t_address ta ON ta.f_id = tw.f_loadportid