|
@@ -405,89 +405,89 @@
|
|
|
<if test="fNewTrademodeid != null ">and bill.f_new_trademodeid = #{fNewTrademodeid}</if>
|
|
|
</where>
|
|
|
${params.dataScope}
|
|
|
- ORDER BY bill.f_id DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus
|
|
|
+ ORDER BY bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus
|
|
|
</select>
|
|
|
|
|
|
<select id="selectWarehouseBusinessList1" parameterType="TWarehousebills" resultType="Map">
|
|
|
SELECT
|
|
|
- DISTINCT
|
|
|
- bill.f_id AS fId,
|
|
|
- corp.f_name AS fCorpid,
|
|
|
- corpTo.f_name AS fTocorpid,
|
|
|
- bill.f_mblno AS fMblno,
|
|
|
- corpSub.f_name AS fSbu,
|
|
|
- bill.f_marks AS fMarks,
|
|
|
- bill.remark AS remark,
|
|
|
- bill.f_planqty AS fPlanqty,
|
|
|
- bill.f_plangrossweight AS fPlangrossweight,
|
|
|
- bill.f_plannetweight AS fPlannetweight,
|
|
|
- bill.f_planvolumn AS fPlanvolumn,
|
|
|
- bill.f_bsdate AS fBsdate,
|
|
|
- dict.dict_label AS fTrademodeid,
|
|
|
- bill.f_truckno AS fTruckno,
|
|
|
- bill.f_driver_name AS fDriverName,
|
|
|
- bill.f_driver_tel AS fDriverTel,
|
|
|
- bill.f_driver_id_car AS fDriverIdCar,
|
|
|
- ware.f_name AS fWarehouseid,
|
|
|
- bill.f_qty AS fQty,
|
|
|
- bill.f_cntval AS fCntval,
|
|
|
- bill.f_chargetype AS fChargetype,
|
|
|
- bill.f_netweight AS fNetweight,
|
|
|
- bill.create_time AS createTime,
|
|
|
- ware1.f_name AS fInwarehouseid,
|
|
|
- bill.create_by AS createBy,
|
|
|
- bill.f_grossweight AS fGrossweight,
|
|
|
- bill.f_product_name AS fProductName,
|
|
|
- bill.f_billing_deadline AS fBillingDeadline,
|
|
|
- bill.free_container_date AS freeContainerDate,
|
|
|
- CASE
|
|
|
- WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '1' THEN '录入'
|
|
|
- WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '2' THEN '暂存'
|
|
|
- WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '3' THEN '驳回'
|
|
|
- WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '4' THEN '请核'
|
|
|
- WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '5' THEN '审核中'
|
|
|
- WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '6' THEN '全部入账'
|
|
|
- WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '1' THEN '新建'
|
|
|
- WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '2' THEN '暂存'
|
|
|
- WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '3' THEN '审核驳回'
|
|
|
- WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '4' THEN '提交审核'
|
|
|
- WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '5' THEN '审核中'
|
|
|
- WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '6' THEN '审核通过'
|
|
|
- END
|
|
|
- AS fBillstatus,
|
|
|
- CASE
|
|
|
- WHEN bill.f_billtype = 'HQZY'
|
|
|
- AND bill.f_items_status = '1' THEN
|
|
|
- '计划'
|
|
|
- WHEN bill.f_billtype = 'HQZY'
|
|
|
- AND bill.f_items_status = '2' THEN
|
|
|
- '待货转'
|
|
|
- WHEN bill.f_billtype = 'HQZY'
|
|
|
- AND bill.f_items_status = '3' THEN
|
|
|
- '货转中'
|
|
|
- WHEN bill.f_billtype = 'HQZY'
|
|
|
- AND bill.f_items_status = '4' THEN
|
|
|
- '已货转'
|
|
|
- END
|
|
|
- AS fItemsStatus,
|
|
|
- bill.f_billno AS fBillno,
|
|
|
- g.f_name AS fGoodsid,
|
|
|
- bill.f_storekeeper AS fStorekeeper,
|
|
|
- bill.f_remarks_fees AS fRemarksFees
|
|
|
+ DISTINCT
|
|
|
+ bill.f_id AS fId,
|
|
|
+ corp.f_name AS fCorpid,
|
|
|
+ corpTo.f_name AS fTocorpid,
|
|
|
+ bill.f_mblno AS fMblno,
|
|
|
+ corpSub.f_name AS fSbu,
|
|
|
+ bill.f_marks AS fMarks,
|
|
|
+ bill.remark AS remark,
|
|
|
+ bill.f_planqty AS fPlanqty,
|
|
|
+ bill.f_plangrossweight AS fPlangrossweight,
|
|
|
+ bill.f_plannetweight AS fPlannetweight,
|
|
|
+ bill.f_planvolumn AS fPlanvolumn,
|
|
|
+ bill.f_bsdate AS fBsdate,
|
|
|
+ dict.dict_label AS fTrademodeid,
|
|
|
+ bill.f_truckno AS fTruckno,
|
|
|
+ bill.f_driver_name AS fDriverName,
|
|
|
+ bill.f_driver_tel AS fDriverTel,
|
|
|
+ bill.f_driver_id_car AS fDriverIdCar,
|
|
|
+ ware.f_name AS fWarehouseid,
|
|
|
+ bill.f_qty AS fQty,
|
|
|
+ bill.f_cntval AS fCntval,
|
|
|
+ bill.f_chargetype AS fChargetype,
|
|
|
+ bill.f_netweight AS fNetweight,
|
|
|
+ bill.create_time AS createTime,
|
|
|
+ ware1.f_name AS fInwarehouseid,
|
|
|
+ bill.create_by AS createBy,
|
|
|
+ bill.f_grossweight AS fGrossweight,
|
|
|
+ bill.f_product_name AS fProductName,
|
|
|
+ bill.f_billing_deadline AS fBillingDeadline,
|
|
|
+ bill.free_container_date AS freeContainerDate,
|
|
|
+ CASE
|
|
|
+ WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '1' THEN '录入'
|
|
|
+ WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '2' THEN '暂存'
|
|
|
+ WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '3' THEN '驳回'
|
|
|
+ WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '4' THEN '请核'
|
|
|
+ WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '5' THEN '审核中'
|
|
|
+ WHEN bill.f_billtype = 'HQZY' AND bill.f_billstatus = '6' THEN '全部入账'
|
|
|
+ WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '1' THEN '新建'
|
|
|
+ WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '2' THEN '暂存'
|
|
|
+ WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '3' THEN '审核驳回'
|
|
|
+ WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '4' THEN '提交审核'
|
|
|
+ WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '5' THEN '审核中'
|
|
|
+ WHEN bill.f_billtype = 'JSCCF' AND bill.f_billstatus = '6' THEN '审核通过'
|
|
|
+ END
|
|
|
+ AS fBillstatus,
|
|
|
+ CASE
|
|
|
+ WHEN bill.f_billtype = 'HQZY'
|
|
|
+ AND bill.f_items_status = '1' THEN
|
|
|
+ '计划'
|
|
|
+ WHEN bill.f_billtype = 'HQZY'
|
|
|
+ AND bill.f_items_status = '2' THEN
|
|
|
+ '待货转'
|
|
|
+ WHEN bill.f_billtype = 'HQZY'
|
|
|
+ AND bill.f_items_status = '3' THEN
|
|
|
+ '货转中'
|
|
|
+ WHEN bill.f_billtype = 'HQZY'
|
|
|
+ AND bill.f_items_status = '4' THEN
|
|
|
+ '已货转'
|
|
|
+ END
|
|
|
+ AS fItemsStatus,
|
|
|
+ bill.f_billno AS fBillno,
|
|
|
+ g.f_name AS fGoodsid,
|
|
|
+ bill.f_storekeeper AS fStorekeeper,
|
|
|
+ bill.f_remarks_fees AS fRemarksFees
|
|
|
FROM
|
|
|
- t_warehousebills bill
|
|
|
- LEFT JOIN t_goods g ON g.f_id = bill.f_goodsid
|
|
|
- left join sys_user u on bill.create_by = u.user_name
|
|
|
- left join sys_user u1 on bill.f_storekeeper = u1.user_name
|
|
|
- left join sys_dept d on bill.f_bsdeptid = d.dept_id
|
|
|
- LEFT JOIN t_corps corp ON corp.f_id = bill.f_corpid
|
|
|
- LEFT JOIN t_corps corpTo ON corpTo.f_id = bill.f_tocorpid
|
|
|
- LEFT JOIN t_corps corpSub ON corpSub.f_id = bill.f_sbu
|
|
|
- LEFT JOIN t_warehouse ware ON ware.f_id = bill.f_warehouseid
|
|
|
- LEFT JOIN t_warehouse ware1 ON ware1.f_id = bill.f_inwarehouseid
|
|
|
- LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id
|
|
|
- LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
|
|
|
- LEFT JOIN sys_dict_data dict ON dict.dict_value = bill.f_trademodeid
|
|
|
+ t_warehousebills bill
|
|
|
+ LEFT JOIN t_goods g ON g.f_id = bill.f_goodsid
|
|
|
+ left join sys_user u on bill.create_by = u.user_name
|
|
|
+ left join sys_user u1 on bill.f_storekeeper = u1.user_name
|
|
|
+ left join sys_dept d on bill.f_bsdeptid = d.dept_id
|
|
|
+ LEFT JOIN t_corps corp ON corp.f_id = bill.f_corpid
|
|
|
+ LEFT JOIN t_corps corpTo ON corpTo.f_id = bill.f_tocorpid
|
|
|
+ LEFT JOIN t_corps corpSub ON corpSub.f_id = bill.f_sbu
|
|
|
+ LEFT JOIN t_warehouse ware ON ware.f_id = bill.f_warehouseid
|
|
|
+ LEFT JOIN t_warehouse ware1 ON ware1.f_id = bill.f_inwarehouseid
|
|
|
+ LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id
|
|
|
+ LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
|
|
|
+ LEFT JOIN sys_dict_data dict ON dict.dict_value = bill.f_trademodeid
|
|
|
<where>
|
|
|
dict.status = '0'
|
|
|
AND dict.dict_type = 'data_trademodes'
|
|
@@ -564,7 +564,7 @@
|
|
|
<if test="fNewTrademodeid != null ">and bill.f_new_trademodeid = #{fNewTrademodeid}</if>
|
|
|
</where>
|
|
|
${params.dataScope}
|
|
|
- ORDER BY bill.f_id DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus
|
|
|
+ ORDER BY bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTWarehousebillsById" parameterType="Long" resultMap="TWarehousebillsResult">
|
|
@@ -2729,4 +2729,27 @@
|
|
|
w.f_id
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selecStorageFeeList" resultType="Map">
|
|
|
+ SELECT DISTINCT w.f_id AS fId, w.f_billno AS fBillno, corp.f_name AS fCorpid, w.f_billing_deadline AS fBillingDeadline, w.remark,
|
|
|
+ w.f_billstatus AS fBillstatus, w.create_by AS createBy, w.create_time AS createTime
|
|
|
+ FROM t_warehousebills w LEFT JOIN t_warehousebillsitems item ON item.f_pid = w.f_id
|
|
|
+ LEFT JOIN t_corps corp ON corp.f_id = w.f_corpid
|
|
|
+ left join sys_user u on w.create_by = u.user_name
|
|
|
+ left join sys_user u1 on w.f_storekeeper = u1.user_name
|
|
|
+ left join sys_dept d on w.f_bsdeptid = d.dept_id
|
|
|
+ <where>
|
|
|
+ w.f_billtype = 'JSCCF'
|
|
|
+ <if test="fBillstatus != null and fBillstatus != ''">and w.f_billstatus = #{fBillstatus}</if>
|
|
|
+ <if test="fMarks != null and fMarks != ''">and w.f_marks = #{fMarks}</if>
|
|
|
+ <if test="createBy != null and createBy != ''">and w.create_by = #{createBy}</if>
|
|
|
+ <if test='timeInterval2 != null and timeInterval2[0] != null and timeInterval2[1]!= ""'>
|
|
|
+ and w.f_billing_deadline BETWEEN #{timeInterval2[0]} AND #{timeInterval2[1]}
|
|
|
+ </if>
|
|
|
+ <if test="fBillno != null and fBillno != ''">and w.f_billno like concat('%', #{fBillno}, '%')</if>
|
|
|
+ <if test="fMblno != null and fMblno != ''">and w.f_mblno like concat('%', #{fMblno}, '%')</if>
|
|
|
+ </where>
|
|
|
+ ${params.dataScope}
|
|
|
+ ORDER BY w.f_bsdate DESC, w.f_bstime DESC,w.f_id DESC,w.f_billstatus
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|