Forráskód Böngészése

巡检/费用修改/运价查询

dongyongwei 4 éve
szülő
commit
7168ec902b
15 módosított fájl, 438 hozzáadás és 97 törlés
  1. 15 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/orderPlan/ftmsorderbillscarsController.java
  2. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/quotation/TSeapriceController.java
  3. 11 0
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/FtmsorderbillscarsExcel.java
  4. 2 0
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/mapper/FtmsorderbillscarsMapper.java
  5. 7 0
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/IftmsorderbillscarsService.java
  6. 11 0
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillscarsServiceImpl.java
  7. 7 0
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillsplansServiceImpl.java
  8. 167 0
      ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillscarsMapper.xml
  9. 1 1
      ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillsplansMapper.xml
  10. 1 3
      ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/TSeapriceQueryLogInterceptor.java
  11. 2 0
      ruoyi-warehouse/src/main/java/com/ruoyi/quotation/mapper/TSeapriceitemMapper.java
  12. 7 0
      ruoyi-warehouse/src/main/java/com/ruoyi/quotation/service/ITSeapriceService.java
  13. 25 0
      ruoyi-warehouse/src/main/java/com/ruoyi/quotation/service/impl/TSeapriceServiceImpl.java
  14. 93 47
      ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml
  15. 88 44
      ruoyi-warehouse/src/main/resources/mapper/quotation/TSeapriceitemMapper.xml

+ 15 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/orderPlan/ftmsorderbillscarsController.java

@@ -56,7 +56,7 @@ public class ftmsorderbillscarsController extends BaseController {
     @PreAuthorize("@ss.hasPermi('fleet:vehicleStatus:query')")
     @GetMapping("/query")
     public Map<String, Object> query(Ftmsorderbills ftmsorderbills) {
-        Map<String, Object> map = new HashMap<>();
+        Map<String, Object> map = new HashMap<String,Object>();
         Ftmsorderbills tmsorder = ftmsorderbillscarsService.judgmentFleet(ftmsorderbills);
         startPage();
         List<FtmsorderbillscarsExcel> list = ftmsorderbillscarsService.selectftmsorderbillscarsMapList(tmsorder);
@@ -68,6 +68,20 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 查询司机状态跟踪列表
      */
+    @PreAuthorize("@ss.hasPermi('fleet:vehicleStatus:query')")
+    @GetMapping("/queryModify")
+    public Map<String, Object> queryModify(Ftmsorderbills ftmsorderbills) {
+        Map<String, Object> map = new HashMap<String,Object>();
+        Ftmsorderbills tmsorder = ftmsorderbillscarsService.judgmentFleet(ftmsorderbills);
+        startPage();
+        List<FtmsorderbillscarsExcel> list = ftmsorderbillscarsService.selectftmsorderbillscarsMapListModify(tmsorder);
+        map.put("dataTable", getDataTable(list));
+        return map;
+    }
+
+    /**
+     * 查询司机状态跟踪列表
+     */
     @GetMapping("/wechatQuery")
     public Map<String, Object> wechatQuery(Ftmsorderbills ftmsorderbills) {
         Map<String, Object> map = new HashMap<>();

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/quotation/TSeapriceController.java

@@ -78,7 +78,7 @@ public class TSeapriceController extends BaseController
     public TableDataInfo queryApp(TSeaprice tSeaprice)
     {
         startPage();
-        List<Map<String, Object>> list = tSeapriceService.selectTSeapriceMapList(tSeaprice);
+        List<Map<String, Object>> list = tSeapriceService.selectTSeapriceMapListApp(tSeaprice);
         return getDataTable(list);
     }
 

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

@@ -14,6 +14,17 @@ public class FtmsorderbillscarsExcel {
     @Excel(name = "运单号")
     private String orderNo;
 
+    /** 来源ID */
+    private String srcMId;
+
+    public String getSrcMId() {
+        return srcMId;
+    }
+
+    public void setSrcMId(String srcMId) {
+        this.srcMId = srcMId;
+    }
+
     @Excel(name = "提单号")
     private String mblno;
 

+ 2 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/mapper/FtmsorderbillscarsMapper.java

@@ -116,6 +116,8 @@ public interface FtmsorderbillscarsMapper {
      */
     public List<FtmsorderbillscarsExcel> selectftmsorderbillscarsMapList(Ftmsorderbills ftmsorderbills);
 
+    public List<FtmsorderbillscarsExcel> selectftmsorderbillscarsMapListModify(Ftmsorderbills ftmsorderbills);
+
     /**
      * 根据orgId更新数据状态
      *

+ 7 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/IftmsorderbillscarsService.java

@@ -87,6 +87,13 @@ public interface IftmsorderbillscarsService {
     public List<FtmsorderbillscarsExcel> selectftmsorderbillscarsMapList(Ftmsorderbills ftmsorderbills);
 
     /**
+     * 费用修改的查询司机状态跟踪列表
+     * @param ftmsorderbills
+     * @return
+     */
+    public List<FtmsorderbillscarsExcel> selectftmsorderbillscarsMapListModify(Ftmsorderbills ftmsorderbills);
+
+    /**
      *  司机操作接单/提箱/装卸货/还卸柜/回单操作  保存
      * @param cars          派车
      * @param attachs       附件

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

@@ -181,6 +181,17 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
     }
 
     /**
+     * 费用修改的查询司机状态跟踪列表
+     *
+     * @param ftmsorderbills
+     * @return
+     */
+    @Override
+    public List<FtmsorderbillscarsExcel> selectftmsorderbillscarsMapListModify(Ftmsorderbills ftmsorderbills) {
+        return ftmsorderbillscarsMapper.selectftmsorderbillscarsMapListModify(ftmsorderbills);
+    }
+
+    /**
      *  根据查询条件查询 状态跟踪列表页 按钮数据
      * @return  结果
      */

+ 7 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillsplansServiceImpl.java

@@ -591,6 +591,13 @@ public class FtmsorderbillsplansServiceImpl implements IftmsorderbillsplansServi
                 }
             }
         }
+
+        //新增逻辑20210707 dongyongwei,
+        //更改订单状态为
+        // 3调度中 计划量和调度量比较 计划量大于0 调度量<>0  计划量>调度量
+        // 4待派车 计划量和调度量比较 计划量大于0 计划量=调度量
+        ftmsorderbillsService.setFtmsorderbillsBillStatus(pId,3L);
+
         return AjaxResult.success(ftmsorderbillsplansMapper.selectftmsorderbillsplansByOrgId(pId));
     }
 

+ 167 - 0
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillscarsMapper.xml

@@ -451,6 +451,173 @@
         </where>
     </select>
 
+    <select id="selectftmsorderbillscarsMapListModify" parameterType="ftmsorderbills" resultType="com.ruoyi.orderPlan.domain.FtmsorderbillscarsExcel">
+        SELECT
+        c.id,
+        c.src_m_id srcMId,
+        c.order_no orderNo,
+        c.mblno,
+        c.carreg_no carregNo,
+        driver.f_name driverName,
+        c.driver_tel driverTel,
+        CASE
+        c.order_status
+        WHEN 10 THEN
+        '车队安排'
+        WHEN 20 THEN
+        '司机受理'
+        WHEN 40 THEN
+        '提箱'
+        WHEN 50 THEN
+        '装卸货'
+        WHEN 60 THEN
+        '还卸柜'
+        WHEN 80 THEN
+        '回单'
+        END orderName,
+        c.order_status orderStatus,
+        p.f_name corpId,
+        CASE
+        t.bill_type
+        WHEN 1 THEN
+        '进口'
+        WHEN 2 THEN
+        '出口'
+        WHEN 3 THEN
+        '内贸'
+        WHEN 4 THEN
+        '其他'
+        END billType,
+        CASE
+        t.trans_type
+        WHEN 1 THEN
+        '集装箱'
+        WHEN 2 THEN
+        '搭建'
+        WHEN 3 THEN
+        '散货'
+        END transType,
+        CASE
+        t.trans_type
+        WHEN 1 THEN
+        '重去重回'
+        WHEN 2 THEN
+        '重去空回'
+        WHEN 3 THEN
+        '空去重回'
+        END transProp,
+        CASE
+        c.bill_kind
+        WHEN 'NN' THEN
+        '直单'
+        WHEN 'MM' THEN
+        '主单'
+        WHEN 'MH' THEN
+        '从单'
+        END billKind,
+        c.m_bill_no mBillNo,
+        g.f_name goodsId,
+        c.cntr_weight cntrWeight,
+        t.qty_plan qtyPlan,
+        t.weight_plan weightPlan,
+        t.ysl,
+        t.voy,
+        t.load_addr loadAddr,
+        t.load_date tLoadDate,
+        t.load_attn loadAttn,
+        t.load_attntel loadAttntel,
+        t.md_load_addr mdLoadAddr,
+        t.md_load_date tMdLoadDate,
+        t.md_load_attn mdLoadAttn,
+        t.md_load_attn_tel mdLoadAttnTel,
+        t.un_load_addr unLoadAddr,
+        t.un_load_date tUnLoadDate,
+        t.un_load_attn unLoadAttn,
+        t.un_load_attn_tel unLoadAttnTel,
+        dic.dict_label cntrId,
+        pol.f_name polId,
+        pod.f_name podId,
+        c.accept_date acceptDate,
+        c.cntr_qty cntrQty,
+        c.off_data offData,
+        c.load_date loadDate,
+        c.md_load_date mdLoadDate,
+        c.un_load_date unLoadDate,
+        c.waybill_date waybillDate,
+        c.waybill_remarks waybillRemarks,
+        c.oil_amt oilAmt,
+        c.cost_oth costOth,
+        c.driverbonus driverbonus,
+        c.cost_remarks costRemarks,
+        c.costom_amt_06 costomAmt06,
+        c.costom_amt_05 costomAmt05,
+        c.costom_amt_04 costomAmt04,
+        c.costom_amt_03 costomAmt03,
+        c.costom_amt_02 costomAmt02,
+        c.costom_amt_01 costomAmt01,
+        c.costom_str_02 costomStr02,
+        c.costom_str_01 costomStr01
+        FROM
+        F_TMSORDERBILLSCARS_MODIFY c
+        LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
+        LEFT JOIN t_corps p ON p.f_id = t.corp_id
+        LEFT JOIN t_corps fleet ON fleet.f_id = c.carcor_pid
+        LEFT JOIN t_goods g ON g.f_id = t.goods_id
+        LEFT JOIN t_address pol ON pol.f_id = t.pol_id
+        AND pol.f_types = 1
+        LEFT JOIN t_address pod ON pod.f_id = t.pod_id
+        AND pod.f_types = 1
+        LEFT JOIN sys_dict_data dic ON dic.dict_value = c.cntr_id
+        AND dic.dict_type = 'data_cntrId'
+        LEFT JOIN t_corps driver ON driver.f_id = c.driver_user_id
+        <where>
+            <if test="carStatus == null">and c.bill_status &gt;= 6</if>
+            <if test="corpId != null">and t.corp_id = #{corpId}</if>
+            <if test="billType != null">and t.bill_type = #{billType}</if>
+            <if test="transType != null">and t.trans_type = #{transType}</if>
+            <if test="transProp != null">and t.trans_prop = #{transProp}</if>
+            <if test="goodsId != null">and t.goods_id = #{goodsId}</if>
+            <if test="driverTel != null">and c.driver_tel = #{driverTel}</if>
+            <if test="orderStatus != null">and c.order_status = #{orderStatus}</if>
+            <if test="billKind != null">and c.bill_kind = #{billKind}</if>
+            <if test="carStatus != null and carStatus == 'planDate'">and c.order_status = 10</if>
+            <if test="carStatus != null and carStatus == 'acceptDate'">and c.order_status = 20</if>
+            <if test="carStatus != null and carStatus == 'loadDate'">and c.order_status = 40</if>
+            <if test="carStatus != null and carStatus == 'mdLoadDate'">and c.order_status = 50</if>
+            <if test="carStatus != null and carStatus == 'unLoadDate'">and c.order_status = 60</if>
+            <if test="carStatus != null and carStatus == 'receiptDate'">and c.order_status = 80</if>
+            <if test="isFleet != null and isFleet == 1">
+                AND fleet.f_id = #{fleetId}
+            </if>
+            <if test='planDate != null and planDate[0] != null and planDate[0]!= ""'>
+                and c.plan_date &gt;= #{planDate[0]}
+            </if>
+            <if test='planDate != null and planDate[1] != null and planDate[1]!= ""'>
+                and c.plan_date &lt;= #{planDate[1]}
+            </if>
+            <if test='acceptDateList != null and acceptDateList[0] != null and acceptDateList[0]!= ""'>
+                and c.accept_date &gt;= #{acceptDateList[0]}
+            </if>
+            <if test='acceptDateList != null and acceptDateList[1] != null and acceptDateList[1]!= ""'>
+                and c.accept_date &lt;= #{acceptDateList[1]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
+                and c.load_date &gt;= #{cLoadDate[0]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
+                and c.load_date &lt;= #{cLoadDate[1]}
+            </if>
+            <if test="mblno != null  and mblno != ''">and t.mblno like concat('%', #{mblno}, '%')</if>
+            <if test="orderNo != null  and orderNo != ''">and c.order_no like concat('%', #{orderNo}, '%')</if>
+            <if test="mBillNo != null  and mBillNo != ''">and c.m_bill_no like concat('%', #{mBillNo}, '%')</if>
+            <if test="carregNo != null  and carregNo != ''">and c.carreg_no like concat('%', #{carregNo}, '%')</if>
+            <if test="loadAddr != null  and loadAddr != ''">and t.load_addr like concat('%', #{loadAddr}, '%')</if>
+            <if test="unLoadAddr != null  and unLoadAddr != ''">and t.un_load_addr like concat('%', #{unLoadAddr},'%')</if>
+            <if test="mdLoadAddr != null  and mdLoadAddr != ''">and t.md_load_addr like concat('%', #{mdLoadAddr},'%')</if>
+        </where>
+        ORDER BY c.id desc
+    </select>
+
     <select id="selectftmsorderbillscarsMapList" parameterType="ftmsorderbills" resultType="com.ruoyi.orderPlan.domain.FtmsorderbillscarsExcel">
         SELECT
             c.id,

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

@@ -115,7 +115,7 @@
         LEFT JOIN t_goods g ON g.f_id = f.goods_id
         <where>
             <if test="1==1">
-              AND  plan.cntr_qty > plan.plan_cntr_qty
+              AND  plan.cntr_qty > plan.car_qty
             </if>
             <if test="corpId != null and corpId != ''">
                 AND f.corp_id = #{corpId}

+ 1 - 3
ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/TSeapriceQueryLogInterceptor.java

@@ -34,8 +34,7 @@ public class TSeapriceQueryLogInterceptor implements HandlerInterceptor {
     public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
             throws Exception {
         String uri = request.getRequestURI();
-        if("/warehouse/seaprice/query".equals(uri)){
-            if("app".equals(request.getParameter("queryFrom"))){
+        if("/warehouse/seaprice/queryApp".equals(uri)){
                 TSeapriceQueryLog tSeapriceQueryLog = new TSeapriceQueryLog();
                 tSeapriceQueryLog.setfPortDestinationId(Long.valueOf(request.getParameter("fPortDestinationId")));
                 tSeapriceQueryLog.setfPortOriginId(Long.valueOf(request.getParameter("fPortOriginId")));
@@ -45,7 +44,6 @@ public class TSeapriceQueryLogInterceptor implements HandlerInterceptor {
                 tSeapriceQueryLog.setfUserId(SecurityUtils.getLoginUser().getUser().getUserId());
                 tSeapriceQueryLog.setfQueryDatetime(new Date());
                 SpringUtils.getBean(ITSeapriceQueryLogService.class).insertTSeapriceQueryLog(tSeapriceQueryLog);
-            }
         }
     }
 }

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/quotation/mapper/TSeapriceitemMapper.java

@@ -28,6 +28,8 @@ public interface TSeapriceitemMapper
      */
     public List<TSeapriceitem> selectTSeapriceitemList(TSeapriceitem tSeapriceitem);
 
+    public List<TSeapriceitem> selectTSeapriceitemListApp(TSeapriceitem tSeapriceitem);
+
     /**
      * 新增【请填写功能名称】
      * 

+ 7 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/quotation/service/ITSeapriceService.java

@@ -78,6 +78,13 @@ public interface ITSeapriceService
     public List<Map<String, Object>> selectTSeapriceMapList(TSeaprice tSeaprice);
 
     /**
+     *  查询海运报价列表信息
+     * @param tSeaprice 条件
+     * @return  结果
+     */
+    public List<Map<String, Object>> selectTSeapriceMapListApp(TSeaprice tSeaprice);
+
+    /**
      * 计算海运费
      */
     public AjaxResult calculateOceanFreight(TSeaprice tSeaprice);

+ 25 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/quotation/service/impl/TSeapriceServiceImpl.java

@@ -71,6 +71,31 @@ public class TSeapriceServiceImpl implements ITSeapriceService
     }
 
     /**
+     * 查询海运报价列表信息
+     *
+     * @param tSeaprice 条件
+     * @return 结果
+     */
+    @Override
+    public List<Map<String, Object>> selectTSeapriceMapListApp(TSeaprice tSeaprice) {
+        List<Map<String, Object>> list =tSeapriceMapper.selectTSeapriceMapList(tSeaprice);
+        List<Map<String, Object>> result = new ArrayList<>();
+        //新增主表内带item逻辑
+        for (int i = 0; i < list.size(); i++) {
+            Map<String,Object> m = list.get(i);
+            //获取主表id
+            Long fId = Long.parseLong(String.valueOf(m.get("fId")));
+            //获取明细表数据,填充到主表map
+            TSeapriceitem tSeapriceitem = new TSeapriceitem();
+            tSeapriceitem.setfPid(fId);
+            tSeapriceitem.setfType("0");
+            m.put("seapriceItem", tSeapriceitemMapper.selectTSeapriceitemListApp(tSeapriceitem));
+            result.add(m);
+        }
+        return result;
+    }
+
+    /**
      * 查询海运价主
      * 
      * @param fId 海运价主ID

+ 93 - 47
ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml

@@ -5,45 +5,65 @@
 <mapper namespace="com.ruoyi.basicData.mapper.TWarehouseMapper">
 
     <resultMap type="TWarehouse" id="TWarehouseResult">
-        <result property="fId"    column="f_id"    />
+        <result property="fId" column="f_id"/>
         <result property="parentId" column="parent_id"/>
         <result property="ancestors" column="ancestors"/>
         <result property="orderNum" column="order_num"/>
-        <result property="fNo"    column="f_no"    />
-        <result property="fName"    column="f_name"    />
-        <result property="fAddr"    column="f_addr"    />
-        <result property="fTotalgross"    column="f_totalgross"    />
-        <result property="fContacts"    column="f_contacts"    />
-        <result property="fTel"    column="f_tel"    />
-        <result property="fCharg"    column="f_charg"    />
-        <result property="fStatus"    column="f_status"    />
-        <result property="delFlag"    column="del_flag"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="remark"    column="remark"    />
-        <result property="fLocation"    column="f_location"    />
-        <result property="fWarehouseInformation"    column="f_warehouse_information"    />
+        <result property="fNo" column="f_no"/>
+        <result property="fName" column="f_name"/>
+        <result property="fAddr" column="f_addr"/>
+        <result property="fTotalgross" column="f_totalgross"/>
+        <result property="fContacts" column="f_contacts"/>
+        <result property="fTel" column="f_tel"/>
+        <result property="fCharg" column="f_charg"/>
+        <result property="fStatus" column="f_status"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
+        <result property="fLocation" column="f_location"/>
+        <result property="fWarehouseInformation" column="f_warehouse_information"/>
     </resultMap>
 
     <sql id="selectTWarehouseVo">
-        select f_id, parent_id, ancestors,  order_num, f_no, f_name, f_addr, f_totalgross,f_contacts, f_tel, f_charg, f_status, del_flag, create_by, create_time, update_by, update_time, remark,f_location, f_warehouse_information from t_warehouse
+        select f_id,
+               parent_id,
+               ancestors,
+               order_num,
+               f_no,
+               f_name,
+               f_addr,
+               f_totalgross,
+               f_contacts,
+               f_tel,
+               f_charg,
+               f_status,
+               del_flag,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark,
+               f_location,
+               f_warehouse_information
+        from t_warehouse
     </sql>
 
     <select id="selectTWarehouseList" parameterType="TWarehouse" resultMap="TWarehouseResult">
         <include refid="selectTWarehouseVo"/>
         <where>
-            <if test="parentId != null  and parentId != ''"> and parent_id = #{parentId} </if>
-            <if test="ancestors != null  and ancestors != ''"> and ancestors like concat('%', #{ancestors}, '%')</if>
-            <if test="fNo != null  and fNo != ''"> and f_no like concat('%', #{fNo}, '%')</if>
-            <if test="fName != null  and fName != ''"> and f_name like concat('%', #{fName}, '%')</if>
-            <if test="fAddr != null  and fAddr != ''"> and f_addr like concat('%', #{fAddr}, '%')</if>
-            <if test="fTotalgross != null "> and f_totalgross like concat('%', #{fTotalgross}, '%')</if>
-            <if test="fContacts != null  and fContacts != ''"> and f_contacts = #{fContacts}</if>
-            <if test="fTel != null  and fTel != ''"> and f_tel = #{fTel}</if>
-            <if test="fCharg != null "> and f_charg = #{fCharg}</if>
-            <if test="fStatus != null  and fStatus != ''"> and f_status = #{fStatus}</if>
+            <if test="parentId != null  and parentId != ''">and parent_id = #{parentId}</if>
+            <if test="ancestors != null  and ancestors != ''">and ancestors like concat('%', #{ancestors}, '%')</if>
+            <if test="fNo != null  and fNo != ''">and f_no like concat('%', #{fNo}, '%')</if>
+            <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
+            <if test="fAddr != null  and fAddr != ''">and f_addr like concat('%', #{fAddr}, '%')</if>
+            <if test="fTotalgross != null ">and f_totalgross like concat('%', #{fTotalgross}, '%')</if>
+            <if test="fContacts != null  and fContacts != ''">and f_contacts = #{fContacts}</if>
+            <if test="fTel != null  and fTel != ''">and f_tel = #{fTel}</if>
+            <if test="fCharg != null ">and f_charg = #{fCharg}</if>
+            <if test="fStatus != null  and fStatus != ''">and f_status = #{fStatus}</if>
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
@@ -135,7 +155,9 @@
     </update>
 
     <delete id="deleteTWarehouseById" parameterType="Long">
-        delete from t_warehouse where f_id = #{fId}
+        delete
+        from t_warehouse
+        where f_id = #{fId}
     </delete>
 
     <delete id="deleteTWarehouseByIds" parameterType="String">
@@ -146,26 +168,44 @@
     </delete>
 
     <select id="checkFNoUnique" parameterType="String" resultMap="TWarehouseResult">
-	    select f_id,f_no from t_warehouse where f_no = #{fNo} limit 1
+        select f_id, f_no
+        from t_warehouse
+        where f_no = #{fNo}
+        limit 1
     </select>
 
     <select id="checkUFNnameUnique" parameterType="String" resultMap="TWarehouseResult">
-        select f_id,f_name from t_warehouse where f_name = #{fAame} limit 1
+        select f_id, f_name
+        from t_warehouse
+        where f_name = #{fAame}
+        limit 1
     </select>
 
     <select id="checkUFAaddrUnique" parameterType="String" resultMap="TWarehouseResult">
-        select f_id,f_addr from t_warehouse where f_addr = #{fAddr} limit 1
+        select f_id, f_addr
+        from t_warehouse
+        where f_addr = #{fAddr}
+        limit 1
     </select>
 
     <select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
-        select count(*) from t_warehouse where f_status = 0 and del_flag = '0' and find_in_set(#{fId}, ancestors)
+        select count(*)
+        from t_warehouse
+        where f_status = 0
+          and del_flag = '0'
+          and find_in_set(#{fId}, ancestors)
     </select>
 
     <select id="selectChildrenDeptById" parameterType="Long" resultMap="TWarehouseResult">
-        select * from t_warehouse where find_in_set(#{fId}, ancestors)
+        select *
+        from t_warehouse
+        where find_in_set(#{fId}, ancestors)
     </select>
     <select id="selectTWarehousById" resultMap="TWarehouseResult">
-        select f_id  from t_warehouse  where parent_id = #{fId} limit 1
+        select f_id
+        from t_warehouse
+        where parent_id = #{fId}
+        limit 1
     </select>
 
     <update id="updateDeptChildren" parameterType="java.util.List">
@@ -193,19 +233,16 @@
     <update id="updatefTotalgross">
         update t_warehouse
         <set>
-            <if test="fTotalgross != null and fTotalgross != ''">f_totalgross =  #{fTotalgross},</if>
+            <if test="fTotalgross != null and fTotalgross != ''">f_totalgross = #{fTotalgross},</if>
             update_time = sysdate()
         </set>
-        where f_id =  #{fId}
+        where f_id = #{fId}
     </update>
 
     <select id="selectTWarehouseFTotalgross" resultType="java.math.BigDecimal">
-        SELECT
-            sum( f_totalgross ) AS fTotalgross
-        FROM
-            t_warehouse
-        WHERE
-            ancestors LIKE  concat('%',#{fId}, '%')
+        SELECT sum(f_totalgross) AS fTotalgross
+        FROM t_warehouse
+        WHERE ancestors LIKE concat('%', #{fId}, '%')
     </select>
 
     <select id="checkDeptNameUnique" resultMap="TWarehouseResult">
@@ -213,13 +250,22 @@
         where f_name=#{fName} and parent_id = #{parentId} limit 1
     </select>
     <select id="hasChildByfId" parameterType="Long" resultType="int">
-        select count(1) from t_warehouse
-        where del_flag = '0' and parent_id = #{fId} limit 1
+        select count(1)
+        from t_warehouse
+        where del_flag = '0'
+          and parent_id = #{fId}
+        limit 1
     </select>
     <select id="checkDeptExistarehouse" parameterType="Long" resultType="int">
-        select count(1) from t_warehousebills where f_warehouseid = #{fId} and del_flag = '0'
+        select count(1)
+        from t_warehousebills
+        where f_warehouseid = #{fId}
+          and del_flag = '0'
     </select>
     <select id="checkDeptExistWarehouseItems" parameterType="Long" resultType="int">
-        select count(1) from t_warehousebillsitems where f_warehouselocid = #{fId} and del_flag = '0'
+        select count(1)
+        from t_warehousebillsitems
+        where f_warehouselocid = #{fId}
+          and del_flag = '0'
     </select>
 </mapper>

+ 88 - 44
ruoyi-warehouse/src/main/resources/mapper/quotation/TSeapriceitemMapper.xml

@@ -1,58 +1,98 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.quotation.mapper.TSeapriceitemMapper">
-    
+
     <resultMap type="TSeapriceitem" id="TSeapriceitemResult">
-        <result property="fId"    column="f_id"    />
-        <result property="fPid"    column="f_pid"    />
-        <result property="fFeeid"    column="f_feeid"    />
-        <result property="fSpecification1"    column="f_specification1"    />
-        <result property="fSpecification2"    column="f_specification2"    />
-        <result property="fSpecification3"    column="f_specification3"    />
-        <result property="fSpecification4"    column="f_specification4"    />
-        <result property="fSpecification5"    column="f_specification5"    />
-        <result property="fSpecification6"    column="f_specification6"    />
-        <result property="fExrate"    column="f_exrate"    />
-        <result property="fUnitprice"    column="f_unitprice"    />
-        <result property="fType"    column="f_type"    />
-        <result property="fBillstatus"    column="f_billstatus"    />
-        <result property="delFlag"    column="del_flag"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="remark"    column="remark"    />
+        <result property="fId" column="f_id"/>
+        <result property="fPid" column="f_pid"/>
+        <result property="fFeeid" column="f_feeid"/>
+        <result property="fSpecification1" column="f_specification1"/>
+        <result property="fSpecification2" column="f_specification2"/>
+        <result property="fSpecification3" column="f_specification3"/>
+        <result property="fSpecification4" column="f_specification4"/>
+        <result property="fSpecification5" column="f_specification5"/>
+        <result property="fSpecification6" column="f_specification6"/>
+        <result property="fExrate" column="f_exrate"/>
+        <result property="fUnitprice" column="f_unitprice"/>
+        <result property="fType" column="f_type"/>
+        <result property="fBillstatus" column="f_billstatus"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
     </resultMap>
 
     <sql id="selectTSeapriceitemVo">
-        select f_id, f_pid, f_feeid, f_specification1, f_specification2, f_specification3, f_specification4, f_specification5, f_specification6, f_exrate, f_unitprice, f_type, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark from t_seapriceitem
+        select s.f_id,
+               s.f_pid,
+               s.f_feeid,
+               s.f_specification1,
+               s.f_specification2,
+               s.f_specification3,
+               s.f_specification4,
+               s.f_specification5,
+               s.f_specification6,
+               s.f_exrate,
+               s.f_unitprice,
+               s.f_type,
+               s.f_billstatus,
+               s.del_flag,
+               s.create_by,
+               s.create_time,
+               s.update_by,
+               s.update_time,
+               s.remark,
+               f.f_name
+        from t_seapriceitem s
+left join t_fees f on s.f_feeid = f.f_id
     </sql>
 
     <select id="selectTSeapriceitemList" parameterType="TSeapriceitem" resultMap="TSeapriceitemResult">
         <include refid="selectTSeapriceitemVo"/>
-        <where>  
-            <if test="fPid != null "> and f_pid = #{fPid}</if>
-            <if test="fFeeid != null "> and f_feeid = #{fFeeid}</if>
-            <if test="fSpecification1 != null "> and f_specification1 = #{fSpecification1}</if>
-            <if test="fSpecification2 != null "> and f_specification2 = #{fSpecification2}</if>
-            <if test="fSpecification3 != null "> and f_specification3 = #{fSpecification3}</if>
-            <if test="fSpecification4 != null "> and f_specification4 = #{fSpecification4}</if>
-            <if test="fSpecification5 != null "> and f_specification5 = #{fSpecification5}</if>
-            <if test="fSpecification6 != null "> and f_specification6 = #{fSpecification6}</if>
-            <if test="fExrate != null "> and f_exrate = #{fExrate}</if>
-            <if test="fUnitprice != null "> and f_unitprice = #{fUnitprice}</if>
-            <if test="fType != null  and fType != ''"> and f_type = #{fType}</if>
-            <if test="fBillstatus != null "> and f_billstatus = #{fBillstatus}</if>
+        <where>
+            <if test="fPid != null ">and s.f_pid = #{fPid}</if>
+            <if test="fFeeid != null ">and s.f_feeid = #{fFeeid}</if>
+            <if test="fSpecification1 != null ">and s.f_specification1 = #{fSpecification1}</if>
+            <if test="fSpecification2 != null ">and s.f_specification2 = #{fSpecification2}</if>
+            <if test="fSpecification3 != null ">and s.f_specification3 = #{fSpecification3}</if>
+            <if test="fSpecification4 != null ">and s.f_specification4 = #{fSpecification4}</if>
+            <if test="fSpecification5 != null ">and s.f_specification5 = #{fSpecification5}</if>
+            <if test="fSpecification6 != null ">and s.f_specification6 = #{fSpecification6}</if>
+            <if test="fExrate != null ">and s.f_exrate = #{fExrate}</if>
+            <if test="fUnitprice != null ">and s.f_unitprice = #{fUnitprice}</if>
+            <if test="fType != null  and fType != ''">and s.f_type = #{fType}</if>
+            <if test="fBillstatus != null ">and s.f_billstatus = #{fBillstatus}</if>
+        </where>
+    </select>
+
+    <select id="selectTSeapriceitemListApp" parameterType="TSeapriceitem" resultMap="TSeapriceitemResult">
+        <include refid="selectTSeapriceitemVo"/>
+        <where>
+            <if test="fPid != null ">and s.f_pid = #{fPid}</if>
+            <if test="fFeeid != null ">and s.f_feeid = #{fFeeid}</if>
+            <if test="fSpecification1 != null ">and s.f_specification1 = #{fSpecification1}</if>
+            <if test="fSpecification2 != null ">and s.f_specification2 = #{fSpecification2}</if>
+            <if test="fSpecification3 != null ">and s.f_specification3 = #{fSpecification3}</if>
+            <if test="fSpecification4 != null ">and s.f_specification4 = #{fSpecification4}</if>
+            <if test="fSpecification5 != null ">and s.f_specification5 = #{fSpecification5}</if>
+            <if test="fSpecification6 != null ">and s.f_specification6 = #{fSpecification6}</if>
+            <if test="fExrate != null ">and s.f_exrate = #{fExrate}</if>
+            <if test="fUnitprice != null ">and s.f_unitprice = #{fUnitprice}</if>
+            <if test="fType != null  and fType != ''">and s.f_type = #{fType}</if>
+            <if test="fBillstatus != null ">and s.f_billstatus = #{fBillstatus}</if>
+            and f.f_name = '海运费'
         </where>
     </select>
-    
+
     <select id="selectTSeapriceitemById" parameterType="Long" resultMap="TSeapriceitemResult">
         <include refid="selectTSeapriceitemVo"/>
-        where f_id = #{fId}
+        where s.f_id = #{fId}
     </select>
-        
+
     <insert id="insertTSeapriceitem" parameterType="TSeapriceitem" useGeneratedKeys="true" keyProperty="fId">
         insert into t_seapriceitem
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -74,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fPid != null">#{fPid},</if>
             <if test="fFeeid != null">#{fFeeid},</if>
@@ -94,7 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateTSeapriceitem" parameterType="TSeapriceitem">
@@ -123,18 +163,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <delete id="deleteTSeapriceitemById" parameterType="Long">
-        delete from t_seapriceitem where f_id = #{fId}
+        delete
+        from t_seapriceitem
+        where f_id = #{fId}
     </delete>
 
     <delete id="deleteTSeapriceitemByIds" parameterType="String">
-        delete from t_seapriceitem where f_id in 
+        delete from t_seapriceitem where f_id in
         <foreach item="fId" collection="array" open="(" separator="," close=")">
             #{fId}
         </foreach>
     </delete>
 
     <delete id="deleteTSeapriceitemByfPid" parameterType="Long">
-        delete from t_seapriceitem where f_pid = #{fPid}
+        delete
+        from t_seapriceitem
+        where f_pid = #{fPid}
     </delete>
 
 </mapper>