|  | @@ -573,45 +573,45 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectInventorySJCKList" parameterType="TWarehousebills"  resultType="java.util.Map">
 | 
	
		
			
				|  |  |          SELECT
 | 
	
		
			
				|  |  | -        co.f_name AS fName,
 | 
	
		
			
				|  |  | -        it.f_bsdate AS fBsdate,
 | 
	
		
			
				|  |  | -        leg.f_mblno AS fMblno,
 | 
	
		
			
				|  |  | -        it.f_business_type AS fBusinessType,
 | 
	
		
			
				|  |  | -        dict.dict_label AS fBusinessTypes,
 | 
	
		
			
				|  |  | -        it.f_marks AS fMarks ,
 | 
	
		
			
				|  |  | -        goo.f_name AS fGoodsName,
 | 
	
		
			
				|  |  | -        dicttr.dict_label AS fTrademodeid,
 | 
	
		
			
				|  |  | -        it.f_qty AS fQty,
 | 
	
		
			
				|  |  | -        it.f_grossweight AS fGrossweight,
 | 
	
		
			
				|  |  | -        it.f_netweight AS fNetweight,
 | 
	
		
			
				|  |  | -        CASE
 | 
	
		
			
				|  |  | -        it.f_billtype
 | 
	
		
			
				|  |  | -        WHEN 'SJRK' THEN
 | 
	
		
			
				|  |  | -        '入库'
 | 
	
		
			
				|  |  | -        WHEN 'SJCK' THEN
 | 
	
		
			
				|  |  | -        '出库'
 | 
	
		
			
				|  |  | -        WHEN 'CKDB' THEN
 | 
	
		
			
				|  |  | -        '调拨'
 | 
	
		
			
				|  |  | -        END AS fBilltype ,
 | 
	
		
			
				|  |  | -        CASE
 | 
	
		
			
				|  |  | -        it.f_billtype
 | 
	
		
			
				|  |  | -        WHEN 'SJRK' THEN
 | 
	
		
			
				|  |  | -        it.f_warehouse_information
 | 
	
		
			
				|  |  | -        WHEN 'SJCK' THEN
 | 
	
		
			
				|  |  | -        it.f_warehouse_information
 | 
	
		
			
				|  |  | -        WHEN 'CKDB' THEN
 | 
	
		
			
				|  |  | -        it.f_orgwarehouse_information
 | 
	
		
			
				|  |  | -        END AS fWarehouseLocationids
 | 
	
		
			
				|  |  | +            co.f_name AS fName,
 | 
	
		
			
				|  |  | +            it.f_bsdate AS fBsdate,
 | 
	
		
			
				|  |  | +            leg.f_mblno AS fMblno,
 | 
	
		
			
				|  |  | +            it.f_business_type AS fBusinessType,
 | 
	
		
			
				|  |  | +            dict.dict_label AS fBusinessTypes,
 | 
	
		
			
				|  |  | +            it.f_marks AS fMarks ,
 | 
	
		
			
				|  |  | +            goo.f_name AS fGoodsName,
 | 
	
		
			
				|  |  | +            dicttr.dict_label AS fTrademodeid,
 | 
	
		
			
				|  |  | +            it.f_qty AS fQty,
 | 
	
		
			
				|  |  | +            it.f_grossweight AS fGrossweight,
 | 
	
		
			
				|  |  | +            it.f_netweight AS fNetweight,
 | 
	
		
			
				|  |  | +            CASE
 | 
	
		
			
				|  |  | +            it.f_billtype
 | 
	
		
			
				|  |  | +            WHEN 'SJRK' THEN
 | 
	
		
			
				|  |  | +            '入库'
 | 
	
		
			
				|  |  | +            WHEN 'SJCK' THEN
 | 
	
		
			
				|  |  | +            '出库'
 | 
	
		
			
				|  |  | +            WHEN 'CKDB' THEN
 | 
	
		
			
				|  |  | +            '调拨'
 | 
	
		
			
				|  |  | +            END AS fBilltype ,
 | 
	
		
			
				|  |  | +            CASE
 | 
	
		
			
				|  |  | +            it.f_billtype
 | 
	
		
			
				|  |  | +            WHEN 'SJRK' THEN
 | 
	
		
			
				|  |  | +            it.f_warehouse_information
 | 
	
		
			
				|  |  | +            WHEN 'SJCK' THEN
 | 
	
		
			
				|  |  | +            it.f_warehouse_information
 | 
	
		
			
				|  |  | +            WHEN 'CKDB' THEN
 | 
	
		
			
				|  |  | +            it.f_orgwarehouse_information
 | 
	
		
			
				|  |  | +            END AS fWarehouseLocationids
 | 
	
		
			
				|  |  |          FROM
 | 
	
		
			
				|  |  | -        t_warehousebills leg
 | 
	
		
			
				|  |  | -        left join sys_user u on leg.create_by = u.user_name
 | 
	
		
			
				|  |  | -        left join sys_dept d on leg.f_bsdeptid = d.dept_id
 | 
	
		
			
				|  |  | -        LEFT JOIN t_warehousebillsitems it ON leg.f_id = it.f_pid
 | 
	
		
			
				|  |  | -        LEFT JOIN t_goods goo ON it.f_goodsid = goo.f_id
 | 
	
		
			
				|  |  | -        LEFT JOIN t_corps co ON leg.f_corpid = co.f_id
 | 
	
		
			
				|  |  | -        LEFT JOIN sys_dict_data dict ON dict.dict_value = it.f_business_type
 | 
	
		
			
				|  |  | -        LEFT JOIN t_warehouse ware ON ware.f_id = it.f_warehouselocid
 | 
	
		
			
				|  |  | -        LEFT JOIN sys_dict_data dicttr ON dicttr.dict_value = leg.f_trademodeid
 | 
	
		
			
				|  |  | +            t_warehousebills leg
 | 
	
		
			
				|  |  | +            left join sys_user u on leg.create_by = u.user_name
 | 
	
		
			
				|  |  | +            left join sys_dept d on leg.f_bsdeptid = d.dept_id
 | 
	
		
			
				|  |  | +            LEFT JOIN t_warehousebillsitems it ON leg.f_id = it.f_pid
 | 
	
		
			
				|  |  | +            LEFT JOIN t_goods goo ON it.f_goodsid = goo.f_id
 | 
	
		
			
				|  |  | +            LEFT JOIN t_corps co ON leg.f_corpid = co.f_id
 | 
	
		
			
				|  |  | +            LEFT JOIN sys_dict_data dict ON dict.dict_value = it.f_business_type
 | 
	
		
			
				|  |  | +            LEFT JOIN t_warehouse ware ON ware.f_id = it.f_warehouselocid
 | 
	
		
			
				|  |  | +            LEFT JOIN sys_dict_data dicttr ON dicttr.dict_value = leg.f_trademodeid
 | 
	
		
			
				|  |  |          <where>
 | 
	
		
			
				|  |  |              dict.status = '0'
 | 
	
		
			
				|  |  |              AND dict.dict_type = 'storage_type'
 | 
	
	
		
			
				|  | @@ -694,15 +694,15 @@
 | 
	
		
			
				|  |  |          </if>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <select id="selectContainMblno" resultType="int">
 | 
	
		
			
				|  |  | +    <select id="selectContainMblno" parameterType="TWarehousebills" resultType="int">
 | 
	
		
			
				|  |  |          SELECT
 | 
	
		
			
				|  |  |              count( f_id )
 | 
	
		
			
				|  |  |          FROM
 | 
	
		
			
				|  |  | -            t_warehouse
 | 
	
		
			
				|  |  | +            t_warehousebills
 | 
	
		
			
				|  |  |          where
 | 
	
		
			
				|  |  |              f_mblno = #{mblNo}
 | 
	
		
			
				|  |  | -            AND f_bsdate > #{currentDay[0]}
 | 
	
		
			
				|  |  | -            AND f_bsdate < #{currentDay[1]}
 | 
	
		
			
				|  |  | +            AND f_bsdate = #{currentDay}
 | 
	
		
			
				|  |  | +            AND f_billtype = #{fBilltype}
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <insert id="insertTWarehousebills" parameterType="TWarehousebills" useGeneratedKeys="true" keyProperty="fId">
 |