select (IFNULL(sum(expend_num),0) - IFNULL(sum(acquire_num),0)) from physic_bill where physic_name=#{name} and physic_spec=#{spec} and factory_name =#{factoryName}
select (IFNULL(sum(expend_num),0) - IFNULL(sum(acquire_num),0)) from physic_bill where physic_name=#{name} and physic_spec=#{spec} and factory_name =#{factoryName} and dept_id =#{deptId}
select physic_name,physic_spec,factory_name from physic_bill where physic_name =#{physicName} group by physic_name,physic_spec,factory_name
select physic_name,physic_spec,factory_name from physic_bill where physic_name LIKE CONCAT('%', #{physicName}, '%') group by physic_name,physic_spec,factory_name,dept_id
1763322112818|112|statement|connection 0|select a.id as physicApplyId, a.*, (select dept_name from sys_dept d where d.id = a.ly_dept_id) as lyDeptName ,(select dept_name from sys_dept d where d.id = a.fy_dept_id) as fyDeptName from physic_apply a where a.del_flag =0 and a.status=? LIMIT ?|select a.id as physicApplyId, a.*, (select dept_name from sys_dept d where d.id = a.ly_dept_id) as lyDeptName ,(select dept_name from sys_dept d where d.id = a.fy_dept_id) as fyDeptName from physic_apply a where a.del_flag =0 and a.status=4 LIMIT 10
1763322142491|37|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '896e930e-ae72-4430-90b2-958b3e36b703')
1763322142529|36|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1965361747758530562 AND del_flag=0
1763372946577|44|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '58b817c5-f3de-45ce-82e1-ff19c06abc17')
1763372946638|37|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763372951157|37|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373051419|43|statement|connection 0|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = ? AND status IN (?,?)) AND (fy_dept_id = ? AND status IN (?,?)))|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = 2 AND status IN (0,1)) AND (fy_dept_id = 2 AND status IN (3,2)))
1763373181277|48|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '58b817c5-f3de-45ce-82e1-ff19c06abc17')
1763373181340|41|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373181424|40|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373186243|40|statement|connection 0|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = ? AND status IN (?,?)) AND (fy_dept_id = ? AND status IN (?,?)))|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = 2 AND status IN (0,1)) AND (fy_dept_id = 2 AND status IN (3,2)))
1763373225830|40|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '58b817c5-f3de-45ce-82e1-ff19c06abc17')
1763373225874|40|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373225921|40|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373245491|43|statement|connection 0|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = ? AND status IN (?,?)) AND (fy_dept_id = ? AND status IN (?,?)))|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = 2 AND status IN (0,1)) AND (fy_dept_id = 2 AND status IN (3,2)))
1763373396783|44|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '58b817c5-f3de-45ce-82e1-ff19c06abc17')
1763373396843|36|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373396923|34|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373401607|101|statement|connection 0|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = ? AND status IN (?,?)) OR (fy_dept_id = ? AND status IN (?,?)))|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = 2 AND status IN (0,1)) OR (fy_dept_id = 2 AND status IN (3,2)))
1763373448766|50|statement|connection 0|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = ?)|SELECT id,token,refresh_token,user_id,expiry_time,version,del_flag,create_by,create_time,update_by,update_time FROM sys_user_token WHERE del_flag=0 AND (token = '58b817c5-f3de-45ce-82e1-ff19c06abc17')
1763373448831|42|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373448914|40|statement|connection 0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=? AND del_flag=0|SELECT id,name,mobile,salt,password,type,auth_dept_list,dept_id,role_list,status,ext,del_flag,create_by,create_time,update_by,update_time FROM sys_user WHERE id=1989172718658990082 AND del_flag=0
1763373453665|122|statement|connection 0|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = ? AND status IN (?,?)) OR (fy_dept_id = ? AND status IN (?,?)))|SELECT id,physic_name,physic_type,physic_spec,unit,return_num,prescription_num,requisition_num,actual_num,batch_no,factory_name,fy_dept_id,ly_dept_id,status,ly_user,sh_user,fy_user,fh_user,version,del_flag,create_by,create_time,update_by,update_time FROM physic_apply WHERE del_flag=0 AND ((ly_dept_id = 2 AND status IN (0,1)) OR (fy_dept_id = 2 AND status IN (3,2)))