| | |
| | | <result property="installUser" column="install_user"></result> |
| | | <result property="loadCurr" column="load_curr"></result> |
| | | <result property="fBSDeviceId" column="FBSDeviceId"></result> |
| | | <result property="monVolStd" column="monVolStd"></result> |
| | | </association> |
| | | <association property="battEndurance" javaType="com.whyc.pojo.BattEndurance"> |
| | | <result property="num" column="num"></result> |
| | |
| | | </select> |
| | | |
| | | <select id="findBattProducerInfoByTime" resultMap="BattInfAndEndurance"> |
| | | select StationName,StationName3,BattGroupId,BattModel,BattProducer,BattProductDate,BattInUseDate,station_install,install_user,load_curr,FBSDeviceId,bEnd.* |
| | | select |
| | | StationName,StationName3,BattGroupId,BattModel,monVolStd,BattProducer,BattProductDate,BattInUseDate,station_install,install_user,load_curr,FBSDeviceId,bEnd.* |
| | | from db_battinf.tb_battinf bInf left join web_site.tb_batt_endurance bEnd on bInf.FBSDeviceId = bEnd.deviceid |
| | | <where> |
| | | <if test="startTime!=null and endTime!=null"> |
| | | and BattInUseDate >= #{startTime} and BattInUseDate<= #{endTime} |
| | | </if> |
| | | <if test="userId!=null and userId!=0"> |
| | | and BattgroupId in(select distinct db_battinf.tb_battinf.battgroupid |
| | | from db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr,db_user.tb_user_inf |
| | | where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId |
| | | and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id |
| | | and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid |
| | | and db_user.tb_user_inf.uid=#{userId}) |
| | | <where> |
| | | <if test="startTime!=null and endTime!=null"> |
| | | and BattInUseDate >= #{startTime} and BattInUseDate<= #{endTime} |
| | | </if> |
| | | <if test="userId!=null and userId!=0"> |
| | | and BattgroupId in(select distinct db_battinf.tb_battinf.battgroupid |
| | | from |
| | | db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr,db_user.tb_user_inf |
| | | where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId |
| | | and |
| | | db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id |
| | | and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid |
| | | and db_user.tb_user_inf.uid=#{userId}) |
| | | </if> |
| | | </where> |
| | | group by binf.StationId order by bInf.StationName |