jsk 检验预警 权限改造
This commit is contained in:
parent
dbf9e35923
commit
2c4db1d75f
|
|
@ -10,10 +10,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
|
|
@ -69,7 +66,12 @@ public class ExpectationsServiceImpl implements ExpectationsService {
|
|||
//在用设备量
|
||||
countExpectations = mapper.getUseCountExpectations(entity);
|
||||
}
|
||||
return ObjectUtils.isNotEmpty(countExpectations) ? AjaxResult.success(countExpectations) : AjaxResult.error();
|
||||
Map<String,String> map=new HashMap<>();
|
||||
if(!ObjectUtils.isNotEmpty(countExpectations)){
|
||||
map.put("expired","0");
|
||||
map.put("aboutToExpire","0");
|
||||
}
|
||||
return ObjectUtils.isNotEmpty(countExpectations) ? AjaxResult.success(countExpectations) : AjaxResult.success(map);
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error();
|
||||
|
|
|
|||
|
|
@ -124,6 +124,9 @@
|
|||
AND sai.`status` = '0'
|
||||
AND mm.next_check_time < DATE_ADD(CURDATE(), INTERVAL 30 DAY)
|
||||
AND mt2.type_id not in (6032,6008,6270)
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND mt.company_id=#{companyId}
|
||||
</if>
|
||||
GROUP BY name;
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue