| | |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.IdGenerator; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TLocation; |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tSiteService.getSiteList(page, beginTime, endTime, name, insertUser, city, state)); |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Integer companyId = null; |
| | | if(1 != user.getRoleType()){ |
| | | companyId = user.getObjectId(); |
| | | } |
| | | page.setRecords(tSiteService.getSiteList(page, beginTime, endTime, name, insertUser, city, state, companyId)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | tSite.setInsertTime(new Date()); |
| | | tSite.setInsertUserId(shiroExtUtil.getUser().getId()); |
| | | tSite.setState(1); |
| | | tSite.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | tSiteService.insert(tSite); |
| | | |
| | | //添加站点区域 |