2019-03-29 18:14:18 +08:00
|
|
|
package com.nis.web.service;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Properties;
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import com.nis.domain.Page;
|
|
|
|
|
import com.nis.domain.SysUserWarn;
|
|
|
|
|
import com.nis.web.dao.SysUserWarnDao;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
public class SysUserWarnService extends BaseService{
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysUserWarnDao sysUserWarnDao;
|
|
|
|
|
|
|
|
|
|
//查询所有的数据
|
|
|
|
|
public Page<SysUserWarn> getAllList(Page<SysUserWarn> page,SysUserWarn entity,Properties msgProp){
|
|
|
|
|
|
|
|
|
|
entity.setPage(page);
|
|
|
|
|
List<SysUserWarn> allList = sysUserWarnDao.getAllList(entity);
|
|
|
|
|
if(allList !=null && allList.size()>0){
|
|
|
|
|
SysUserWarn obj=new SysUserWarn();
|
|
|
|
|
obj.setServiceId(entity.getServiceId());
|
|
|
|
|
SysUserWarn allSum = sysUserWarnDao.getAllSum(obj);
|
|
|
|
|
SysUserWarn sysWarn=new SysUserWarn();
|
|
|
|
|
String report_total = msgProp.getProperty("report_total");
|
|
|
|
|
sysWarn.setServiceId(report_total);
|
|
|
|
|
sysWarn.setServiceDesc("--");
|
|
|
|
|
sysWarn.setInterfaceCfgTotal(allSum.getInterfaceCfgTotal());
|
|
|
|
|
sysWarn.setSystemCfgTotal(allSum.getSystemCfgTotal());
|
|
|
|
|
sysWarn.setTime(allList.get(0).getTime());
|
|
|
|
|
allList.add(0, sysWarn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
page.setList(allList);
|
|
|
|
|
return page;
|
|
|
|
|
}
|
2019-04-04 18:09:22 +08:00
|
|
|
//查询总的记录数
|
2019-03-29 18:14:18 +08:00
|
|
|
public Integer getAllInfoCount(){
|
|
|
|
|
|
|
|
|
|
return sysUserWarnDao.getAllInfoCount();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//根据serviceID和表名查询业务配置的数量
|
|
|
|
|
public Integer getCfgCount(SysUserWarn entity){
|
|
|
|
|
|
|
|
|
|
return sysUserWarnDao.getCfgCount(entity);
|
|
|
|
|
}
|
|
|
|
|
//新增
|
|
|
|
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
|
|
|
public int insert(List<SysUserWarn> list){
|
|
|
|
|
return sysUserWarnDao.insert(list);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//删除所有的数据
|
|
|
|
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
|
|
|
public int deleteAllData(){
|
|
|
|
|
return sysUserWarnDao.deleteAllData();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//查询 所有业务 界面总量和服务总量的和
|
|
|
|
|
public SysUserWarn findServiceSum(){
|
|
|
|
|
SysUserWarn obj=new SysUserWarn();
|
|
|
|
|
SysUserWarn allSum = sysUserWarnDao.getAllSum(obj);
|
|
|
|
|
return allSum;
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-04 18:09:22 +08:00
|
|
|
//查询ASN IP 页面配置总量
|
|
|
|
|
public Integer getASNIPTotal(){
|
|
|
|
|
|
|
|
|
|
return sysUserWarnDao.getASNIPTotal();
|
|
|
|
|
}
|
|
|
|
|
//查询APP IP 页面配置总量
|
|
|
|
|
public Integer getAPPIPTotal(){
|
|
|
|
|
|
|
|
|
|
return sysUserWarnDao.getAPPIPTotal();
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-29 18:14:18 +08:00
|
|
|
}
|