| | |
| | | @ApiModelProperty(value = "是否存在溯源") |
| | | private Integer isSuYuan; |
| | | |
| | | @ApiModelProperty(value = "是否存在快速溯源") |
| | | private Integer isFast; |
| | | |
| | | public Qxsh() { |
| | | this.isSuYuan = 0; |
| | | } |
| | |
| | | public void setIsSuYuan(Integer isSuYuan) { |
| | | this.isSuYuan = isSuYuan; |
| | | } |
| | | |
| | | public Integer getIsFast() { |
| | | return isFast; |
| | | } |
| | | |
| | | public void setIsFast(Integer isFast) { |
| | | this.isFast = isFast; |
| | | } |
| | | } |
| | |
| | | |
| | | public List<Map<String, Object>> count7DayForAlarm(@Param("start") Integer start, @Param("end") Integer end); |
| | | |
| | | public Integer countFastSuYuan(@Param("id") String id, @Param("time") String time); |
| | | |
| | | public Integer hasSuYuan(@Param("suYuanId") String suYuanId, @Param("createTime") String createTime); |
| | | |
| | | public List<Qxsh> select3Hours(@Param("start") Integer start, @Param("end") Integer end); |
| | |
| | | continue; |
| | | } |
| | | |
| | | int isSuYuan = hasSuYuan(qxsh); |
| | | qxsh.setIsSuYuan(isSuYuan); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 查询溯源 |
| | | */ |
| | | private Integer hasSuYuan(Qxsh qxsh) { |
| | | String suYuanId = suYuanService.selectSuYuanIdByName(qxsh.getName()); |
| | | String createTime = qxsh.getTime().substring(0, 4) + "-" + qxsh.getTime().substring(4, 6) + "-" + qxsh.getTime().substring(6, 8) + " " + qxsh.getTime().substring(8, 10) + ":00:00"; |
| | | |
| | | return qxshMapper.hasSuYuan(suYuanId, createTime); |
| | | Integer isSuYuan = qxshMapper.hasSuYuan(suYuanId, createTime); |
| | | qxsh.setIsSuYuan(isSuYuan); |
| | | |
| | | Integer isFast = qxshMapper.countFastSuYuan(suYuanId, createTime); |
| | | qxsh.setIsFast(isFast); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | } |
| | |
| | | select createTime, count(*) "num" from rs group by createTime order by createTime; |
| | | </select> |
| | | |
| | | <select id="countFastSuYuan" resultType="java.lang.Integer"> |
| | | select count(*) from suyuan_fast |
| | | where su_yuan_id = #{id} and create_time = #{time}; |
| | | </select> |
| | | |
| | | <select id="hasSuYuan" resultType="java.lang.Integer"> |
| | | select count(*) from suyuan_46 where su_yuan_id=#{suYuanId} and create_time=#{createTime}; |
| | | </select> |