|
|
@@ -22,16 +22,65 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
<result property="createBy" column="create_by" />
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
+
|
|
|
+
|
|
|
+ <result property="orderType" column="order_type" />
|
|
|
+ <result property="senderCity" column="sender_city" />
|
|
|
+ <result property="receiverCity" column="receiver_city" />
|
|
|
+ <result property="signTime" column="sign_time" />
|
|
|
+ <result property="goodsWeight" column="goods_weight" />
|
|
|
+ <result property="productCode" column="product_code" />
|
|
|
+ <result property="userName" column="user_name" />
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectBizWaybillCostDetailsVo">
|
|
|
- select waybill_detail_id, waybill_id, external_waybill_no, fee_item_code, fee_item_name, fee_name, amount, rate_amount, adjust_amount, remark, create_time, update_time, dept_id, user_id, del_flag, create_by, update_by from biz_waybill_cost_details
|
|
|
- </sql>
|
|
|
+ SELECT
|
|
|
+ a.waybill_detail_id,
|
|
|
+ b.sign_time,
|
|
|
+ b.external_waybill_no,
|
|
|
+ b.sender_city,
|
|
|
+ b.receiver_city,
|
|
|
+ b.goods_weight,
|
|
|
+ b.order_type,
|
|
|
+ b.product_code,
|
|
|
+ u.nick_name,
|
|
|
+ a.waybill_id,
|
|
|
+ a.external_waybill_no,
|
|
|
+ a.fee_item_code,
|
|
|
+ a.fee_item_name,
|
|
|
+ ifnull( a.adjust_amount, a.rate_amount ) rate_amount,
|
|
|
+ a.adjust_amount,
|
|
|
+ a.remark,
|
|
|
+ a.create_time,
|
|
|
+ a.update_time,
|
|
|
+ a.dept_id,
|
|
|
+ a.del_flag,
|
|
|
+ a.create_by,
|
|
|
+ a.update_by
|
|
|
+ FROM
|
|
|
+ biz_waybill_cost_details a
|
|
|
+ LEFT JOIN biz_waybill_order b ON a.waybill_id = b.waybill_id
|
|
|
+ LEFT JOIN sys_user u ON b.user_id = u.user_id
|
|
|
+ LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
|
|
+ </sql>
|
|
|
|
|
|
<select id="selectBizWaybillCostDetailsList" parameterType="com.ruoyi.logistics.domain.BizWaybillCostDetails" resultMap="BizWaybillCostDetailsResult">
|
|
|
<include refid="selectBizWaybillCostDetailsVo"/>
|
|
|
- <where>
|
|
|
- <if test="waybillId != null "> and waybill_id = #{waybillId}</if>
|
|
|
+ <where>
|
|
|
+ b.order_status = 6
|
|
|
+ <if test="monthCode != null "> AND DATE_FORMAT( b.sign_time, '%Y.%m' ) = #{monthCode}</if>
|
|
|
+ <if test="deptId != null "> AND a.dept_id = #{deptId}</if>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScope}
|
|
|
+
|
|
|
+ <!-- <if test="waybillId != null "> and waybill_id = #{waybillId}</if>
|
|
|
<if test="externalWaybillNo != null and externalWaybillNo != ''"> and external_waybill_no = #{externalWaybillNo}</if>
|
|
|
<if test="feeItemCode != null and feeItemCode != ''"> and fee_item_code = #{feeItemCode}</if>
|
|
|
<if test="feeItemName != null and feeItemName != ''"> and fee_item_name like concat('%', #{feeItemName}, '%')</if>
|
|
|
@@ -40,13 +89,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="rateAmount != null "> and rate_amount = #{rateAmount}</if>
|
|
|
<if test="adjustAmount != null "> and adjust_amount = #{adjustAmount}</if>
|
|
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
- <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>-->
|
|
|
</where>
|
|
|
</select>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <select id="selectBizWaybillCostDetailsListByWx" parameterType="com.ruoyi.logistics.domain.BizWaybillCostDetails" resultMap="BizWaybillCostDetailsResult">
|
|
|
+ select waybill_detail_id, waybill_id, external_waybill_no, fee_item_code, fee_item_name, fee_name, amount, rate_amount, adjust_amount, remark, create_time, update_time, dept_id, user_id, del_flag, create_by, update_by from biz_waybill_cost_details
|
|
|
+
|
|
|
+ <where>
|
|
|
+
|
|
|
+ <if test="waybillId != null "> and waybill_id = #{waybillId}</if>
|
|
|
+ <!-- <if test="externalWaybillNo != null and externalWaybillNo != ''"> and external_waybill_no = #{externalWaybillNo}</if>
|
|
|
+ <if test="feeItemCode != null and feeItemCode != ''"> and fee_item_code = #{feeItemCode}</if>
|
|
|
+ <if test="feeItemName != null and feeItemName != ''"> and fee_item_name like concat('%', #{feeItemName}, '%')</if>
|
|
|
+ <if test="feeName != null and feeName != ''"> and fee_name like concat('%', #{feeName}, '%')</if>
|
|
|
+ <if test="amount != null "> and amount = #{amount}</if>
|
|
|
+ <if test="rateAmount != null "> and rate_amount = #{rateAmount}</if>
|
|
|
+ <if test="adjustAmount != null "> and adjust_amount = #{adjustAmount}</if>
|
|
|
+ <if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>-->
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
|
|
|
<select id="selectBizWaybillCostDetailsByWaybillDetailId" parameterType="Long" resultMap="BizWaybillCostDetailsResult">
|
|
|
<include refid="selectBizWaybillCostDetailsVo"/>
|
|
|
- where waybill_detail_id = #{waybillDetailId}
|
|
|
+ where a.waybill_detail_id = #{waybillDetailId}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertBizWaybillCostDetails" parameterType="com.ruoyi.logistics.domain.BizWaybillCostDetails" useGeneratedKeys="true" keyProperty="waybillDetailId">
|