| | |
| | | |
| | | List<BattInfAndEnduranceDTO> findBattProducerInfoByProducerName(@Param("battProducer") String battProducer,@Param("userId") int userId); |
| | | |
| | | List<BattInfAndEnduranceDTO> findBattProducerInfoByYearCode(@Param("yearCode") int yearCode,@Param("userId") int uId); |
| | | List<BattInfAndEnduranceDTO> findBattProducerInfoByYearCode(@Param("year") int year,@Param("userId") int uId); |
| | | |
| | | List<BattInfAndEnduranceDTO> findBattProducerInfoByTime(@Param("startTime") Date startTime,@Param("endTime") Date endTime, @Param("userId") int uId); |
| | | |
| | |
| | | |
| | | /** |
| | | * yearCode: |
| | | * 1:3年以内 |
| | | * 2:3-5年 |
| | | * 3:5到7年 |
| | | * 4:7年以上 |
| | | * @param yearCode |
| | | * 1:1年以内 |
| | | * ... |
| | | * 7:7年以内 |
| | | * 8:7年以上 |
| | | * @param year |
| | | * @param uId |
| | | * @return |
| | | */ |
| | | public Response findBattProducerInfoByYearCode(int yearCode,int uId){ |
| | | List<BattInfAndEnduranceDTO> list = battInfMapper.findBattProducerInfoByYearCode(yearCode,uId); |
| | | public Response findBattProducerInfoByYearCode(int year,int uId){ |
| | | List<BattInfAndEnduranceDTO> list = battInfMapper.findBattProducerInfoByYearCode(year,uId); |
| | | return new Response().set(1,list,"查询成功"); |
| | | } |
| | | |
| | |
| | | select |
| | | StationName,StationName1,StationName2,StationName3,StationName5,BattGroupId,BattModel,BattProducer,BattProductDate,BattInUseDate,station_install,install_user,load_curr,bEnd.* |
| | | from db_battinf.tb_battinf bInf left join web_site.tb_batt_endurance bEnd on bInf.FBSDeviceId = bEnd.deviceid |
| | | <if test="yearCode==1"> |
| | | where TIMESTAMPDIFF(YEAR,BattInUseDate,CURDATE())<3 |
| | | <if test="year<=7"> |
| | | where TIMESTAMPDIFF(YEAR,BattInUseDate,CURDATE())<= #{year} |
| | | </if> |
| | | <if test="yearCode==2"> |
| | | where TIMESTAMPDIFF(YEAR,BattInUseDate,CURDATE())>=3 and TIMESTAMPDIFF(YEAR,BattInUseDate,CURDATE())<5 |
| | | </if> |
| | | <if test="yearCode==3"> |
| | | where TIMESTAMPDIFF(YEAR,BattInUseDate,CURDATE())>=5 and TIMESTAMPDIFF(YEAR,BattInUseDate,CURDATE())<7 |
| | | </if> |
| | | <if test="yearCode==4"> |
| | | where TIMESTAMPDIFF(YEAR,BattInUseDate,CURDATE())>=7 |
| | | <if test="year==8"> |
| | | where TIMESTAMPDIFF(YEAR,BattInUseDate,CURDATE())>7 |
| | | </if> |
| | | <if test="userId!=null and userId!=0"> |
| | | and BattgroupId in(select distinct db_battinf.tb_battinf.battgroupid |