|  | @@ -1660,29 +1660,29 @@
 | 
											
												
													
														|  |          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_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 = '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 = '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 = '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_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 = '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 = '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 = '5' and tw.f_delete_status = '2' THEN
 | 
											
												
													
														|  | -        '修改提交审批中'
 |  | 
 | 
											
												
													
														|  | 
 |  | +        '提交变更审批中'
 | 
											
												
													
														|  |          WHEN  tw.f_submit_update = '6' 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 = '3' THEN
 | 
											
												
													
														|  | -        '运单删除驳回'
 |  | 
 | 
											
												
													
														|  | 
 |  | +        '申请删单驳回'
 | 
											
												
													
														|  |          WHEN  tw.f_delete_status = '4' THEN
 |  |          WHEN  tw.f_delete_status = '4' THEN
 | 
											
												
													
														|  | -        '运单删除提交'
 |  | 
 | 
											
												
													
														|  | 
 |  | +        '申请删单提交'
 | 
											
												
													
														|  |          WHEN  tw.f_delete_status = '5' THEN
 |  |          WHEN  tw.f_delete_status = '5' THEN
 | 
											
												
													
														|  | -        '运单删除审批中'
 |  | 
 | 
											
												
													
														|  | 
 |  | +        '申请删单审批中'
 | 
											
												
													
														|  |          WHEN  tw.f_delete_status = '6' THEN
 |  |          WHEN  tw.f_delete_status = '6' THEN
 | 
											
												
													
														|  | -        '运单删除通过'
 |  | 
 | 
											
												
													
														|  | 
 |  | +        '申请删单通过'
 | 
											
												
													
														|  |          END AS fBillstatus,
 |  |          END AS fBillstatus,
 | 
											
												
													
														|  |          CASE
 |  |          CASE
 | 
											
												
													
														|  |          WHEN tf.f_billstatus = '1' THEN
 |  |          WHEN tf.f_billstatus = '1' THEN
 | 
											
										
											
												
													
														|  | @@ -1768,7 +1768,28 @@
 | 
											
												
													
														|  |              <if test="fIfdamage != null  and fIfdamage != ''">and tw.f_ifdamage = #{fIfdamage}</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="fBankcorpid != null  and fBankcorpid != ''">and tw.f_bankcorpid = #{fBankcorpid}</if>
 | 
											
												
													
														|  |              <if test="fBilltype != null  and fBilltype != ''">and tw.f_billtype = #{fBilltype}</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="fBillstatus == null">
 | 
											
												
													
														|  | 
 |  | +                and tw.f_updete_status = 2
 | 
											
												
													
														|  | 
 |  | +                and tw.f_submit_update = 2
 | 
											
												
													
														|  | 
 |  | +                and tw.f_delete_status = 2
 | 
											
												
													
														|  | 
 |  | +            </if>
 | 
											
												
													
														|  | 
 |  | +            <if test="fBillstatus != null and (fBillstatus == 4 or fBillstatus == 6 or fBillstatus == 9 or fBillstatus == 11)">
 | 
											
												
													
														|  | 
 |  | +                and tw.f_billstatus = #{fBillstatus}
 | 
											
												
													
														|  | 
 |  | +                and tw.f_updete_status = 2
 | 
											
												
													
														|  | 
 |  | +                and tw.f_submit_update = 2
 | 
											
												
													
														|  | 
 |  | +                and tw.f_delete_status = 2
 | 
											
												
													
														|  | 
 |  | +            </if>
 | 
											
												
													
														|  | 
 |  | +            <if test="fBillstatus != null and fBillstatus == 10">
 | 
											
												
													
														|  | 
 |  | +                and tw.f_billstatus in ('3','8')
 | 
											
												
													
														|  | 
 |  | +                and tw.f_updete_status in ('2','3')
 | 
											
												
													
														|  | 
 |  | +                and tw.f_submit_update in ('2','3')
 | 
											
												
													
														|  | 
 |  | +                and tw.f_delete_status in ('2','3')
 | 
											
												
													
														|  | 
 |  | +            </if>
 | 
											
												
													
														|  | 
 |  | +            <if test="fBillstatus != null and fBillstatus == 12">
 | 
											
												
													
														|  | 
 |  | +                AND (tw.f_updete_status != 2
 | 
											
												
													
														|  | 
 |  | +                OR tw.f_submit_update != 2
 | 
											
												
													
														|  | 
 |  | +                OR tw.f_delete_status != 2 )
 | 
											
												
													
														|  | 
 |  | +            </if>
 | 
											
												
													
														|  |              <if test="fItemsStatus != null ">and tw.f_items_status = #{fItemsStatus}</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="fBillingDeadline != null ">and tw.f_billing_deadline = #{fBillingDeadline}</if>
 | 
											
												
													
														|  |              <if test="fProductName != null  and fProductName != ''">and tw.f_product_name like concat('%',
 |  |              <if test="fProductName != null  and fProductName != ''">and tw.f_product_name like concat('%',
 | 
											
										
											
												
													
														|  | @@ -1892,29 +1913,29 @@
 | 
											
												
													
														|  |          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_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 = '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 = '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 = '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_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 = '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 = '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 = '5' and tw.f_delete_status = '2' THEN
 | 
											
												
													
														|  | -        '修改提交审批中'
 |  | 
 | 
											
												
													
														|  | 
 |  | +        '提交变更审批中'
 | 
											
												
													
														|  |          WHEN  tw.f_submit_update = '6' 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 = '3' THEN
 | 
											
												
													
														|  | -        '运单删除驳回'
 |  | 
 | 
											
												
													
														|  | 
 |  | +        '申请删单驳回'
 | 
											
												
													
														|  |          WHEN  tw.f_delete_status = '4' THEN
 |  |          WHEN  tw.f_delete_status = '4' THEN
 | 
											
												
													
														|  | -        '运单删除提交'
 |  | 
 | 
											
												
													
														|  | 
 |  | +        '申请删单提交'
 | 
											
												
													
														|  |          WHEN  tw.f_delete_status = '5' THEN
 |  |          WHEN  tw.f_delete_status = '5' THEN
 | 
											
												
													
														|  | -        '运单删除审批中'
 |  | 
 | 
											
												
													
														|  | 
 |  | +        '申请删单审批中'
 | 
											
												
													
														|  |          WHEN  tw.f_delete_status = '6' THEN
 |  |          WHEN  tw.f_delete_status = '6' THEN
 | 
											
												
													
														|  | -        '运单删除通过'
 |  | 
 | 
											
												
													
														|  | 
 |  | +        '申请删单通过'
 | 
											
												
													
														|  |          END AS fBillstatusName,
 |  |          END AS fBillstatusName,
 | 
											
												
													
														|  |          CASE
 |  |          CASE
 | 
											
												
													
														|  |          WHEN tf.f_billstatus = '1' THEN
 |  |          WHEN tf.f_billstatus = '1' THEN
 | 
											
										
											
												
													
														|  | @@ -2000,7 +2021,28 @@
 | 
											
												
													
														|  |              <if test="fIfdamage != null  and fIfdamage != ''">and tw.f_ifdamage = #{fIfdamage}</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="fBankcorpid != null  and fBankcorpid != ''">and tw.f_bankcorpid = #{fBankcorpid}</if>
 | 
											
												
													
														|  |              <if test="fBilltype != null  and fBilltype != ''">and tw.f_billtype = #{fBilltype}</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="fBillstatus == null">
 | 
											
												
													
														|  | 
 |  | +            and tw.f_updete_status = 2
 | 
											
												
													
														|  | 
 |  | +            and tw.f_submit_update = 2
 | 
											
												
													
														|  | 
 |  | +            and tw.f_delete_status = 2
 | 
											
												
													
														|  | 
 |  | +            </if>
 | 
											
												
													
														|  | 
 |  | +            <if test="fBillstatus != null and (fBillstatus == 4 or fBillstatus == 6 or fBillstatus == 9 or fBillstatus == 11)">
 | 
											
												
													
														|  | 
 |  | +                and tw.f_billstatus = #{fBillstatus}
 | 
											
												
													
														|  | 
 |  | +                and tw.f_updete_status = 2
 | 
											
												
													
														|  | 
 |  | +                and tw.f_submit_update = 2
 | 
											
												
													
														|  | 
 |  | +                and tw.f_delete_status = 2
 | 
											
												
													
														|  | 
 |  | +            </if>
 | 
											
												
													
														|  | 
 |  | +            <if test="fBillstatus != null and fBillstatus == 10">
 | 
											
												
													
														|  | 
 |  | +                and tw.f_billstatus in ('3','8')
 | 
											
												
													
														|  | 
 |  | +                and tw.f_updete_status in ('2','3')
 | 
											
												
													
														|  | 
 |  | +                and tw.f_submit_update in ('2','3')
 | 
											
												
													
														|  | 
 |  | +                and tw.f_delete_status in ('2','3')
 | 
											
												
													
														|  | 
 |  | +            </if>
 | 
											
												
													
														|  | 
 |  | +            <if test="fBillstatus != null and fBillstatus == 12">
 | 
											
												
													
														|  | 
 |  | +                AND (tw.f_updete_status != 2
 | 
											
												
													
														|  | 
 |  | +                OR tw.f_submit_update != 2
 | 
											
												
													
														|  | 
 |  | +                OR tw.f_delete_status != 2 )
 | 
											
												
													
														|  | 
 |  | +            </if>
 | 
											
												
													
														|  |              <if test="fItemsStatus != null ">and tw.f_items_status = #{fItemsStatus}</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="fBillingDeadline != null ">and tw.f_billing_deadline = #{fBillingDeadline}</if>
 | 
											
												
													
														|  |              <if test="fProductName != null  and fProductName != ''">and tw.f_product_name like concat('%',
 |  |              <if test="fProductName != null  and fProductName != ''">and tw.f_product_name like concat('%',
 | 
											
										
											
												
													
														|  | @@ -2222,7 +2264,8 @@
 | 
											
												
													
														|  |              w.f_planvolumn fPlanvolumn,
 |  |              w.f_planvolumn fPlanvolumn,
 | 
											
												
													
														|  |              w.f_plannetweight fPlannetweight,
 |  |              w.f_plannetweight fPlannetweight,
 | 
											
												
													
														|  |              w.f_plangrossweight fPlangrossweight,
 |  |              w.f_plangrossweight fPlangrossweight,
 | 
											
												
													
														|  | -            w.f_grossweight fGrossweight,
 |  | 
 | 
											
												
													
														|  | 
 |  | +            IFNULL(ROUND(w.f_grossweight/1000.3465,2),0) fGrossweight,
 | 
											
												
													
														|  | 
 |  | +            w.f_grossweight fGrossweights,
 | 
											
												
													
														|  |              w.f_storekeeper fStorekeeper,
 |  |              w.f_storekeeper fStorekeeper,
 | 
											
												
													
														|  |              w.create_by createBy,
 |  |              w.create_by createBy,
 | 
											
												
													
														|  |              w.f_warehouseid fWarehouseid,
 |  |              w.f_warehouseid fWarehouseid,
 | 
											
										
											
												
													
														|  | @@ -2317,7 +2360,8 @@
 | 
											
												
													
														|  |              cntr.f_name cntrtypes,
 |  |              cntr.f_name cntrtypes,
 | 
											
												
													
														|  |              t.f_cntrtype fCntrtype,
 |  |              t.f_cntrtype fCntrtype,
 | 
											
												
													
														|  |              t.f_qty fQty,
 |  |              t.f_qty fQty,
 | 
											
												
													
														|  | -            t.f_grossweight fGrossweight,
 |  | 
 | 
											
												
													
														|  | 
 |  | +            IFNULL(ROUND(w.f_grossweight/1000.3465,2),0) fGrossweight,
 | 
											
												
													
														|  | 
 |  | +            t.f_grossweight fGrossweights,
 | 
											
												
													
														|  |              t.f_cntqty fCntqty,
 |  |              t.f_cntqty fCntqty,
 | 
											
												
													
														|  |          CASE
 |  |          CASE
 | 
											
												
													
														|  |  		    WHEN t.f_billstatus = '10' THEN
 |  |  		    WHEN t.f_billstatus = '10' THEN
 |