<?xml version="1.0" encoding="utf-8" ?>
<select>
  <selectstr>
SELECT u_dept.deptid,
	u_dept.deptname,
	moneyrate,
	discount,
	pricelistid,
	profitrate
FROM u_dept
  </selectstr>
  <where>
	  <when notnull="@deptid">
		  u_dept.deptid = @deptid
	  </when>
	  <when $user_deptstr!="-1">
		  u_dept.deptid IN ($$user_deptstr$$) OR u_dept.deptid = -1
	  </when>
  </where>
  <displayfields>
  </displayfields>
</select>
