This commit is contained in:
parent
8f1c3fe5c0
commit
501c2ac75c
|
|
@ -1,245 +0,0 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.ifish.bean;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* 鱼缸场详情表(tbl_vender_list)
|
||||
*
|
||||
* @author bianj
|
||||
* @version 1.0.0 2017-06-27
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "tbl_vender_list")
|
||||
public class Tbl_Vender implements java.io.Serializable {
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private static final long serialVersionUID = 2462685903502867014L;
|
||||
|
||||
/**
|
||||
* 鱼缸厂编号
|
||||
*/
|
||||
@Id
|
||||
@Column(name = "brand_code", unique = true, nullable = false, length = 20)
|
||||
private String brandCode;
|
||||
|
||||
/**
|
||||
* logo
|
||||
*/
|
||||
@Column(name = "brand_logo", nullable = true, length = 100)
|
||||
private String brandLogo;
|
||||
|
||||
/**
|
||||
* 鱼缸厂名称
|
||||
*/
|
||||
@Column(name = "brand_name", nullable = false, length = 20)
|
||||
private String brandName;
|
||||
|
||||
/**
|
||||
* 品牌介绍
|
||||
*/
|
||||
@Column(name = "brand_introduce", nullable = true, length = 100)
|
||||
private String brandIntroduce;
|
||||
|
||||
/**
|
||||
* app展示
|
||||
*/
|
||||
@Column(name = "app_show", nullable = true, length = 1)
|
||||
private String appShow;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Column(name = "contact_phone", nullable = true, length = 30)
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
@Column(name = "contact_address", nullable = true, length = 50)
|
||||
private String contactAddress;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time", nullable = true)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time", nullable = true)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 获取鱼缸厂编号
|
||||
*
|
||||
* @return 鱼缸厂编号
|
||||
*/
|
||||
public String getBrandCode() {
|
||||
return this.brandCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置鱼缸厂编号
|
||||
*
|
||||
* @param brandCode 鱼缸厂编号
|
||||
*/
|
||||
public void setBrandCode(String brandCode) {
|
||||
this.brandCode = brandCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取logo
|
||||
*
|
||||
* @return logo
|
||||
*/
|
||||
public String getBrandLogo() {
|
||||
return this.brandLogo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置logo
|
||||
*
|
||||
* @param brandLogo logo
|
||||
*/
|
||||
public void setBrandLogo(String brandLogo) {
|
||||
this.brandLogo = brandLogo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取鱼缸厂名称
|
||||
*
|
||||
* @return 鱼缸厂名称
|
||||
*/
|
||||
public String getBrandName() {
|
||||
return this.brandName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置鱼缸厂名称
|
||||
*
|
||||
* @param brandName 鱼缸厂名称
|
||||
*/
|
||||
public void setBrandName(String brandName) {
|
||||
this.brandName = brandName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取品牌介绍
|
||||
*
|
||||
* @return 品牌介绍
|
||||
*/
|
||||
public String getBrandIntroduce() {
|
||||
return this.brandIntroduce;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置品牌介绍
|
||||
*
|
||||
* @param brandIntroduce 品牌介绍
|
||||
*/
|
||||
public void setBrandIntroduce(String brandIntroduce) {
|
||||
this.brandIntroduce = brandIntroduce;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取app展示
|
||||
*
|
||||
* @return app展示
|
||||
*/
|
||||
public String getAppShow() {
|
||||
return this.appShow;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置app展示
|
||||
*
|
||||
* @param appShow app展示
|
||||
*/
|
||||
public void setAppShow(String appShow) {
|
||||
this.appShow = appShow;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取联系电话
|
||||
*
|
||||
* @return 联系电话
|
||||
*/
|
||||
public String getContactPhone() {
|
||||
return this.contactPhone;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置联系电话
|
||||
*
|
||||
* @param contactPhone 联系电话
|
||||
*/
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取联系地址
|
||||
*
|
||||
* @return 联系地址
|
||||
*/
|
||||
public String getContactAddress() {
|
||||
return this.contactAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置联系地址
|
||||
*
|
||||
* @param contactAddress 联系地址
|
||||
*/
|
||||
public void setContactAddress(String contactAddress) {
|
||||
this.contactAddress = contactAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新时间
|
||||
*
|
||||
* @return 更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return this.updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新时间
|
||||
*
|
||||
* @param updateTime 更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*
|
||||
* @return 创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return this.createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间
|
||||
*
|
||||
* @param createTime 创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.ifish.bean;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* APP版本详情表(tbl_version)
|
||||
*
|
||||
* @author bianj
|
||||
* @version 1.0.0 2017-08-14
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "tbl_version")
|
||||
public class Tbl_Version implements java.io.Serializable {
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private static final long serialVersionUID = -8289374797318946959L;
|
||||
|
||||
/**
|
||||
* 版本ID
|
||||
*/
|
||||
@Id
|
||||
@Column(name = "version_id", unique = true, nullable = false, length = 10)
|
||||
private Integer versionId;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@Column(name = "version_code", nullable = true, length = 20)
|
||||
private String versionCode;
|
||||
|
||||
/**
|
||||
* 更新类型,1强制升级,0,不强制
|
||||
*/
|
||||
@Column(name = "is_must_update", nullable = true, length = 1)
|
||||
private String isMustUpdate;
|
||||
|
||||
/**
|
||||
* 下载地址
|
||||
*/
|
||||
@Column(name = "app_address", nullable = true, length = 100)
|
||||
private String appAddress;
|
||||
|
||||
/**
|
||||
* 更新内容
|
||||
*/
|
||||
@Column(name = "upload_content", nullable = true, length = 200)
|
||||
private String uploadContent;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time", nullable = true)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 手机类型
|
||||
*/
|
||||
@Column(name = "phone_type", nullable = true, length = 255)
|
||||
private String phoneType;
|
||||
|
||||
/**
|
||||
* 获取版本ID
|
||||
*
|
||||
* @return 版本ID
|
||||
*/
|
||||
public Integer getVersionId() {
|
||||
return this.versionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置版本ID
|
||||
*
|
||||
* @param versionId 版本ID
|
||||
*/
|
||||
public void setVersionId(Integer versionId) {
|
||||
this.versionId = versionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取版本号
|
||||
*
|
||||
* @return 版本号
|
||||
*/
|
||||
public String getVersionCode() {
|
||||
return this.versionCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置版本号
|
||||
*
|
||||
* @param versionCode 版本号
|
||||
*/
|
||||
public void setVersionCode(String versionCode) {
|
||||
this.versionCode = versionCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新类型,1强制升级,0,不强制
|
||||
*
|
||||
* @return 更新类型
|
||||
*/
|
||||
public String getIsMustUpdate() {
|
||||
return this.isMustUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新类型,1强制升级,0,不强制
|
||||
*
|
||||
* @param isMustUpdate 更新类型,1强制升级,0,不强制
|
||||
*/
|
||||
public void setIsMustUpdate(String isMustUpdate) {
|
||||
this.isMustUpdate = isMustUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取下载地址
|
||||
*
|
||||
* @return 下载地址
|
||||
*/
|
||||
public String getAppAddress() {
|
||||
return this.appAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置下载地址
|
||||
*
|
||||
* @param appAddress 下载地址
|
||||
*/
|
||||
public void setAppAddress(String appAddress) {
|
||||
this.appAddress = appAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新内容
|
||||
*
|
||||
* @return 更新内容
|
||||
*/
|
||||
public String getUploadContent() {
|
||||
return this.uploadContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新内容
|
||||
*
|
||||
* @param uploadContent 更新内容
|
||||
*/
|
||||
public void setUploadContent(String uploadContent) {
|
||||
this.uploadContent = uploadContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*
|
||||
* @return 创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return this.createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间
|
||||
*
|
||||
* @param createTime 创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取手机类型
|
||||
*
|
||||
* @return 手机类型
|
||||
*/
|
||||
public String getPhoneType() {
|
||||
return this.phoneType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置手机类型
|
||||
*
|
||||
* @param phoneType 手机类型
|
||||
*/
|
||||
public void setPhoneType(String phoneType) {
|
||||
this.phoneType = phoneType;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.ifish.config;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.RequestDispatcher;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.web.WebAttributes;
|
||||
import org.springframework.security.web.access.AccessDeniedHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class MyAccessDeniedHandler implements AccessDeniedHandler {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.security.web.access.AccessDeniedHandler#handle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.springframework.security.access.AccessDeniedException)
|
||||
*/
|
||||
private String errorPage;
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException)
|
||||
throws IOException, ServletException {
|
||||
if (!response.isCommitted()) {
|
||||
if (errorPage != null) {
|
||||
// Put exception into request scope (perhaps of use to a view)
|
||||
request.setAttribute(WebAttributes.ACCESS_DENIED_403, accessDeniedException);
|
||||
|
||||
// Set the 403 status code.
|
||||
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
|
||||
|
||||
// forward to error page.
|
||||
RequestDispatcher dispatcher = request.getRequestDispatcher(errorPage);
|
||||
dispatcher.forward(request, response);
|
||||
} else {
|
||||
response.sendError(HttpServletResponse.SC_FORBIDDEN, accessDeniedException.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The error page to use. Must begin with a "/" and is interpreted relative
|
||||
* to the current context root.
|
||||
*
|
||||
* @param errorPage the dispatcher path to display
|
||||
*
|
||||
* @throws IllegalArgumentException if the argument doesn't comply with the
|
||||
* above limitations
|
||||
*/
|
||||
public void setErrorPage(String errorPage) {
|
||||
if ((errorPage != null) && !errorPage.startsWith("/")) {
|
||||
throw new IllegalArgumentException("errorPage must begin with '/'");
|
||||
}
|
||||
|
||||
this.errorPage = errorPage;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -55,6 +55,7 @@ public class MyUserDetailService implements UserDetailsService {
|
|||
userdetails.setAccountNonLocked(accountNonLocked);
|
||||
userdetails.setAccountNonExpired(accountNonExpired);
|
||||
userdetails.setCredentialsNonExpired(credentialsNonExpired);
|
||||
userdetails.setAuthorities(authorities);
|
||||
return userdetails;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,8 @@ import org.springframework.security.config.annotation.authentication.builders.Au
|
|||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.web.filter.CharacterEncodingFilter;
|
||||
import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.security.web.access.AccessDeniedHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -26,10 +25,10 @@ import org.springframework.security.crypto.password.PasswordEncoder;
|
|||
@Configuration
|
||||
@EnableWebSecurity
|
||||
public class SecuredConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
|
||||
@Autowired
|
||||
private UserHelper userHelper;
|
||||
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
//The CharacterEncodingFilter must be started before SecurityFilter. I moved it to security configuration:
|
||||
|
|
@ -48,7 +47,23 @@ public class SecuredConfig extends WebSecurityConfigurerAdapter {
|
|||
//.antMatchers("/score/*").hasRole("4") //同上,utype为4的才能访问
|
||||
.antMatchers("/index").authenticated()
|
||||
.antMatchers("/").authenticated()
|
||||
.antMatchers("/admin/**").hasAnyRole("4")
|
||||
.antMatchers("/userlist").hasAnyRole("4")
|
||||
.antMatchers("/pushlist").hasAnyRole("4")
|
||||
.antMatchers("/remindWaterList").hasAnyRole("4")
|
||||
.antMatchers("/cameralist").hasAnyRole("4")
|
||||
.antMatchers("/camerauserlist").hasAnyRole("4")
|
||||
.antMatchers("/activeCodeList").hasAnyRole("4")
|
||||
.antMatchers("/devicelist").hasAnyRole("4")
|
||||
.antMatchers("/bindlist").hasAnyRole("4")
|
||||
.antMatchers("/hardwareTypelist").hasAnyRole("4")
|
||||
.antMatchers("/loginlist").hasAnyRole("4")
|
||||
.antMatchers("/factorylist").hasAnyRole("4")
|
||||
.antMatchers("/venderlist").hasAnyRole("4")
|
||||
.antMatchers("/querylist").hasAnyRole("4")
|
||||
.antMatchers("/authorizationQuery").hasAnyRole("4")
|
||||
.antMatchers("/paylist").hasAnyRole("4")
|
||||
.antMatchers("/adminUserList").hasAnyRole("4")
|
||||
.antMatchers("/versionlist").hasAnyRole("4")
|
||||
.and() //相当于方法结束符,and结束的几个方法是并行的,没有顺序之分,最后一个方法不需要and结束
|
||||
.formLogin()//配置FBA。登陆,若有role权限,formLogin不能少
|
||||
.loginProcessingUrl("/login")//登陆后是否跳转前一个URL,参数为登陆的POST地址
|
||||
|
|
@ -67,10 +82,10 @@ public class SecuredConfig extends WebSecurityConfigurerAdapter {
|
|||
//.and()
|
||||
// .rememberMe().key("gkweb") //记住密码,cookie的name为remember-me,key的值相当于token
|
||||
// .tokenValiditySeconds(1209600) //cookie有效期,时间为秒
|
||||
.and().exceptionHandling().accessDeniedPage("/403") //请求异常,请求403
|
||||
.and().exceptionHandling().accessDeniedHandler(accessDeniedHandler()).accessDeniedPage("/403") //请求异常,请求403
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth.userDetailsService(new MyUserDetailService(userHelper));
|
||||
|
|
@ -80,10 +95,15 @@ public class SecuredConfig extends WebSecurityConfigurerAdapter {
|
|||
// .withUser("3").password("3").roles("ADMIN");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Bean(name = BeanIds.AUTHENTICATION_MANAGER)
|
||||
@Override
|
||||
public AuthenticationManager authenticationManagerBean() throws Exception {
|
||||
return super.authenticationManagerBean();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public AccessDeniedHandler accessDeniedHandler() {
|
||||
return new MyAccessDeniedHandler();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,6 +191,11 @@ public class UserInfo implements UserDetails, CredentialsContainer {
|
|||
this.accountNonLocked = accountNonLocked;
|
||||
}
|
||||
|
||||
public void setAuthorities(final Collection<? extends GrantedAuthority> authorities) {
|
||||
this.authorities = Collections
|
||||
.unmodifiableSet(sortAuthorities(authorities));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the credentialsNonExpired
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,21 +5,16 @@
|
|||
*/
|
||||
package com.ifish.config;
|
||||
|
||||
import com.ifish.util.IfishFilePath;
|
||||
import java.io.IOException;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.multipart.MultipartResolver;
|
||||
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
||||
import org.springframework.web.multipart.support.StandardServletMultipartResolver;
|
||||
import org.springframework.web.servlet.ViewResolver;
|
||||
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
||||
import org.springframework.web.servlet.view.tiles3.TilesConfigurer;
|
||||
import org.springframework.web.servlet.view.tiles3.TilesViewResolver;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ import com.ifish.bean.Tbl_Device_User;
|
|||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Upgrade_Notes;
|
||||
import com.ifish.helper.DeviceHelper;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
@ -159,6 +162,7 @@ public class Device {
|
|||
/**
|
||||
* 批量升级sdk
|
||||
*
|
||||
* @param tbl_Upgrade_Notes
|
||||
* @param factoryCode
|
||||
* @param brandCode
|
||||
* @param hardwareType
|
||||
|
|
@ -175,14 +179,16 @@ public class Device {
|
|||
/**
|
||||
* 设置,取消设备授权
|
||||
*
|
||||
* @param deviceId
|
||||
* @param device
|
||||
* @param request
|
||||
* @param isblacklist
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/deviceIsBlacklist"}, method = RequestMethod.POST, produces = "text/html;charset=utf-8")
|
||||
@ResponseBody
|
||||
public Object deviceIsBlacklist(Integer deviceId, String isblacklist) {
|
||||
return deviceHelper.deviceIsBlacklist(deviceId, isblacklist);
|
||||
public Object deviceIsBlacklist(Integer deviceId, String isblacklist, HttpServletRequest request) {
|
||||
return deviceHelper.deviceIsBlacklist(deviceId, isblacklist, request);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -268,13 +274,24 @@ public class Device {
|
|||
return deviceHelper.getHardwareTypelistData(draw, start, length, showName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备类型详情页
|
||||
*
|
||||
* @param hardwareType
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/hardwareTypedetail"}, method = RequestMethod.GET)
|
||||
public ModelAndView getHardwareTypeDetail(String hardwareType) {
|
||||
return deviceHelper.getHardwareTypeDetail(hardwareType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入一条设备信息
|
||||
*
|
||||
* @param tbl_HardWare_Type
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/insertHardwareType"}, method = RequestMethod.POST)
|
||||
@RequestMapping(value = {"/insertHardwareType"}, method = RequestMethod.POST, produces = "text/html;charset=utf-8")
|
||||
@ResponseBody
|
||||
public Object insertHardwareType(Tbl_HardWare_Type tbl_HardWare_Type) {
|
||||
return deviceHelper.HardwareTypeOperation(tbl_HardWare_Type, "1");
|
||||
|
|
@ -286,7 +303,7 @@ public class Device {
|
|||
* @param tbl_HardWare_Type
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/updateHardwareType"}, method = RequestMethod.POST)
|
||||
@RequestMapping(value = {"/updateHardwareType"}, method = RequestMethod.POST, produces = "text/html;charset=utf-8")
|
||||
@ResponseBody
|
||||
public Object updateHardwareType(Tbl_HardWare_Type tbl_HardWare_Type) {
|
||||
return deviceHelper.HardwareTypeOperation(tbl_HardWare_Type, "2");
|
||||
|
|
@ -298,9 +315,24 @@ public class Device {
|
|||
* @param tbl_HardWare_Type
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/deleteHardwareType"}, method = RequestMethod.POST)
|
||||
@RequestMapping(value = {"/deleteHardwareType"}, method = RequestMethod.POST, produces = "text/html;charset=utf-8")
|
||||
@ResponseBody
|
||||
public Object deleteHardwareType(Tbl_HardWare_Type tbl_HardWare_Type) {
|
||||
return deviceHelper.HardwareTypeOperation(tbl_HardWare_Type, "3");
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试工具分配授权设备接口
|
||||
*
|
||||
* @param data
|
||||
* @param subStr
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/saveMacAddress"}, method = RequestMethod.POST, produces = "text/html;charset=utf-8")
|
||||
@ResponseBody
|
||||
public Object saveMacAddress(Map<String, String> data, String subStr, HttpServletRequest request, HttpServletResponse response) {
|
||||
return deviceHelper.saveMacAddress(data, subStr, request, response);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.ifish.controller;
|
||||
|
||||
import com.ifish.bean.Tbl_Version;
|
||||
import com.ifish.helper.VersionHelperI;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
@Controller
|
||||
public class Version {
|
||||
|
||||
@Autowired
|
||||
private VersionHelperI versionHelperI;
|
||||
|
||||
/**
|
||||
* 版本管理首页
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/versionlist"}, method = RequestMethod.GET)
|
||||
public ModelAndView getVersionlist() {
|
||||
return versionHelperI.getVersionlist();
|
||||
}
|
||||
|
||||
/**
|
||||
* 版本管理页面数据
|
||||
*
|
||||
* @param phoneType
|
||||
* @param content
|
||||
* @param draw
|
||||
* @param start
|
||||
* @param length
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/versionlistData"}, method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object getVerisonlistData(String phoneType, String content, String draw, Integer start, Integer length) {
|
||||
return versionHelperI.getVerisonlistData(phoneType, content, draw, start, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* 版本详情页
|
||||
*
|
||||
* @param versionId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/versiondetail"}, method = RequestMethod.GET)
|
||||
public ModelAndView getVersionDetail(String versionId) {
|
||||
return versionHelperI.getVersionDetail(versionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除版本
|
||||
*
|
||||
* @param versionId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/deleteVersion"}, method = RequestMethod.POST, produces = " text/html;charset=utf-8")
|
||||
@ResponseBody
|
||||
public Object deleteVersion(String versionId) {
|
||||
return versionHelperI.deleteVersion(versionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增一个版本信息
|
||||
*
|
||||
* @param tbl_Version
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/addVersion"}, method = RequestMethod.POST, produces = " text/html;charset=utf-8")
|
||||
@ResponseBody
|
||||
public Object addVerison(Tbl_Version tbl_Version) {
|
||||
return versionHelperI.addVerison(tbl_Version);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改一个版本信息
|
||||
*
|
||||
* @param tbl_Version
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/updateVersion"}, method = RequestMethod.POST, produces = " text/html;charset=utf-8")
|
||||
@ResponseBody
|
||||
public Object updateVersion(Tbl_Version tbl_Version) {
|
||||
return versionHelperI.updateVersion(tbl_Version);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改是否强制升级
|
||||
*
|
||||
* @param versionId
|
||||
* @param isMustUpdate
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"/versionShowUpdate"}, method = RequestMethod.POST, produces = " text/html;charset=utf-8")
|
||||
@ResponseBody
|
||||
public Object versionShowUpdate(String versionId, String isMustUpdate) {
|
||||
return versionHelperI.versionShowUpdate(versionId, isMustUpdate);
|
||||
}
|
||||
}
|
||||
|
|
@ -11,11 +11,14 @@ import com.ifish.bean.Tbl_Activa_Code;
|
|||
import com.ifish.bean.Tbl_Device;
|
||||
import com.ifish.bean.Tbl_Device_Statistics;
|
||||
import com.ifish.bean.Tbl_Device_User;
|
||||
import com.ifish.bean.Tbl_Factory_List;
|
||||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Login_Record;
|
||||
import com.ifish.bean.Tbl_Operate_record;
|
||||
import com.ifish.bean.Tbl_Push_List;
|
||||
import com.ifish.bean.Tbl_Upgrade_Notes;
|
||||
import com.ifish.bean.Tbl_User;
|
||||
import com.ifish.bean.Tbl_Vender_List;
|
||||
import com.ifish.enums.PushTypeEnum;
|
||||
import com.ifish.enums.ResultEnum;
|
||||
import com.ifish.mapper.Tbl_Device_Mapper;
|
||||
|
|
@ -27,6 +30,8 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -892,20 +897,31 @@ public class DeviceHelper implements DeviceHelperI {
|
|||
/**
|
||||
* 设置,取消设备授权
|
||||
*
|
||||
* @param deviceId
|
||||
* @param device
|
||||
* @param request
|
||||
* @param isblacklist
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object deviceIsBlacklist(Integer deviceId, String isblacklist) {
|
||||
public Object deviceIsBlacklist(Integer deviceId, String isblacklist, HttpServletRequest request) {
|
||||
try {
|
||||
Tbl_Device device = new Tbl_Device();
|
||||
device.setDeviceId(deviceId);
|
||||
device.setIsBlacklist(isblacklist);
|
||||
int i = tbl_Device_Mapper.updateTbl_Device(device);
|
||||
if (i > 0) {
|
||||
redisKeyHelperI.deleteRedisByTbl_Device(device);
|
||||
if (isblacklist.equals("0")) {
|
||||
device = getDeviceById(deviceId);
|
||||
tbl_Device_Mapper.setAuthorizeTime(new Date(), deviceId);
|
||||
Tbl_Operate_record operateRecord = new Tbl_Operate_record();
|
||||
operateRecord.setCreateTime(new Date());
|
||||
operateRecord.setRecordIp(IfishUtil.getIp(request));
|
||||
operateRecord.setRecordNumber(1);
|
||||
operateRecord.setRecordType("1");
|
||||
operateRecord.setFactoryCode(device.getFactoryCode());
|
||||
tbl_Device_Mapper.insertTbl_Operate_records(operateRecord);
|
||||
} else {
|
||||
tbl_Device_Mapper.setAuthorizeTime(null, deviceId);
|
||||
}
|
||||
|
|
@ -1068,7 +1084,7 @@ public class DeviceHelper implements DeviceHelperI {
|
|||
@Override
|
||||
public ModelAndView getHardwareTypelist() {
|
||||
ModelAndView mv = new ModelAndView();
|
||||
mv.setViewName("deviceloginlist");
|
||||
mv.setViewName("hardwareTypelist");
|
||||
mv.addObject("pagetitle", "设备类型");
|
||||
mv.addObject("title", "设备类型");
|
||||
|
||||
|
|
@ -1117,6 +1133,51 @@ public class DeviceHelper implements DeviceHelperI {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备详情页
|
||||
*
|
||||
* @param hardwareType
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ModelAndView getHardwareTypeDetail(String hardwareType) {
|
||||
ModelAndView mv = new ModelAndView();
|
||||
mv.setViewName("hardwareTypedetail");
|
||||
mv.addObject("pagetitle", "设备详情");
|
||||
mv.addObject("title", "设备详情");
|
||||
List<Map> list = tbl_Factory_List_Mapper.getFactoryListData(0, 1000);
|
||||
mv.addObject("factorylist", list);
|
||||
try {
|
||||
if (StringUtils.isNotBlank(hardwareType)) {
|
||||
Tbl_HardWare_Type hardWare_Type = hardWareTypeHelperI.getHardwareTypeByTypeCode(hardwareType);
|
||||
if (hardWare_Type != null) {
|
||||
mv.addObject("hardWareType", hardWare_Type);
|
||||
mv.addObject("type", "update");
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
mv.addObject("myjs", "<!-- Other plugins ( load only nessesary plugins for every page) -->\n"
|
||||
+ " <script src=\"static/assets/plugins/core/moment/moment.min.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/charts/sparklines/jquery.sparkline.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/charts/pie-chart/jquery.easy-pie-chart.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/forms/icheck/jquery.icheck.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/forms/tags/jquery.tagsinput.min.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/forms/tinymce/tinymce.min.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/tables/jquery.dataTables.js\"></script>\n"
|
||||
+ "<link href=\"static/assets/plugins/tables/jquery.dataTables.css\" rel=\"stylesheet\">"
|
||||
+ "<link href=\"static/assets/plugins/tables/dataTables.bootstrap.css\" rel=\"stylesheet\">"
|
||||
+ " <script src=\"static/assets/plugins/tables/dataTables.bootstrap.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/misc/highlight/highlight.pack.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/misc/countTo/jquery.countTo.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/js/jquery.sprFlat.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/js/app.js\"></script>");
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备类型数据操作
|
||||
*
|
||||
|
|
@ -1133,9 +1194,158 @@ public class DeviceHelper implements DeviceHelperI {
|
|||
}
|
||||
} //修改数据
|
||||
else if (operation.equals("2")) {
|
||||
if (hardWareTypeHelperI.updateHardwareType(tbl_HardWare_Type) > 0) {
|
||||
redisKeyHelperI.deleteTbl_HardWare_Type(tbl_HardWare_Type);
|
||||
return "成功";
|
||||
}
|
||||
} //删除数据
|
||||
else if (operation.equals("3")) {
|
||||
if (hardWareTypeHelperI.deleteHardwareType(tbl_HardWare_Type) > 0) {
|
||||
redisKeyHelperI.deleteTbl_HardWare_Type(tbl_HardWare_Type);
|
||||
return "成功";
|
||||
}
|
||||
}
|
||||
return "失败";
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试工具分配授权接口
|
||||
*
|
||||
* @param data
|
||||
* @param subStr
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object saveMacAddress(Map<String, String> data, String subStr, HttpServletRequest request, HttpServletResponse response) {
|
||||
response.setHeader("Access-Control-Allow-Origin", "*");
|
||||
try {
|
||||
String ip = IfishUtil.getIp(request);
|
||||
JSONObject json = JSONObject.parseObject(subStr);
|
||||
String brandCode = json.getString("brandCode");
|
||||
String factoryCode = json.getString("factoryCode");
|
||||
String isBlacklist = json.getString("isBlacklist");
|
||||
String macs = json.getString("mac");
|
||||
String hardType = json.getString("hardType");
|
||||
String[] mac = macs.equals("") ? null : macs.split(",");
|
||||
String[] hardTypes = hardType.equals("") ? null : hardType.split(",");
|
||||
Map<String, Object> map = saveDevices(factoryCode, isBlacklist, brandCode, ip, mac, hardTypes);
|
||||
JSONObject returnJson = new JSONObject(map);
|
||||
return returnJson.toString();
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Map<String, Object> saveDevices(String factoryCode, String isBlacklist, String brandCode, String ip, String[] macs, String[] hardTypes) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
try {
|
||||
//保存设备信息
|
||||
if (macs != null && hardTypes != null) {
|
||||
//编号
|
||||
String code = IfishUtil.getCode();
|
||||
//为空则默认授权
|
||||
if (!(isBlacklist != null && isBlacklist != "")) {
|
||||
isBlacklist = "0";
|
||||
}
|
||||
//授权数量
|
||||
int j = 0;
|
||||
for (int i = 0; i < macs.length; i++) {
|
||||
String macAddress = macs[i];
|
||||
Tbl_Device device = getDeviceByMacAddress(macAddress);
|
||||
if (device != null) {
|
||||
Tbl_Device_Statistics device_Statistics = getDeviceStatisticsByMacAddress(macAddress);
|
||||
boolean flag = false;
|
||||
if (device_Statistics == null) {
|
||||
device_Statistics.setDeviceId(device.getDeviceId());
|
||||
device_Statistics.setMacAddress(macAddress);
|
||||
flag = true;
|
||||
}
|
||||
device.setFactoryCode(factoryCode);
|
||||
device.setBrandCode(brandCode);
|
||||
device.setHardwareType(hardTypes[i]);
|
||||
device_Statistics.setFactoryCode(factoryCode);
|
||||
device_Statistics.setBrandCode(brandCode);
|
||||
device_Statistics.setHardwareType(hardTypes[i]);
|
||||
//原来未授权
|
||||
if (device.getIsBlacklist().equals("1")) {
|
||||
//授权
|
||||
if (isBlacklist.equals("0")) {
|
||||
j++;
|
||||
device.setIsBlacklist(isBlacklist);
|
||||
device_Statistics.setAuthorizeTime(new Date());
|
||||
}
|
||||
}
|
||||
//编号
|
||||
device_Statistics.setCreateCode(code);
|
||||
//分配日期
|
||||
device_Statistics.setCreateDate(new Date());
|
||||
tbl_Device_Mapper.updateTbl_Device(device);
|
||||
redisKeyHelperI.deleteRedisByTbl_Device(device);
|
||||
if (flag) {
|
||||
tbl_Device_Mapper.insertDeviceStatistics(device_Statistics);
|
||||
} else {
|
||||
tbl_Device_Mapper.updateDeviceStatistics(device_Statistics);
|
||||
redisKeyHelperI.deleteRedisByTbl_Device_Statistics(device_Statistics);
|
||||
}
|
||||
} else {
|
||||
device = new Tbl_Device();
|
||||
device.setFactoryCode(factoryCode);
|
||||
device.setBrandCode(brandCode);
|
||||
device.setHardwareType(hardTypes[i]);
|
||||
Tbl_Device_Statistics device_Statistics = new Tbl_Device_Statistics();
|
||||
device_Statistics.setDeviceId(device.getDeviceId());
|
||||
device_Statistics.setMacAddress(macAddress);
|
||||
device_Statistics.setFactoryCode(factoryCode);
|
||||
device_Statistics.setBrandCode(brandCode);
|
||||
device_Statistics.setHardwareType(hardTypes[i]);
|
||||
//授权
|
||||
if (isBlacklist.equals("0")) {
|
||||
j++;
|
||||
device.setIsBlacklist(isBlacklist);
|
||||
device_Statistics.setAuthorizeTime(new Date());
|
||||
}
|
||||
//编号
|
||||
device_Statistics.setCreateCode(code);
|
||||
//分配日期
|
||||
device_Statistics.setCreateDate(new Date());
|
||||
tbl_Device_Mapper.insertDevice(device);
|
||||
tbl_Device_Mapper.insertDeviceStatistics(device_Statistics);
|
||||
}
|
||||
}
|
||||
//分配
|
||||
Tbl_Operate_record operateRecord = new Tbl_Operate_record();
|
||||
operateRecord.setCreateTime(new Date());
|
||||
operateRecord.setRecordIp(ip);
|
||||
operateRecord.setRecordNumber(macs.length);
|
||||
operateRecord.setRecordType("0");
|
||||
operateRecord.setFactoryCode(factoryCode);
|
||||
//编号
|
||||
operateRecord.setCreateCode(code);
|
||||
tbl_Device_Mapper.insertTbl_Operate_records(operateRecord);
|
||||
//授权
|
||||
if (j > 0) {
|
||||
Tbl_Operate_record operateRecord1 = new Tbl_Operate_record();
|
||||
operateRecord1.setCreateTime(new Date());
|
||||
operateRecord1.setRecordIp(ip);
|
||||
operateRecord1.setRecordNumber(j);
|
||||
operateRecord1.setRecordType("1");
|
||||
operateRecord1.setFactoryCode(factoryCode);
|
||||
tbl_Device_Mapper.insertTbl_Operate_records(operateRecord1);
|
||||
}
|
||||
map.put("parm", "result");
|
||||
map.put("parm1", macs.length);
|
||||
map.put("parm2", j);
|
||||
if (macs.length > 0) {
|
||||
map.put("parm3", code);
|
||||
} else {
|
||||
map.put("parm3", "");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ import com.ifish.bean.Tbl_Device_User;
|
|||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Upgrade_Notes;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
|
|
@ -227,7 +230,7 @@ public interface DeviceHelperI {
|
|||
* @param isblacklist
|
||||
* @return
|
||||
*/
|
||||
public Object deviceIsBlacklist(Integer deviceId, String isblacklist);
|
||||
public Object deviceIsBlacklist(Integer deviceId, String isblacklist, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 设备绑定列表查询页面
|
||||
|
|
@ -280,6 +283,14 @@ public interface DeviceHelperI {
|
|||
*/
|
||||
public ModelAndView getHardwareTypelist();
|
||||
|
||||
/**
|
||||
* 设备详情页
|
||||
*
|
||||
* @param hardwareType
|
||||
* @return
|
||||
*/
|
||||
public ModelAndView getHardwareTypeDetail(String hardwareType);
|
||||
|
||||
/**
|
||||
* 设备类型列表页面数据
|
||||
*
|
||||
|
|
@ -299,4 +310,15 @@ public interface DeviceHelperI {
|
|||
* @return
|
||||
*/
|
||||
public Object HardwareTypeOperation(Tbl_HardWare_Type tbl_HardWare_Type, String operation);
|
||||
|
||||
/**
|
||||
* 测试工具分配授权接口
|
||||
*
|
||||
* @param data
|
||||
* @param subStr
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
public Object saveMacAddress(Map<String, String> data, String subStr, HttpServletRequest request, HttpServletResponse response);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -417,6 +417,32 @@ public class FactoryHelper implements FactoryHelperI {
|
|||
List<Map> list = tbl_Factory_List_Mapper.getFactoryListData(0, 1000);
|
||||
mv.addObject("factorylist", list);
|
||||
mv.addObject("factoryCode", factoryCode);
|
||||
if (StringUtils.isBlank(createTimeBefore)) {
|
||||
//获取上个月数据
|
||||
Format format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.MONTH, -1);
|
||||
//上个月第一天
|
||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||
createTimeBefore = format.format(calendar.getTime());
|
||||
|
||||
//上个月最后一天
|
||||
int maxDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
calendar.set(Calendar.DAY_OF_MONTH, maxDay);
|
||||
createTimeAfter = format.format(calendar.getTime());
|
||||
}
|
||||
if (StringUtils.isBlank(createTimeAfter)) {
|
||||
//获取上个月数据
|
||||
Format format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.MONTH, -1);
|
||||
//上个月最后一天
|
||||
int maxDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
calendar.set(Calendar.DAY_OF_MONTH, maxDay);
|
||||
createTimeAfter = format.format(calendar.getTime());
|
||||
}
|
||||
mv.addObject("createTimeBefore", createTimeBefore);
|
||||
mv.addObject("createTimeAfter", createTimeAfter);
|
||||
mv.addObject("map", authorizationData(factoryCode, createTimeBefore, createTimeAfter));
|
||||
mv.addObject("myjs", "<!-- Other plugins ( load only nessesary plugins for every page) -->\n"
|
||||
+ " <script src=\"static/assets/plugins/core/moment/moment.min.js\"></script>\n"
|
||||
|
|
@ -443,21 +469,7 @@ public class FactoryHelper implements FactoryHelperI {
|
|||
*/
|
||||
public Map authorizationData(String factoryCode, String createTimeBefore, String createTimeAfter) {
|
||||
Map map = new HashMap();
|
||||
if (StringUtils.isBlank(createTimeBefore) && StringUtils.isBlank(createTimeAfter)) {
|
||||
//获取上个月数据
|
||||
Format format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.MONTH, -1);
|
||||
//上个月第一天
|
||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||
createTimeBefore = format.format(calendar.getTime());
|
||||
|
||||
//上个月最后一天
|
||||
int maxDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
calendar.set(Calendar.DAY_OF_MONTH, maxDay);
|
||||
createTimeAfter = format.format(calendar.getTime());
|
||||
}
|
||||
//百分比
|
||||
//百分比
|
||||
NumberFormat numberFormat = NumberFormat.getInstance();
|
||||
//设置精确到小数点后0位
|
||||
numberFormat.setMaximumFractionDigits(0);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
package com.ifish.helper;
|
||||
|
||||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Vender;
|
||||
import com.ifish.bean.Tbl_Vender_List;
|
||||
import com.ifish.mapper.Tbl_Hardware_Type_Mapper;
|
||||
import com.ifish.util.IfishUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -65,12 +65,12 @@ public class HardWareTypeHelper implements HardWareTypeHelperI {
|
|||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public Tbl_Vender getVenderListByBrandCode(String code) throws Exception {
|
||||
Tbl_Vender venderList = new Tbl_Vender();
|
||||
public Tbl_Vender_List getVenderListByBrandCode(String code) throws Exception {
|
||||
Tbl_Vender_List venderList = new Tbl_Vender_List();
|
||||
String key = redisKeyHelperI.getTbl_Vender_ListRedisKeyByCode(code);
|
||||
String redisString = redisHelperI.getRedis(key);
|
||||
if (StringUtils.isNotBlank(redisString)) {
|
||||
venderList = (Tbl_Vender) IfishUtil.JsonToBean(redisString, Tbl_Vender.class);
|
||||
venderList = (Tbl_Vender_List) IfishUtil.JsonToBean(redisString, Tbl_Vender_List.class);
|
||||
} else {
|
||||
venderList = tbl_Hardware_Type_Mapper.getVenderListByBrandCode(code);
|
||||
redisHelperI.setRedis(key, IfishUtil.ObjectToJson(venderList));
|
||||
|
|
@ -86,12 +86,12 @@ public class HardWareTypeHelper implements HardWareTypeHelperI {
|
|||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public Tbl_Vender getVenderListByHardwareTypeCode(String code) throws Exception {
|
||||
Tbl_Vender venderList = new Tbl_Vender();
|
||||
public Tbl_Vender_List getVenderListByHardwareTypeCode(String code) throws Exception {
|
||||
Tbl_Vender_List venderList = new Tbl_Vender_List();
|
||||
String key = redisKeyHelperI.getTbl_Vender_ListRedisKeyByCode(code);
|
||||
String redisString = redisHelperI.getRedis(key);
|
||||
if (StringUtils.isNotBlank(redisString)) {
|
||||
venderList = (Tbl_Vender) IfishUtil.JsonToBean(redisString, Tbl_Vender.class);
|
||||
venderList = (Tbl_Vender_List) IfishUtil.JsonToBean(redisString, Tbl_Vender_List.class);
|
||||
} else {
|
||||
venderList = tbl_Hardware_Type_Mapper.getVenderListByHardwareTypeCode(code);
|
||||
redisHelperI.setRedis(key, IfishUtil.ObjectToJson(venderList));
|
||||
|
|
@ -116,4 +116,38 @@ public class HardWareTypeHelper implements HardWareTypeHelperI {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改一条设备信息
|
||||
*
|
||||
* @param tbl_HardWare_Type
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Integer updateHardwareType(Tbl_HardWare_Type tbl_HardWare_Type) {
|
||||
|
||||
try {
|
||||
Integer i = tbl_Hardware_Type_Mapper.updateHardwareType(tbl_HardWare_Type);
|
||||
redisKeyHelperI.deleteTbl_HardWare_Type(tbl_HardWare_Type);
|
||||
return i;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除一条设备信息
|
||||
*
|
||||
* @param tbl_HardWare_Type
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Integer deleteHardwareType(Tbl_HardWare_Type tbl_HardWare_Type) {
|
||||
try {
|
||||
Integer i = tbl_Hardware_Type_Mapper.deleteHardwareType(tbl_HardWare_Type);
|
||||
return i;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
package com.ifish.helper;
|
||||
|
||||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Vender;
|
||||
import com.ifish.bean.Tbl_Vender_List;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -29,7 +29,7 @@ public interface HardWareTypeHelperI {
|
|||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
Tbl_Vender getVenderListByBrandCode(String code) throws Exception;
|
||||
Tbl_Vender_List getVenderListByBrandCode(String code) throws Exception;
|
||||
|
||||
/**
|
||||
* 根据设备型号获取厂家信息
|
||||
|
|
@ -38,7 +38,7 @@ public interface HardWareTypeHelperI {
|
|||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Tbl_Vender getVenderListByHardwareTypeCode(String code) throws Exception;
|
||||
public Tbl_Vender_List getVenderListByHardwareTypeCode(String code) throws Exception;
|
||||
|
||||
/**
|
||||
* 插入一条设备类型信息
|
||||
|
|
@ -48,4 +48,20 @@ public interface HardWareTypeHelperI {
|
|||
*/
|
||||
Integer insertHardwareType(Tbl_HardWare_Type tbl_HardWare_Type);
|
||||
|
||||
/**
|
||||
* 修改一条设备信息
|
||||
*
|
||||
* @param tbl_HardWare_Type
|
||||
* @return
|
||||
*/
|
||||
public Integer updateHardwareType(Tbl_HardWare_Type tbl_HardWare_Type);
|
||||
|
||||
/**
|
||||
* 删除一条设备信息
|
||||
*
|
||||
* @param tbl_HardWare_Type
|
||||
* @return
|
||||
*/
|
||||
public Integer deleteHardwareType(Tbl_HardWare_Type tbl_HardWare_Type);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -220,6 +220,9 @@ public class PushMessageHelper implements PushMessageHelperI {
|
|||
redisHelperI.setRedis(key, allCount.toString());
|
||||
}
|
||||
}
|
||||
if (pushType.equals("remind_water")) {
|
||||
allCount = count;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ package com.ifish.helper;
|
|||
import com.ifish.bean.Tbl_Device;
|
||||
import com.ifish.bean.Tbl_Device_Statistics;
|
||||
import com.ifish.bean.Tbl_Device_User;
|
||||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Live_Message;
|
||||
import com.ifish.bean.Tbl_Live_Room;
|
||||
import com.ifish.bean.Tbl_Push_List;
|
||||
|
|
@ -633,4 +634,16 @@ public class RedisKeyHelper implements RedisKeyHelperI {
|
|||
redisHelperI.delRedisByTagKey(RedisKey.VENDER_CODE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备类型缓存
|
||||
*
|
||||
* @param tbl_HardWare_Type
|
||||
*/
|
||||
@Override
|
||||
public void deleteTbl_HardWare_Type(Tbl_HardWare_Type tbl_HardWare_Type) {
|
||||
if (StringUtils.isNotBlank(tbl_HardWare_Type.getHardwareType())) {
|
||||
redisHelperI.delRedisByTagKey(getTbl_HardWare_TypeRedisKeyByTypeCode(tbl_HardWare_Type.getHardwareType()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ package com.ifish.helper;
|
|||
import com.ifish.bean.Tbl_Device;
|
||||
import com.ifish.bean.Tbl_Device_Statistics;
|
||||
import com.ifish.bean.Tbl_Device_User;
|
||||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Live_Message;
|
||||
import com.ifish.bean.Tbl_Live_Room;
|
||||
import com.ifish.bean.Tbl_Push_List;
|
||||
|
|
@ -388,4 +389,11 @@ public interface RedisKeyHelperI {
|
|||
*/
|
||||
public void deleteTbl_Vender_List_RedisKey();
|
||||
|
||||
/**
|
||||
* 删除设备类型缓存
|
||||
*
|
||||
* @param tbl_HardWare_Type
|
||||
*/
|
||||
public void deleteTbl_HardWare_Type(Tbl_HardWare_Type tbl_HardWare_Type);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import com.ifish.bean.Tbl_Device_User;
|
|||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Security_User;
|
||||
import com.ifish.bean.Tbl_User;
|
||||
import com.ifish.bean.Tbl_Vender;
|
||||
import com.ifish.bean.Tbl_Vender_List;
|
||||
import com.ifish.mapper.Tbl_Push_List_Mapper;
|
||||
import com.ifish.mapper.Tbl_User_Mapper;
|
||||
import com.ifish.util.IfishUtil;
|
||||
|
|
@ -243,7 +243,7 @@ public class UserHelper implements UserHelperI {
|
|||
} else {
|
||||
//设备信息
|
||||
Tbl_HardWare_Type hardWare_Type = hardWareTypeHelperI.getHardwareTypeByTypeCode(device.getHardwareType());
|
||||
Tbl_Vender vender = hardWareTypeHelperI.getVenderListByHardwareTypeCode(hardWare_Type.getHardwareType());
|
||||
Tbl_Vender_List vender = hardWareTypeHelperI.getVenderListByHardwareTypeCode(hardWare_Type.getHardwareType());
|
||||
Tbl_Device_Statistics device_Statistics = deviceHelper.getDeviceStatisticsByDeviceId(device.getDeviceId());
|
||||
Map map = new HashMap();
|
||||
//设备ID
|
||||
|
|
|
|||
|
|
@ -0,0 +1,201 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.ifish.helper;
|
||||
|
||||
import com.ifish.bean.Tbl_Version;
|
||||
import com.ifish.mapper.Tbl_Version_Mapper;
|
||||
import com.ifish.util.IfishUtil;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
@Component
|
||||
public class VersionHelper implements VersionHelperI {
|
||||
|
||||
@Autowired
|
||||
private Tbl_Version_Mapper tbl_Version_Mapper;
|
||||
|
||||
/**
|
||||
* 版本管理首页
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ModelAndView getVersionlist() {
|
||||
ModelAndView mv = new ModelAndView();
|
||||
mv.setViewName("versionlist");
|
||||
mv.addObject("pagetitle", "版本管理");
|
||||
mv.addObject("title", "版本管理");
|
||||
mv.addObject("myjs", "<!-- Other plugins ( load only nessesary plugins for every page) -->\n"
|
||||
+ " <script src=\"static/assets/plugins/core/moment/moment.min.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/charts/sparklines/jquery.sparkline.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/charts/pie-chart/jquery.easy-pie-chart.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/forms/icheck/jquery.icheck.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/forms/tags/jquery.tagsinput.min.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/forms/tinymce/tinymce.min.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/tables/jquery.dataTables.js\"></script>\n"
|
||||
+ "<link href=\"static/assets/plugins/tables/jquery.dataTables.css\" rel=\"stylesheet\">"
|
||||
+ "<link href=\"static/assets/plugins/tables/dataTables.bootstrap.css\" rel=\"stylesheet\">"
|
||||
+ " <script src=\"static/assets/plugins/tables/dataTables.bootstrap.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/misc/highlight/highlight.pack.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/misc/countTo/jquery.countTo.js\"></script>\n"
|
||||
+ " <script src=\"static/switchery/switchery.min.js\"></script>\n"
|
||||
+ "<link href=\"static/switchery/switchery.min.css\" rel=\"stylesheet\">"
|
||||
+ " <script src=\"static/assets/js/jquery.sprFlat.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/js/app.js\"></script>");
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 版本管理页面数据
|
||||
*
|
||||
* @param phoneType
|
||||
* @param content
|
||||
* @param draw
|
||||
* @param start
|
||||
* @param length
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getVerisonlistData(String phoneType, String content, String draw, Integer start, Integer length) {
|
||||
List<Map> list = tbl_Version_Mapper.getVersionListData(phoneType, content, start, length);
|
||||
for (Map map : list) {
|
||||
String dateTime = IfishUtil.format((Date) map.get("createTime"));
|
||||
map.put("createTime", dateTime);
|
||||
}
|
||||
Integer allCount = tbl_Version_Mapper.getAllVersionListDataCount();
|
||||
Integer count = 0;
|
||||
if (StringUtils.isNotBlank(phoneType) || StringUtils.isNotBlank(content)) {
|
||||
count = tbl_Version_Mapper.getVeriosnListDataCountBySelect(phoneType, content);
|
||||
} else {
|
||||
count = allCount;
|
||||
}
|
||||
Map map = new HashMap();
|
||||
map.put("data", list);
|
||||
map.put("draw", draw);
|
||||
map.put("recordsTotal", allCount);
|
||||
map.put("recordsFiltered", count);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 版本详情页
|
||||
*
|
||||
* @param versionId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ModelAndView getVersionDetail(String versionId) {
|
||||
ModelAndView mv = new ModelAndView();
|
||||
mv.setViewName("versiondetail");
|
||||
mv.addObject("pagetitle", "版本详情");
|
||||
mv.addObject("title", "版本详情");
|
||||
if (StringUtils.isNotBlank(versionId)) {
|
||||
Tbl_Version tbl_Version = tbl_Version_Mapper.getTbl_VersionById(versionId);
|
||||
mv.addObject("version", tbl_Version);
|
||||
mv.addObject("type", "update");
|
||||
}
|
||||
mv.addObject("myjs", "<!-- Other plugins ( load only nessesary plugins for every page) -->\n"
|
||||
+ " <script src=\"static/assets/plugins/core/moment/moment.min.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/charts/sparklines/jquery.sparkline.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/charts/pie-chart/jquery.easy-pie-chart.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/forms/icheck/jquery.icheck.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/forms/tags/jquery.tagsinput.min.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/forms/tinymce/tinymce.min.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/tables/jquery.dataTables.js\"></script>\n"
|
||||
+ "<link href=\"static/assets/plugins/tables/jquery.dataTables.css\" rel=\"stylesheet\">"
|
||||
+ "<link href=\"static/assets/plugins/tables/dataTables.bootstrap.css\" rel=\"stylesheet\">"
|
||||
+ " <script src=\"static/assets/plugins/tables/dataTables.bootstrap.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/misc/highlight/highlight.pack.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/plugins/misc/countTo/jquery.countTo.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/js/jquery.sprFlat.js\"></script>\n"
|
||||
+ " <script src=\"static/assets/js/app.js\"></script>");
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除版本管理
|
||||
*
|
||||
* @param versionId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object deleteVersion(String versionId) {
|
||||
try {
|
||||
int i = tbl_Version_Mapper.deleteTbl_VersionById(versionId);
|
||||
if (i > 0) {
|
||||
return "成功";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return "失败";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增一个版本信息
|
||||
*
|
||||
* @param tbl_Version
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object addVerison(Tbl_Version tbl_Version) {
|
||||
try {
|
||||
int i = tbl_Version_Mapper.addTbl_Version(tbl_Version);
|
||||
if (i > 0) {
|
||||
return "成功";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return "失败";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改一个版本信息
|
||||
*
|
||||
* @param tbl_Version
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object updateVersion(Tbl_Version tbl_Version) {
|
||||
try {
|
||||
int i = tbl_Version_Mapper.updateTbl_Version(tbl_Version);
|
||||
if (i > 0) {
|
||||
return "成功";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return "失败";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改版本是否强制升级
|
||||
*
|
||||
* @param versionId
|
||||
* @param isMustUpdate
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object versionShowUpdate(String versionId, String isMustUpdate) {
|
||||
try {
|
||||
int i = tbl_Version_Mapper.updateTbl_VersionisMustUpdate(isMustUpdate, versionId);
|
||||
if (i > 0) {
|
||||
return "成功";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return "失败";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.ifish.helper;
|
||||
|
||||
import com.ifish.bean.Tbl_Version;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public interface VersionHelperI {
|
||||
|
||||
/**
|
||||
* 版本管理首页
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ModelAndView getVersionlist();
|
||||
|
||||
/**
|
||||
* 版本管理页面数据
|
||||
*
|
||||
* @param phoneType
|
||||
* @param content
|
||||
* @param draw
|
||||
* @param start
|
||||
* @param length
|
||||
* @return
|
||||
*/
|
||||
public Object getVerisonlistData(String phoneType, String content, String draw, Integer start, Integer length);
|
||||
|
||||
/**
|
||||
* 版本详情页
|
||||
*
|
||||
* @param versionId
|
||||
* @return
|
||||
*/
|
||||
public ModelAndView getVersionDetail(String versionId);
|
||||
|
||||
/**
|
||||
* 新增一个版本信息
|
||||
*
|
||||
* @param tbl_Version
|
||||
* @return
|
||||
*/
|
||||
public Object addVerison(Tbl_Version tbl_Version);
|
||||
|
||||
/**
|
||||
* 删除版本管理
|
||||
*
|
||||
* @param versionId
|
||||
* @return
|
||||
*/
|
||||
public Object deleteVersion(String versionId);
|
||||
|
||||
/**
|
||||
* 修改一个版本信息
|
||||
*
|
||||
* @param tbl_Version
|
||||
* @return
|
||||
*/
|
||||
public Object updateVersion(Tbl_Version tbl_Version);
|
||||
|
||||
/**
|
||||
* 修改版本是否强制升级
|
||||
*
|
||||
* @param versionId
|
||||
* @param isMustUpdate
|
||||
* @return
|
||||
*/
|
||||
public Object versionShowUpdate(String versionId, String isMustUpdate);
|
||||
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ import com.ifish.bean.Tbl_Device_Statistics;
|
|||
import com.ifish.bean.Tbl_Device_User;
|
||||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Login_Record;
|
||||
import com.ifish.bean.Tbl_Operate_record;
|
||||
import com.ifish.bean.Tbl_Upgrade_Notes;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -518,4 +519,14 @@ public interface Tbl_Device_Mapper {
|
|||
*/
|
||||
@Select("SELECT COUNT(1) FROM Tbl_hardware_type ")
|
||||
Integer getAllHardware_Type_MapperListCount();
|
||||
|
||||
/**
|
||||
* 插入一套分配授权数据
|
||||
*
|
||||
* @param tbl_Operate_record
|
||||
* @return
|
||||
*/
|
||||
@Insert("INSERT INTO tbl_operate_record(record_number,record_ip,factory_code,record_type,create_time,create_code) VALUES ("
|
||||
+ "#{record.recordNumber},#{record.recordIp},#{record.factoryCode},#{record.recordType},NOW(),#{record.createCode})")
|
||||
Integer insertTbl_Operate_records(@Param("record") Tbl_Operate_record tbl_Operate_record);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ package com.ifish.mapper;
|
|||
import com.ifish.bean.Tbl_Device;
|
||||
import com.ifish.bean.Tbl_Device_Statistics;
|
||||
import com.ifish.bean.Tbl_Device_User;
|
||||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Upgrade_Notes;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -849,7 +850,7 @@ public class Tbl_Device_MapperSql {
|
|||
if (StringUtils.isNotBlank(showName)) {
|
||||
sb.append(" where hardware_name like '%").append(showName).append("%'");
|
||||
}
|
||||
sb.append(" order by create_time limit ").append(start).append(",").append(length);
|
||||
sb.append(" order by hardware_type limit ").append(start).append(",").append(length);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
|
@ -869,4 +870,25 @@ public class Tbl_Device_MapperSql {
|
|||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改一条设备类型信息
|
||||
*
|
||||
* @param tbl_HardWare_Type
|
||||
* @return
|
||||
*/
|
||||
public String updateHardwareType(@Param("hard") Tbl_HardWare_Type tbl_HardWare_Type) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
// UPDATE tbl_hardware_type set hardware_name=#{hard.hardwareName},factory_code=#{hard.factoryCode},hardware_desc=#{hard.hardwareDesc},"
|
||||
// + "control_amount=#{hard.controlAmount},timer_amount=#{hard.timerAmount},is_custom_icon=#{hard.isCustomIcon},icon_link=#{hard.iconLink},all_icon_name=#{hard.allIconName},update_time=NOW(),is_lightness"
|
||||
// + "=#{hard.isLightness},is_sark_lamp=#{hard.isSarkLamp},is_work_model=#{hard.isWorkModel},all_show_name=#{hard.allShowName},default_show_name=#{hard.defaultShowName},default_icon_name=#{hard.defaultIconName}"
|
||||
// + " WHERE hardware_type=#{hard.hardwareType}
|
||||
sb.append("UPDATE tbl_hardware_type set hardware_name='" + tbl_HardWare_Type.getHardwareName() + "',factory_code='" + tbl_HardWare_Type.getFactoryCode() + "',hardware_desc='" + tbl_HardWare_Type.getHardwareDesc()
|
||||
+ "',control_amount='" + tbl_HardWare_Type.getControlAmount() + "',timer_amount='" + tbl_HardWare_Type.getTimerAmount() + "',is_custom_icon='" + tbl_HardWare_Type.getIsCustomIcon() + "',icon_link='" + tbl_HardWare_Type.getIconLink()
|
||||
+ "',all_icon_name='" + tbl_HardWare_Type.getAllIconName() + "',update_time=NOW(),is_lightness='" + tbl_HardWare_Type.getIsLightness() + "',is_sark_lamp='" + tbl_HardWare_Type.getIsSarkLamp() + "',is_work_model='"
|
||||
+ tbl_HardWare_Type.getIsWorkModel() + "',all_show_name='" + tbl_HardWare_Type.getAllShowName() + "',default_show_name='" + tbl_HardWare_Type.getDefaultShowName() + "',default_icon_name='"
|
||||
+ tbl_HardWare_Type.getDefaultIconName() + "' WHERE hardware_type='" + tbl_HardWare_Type.getHardwareType() + "'");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ package com.ifish.mapper;
|
|||
|
||||
import com.ifish.bean.Tbl_Factory_List;
|
||||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Vender;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
|
|
|
|||
|
|
@ -6,12 +6,13 @@
|
|||
package com.ifish.mapper;
|
||||
|
||||
import com.ifish.bean.Tbl_HardWare_Type;
|
||||
import com.ifish.bean.Tbl_Vender;
|
||||
import com.ifish.bean.Tbl_Vender_List;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
import org.apache.ibatis.annotations.UpdateProvider;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -26,7 +27,7 @@ public interface Tbl_Hardware_Type_Mapper {
|
|||
* @return
|
||||
*/
|
||||
@Select("select hardware_type,hardware_name,control_amount,timer_amount,is_work_model,is_custom_icon,all_icon_name,all_show_name,default_icon_name,default_show_name,"
|
||||
+ "icon_link,is_lightness,is_sark_lamp,hardware_desc,update_time,create_time from tbl_hardware_type where hardware_type=#{type}")
|
||||
+ "icon_link,is_lightness,is_sark_lamp,hardware_desc,update_time,create_time,factory_code from tbl_hardware_type where hardware_type=#{type}")
|
||||
Tbl_HardWare_Type getHardwareTypeByTypeCode(@Param("type") String type);
|
||||
|
||||
/**
|
||||
|
|
@ -36,7 +37,7 @@ public interface Tbl_Hardware_Type_Mapper {
|
|||
* @return
|
||||
*/
|
||||
@Select("select brand_code,brand_name,brand_introduce,brand_logo from tbl_vender_list where brand_code=#{code}")
|
||||
Tbl_Vender getVenderListByBrandCode(@Param("code") String code);
|
||||
Tbl_Vender_List getVenderListByBrandCode(@Param("code") String code);
|
||||
|
||||
/**
|
||||
* 根据设备型号获取厂家信息
|
||||
|
|
@ -46,7 +47,7 @@ public interface Tbl_Hardware_Type_Mapper {
|
|||
* @throws Exception
|
||||
*/
|
||||
@Select("select a.brand_code,brand_name,brand_introduce,brand_logo from tbl_vender_list a LEFT JOIN tbl_vender_hardware b ON a.brand_code = b.brand_code where b.hardware_type=#{code}")
|
||||
Tbl_Vender getVenderListByHardwareTypeCode(@Param("code") String code);
|
||||
Tbl_Vender_List getVenderListByHardwareTypeCode(@Param("code") String code);
|
||||
|
||||
/**
|
||||
* 插入一条设备类型数据
|
||||
|
|
@ -66,8 +67,20 @@ public interface Tbl_Hardware_Type_Mapper {
|
|||
* @param tbl_HardWare_Type
|
||||
* @return
|
||||
*/
|
||||
@Update("")
|
||||
// @Update("UPDATE tbl_hardware_type set hardware_name=#{hard.hardwareName},factory_code=#{hard.factoryCode},hardware_desc=#{hard.hardwareDesc},"
|
||||
// + "control_amount=#{hard.controlAmount},timer_amount=#{hard.timerAmount},is_custom_icon=#{hard.isCustomIcon},icon_link=#{hard.iconLink},all_icon_name=#{hard.allIconName},update_time=NOW(),is_lightness"
|
||||
// + "=#{hard.isLightness},is_sark_lamp=#{hard.isSarkLamp},is_work_model=#{hard.isWorkModel},all_show_name=#{hard.allShowName},default_show_name=#{hard.defaultShowName},default_icon_name=#{hard.defaultIconName}"
|
||||
// + " WHERE hardware_type=#{hard.hardwareType}")
|
||||
@UpdateProvider(type = Tbl_Device_MapperSql.class, method = "updateHardwareType")
|
||||
Integer updateHardwareType(@Param("hard") Tbl_HardWare_Type tbl_HardWare_Type);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除一条设备信息
|
||||
*
|
||||
* @param tbl_HardWare_Type
|
||||
* @return
|
||||
*/
|
||||
@Delete("delete from tbl_hardware_type where hardware_type=#{hard.hardwareType}")
|
||||
Integer deleteHardwareType(@Param("hard") Tbl_HardWare_Type tbl_HardWare_Type);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.ifish.bean.Tbl_Operate_record;
|
|||
import com.ifish.bean.Tbl_Payee_Info;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.SelectProvider;
|
||||
|
|
@ -106,4 +107,6 @@ public interface Tbl_Pay_Bill_Mapper {
|
|||
*/
|
||||
@Select("Select count(1) from tbl_operate_record where record_type='1' and factory_code = #{code} AND #{date}=date_format(create_time,'%Y-%m')")
|
||||
Integer getOperate_recordsCount(@Param("code") String factoryCode, @Param("date") String billMonth);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ public class Tbl_Push_List_MapperSql {
|
|||
}
|
||||
if (StringUtils.isNotBlank(pushType)) {
|
||||
sb.append(" AND a.push_type = #{pushType}");
|
||||
} else {
|
||||
sb.append(" AND a.push_type <> 'remind_water'");
|
||||
}
|
||||
if (StringUtils.isNotBlank(sdkVersion)) {
|
||||
sb.append(" AND c.sdk_version = #{sdkversion}");
|
||||
|
|
@ -115,6 +117,8 @@ public class Tbl_Push_List_MapperSql {
|
|||
}
|
||||
if (StringUtils.isNotBlank(pushType)) {
|
||||
sb.append(" AND a.push_type = #{pushType}");
|
||||
} else {
|
||||
sb.append(" AND a.push_type <> 'remind_water'");
|
||||
}
|
||||
if (StringUtils.isNotBlank(sdkVersion)) {
|
||||
sb.append(" AND c.sdk_version = #{sdkversion}");
|
||||
|
|
@ -125,13 +129,6 @@ public class Tbl_Push_List_MapperSql {
|
|||
if (StringUtils.isNotBlank(mac)) {
|
||||
sb.append(" AND b.mac_address = #{mac}");
|
||||
}
|
||||
if (StringUtils.isBlank(sortField)) {
|
||||
sortField = "push_id";
|
||||
}
|
||||
if (StringUtils.isBlank(sortMode)) {
|
||||
sortMode = "DESC";
|
||||
}
|
||||
sb.append("ORDER BY a." + sortField + " " + sortMode);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +140,7 @@ public class Tbl_Push_List_MapperSql {
|
|||
public String getPushListDataAllCount() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("SELECT COUNT(1) ");
|
||||
sb.append(" from tbl_push_list a");
|
||||
sb.append(" from tbl_push_list a where a.push_type <> 'remind_water'");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.ifish.mapper;
|
||||
|
||||
import com.ifish.bean.Tbl_Version;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.SelectProvider;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public interface Tbl_Version_Mapper {
|
||||
|
||||
/**
|
||||
* 查询版本数据
|
||||
*
|
||||
* @param phoneType
|
||||
* @param context
|
||||
* @param start
|
||||
* @param length
|
||||
* @return
|
||||
*/
|
||||
@SelectProvider(type = Tbl_Version_MapperSql.class, method = "getVersionListData")
|
||||
List<Map> getVersionListData(@Param("type") String phoneType, String context, Integer start, Integer length);
|
||||
|
||||
/**
|
||||
* 查询版本数据数量
|
||||
*
|
||||
* @param phoneType
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
@SelectProvider(type = Tbl_Version_MapperSql.class, method = "getVeriosnListDataCountBySelect")
|
||||
Integer getVeriosnListDataCountBySelect(@Param("type") String phoneType, String context);
|
||||
|
||||
/**
|
||||
* 查询版本数据总数
|
||||
*/
|
||||
@Select("SELECT COUNT(1) FROM Tbl_version")
|
||||
Integer getAllVersionListDataCount();
|
||||
|
||||
/**
|
||||
* 根据ID获取版本对象
|
||||
*
|
||||
* @param versionId
|
||||
* @return
|
||||
*/
|
||||
@Select("SELECT * FROM Tbl_version WHERE version_id = #{versionId}")
|
||||
Tbl_Version getTbl_VersionById(@Param("versionId") String versionId);
|
||||
|
||||
/**
|
||||
* 根据ID删除一个版本管理数据
|
||||
*/
|
||||
@Delete("DELETE FROM Tbl_version WHERE version_id = #{id}")
|
||||
Integer deleteTbl_VersionById(@Param("id") String versionId);
|
||||
|
||||
/**
|
||||
* 插入一条版本信息
|
||||
*
|
||||
* @param tbl_Version
|
||||
* @return
|
||||
*/
|
||||
@Insert("INSERT INTO TBL_VERSION(version_code,is_must_update,app_address,upload_content,create_time,phone_type) VALUES(#{version.versionCode},#{version.isMustUpdate},#{version.appAddress},"
|
||||
+ "#{version.uploadContent},NOW(),#{version.phoneType})")
|
||||
Integer addTbl_Version(@Param("version") Tbl_Version tbl_Version);
|
||||
|
||||
/**
|
||||
* 修改一个版本信息
|
||||
*
|
||||
* @param tbl_Version
|
||||
* @return
|
||||
*/
|
||||
@Update("UPDATE TBL_VERSION SET version_code=#{version.versionCode},is_must_update=#{version.isMustUpdate},app_address=#{version.appAddress},"
|
||||
+ "upload_content=#{version.uploadContent},phone_type=#{version.phoneType} WHERE version_id = #{version.versionId}")
|
||||
Integer updateTbl_Version(@Param("version") Tbl_Version tbl_Version);
|
||||
|
||||
/**
|
||||
* 修改强制升级
|
||||
*
|
||||
* @param isMustUpdate
|
||||
* @param versionId
|
||||
* @return
|
||||
*/
|
||||
@Update("UPDATE TBL_VERSION SET is_must_update=#{isMustUpdate} WHERE version_id = #{versionId}")
|
||||
Integer updateTbl_VersionisMustUpdate(@Param("isMustUpdate") String isMustUpdate, @Param("versionId") String versionId);
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.ifish.mapper;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class Tbl_Version_MapperSql {
|
||||
|
||||
/**
|
||||
* 查询版本数据
|
||||
*
|
||||
* @param phoneType
|
||||
* @param context
|
||||
* @param start
|
||||
* @param length
|
||||
* @return
|
||||
*/
|
||||
public String getVersionListData(@Param("type") String phoneType, String context, Integer start, Integer length) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append("SELECT version_id versionId,version_code versionCode,is_must_update isMustUpdate,app_address appAddress,upload_content uploadContent,create_time createTime,phone_type phoneType ");
|
||||
sb.append(" from tbl_version WHERE 1=1 ");
|
||||
if (StringUtils.isNotBlank(phoneType)) {
|
||||
sb.append(" AND phone_type = #{type}");
|
||||
}
|
||||
if (StringUtils.isNotBlank(context)) {
|
||||
sb.append(" AND upload_content like '%").append(context).append("%'");
|
||||
}
|
||||
sb.append(" ORDER BY version_id DESC LIMIT ").append(start).append(",").append(length);
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询版本数据数量
|
||||
*
|
||||
* @param phoneType
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
public String getVeriosnListDataCountBySelect(@Param("type") String phoneType, String context) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append("SELECT count(1) ");
|
||||
sb.append(" from tbl_version WHERE 1=1 ");
|
||||
if (StringUtils.isNotBlank(phoneType)) {
|
||||
sb.append(" AND phone_type = #{type}");
|
||||
}
|
||||
if (StringUtils.isNotBlank(context)) {
|
||||
sb.append(" AND upload_content like '%").append(context).append("%'");
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@ import java.util.Map;
|
|||
import java.util.Random;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.codehaus.jackson.map.ObjectMapper;
|
||||
import org.codehaus.jackson.type.JavaType;
|
||||
|
|
@ -491,4 +492,46 @@ public class IfishUtil {
|
|||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取IP
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public static String getIp(HttpServletRequest request) {
|
||||
String ip = request.getHeader("X-Forwarded-For");
|
||||
if (!org.springframework.util.StringUtils.isEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)) {
|
||||
//多次反向代理后会有多个ip值,第一个ip才是真实ip
|
||||
int index = ip.indexOf(",");
|
||||
if (index != -1) {
|
||||
return ip.substring(0, index);
|
||||
} else {
|
||||
return ip;
|
||||
}
|
||||
}
|
||||
ip = request.getHeader("X-Real-IP");
|
||||
if (!org.springframework.util.StringUtils.isEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)) {
|
||||
return ip;
|
||||
}
|
||||
return request.getRemoteAddr();
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成编号
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getCode() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String hexYear = String.format("%04d", calendar.get(Calendar.YEAR));
|
||||
String hexMonth = String.format("%02d", (calendar.get(Calendar.MONTH) + 1));
|
||||
String hexDate = String.format("%02d", calendar.get(Calendar.DATE));
|
||||
String hexHours = String.format("%02d", calendar.get(Calendar.HOUR_OF_DAY));
|
||||
String hexMinutes = String.format("%02d", calendar.get(Calendar.MINUTE));
|
||||
String hexSeconds = String.format("%02d", calendar.get(Calendar.SECOND));
|
||||
String millisecond = String.format("%03d", calendar.get(Calendar.MILLISECOND));
|
||||
String code = "BH" + hexYear + hexMonth + hexDate + "_" + hexHours + hexMinutes + hexSeconds + millisecond;
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
<link href="static/assets/css/main.css" rel="stylesheet" />
|
||||
<!-- Custom stylesheets ( Put your own changes here ) -->
|
||||
<link href="static/assets/css/custom.css" rel="stylesheet" />
|
||||
<link href="static/mycss.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- Fav and touch icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="static/assets/img/ico/apple-touch-icon-144-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="static/assets/img/ico/apple-touch-icon-114-precomposed.png">
|
||||
|
|
@ -67,8 +68,7 @@
|
|||
<![endif]-->
|
||||
<!-- Bootstrap plugins -->
|
||||
<!--<script src="static/assets/js/bootstrap/bootstrap.js"></script>-->
|
||||
<link href="../../static/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="../../static/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<script src="static/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- Core plugins ( not remove ever) -->
|
||||
<!-- Handle responsive view functions -->
|
||||
<script src="static/assets/js/jRespond.min.js"></script>
|
||||
|
|
@ -82,6 +82,13 @@
|
|||
<!-- Bootbox confirm dialog for reset postion on panels -->
|
||||
<script src="static/assets/plugins/ui/bootbox/bootbox.js"></script>
|
||||
${myjs}
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#logout').click(function(){
|
||||
$('#logoutForm').submit();
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<t:insertAttribute name="header" />
|
||||
|
|
@ -120,7 +127,7 @@
|
|||
</li>
|
||||
<li><a href="bindlist"><i class="im-cog2"></i> 设备绑定</a>
|
||||
</li>
|
||||
<li><a href="form-wizard.html"><i class="br-cog"></i> 设备类型</a>
|
||||
<li><a href="hardwareTypelist"><i class="br-cog"></i> 设备类型</a>
|
||||
</li>
|
||||
<li><a href="loginlist"><i class="en-cog"></i> 登陆记录</a>
|
||||
</li>
|
||||
|
|
@ -146,12 +153,12 @@
|
|||
<ul class="nav sub">
|
||||
<li><a href="adminUserList"><i class="ec-pencil2"></i> 系统用户</a>
|
||||
</li>
|
||||
<li><a href="menuManage"><i class="im-checkbox-checked"></i> 菜单管理</a>
|
||||
</li>
|
||||
<li><a href="form-wizard.html"><i class="im-wand"></i> 版本管理</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!--<li><a href="menuManage"><i class="im-checkbox-checked"></i> 菜单管理</a>-->
|
||||
</li>
|
||||
<li><a href="versionlist"><i class="im-wand"></i> 版本管理</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<!-- End #sideNav -->
|
||||
|
|
|
|||
|
|
@ -19,15 +19,21 @@
|
|||
</div>
|
||||
<nav class="top-nav" role="navigation">
|
||||
<ul class="nav navbar-nav pull-left">
|
||||
|
||||
<li id="toggle-sidebar-li">
|
||||
<a href="#" id="toggle-sidebar"><i class="en-arrow-left2" style="transform: rotate(0deg);"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" data-toggle="dropdown"><small>欢迎光临,</small>${username}</a>
|
||||
<ul class="dropdown-menu right" role="menu">
|
||||
<li><a href="#"><i class="st-settings"></i> 修改密码</a>
|
||||
<li><a href="adminUserList"><i class="st-settings"></i> 修改密码</a>
|
||||
</li>
|
||||
<li><a href="#"><i class="im-exit"></i> 退出</a>
|
||||
<li><a href="#" id="logout"><i class="im-exit"></i> 退出</a>
|
||||
<form action="${pageContext.request.contextPath}/logout" method="post" id="logoutForm">
|
||||
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -126,11 +126,31 @@
|
|||
<put-attribute name="body" value="/WEB-INF/views/device/hardwareType.jsp" />
|
||||
</definition>
|
||||
|
||||
<!-- 设备类型修改页面 -->
|
||||
<definition name="hardwareTypedetail" extends="base">
|
||||
<put-attribute name="body" value="/WEB-INF/views/device/hardwareTypeDetail.jsp" />
|
||||
</definition>
|
||||
|
||||
<!-- 设备登陆记录列表页面 -->
|
||||
<definition name="deviceloginlist" extends="base">
|
||||
<put-attribute name="body" value="/WEB-INF/views/device/loginlist.jsp" />
|
||||
</definition>
|
||||
|
||||
<!-- 设备登陆记录列表页面 -->
|
||||
<definition name="deviceloginlist" extends="base">
|
||||
<put-attribute name="body" value="/WEB-INF/views/device/loginlist.jsp" />
|
||||
</definition>
|
||||
|
||||
<!-- 版本管理列表页面 -->
|
||||
<definition name="versionlist" extends="base">
|
||||
<put-attribute name="body" value="/WEB-INF/views/version/list.jsp" />
|
||||
</definition>
|
||||
|
||||
<!-- 版本管理列表页面 -->
|
||||
<definition name="versiondetail" extends="base">
|
||||
<put-attribute name="body" value="/WEB-INF/views/version/detail.jsp" />
|
||||
</definition>
|
||||
|
||||
<!-- 测试页面 -->
|
||||
<definition name="testj" extends="base">
|
||||
<put-attribute name="body" value="/WEB-INF/views/query/test.jsp" />
|
||||
|
|
|
|||
|
|
@ -145,9 +145,9 @@
|
|||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.isUsed === '1') {
|
||||
str = '<span class="btn btn-xs btn-success">是</span>';
|
||||
str = '<span class="badge badge-success mr10 mb10">是</span>';
|
||||
} else {
|
||||
str = '<span class="btn btn-xs btn-danger">否</span>';
|
||||
str = '<span class="badge badge-default mr10 mb10">否</span>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -200,11 +200,7 @@
|
|||
});
|
||||
|
||||
$('#downloadExcel').click(function () {
|
||||
if (window.confirm('你确定要生成吗?')) {
|
||||
$("#downloadExcelForm").submit();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
$("#downloadExcelForm").submit();
|
||||
});
|
||||
|
||||
$('#clearSelect').click(function () {
|
||||
|
|
|
|||
|
|
@ -190,9 +190,9 @@
|
|||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.isMaster === '1') {
|
||||
str = '<span class="btn btn-xs btn-success">是</span>';
|
||||
str = '<span class="badge badge-success mr10 mb10">是</span>';
|
||||
} else {
|
||||
str = '<span class="btn btn-xs btn-danger">否</span>';
|
||||
str = '<span class="badge badge-default mr10 mb10">否</span>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -202,9 +202,9 @@
|
|||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.isLive === '1') {
|
||||
str = '<span class="btn btn-xs btn-success">是</span>';
|
||||
str = '<span class="badge badge-success mr10 mb10">是</span>';
|
||||
} else {
|
||||
str = '<span class="btn btn-xs btn-danger">否</span>';
|
||||
str = '<span class="badge badge-default mr10 mb10">否</span>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,9 +223,9 @@
|
|||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.isMaster !== undefined && row.isMaster !== '0') {
|
||||
str = '<span class="btn btn-xs btn-success">是</span>';
|
||||
str = '<span class="badge badge-success">是</span>';
|
||||
} else {
|
||||
str = '<span class="btn btn-xs btn-danger">否</span>';
|
||||
str = '<span class="badge badge-default">否</span>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -241,6 +241,13 @@
|
|||
{
|
||||
"data": "authorizeTime",
|
||||
"width": "120px",
|
||||
render: function (data, type, row, meta) {
|
||||
if (row.authorizeTime !== undefined && row.isMaster !== '') {
|
||||
return row.authorizeTime;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "isBlacklist",
|
||||
|
|
@ -248,9 +255,9 @@
|
|||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.isBlacklist === undefined || row.isBlacklist === '1') {
|
||||
str = '<span class="btn btn-xs btn-danger">NO</span>';
|
||||
str = '<span class="badge badge-default">NO</span>';
|
||||
} else {
|
||||
str = '<span class="btn btn-xs btn-success">OK</span>';
|
||||
str = '<span class="badge badge-success">OK</span>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<table class="dataTable cell-border" id="datatable" style="display: inline-block;">
|
||||
<thead style="width: 1600px">
|
||||
<tr style="width: 1600px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th >编号</th>
|
||||
<th >名称</th>
|
||||
<th >控制数</th>
|
||||
|
|
@ -27,8 +27,35 @@
|
|||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<style type="text/css">
|
||||
td.my_class{font-size: 20px;color: green;text-align: center;font-weight: 900}
|
||||
</style>
|
||||
<script>
|
||||
function updateHardwareType(code) {
|
||||
window.open("hardwareTypedetail?hardwareType=" + code);
|
||||
//window.location.href = "hardwareTypedetail?hardwareType=" + code;
|
||||
}
|
||||
|
||||
function deleteHardwareType(code) {
|
||||
if (window.confirm('你确定要删除此设备类型吗?')) {
|
||||
$.ajax({
|
||||
url: 'deleteHardwareType',
|
||||
type: 'post',
|
||||
data: {"hardwareType": code},
|
||||
success: function (data) {
|
||||
alert(data);
|
||||
location.reload();
|
||||
},
|
||||
error: function (data) {
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//alert("取消");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var table = $('#datatable').on('draw.dt', function () {
|
||||
var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
|
||||
|
|
@ -74,217 +101,142 @@
|
|||
autoWidth: false,
|
||||
//ajax获取服务器数据
|
||||
ajax: {
|
||||
url: 'devicelistData',
|
||||
url: 'hardwareTypelistData',
|
||||
type: 'post',
|
||||
data: function (d) {
|
||||
d.macAddress = $('#macAddress').val();
|
||||
d.deviceId = $('#deviceId').val();
|
||||
d.sdkVersion = $('#sdkVersion').val();
|
||||
d.upgradeVersion = $('#upgradeVersion').val();
|
||||
d.createDate = $('#createDate').val();
|
||||
d.createCode = $('#createCode').val();
|
||||
d.loginTime = $('#loginTime').val();
|
||||
d.factoryCode = $('#factoryCode').val();
|
||||
d.brandCode = $('#brandCode').val();
|
||||
d.hardwareType = $('#hardwareType').val();
|
||||
d.isCharge = $('#isCharge').val();
|
||||
d.isBlacklist = $('#isBlacklist').val();
|
||||
d.isUpgrade = $('#isUpgrade').val();
|
||||
d.sortField = $('#sortField').val();
|
||||
d.sortModel = $('#sortModel').val();
|
||||
}
|
||||
},
|
||||
//数据展示
|
||||
columns: [
|
||||
{
|
||||
"data": "deviceId",
|
||||
"width": "98px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.macAddress !== undefined && row.macAddress !== '') {
|
||||
str = str + "<span class='label label-dark'>" + row.macAddress + "</span></br>";
|
||||
}
|
||||
if (row.deviceId !== undefined && row.deviceId !== '') {
|
||||
str = str + "<span class='label label-xs label-info'>" + row.deviceId + "</span>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
"data": "hardwareType",
|
||||
"width": "67px;",
|
||||
},
|
||||
{
|
||||
"data": "factoryName",
|
||||
"width": "81px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.factoryName !== undefined && row.factoryName !== '') {
|
||||
str = str + "<span class='btn btn-danger'>" + row.factoryName + "</span></br>";
|
||||
}
|
||||
if (row.brandName !== undefined && row.brandName !== '') {
|
||||
str = str + "<span class='btn btn-primary'>" + row.brandName + "</span></br>";
|
||||
}
|
||||
if (row.hardWareName !== undefined && row.hardWareName !== '') {
|
||||
str = str + "<span class='btn btn-success'>" + row.hardWareName + "</span>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
"data": "hardwareName",
|
||||
"width": "67px",
|
||||
},
|
||||
{
|
||||
"data": "onOff",
|
||||
"width": "69px",
|
||||
"data": "controlAmount",
|
||||
"width": "93px",
|
||||
className: "my_class my_class2",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.onOff !== undefined && row.onOff !== '0') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>温度报警:开</span></br>";
|
||||
if (row.controlAmount !== undefined && row.controlAmount !== '0') {
|
||||
str = str + "<span class='' >" + row.controlAmount + "控</span></br>";
|
||||
} else {
|
||||
str = str + "<span class='btn btn-xs btn-danger'>温度报警:关</span></br>";
|
||||
}
|
||||
if (row.waterRemind !== undefined && row.waterRemind !== '0') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>换水提醒:开</span>";
|
||||
} else {
|
||||
str = str + "<span class='btn btn-xs btn-danger'>换水提醒:关</span>";
|
||||
str = str + "<span class='' >0控</span></br>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "sdkVersion",
|
||||
"width": "172px",
|
||||
"data": "timerAmount",
|
||||
"width": "93px",
|
||||
className: "my_class my_class2",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.sdkVersion !== undefined && row.sdkVersion !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>SDK版本:" + row.sdkVersion + "</span></br>";
|
||||
}
|
||||
if (row.sdkTime !== undefined && row.sdkTime !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>版本日期:" + row.sdkTime + "</span></br>";
|
||||
}
|
||||
if (row.upgradeTime !== undefined && row.upgradeTime !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>升级日期:" + row.upgradeTime + "</span></br>";
|
||||
}
|
||||
if (row.isUpgrade !== undefined && row.isUpgrade !== '0') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>自动升级:开</span></br>";
|
||||
if (row.timerAmount !== undefined && row.timerAmount !== '0') {
|
||||
str = str + "<span class='' style='font-size:16px'>" + row.timerAmount + "个</span></br>";
|
||||
} else {
|
||||
str = str + "<span class='btn btn-xs btn-danger'>自动升级:关</span></br>";
|
||||
}
|
||||
if (row.upgradeVersion !== undefined && row.upgradeVersion !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>升级版本:" + row.upgradeVersion + "</span>";
|
||||
str = str + "<span class='' tyle='font-size:16px'>0个</span></br>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "loginCount",
|
||||
"width": "172px",
|
||||
"data": "isWorkModel",
|
||||
"width": "67px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.loginCount !== undefined && row.loginCount !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>登陆次数:" + row.loginCount + "</span></br>";
|
||||
}
|
||||
if (row.loginTime !== undefined && row.loginTime !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>登陆时间:" + row.loginTime + "</span>";
|
||||
if (row.isWorkModel !== undefined && row.isWorkModel !== '0') {
|
||||
str = '<span class="badge label-success">有</span>';
|
||||
} else {
|
||||
str = '<span class="badge">无</span>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "createDate",
|
||||
"width": "172px",
|
||||
"data": "isLightness",
|
||||
"width": "67px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.createDate !== undefined && row.createDate !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>分配日期:" + row.createDate + "</span></br>";
|
||||
}
|
||||
if (row.createCode !== undefined && row.createCode !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>分配编号:" + row.createCode + "</span></br>";
|
||||
}
|
||||
if (row.firstActivate !== undefined && row.firstActivate !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>激活时间:" + row.firstActivate + "</span></br>";
|
||||
}
|
||||
if (row.createTime !== undefined && row.createTime !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>创建时间:" + row.createTime + "</span>";
|
||||
if (row.isLightness !== undefined && row.isLightness !== '0') {
|
||||
str = '<span class="badge label-success">有</span>';
|
||||
} else {
|
||||
str = '<span class="badge">无</span>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "mcuCount",
|
||||
"width": "125px",
|
||||
"data": "isSarkLamp",
|
||||
"width": "67px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.mcuCount !== undefined && row.mcuCount !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default mr10' style='width:130px;'>MCU启动次数:" + row.mcuCount + "</span></br>";
|
||||
}
|
||||
if (row.moduleCount !== undefined && row.moduleCount !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default mr10' style='width:130px;'>模块启动次数:" + row.moduleCount + "</span></br>";
|
||||
}
|
||||
if (row.routerCount !== undefined && row.routerCount !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default mr10' style='width:130px;'>连接路由器次数:" + row.routerCount + "</span></br>";
|
||||
}
|
||||
if (row.serverCount !== undefined && row.serverCount !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default mr10' style='width:130px;'>成功连接次数:" + row.serverCount + "</span></br>";
|
||||
}
|
||||
if (row.serverTryCount !== undefined && row.serverTryCount !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default mr10' style='width:130px;'>尝试连接次数:" + row.serverTryCount + "</span></br>";
|
||||
var str = "";
|
||||
if (row.isSarkLamp !== undefined && row.isSarkLamp !== '0') {
|
||||
str = '<span class="badge label-success">有</span>';
|
||||
} else {
|
||||
str = '<span class="badge">无</span>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "activeTime",
|
||||
"width": "172px",
|
||||
"data": "isCustomIcon",
|
||||
"width": "67px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.isCharge !== undefined && row.isCharge !== '0') {
|
||||
str = str + "<span class='btn btn-xs btn-default' style='width:130px;'>是否收费:是</span></br>";
|
||||
if (row.isCustomIcon !== undefined && row.isCustomIcon !== '0') {
|
||||
str = '<span class="badge label-success">自定义</span>';
|
||||
} else {
|
||||
str = str + "<span class='btn btn-xs btn-danger' style='width:130px;'>是否收费:否</span></br>";
|
||||
}
|
||||
if (row.isBlacklist !== undefined && row.isBlacklist !== '1') {
|
||||
str = str + "<span class='btn btn-xs btn-default' style='width:130px;'>授权状态:OK</span></br>";
|
||||
} else {
|
||||
str = str + "<span class='btn btn-xs btn-danger' style='width:130px;'>授权状态:NO</span></br>";
|
||||
}
|
||||
if (row.authorizeTime !== undefined && row.authorizeTime !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>授权时间:" + row.authorizeTime + "</span>";
|
||||
str = '<span class="badge">默认</span>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "deviceId",
|
||||
"width": "58px",
|
||||
"data": "iconLink",
|
||||
"width": "146px",
|
||||
},
|
||||
{
|
||||
"data": "allIconName",
|
||||
"width": "146px",
|
||||
},
|
||||
{
|
||||
"data": "allShowName",
|
||||
"width": "146px",
|
||||
},
|
||||
{
|
||||
"data": "defaultIconName",
|
||||
"width": "120px",
|
||||
},
|
||||
{
|
||||
"data": "defaultShowName",
|
||||
"width": "120px",
|
||||
},
|
||||
{
|
||||
"data": "hardwareType",
|
||||
"width": "68px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = '';
|
||||
//如果没有收费
|
||||
if (row.isCharge === undefined || row.isCharge === '0') {
|
||||
//如果没有授权
|
||||
if (row.isBlacklist === undefined || row.isBlacklist !== '0') {
|
||||
str = '<button title="授权" onclick="hardwareLicense(' + row.deviceId + ',0)" class="btn btn-xs btn-primary"><span class="fa-ok-circle"></span>授予权限</button>';
|
||||
} else {
|
||||
str = '<button title="取消授权" onclick="hardwareLicense(' + row.deviceId + ',1)" class="btn btn-xs btn-danger"><span class="fa-remove-circle"></span>取消授权</button>';
|
||||
}
|
||||
}
|
||||
var str = '<button title="修改" onclick="updateHardwareType(\'' + row.hardwareType + '\')" class="btn btn-xs btn-default"><span class="fa-edit"></span>修改设备</button></br>';
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "deviceId",
|
||||
"width": "58px",
|
||||
"data": "hardwareType",
|
||||
"width": "68px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = '';
|
||||
//如果开启自动升级
|
||||
if (row.isUpgrade === '1') {
|
||||
str = str + '<button title="取消升级SDK" onclick="noUpgradeSdk(' + row.deviceId + ')" class="btn btn-xs btn-danger"><span class="fa-cloud-download"></span>取消升级</button></br>';
|
||||
} else {
|
||||
str = str + '<button title="重启升级SDK" onclick="upgradeSdk(' + row.deviceId + ',1)" class="btn btn-xs btn-primary"><span class="fa-cloud-upload"></span>重启升级</button></br>';
|
||||
}
|
||||
str = str + '<button title="查询设备状态" onclick="searchStatus(\'' + row.macAddress + '\')" class="btn btn-xs btn-default"><span class="ec-search"></span>查询状态</button></br>';
|
||||
str = str + '<button title="在线升级SDK" onclick="upgradeSDKOnline(\'' + row.macAddress + '\')" class="btn btn-xs btn-success"><span class="fa-cloud-upload"></span>在线升级</button>';
|
||||
var str = '<button title="删除" onclick="deleteHardwareType(\'' + row.hardwareType + '\')" class="btn btn-xs btn-danger"><span class="ec-trashcan"></span>删除设备</button></br>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$("#datatable_length").append(' <label><button href="addHardwareType" target="_blank" class="btn btn-sm btn-primary"><i class="fa-edit"></i><span class="no-text-shadow">新增</span></button></label>');
|
||||
$("#datatable_length").append('<label><span style="font-family:\'Times New Roman\';"> </span></label><label><a href="hardwareTypedetail" target="_blank" class="btn btn-sm btn-primary"><i class="fa-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,201 @@
|
|||
<%--
|
||||
Document : hardwareTypeDetail
|
||||
Created on : 2017-8-21, 11:15:41
|
||||
Author : Administrator
|
||||
--%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<form class="form-horizontal group-border hover-stripped" id="sendForm" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">类型编号:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<c:choose>
|
||||
<c:when test="${hardWareType.hardwareType != null}">
|
||||
<input type="text" id="hardwareType" name="hardwareType" value="${hardWareType.hardwareType}" disabled="disabled" class="form-control input-xlarge">
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<input type="text" id="hardwareType" name="hardwareType" class="form-control input-xlarge">
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">类型名称:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<input type="text" class="form-control input-xlarge" name="hardwareName" id="hardwareName" value="${hardWareType.hardwareName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">所属电子厂:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<select style="width:270px" id="factoryCode" name="factoryCode" >
|
||||
<option value="">请选择</option>
|
||||
<c:forEach var="item" items="${factorylist}">
|
||||
<option value="${item.factoryCode}">${item.factoryName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">控制个数:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<input type="text" class="form-control input-xlarge" name="controlAmount" id="controlAmount" value="${hardWareType.controlAmount}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">定时器个数:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<input type="text" class="form-control input-xlarge" name="timerAmount" id="timerAmount" value="${hardWareType.timerAmount}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">工作模式:</label>
|
||||
<div class="col-lg-10" >
|
||||
<select style="width:270px" id="isWorkModel" name="isWorkModel" value="${hardWareType.isWorkModel}">
|
||||
<option value="0" style="width:270px;">无</option>
|
||||
<option value="1" style="width:270px;">有</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">有无背光:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<select style="width:270px" id="isLightness" name="isLightness" >
|
||||
<option value="0">无</option>
|
||||
<option value="1">有</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">有无柜灯:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<select style="width:270px" id="isSarkLamp" name="isSarkLamp" value="${hardWareType.isSarkLamp}">
|
||||
<option value="0">无</option>
|
||||
<option value="1">有</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">自定义图标:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<select style="width:270px" id="isCustomIcon" name="isCustomIcon" value="${hardWareType.isCustomIcon}">
|
||||
<option value="0">无</option>
|
||||
<option value="1">有</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">图标根地址:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<input type="text" class="form-control input-xlarge" id="iconLink" name="iconLink" value="${hardWareType.iconLink}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">选择的图标:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<input type="text" class="form-control input-xlarge" id="allIconName" name="allIconName" value="${hardWareType.allIconName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">对应的名称:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<input type="text" class="form-control input-xlarge" id="allShowName" name="allShowName" value="${hardWareType.allShowName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">默认图标:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<input type="text" class="form-control input-xlarge" id="defaultIconName" value="${hardWareType.defaultIconName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">默认名称:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<input type="text" class="form-control input-xlarge" id="defaultShowName" name="defaultShowName" value="${hardWareType.defaultShowName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">备注描述:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<input type="textarea" class="form-control input-xlarge" id="hardwareDesc" name="hardwareDesc" value="${hardWareType.hardwareDesc}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="form-group" style="margin-left: 418px;margin-top: 40px">
|
||||
<input type="hidden" id="checkType" value="${type}">
|
||||
<button class="btn btn-primary" id="btnSend"><i class="fa-ok bigger-110"></i>提交</button>
|
||||
|
||||
<button class="btn" id="btnfalse"><i class="fa-undo bigger-110"></i>取消</button>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
$(function () {
|
||||
var a = $('#crumb');
|
||||
a.children()[1].remove();
|
||||
a.append('<li>设备详情<li>');
|
||||
var b = $('.hasSub')[2];
|
||||
b.children[0].className = 'expand active-state';
|
||||
b.children[1].className = 'nav sub show';
|
||||
b.children[0].children[0].style.transform = 'rotate(-180deg)';
|
||||
b.children[1].children[2].children[0].className = 'active';
|
||||
|
||||
$('#isWorkModel').val(${hardWareType.isWorkModel});
|
||||
$('#isLightness').val(${hardWareType.isLightness});
|
||||
$('#isSarkLamp').val(${hardWareType.isSarkLamp});
|
||||
$('#isCustomIcon').val(${hardWareType.isCustomIcon});
|
||||
$('#factoryCode').val('${hardWareType.factoryCode}');
|
||||
|
||||
$('#btnSend').click(function () {
|
||||
var type = $('#checkType').val();
|
||||
var url = "";
|
||||
if (type !== undefined && type !== '') {
|
||||
url = "updateHardwareType";
|
||||
} else {
|
||||
url = "insertHardwareType";
|
||||
}
|
||||
var hardwareType = $('#hardwareType').val();
|
||||
var hardwareName = $('#hardwareName').val();
|
||||
var factoryCode = $('#factoryCode').val();
|
||||
var controlAmount = $('#controlAmount').val();
|
||||
var timerAmount = $('#timerAmount').val();
|
||||
var isWorkModel = $('#isWorkModel').val();
|
||||
var isLightness = $('#isLightness').val();
|
||||
var isSarkLamp = $('#isSarkLamp').val();
|
||||
var isCustomIcon = $('#isCustomIcon').val();
|
||||
var iconLink = $('#iconLink').val();
|
||||
var allIconName = $('#allIconName').val();
|
||||
var allShowName = $('#allShowName').val();
|
||||
var defaultIconName = $('#defaultIconName').val();
|
||||
var defaultShowName = $('#defaultShowName').val();
|
||||
var hardwareDesc = $('#hardwareDesc').val();
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
data: {"hardwareType": hardwareType, "hardwareName": hardwareName, "factoryCode": factoryCode, "controlAmount": controlAmount, "timerAmount": timerAmount, "isWorkModel": isWorkModel, "isLightness": isLightness,
|
||||
"isSarkLamp": isSarkLamp, "isCustomIcon": isCustomIcon, "iconLink": iconLink, "allIconName": allIconName, "allShowName": allShowName, "defaultIconName": defaultIconName, "defaultShowName": defaultShowName, "hardwareDesc": hardwareDesc},
|
||||
success: function (data) {
|
||||
if (data === '成功') {
|
||||
alert('设置成功');
|
||||
} else {
|
||||
alert('设置失败');
|
||||
}
|
||||
},
|
||||
error: function (data) {
|
||||
alert('操作出现了错误!');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$('#btnfalse').click(function () {
|
||||
window.opener = null;
|
||||
window.open('', '_self');
|
||||
window.close();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -339,12 +339,12 @@
|
|||
if (row.onOff !== undefined && row.onOff !== '0') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>温度报警:开</span></br>";
|
||||
} else {
|
||||
str = str + "<span class='btn btn-xs btn-danger'>温度报警:关</span></br>";
|
||||
str = str + "<span class='label label-default mr10 mb10'>温度报警:关</span></br>";
|
||||
}
|
||||
if (row.waterRemind !== undefined && row.waterRemind !== '0') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>换水提醒:开</span>";
|
||||
} else {
|
||||
str = str + "<span class='btn btn-xs btn-danger'>换水提醒:关</span>";
|
||||
str = str + "<span class='label label-default mr10 mb10'>换水提醒:关</span>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -366,7 +366,7 @@
|
|||
if (row.isUpgrade !== undefined && row.isUpgrade !== '0') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>自动升级:开</span></br>";
|
||||
} else {
|
||||
str = str + "<span class='btn btn-xs btn-danger'>自动升级:关</span></br>";
|
||||
str = str + "<span class='label label-default mr10 mb10'>自动升级:关</span></br>";
|
||||
}
|
||||
if (row.upgradeVersion !== undefined && row.upgradeVersion !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>升级版本:" + row.upgradeVersion + "</span>";
|
||||
|
|
@ -439,12 +439,12 @@
|
|||
if (row.isCharge !== undefined && row.isCharge !== '0') {
|
||||
str = str + "<span class='btn btn-xs btn-default' style='width:130px;'>是否收费:是</span></br>";
|
||||
} else {
|
||||
str = str + "<span class='btn btn-xs btn-danger' style='width:130px;'>是否收费:否</span></br>";
|
||||
str = str + "<span class='label label-default mr10 mb10' style='width:130px;'>是否收费:否</span></br>";
|
||||
}
|
||||
if (row.isBlacklist !== undefined && row.isBlacklist !== '1') {
|
||||
str = str + "<span class='btn btn-xs btn-default' style='width:130px;'>授权状态:OK</span></br>";
|
||||
} else {
|
||||
str = str + "<span class='btn btn-xs btn-danger' style='width:130px;'>授权状态:NO</span></br>";
|
||||
str = str + "<span class='label label-default mr10 mb10' style='width:130px;'>授权状态:NO</span></br>";
|
||||
}
|
||||
if (row.authorizeTime !== undefined && row.authorizeTime !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-default'>授权时间:" + row.authorizeTime + "</span>";
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
$(function () {
|
||||
var a = $('#crumb');
|
||||
a.children()[1].remove();
|
||||
a.append('<li>用户详情<li>');
|
||||
a.append('<li>电子厂详情<li>');
|
||||
var b = $('.hasSub')[3];
|
||||
b.children[0].className = 'expand active-state';
|
||||
b.children[1].className = 'nav sub show';
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
$("#datatable_length").append(' <label><a href="addFactory" target="_blank" class="btn btn-primary"><i class="fa-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
$("#datatable_length").append('<label><span style="font-family:\'Times New Roman\';"> </span></label><label><a href="addFactory" target="_blank" class="btn btn-primary"><i class="fa-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -3,426 +3,11 @@
|
|||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
|
||||
<div class="outlet">
|
||||
<!-- Start .outlet -->
|
||||
<!-- Page start here ( usual with .row ) -->
|
||||
<div class="row">
|
||||
<!-- Start .row -->
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="carousel-tile carousel vertical slide">
|
||||
<div class="carousel-inner">
|
||||
<div class="item active">
|
||||
<div class="tile red">
|
||||
<div class="tile-icon">
|
||||
<i class="br-cart s64"></i>
|
||||
</div>
|
||||
<div class="tile-content">
|
||||
<div class="number">107</div>
|
||||
<h3>Orders</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="tile orange">
|
||||
<!-- tile start here -->
|
||||
<div class="tile-icon">
|
||||
<i class="ec-cog s64"></i>
|
||||
</div>
|
||||
<div class="tile-content">
|
||||
<div class="number">5</div>
|
||||
<h3>Settings changed</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Carousel -->
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="carousel-tile carousel slide">
|
||||
<div class="carousel-inner">
|
||||
<div class="item active">
|
||||
<div class="tile blue">
|
||||
<div class="tile-icon">
|
||||
<i class="st-chat s64"></i>
|
||||
</div>
|
||||
<div class="tile-content">
|
||||
<div class="number">24</div>
|
||||
<h3>New Comments</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="tile brown">
|
||||
<!-- tile start here -->
|
||||
<div class="tile-icon">
|
||||
<i class="ec-mail s64"></i>
|
||||
</div>
|
||||
<div class="tile-content">
|
||||
<div class="number">17</div>
|
||||
<h3>New emails</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Carousel -->
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="carousel-tile carousel vertical slide">
|
||||
<div class="carousel-inner">
|
||||
<div class="item active">
|
||||
<div class="tile green">
|
||||
<div class="tile-icon">
|
||||
<i class="ec-users s64"></i>
|
||||
</div>
|
||||
<div class="tile-content">
|
||||
<div class="number">325</div>
|
||||
<h3>New users</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="tile purple">
|
||||
<!-- tile start here -->
|
||||
<div class="tile-icon">
|
||||
<i class="ec-search s64"></i>
|
||||
</div>
|
||||
<div class="tile-content">
|
||||
<div class="number">2540</div>
|
||||
<h3>Searches</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Carousel -->
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="carousel-tile carousel slide">
|
||||
<div class="carousel-inner">
|
||||
<div class="item active">
|
||||
<div class="tile teal">
|
||||
<!-- tile start here -->
|
||||
<div class="tile-icon">
|
||||
<i class="ec-images s64"></i>
|
||||
</div>
|
||||
<div class="tile-content">
|
||||
<div class="number">45</div>
|
||||
<h3>New images</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="tile magenta">
|
||||
<!-- tile start here -->
|
||||
<div class="tile-icon">
|
||||
<i class="ec-share s64"></i>
|
||||
</div>
|
||||
<div class="tile-content">
|
||||
<div class="number">3548</div>
|
||||
<h3>Posts shared</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Carousel -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- End .row -->
|
||||
<div class="row">
|
||||
<!-- Start .row -->
|
||||
<div class="col-lg-6 col-md-6 sortable-layout">
|
||||
<!-- Start col-lg-6 -->
|
||||
<div class="panel panel-teal toggle panelMove panelClose panelRefresh">
|
||||
<!-- Start .panel -->
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="im-bars"></i> Page views</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="stats-pageviews" style="width: 100%; height:250px;"></div>
|
||||
</div>
|
||||
<div class="panel-footer teal-bg">
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="tile teal m0">
|
||||
<div class="tile-content text-center pl0 pr0">
|
||||
<div id="countToday" class="number">75</div>
|
||||
<h3>Today</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="tile teal m0">
|
||||
<div class="tile-content text-center pl0 pr0">
|
||||
<div id="countYesterday" class="number">69</div>
|
||||
<h3>Yesterday</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="tile teal m0">
|
||||
<div class="tile-content text-center pl0 pr0">
|
||||
<div id="countWeek" class="number">380</div>
|
||||
<h3>This Week</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="tile teal m0">
|
||||
<div class="tile-content text-center pl0 pr0">
|
||||
<div id="countTotal" class="number">1254</div>
|
||||
<h3>Total</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End .panel -->
|
||||
<div class="panel panel-brown panelMove">
|
||||
<!-- Start .panel -->
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="st-camera"></i> Instagram activity</h4>
|
||||
<div class="pull-right mt10">
|
||||
<a href="#" class="color-grayspr">@SuggeElson</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body p0">
|
||||
<div class="instagram-widget">
|
||||
<div class="instagram-widget-header gray-bg">
|
||||
<div class="col-lg-4 col-md-4 col-xs-4 text-center">
|
||||
<!-- col-lg-4 start here -->
|
||||
<a href="#">
|
||||
<p class="instagram-widget-text">Followers</p>
|
||||
<strong class="instagram-widget-number">1256</strong>
|
||||
</a>
|
||||
</div>
|
||||
<!-- col-lg-4 end here -->
|
||||
<div class="col-lg-4 col-md-4 col-xs-4 text-center">
|
||||
<!-- col-lg-4 start here -->
|
||||
<a href="#">
|
||||
<p class="instagram-widget-text">Following</p>
|
||||
<strong class="instagram-widget-number">345</strong>
|
||||
</a>
|
||||
</div>
|
||||
<!-- col-lg-4 end here -->
|
||||
<div class="col-lg-4 col-md-4 col-xs-4 text-center">
|
||||
<!-- col-lg-4 start here -->
|
||||
<a href="#">
|
||||
<p class="instagram-widget-text">Shots</p>
|
||||
<strong class="instagram-widget-number">176</strong>
|
||||
</a>
|
||||
</div>
|
||||
<!-- col-lg-4 end here -->
|
||||
</div>
|
||||
<div class="instagram-widget-image">
|
||||
<div id="instagram-widget" class="carousel slide">
|
||||
<!-- Indicators -->
|
||||
<ol class="carousel-indicators dotstyle">
|
||||
<li data-target="#instagram-widget" data-slide-to="0" class="active"><a href="#">Image 1</a>
|
||||
</li>
|
||||
<li data-target="#instagram-widget" data-slide-to="1"><a href="#">Image 2</a>
|
||||
</li>
|
||||
<li data-target="#instagram-widget" data-slide-to="2"><a href="#">Image 3</a>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<figure class="item active">
|
||||
<img class="img-responsive" src="static/assets/img/instagram/instagram.jpg" alt="image">
|
||||
</figure>
|
||||
<figure class="item">
|
||||
<img class="img-responsive" src="static/assets/img/instagram/instagram2.jpg" alt="image">
|
||||
</figure>
|
||||
<figure class="item">
|
||||
<img class="img-responsive" src="static/assets/img/instagram/instagram3.jpg" alt="image">
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Carousel -->
|
||||
</div>
|
||||
<div class="instagram-widget-footer">
|
||||
<div class="col-lg-6 col-md-6 col-xs-6 text-center">
|
||||
<!-- col-lg-6 start here -->
|
||||
<p>
|
||||
<a href="#">
|
||||
<i class="ec-chat mr5"></i>
|
||||
<strong class="instagram-widget-number">17</strong>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<!-- col-lg-6 end here -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-6 text-center">
|
||||
<!-- col-lg-6 start here -->
|
||||
<p>
|
||||
<a href="#">
|
||||
<i class="ec-heart mr5"></i>
|
||||
<strong class="instagram-widget-number">27</strong>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<!-- col-lg-6 end here -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End .panel -->
|
||||
<div class="panel panel-default panelMove plain">
|
||||
<!-- Start .panel -->
|
||||
<div class="panel-heading white-bg"></div>
|
||||
<div class="panel-body p0">
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End .panel -->
|
||||
</div>
|
||||
<!-- End col-lg-6 -->
|
||||
<div class="col-lg-6 col-md-6 sortable-layout">
|
||||
<!-- Start col-lg-6 -->
|
||||
<div class="panel panel-primary plain toggle panelMove panelClose panelRefresh">
|
||||
<!-- Start .panel -->
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="im-bars"></i> Week Earnings</h4>
|
||||
</div>
|
||||
<div class="panel-body blue-bg">
|
||||
<div id="stats-earnings" style="width: 100%; height:250px;"></div>
|
||||
</div>
|
||||
<div class="panel-footer white-bg">
|
||||
<div id="stats-category-earnings" class="col-lg-6 col-md-12" style="height:150px;">
|
||||
</div>
|
||||
<div id="stats-earnings-bars" class="col-lg-6 col-md-12" style="height:150px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End .panel -->
|
||||
<div class="weather-widget panel panel-primary plain toggle panelMove panelClose panelRefresh">
|
||||
<!-- Start .panel -->
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">Weather now</h4>
|
||||
</div>
|
||||
<div class="panel-body blue-bg text-center">
|
||||
<canvas id="weather-now" width="128" height="128"></canvas>
|
||||
<p class="weather-location"><strong>23°C</strong> Madrid</p>
|
||||
</div>
|
||||
<div class="panel-footer white-bg text-center">
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-6">
|
||||
<!-- col-lg-3 start here -->
|
||||
<p class="weather-day">MON</p>
|
||||
<canvas id="forecast-now" width="64" height="64"></canvas>
|
||||
<p class="weather-degree">23°C</p>
|
||||
</div>
|
||||
<!-- col-lg-3 end here -->
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-6">
|
||||
<!-- col-lg-3 start here -->
|
||||
<p class="weather-day">TUE</p>
|
||||
<canvas id="forecast-day1" width="64" height="64"></canvas>
|
||||
<p class="weather-degree">17°C</p>
|
||||
</div>
|
||||
<!-- col-lg-3 end here -->
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-6">
|
||||
<!-- col-lg-3 start here -->
|
||||
<p class="weather-day">WED</p>
|
||||
<canvas id="forecast-day2" width="64" height="64"></canvas>
|
||||
<p class="weather-degree">15°C</p>
|
||||
</div>
|
||||
<!-- col-lg-3 end here -->
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-6">
|
||||
<!-- col-lg-3 start here -->
|
||||
<p class="weather-day">THU</p>
|
||||
<canvas id="forecast-day3" width="64" height="64"></canvas>
|
||||
<p class="weather-degree">18°C</p>
|
||||
</div>
|
||||
<!-- col-lg-3 end here -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- End .panel -->
|
||||
<div class="panel panel-default toggle panelMove panelClose panelRefresh">
|
||||
<!-- Start .panel -->
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="fa-list"></i> ToDo</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="todo-widget">
|
||||
<div class="todo-header">
|
||||
<div class="todo-search">
|
||||
<form>
|
||||
<input type="text" class="form-control" name="search" placeholder="Search for todo ...">
|
||||
</form>
|
||||
</div>
|
||||
<div class="todo-add">
|
||||
<a href="#" class="btn btn-primary tip" title="Add new todo"><i class="im-plus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="todo-period">Today</h4>
|
||||
<ul class="todo-list" id="today">
|
||||
<li class="todo-task-item">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox">
|
||||
</label>
|
||||
<div class="todo-priority normal tip" title="Normal priority">
|
||||
<i class="im-radio-checked"></i>
|
||||
</div>
|
||||
<span class="todo-category label label-primary"> javascript </span>
|
||||
<div class="todo-task-text">Add scroll function to template</div>
|
||||
<button type="button" class="close todo-close">×</button>
|
||||
</li>
|
||||
<li class="todo-task-item">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox">
|
||||
</label>
|
||||
<div class="todo-priority high tip" title="High priority">
|
||||
<i class="im-radio-checked"></i>
|
||||
</div>
|
||||
<span class="todo-category label label-brown"> less </span>
|
||||
<div class="todo-task-text">Fix main less file</div>
|
||||
<button type="button" class="close todo-close">×</button>
|
||||
</li>
|
||||
<li class="todo-task-item task-done">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" checked>
|
||||
</label>
|
||||
<div class="todo-priority high tip" title="High priority">
|
||||
<i class="im-radio-checked"></i>
|
||||
</div>
|
||||
<span class="todo-category label label-info"> html </span>
|
||||
<div class="todo-task-text">Change navigation structure</div>
|
||||
<button type="button" class="close todo-close">×</button>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="todo-period">Tomorrow</h4>
|
||||
<ul class="todo-list" id="tomorrow">
|
||||
<li class="todo-task-item">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox">
|
||||
</label>
|
||||
<div class="todo-priority tip" title="Low priority">
|
||||
<i class="im-radio-checked"></i>
|
||||
</div>
|
||||
<span class="todo-category label label-dark"> css </span>
|
||||
<div class="todo-task-text">Create slide panel widget</div>
|
||||
<button type="button" class="close todo-close">×</button>
|
||||
</li>
|
||||
<li class="todo-task-item">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox">
|
||||
</label>
|
||||
<div class="todo-priority medium tip" title="Medium priority">
|
||||
<i class="im-radio-checked"></i>
|
||||
</div>
|
||||
<span class="todo-category label label-danger"> php </span>
|
||||
<div class="todo-task-text">Edit the main controller</div>
|
||||
<button type="button" class="close todo-close">×</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End .panel -->
|
||||
</div>
|
||||
<!-- End col-lg-6 -->
|
||||
</div>
|
||||
<!-- End .row -->
|
||||
<!-- Page End here -->
|
||||
|
||||
</div>
|
||||
<!-- End .outlet -->
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var a = $('#crumb');
|
||||
a.children()[1].remove();
|
||||
a.append('<li>空白页<li>');
|
||||
var b = $('.hasSub')[3];
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -191,9 +191,9 @@
|
|||
var str = "";
|
||||
if (row.payStatus === '0') {
|
||||
str = "<a href='javascript:void(0);' onclick='onoffCharge(\"" + row.factoryCode + "\",\"" + row.billMonth + "\")' class='btn btn-xs btn-success'> <i class='im-tag'></i><span class='no-text-shadow'>收费</span></a>";
|
||||
str += '<a href="paydetail?factoryCode=' + row.factoryCode + '&billMonth=' + row.billMonth + '" class="btn btn-xs btn-info"><i class="im-tag"></i><span class="no-text-shadow">详情</span></a>'
|
||||
str += '<a href="paydetail?factoryCode=' + row.factoryCode + '&billMonth=' + row.billMonth + '" class="btn btn-xs btn-primary"><i class="im-tag"></i><span class="no-text-shadow">详情</span></a>'
|
||||
} else {
|
||||
str = '<a href="paydetail?factoryCode=' + row.factoryCode + '&billMonth=' + row.billMonth + '" class="btn btn-xs btn-info"><i class="im-tag"></i><span class="no-text-shadow">详情</span></a>';
|
||||
str = '<a href="paydetail?factoryCode=' + row.factoryCode + '&billMonth=' + row.billMonth + '" class="btn btn-xs btn-primary"><i class="im-tag"></i><span class="no-text-shadow">详情</span></a>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
<th>设备信息</th>
|
||||
<th>上报记录</th>
|
||||
<th>手机类型</th>
|
||||
<th>极光发送</th>
|
||||
<th>极光推送账号</th>
|
||||
<th>消息类型</th>
|
||||
<th>推送标题</th>
|
||||
<th>推送内容</th>
|
||||
|
|
@ -125,16 +125,16 @@
|
|||
//代表,是显示类型的时候判断值的长度是否超过8,如果是则截取
|
||||
//这里只处理了类型是显示的,过滤和排序返回原始数据
|
||||
var str = "";
|
||||
if (row.phoneNumber != null) {
|
||||
str = str + "<span class='btn btn-dark'>" + row.phoneNumber + "</span></br>";
|
||||
if (row.phoneNumber !== undefined) {
|
||||
str = str + "<span class='label label-dark mr10 mb10'>" + row.phoneNumber + "</span></br>";
|
||||
}
|
||||
if (row.userEmail != null) {
|
||||
str = str + "<span class='btn btn-primary'>" + row.userEmail + "</span></br>";
|
||||
if (row.userEmail !== undefined) {
|
||||
str = str + "<span class='label label-primary mr10 mb10'>" + row.userEmail + "</span></br>";
|
||||
}
|
||||
if (row.phoneNumber == null && row.userEmail == null && ((row.nickName == null || row.nickName == ''))) {
|
||||
str = str + "<span class='btn btn-info'>游客登录</span></br>";
|
||||
if (row.phoneNumber === undefined && row.userEmail === undefined && ((row.nickName === undefined || row.nickName === ''))) {
|
||||
str = str + "<span class='badge badge-teal mr10 mb10'>游客登录</span></br>";
|
||||
}
|
||||
if (row.userId != null && row.userId != '') {
|
||||
if (row.userId !== undefined && row.userId !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-purple'>用户ID:" + row.userId + "</span></br>";
|
||||
}
|
||||
return str;
|
||||
|
|
@ -144,14 +144,37 @@
|
|||
"data": "userId",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.macAddress != null) {
|
||||
str = str + "<span class='btn btn-dark btn-alt'>" + row.macAddress + "</span></br>";
|
||||
if (row.macAddress !== undefined) {
|
||||
str = str + "<span class='label label-primary mr10 mb10'>" + row.macAddress + "</span></br>";
|
||||
}
|
||||
if (row.deviceId != null) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>设备ID:" + row.deviceId + "</span></br>";
|
||||
if (row.deviceId !== undefined) {
|
||||
str = str + "<span class='label label-default mr10 mb10'>设备ID:" + row.deviceId + "</span></br>";
|
||||
}
|
||||
if (row.sdkVersion != null) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>sdk版本:" + row.sdkVersion + "</span></br>";
|
||||
if (row.sdkVersion !== undefined) {
|
||||
str = str + "<span class='label label-default mr10 mb10'>sdk版本:" + row.sdkVersion + "</span></br>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "userId",
|
||||
"width": "125px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.mcuCount !== undefined) {
|
||||
str = str + "<span class='btn btn-xs btn-default mr10'>MCU启动次数:" + row.mcuCount + "次</span></br>";
|
||||
}
|
||||
if (row.moduleCount !== undefined) {
|
||||
str = str + "<span class='btn btn-xs btn-default mr10'>模块启动次数:" + row.moduleCount + "次</span>";
|
||||
}
|
||||
if (row.routerCount !== undefined) {
|
||||
str = str + "<span class='btn btn-xs btn-default mr10'>连接路由器次数:" + row.routerCount + "次</span>";
|
||||
}
|
||||
if (row.serverCount !== undefined) {
|
||||
str = str + "<span class='btn btn-xs btn-default mr10'>成功连接次数:" + row.serverCount + "次</span>";
|
||||
}
|
||||
if (row.serverTryCount !== undefined) {
|
||||
str = str + "<span class='btn btn-xs btn-default mr10'>尝试连接次数:" + row.serverTryCount + "次</span>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -160,20 +183,8 @@
|
|||
"data": "userId",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.mcuCount != null) {
|
||||
str = str + "<span class='btn btn-dark btn-alt'>MCU启动次数:" + row.mcuCount + "次</span></br>";
|
||||
}
|
||||
if (row.moduleCount != null) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>模块启动次数:" + row.moduleCount + "次</span>";
|
||||
}
|
||||
if (row.routerCount != null) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>连接路由器次数:" + row.routerCount + "次</span>";
|
||||
}
|
||||
if (row.serverCount != null) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>成功连接次数:" + row.serverCount + "次</span>";
|
||||
}
|
||||
if (row.serverTryCount != null) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>尝试连接次数:" + row.serverTryCount + "次</span>";
|
||||
if (row.phoneType !== undefined) {
|
||||
str = str + "<span class='badge badge-brown mr10 mb10'>" + row.phoneType + "</span></br>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -182,20 +193,10 @@
|
|||
"data": "userId",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.phoneType != null) {
|
||||
str = str + "<span class='btn btn-dark btn-alt'>" + row.phoneType + "</span></br>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "userId",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.jpushStatus != null && row.jpushStatus == '1') {
|
||||
str = "<span class='btn btn-success btn-alt'>是</span></br>";
|
||||
if (row.jpushStatus !== undefined && row.jpushStatus === '1') {
|
||||
str = "<span class='badge badge-success mr10 mb10'>是</span></br>";
|
||||
} else {
|
||||
str = "<span class='btn btn-danger btn-alt'>否</span></br>";
|
||||
str = "<span class='badge badge-default mr10 mb10'>否</span></br>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -204,8 +205,18 @@
|
|||
"data": "userId",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.pushType != null && row.pushType !== '') {
|
||||
str = "<span class='btn btn-success btn-alt'>是</span></br>";
|
||||
if (row.pushType !== undefined && row.pushType !== '') {
|
||||
if(row.pushType === 'remove_device'){
|
||||
str = "解绑通知";
|
||||
}else if(row.pushType === 'wendu_warn'){
|
||||
str = "温度预警";
|
||||
}else if(row.pushType === 'app_update'){
|
||||
str = "IOS更新推送";
|
||||
}else if(row.pushType === 'remind_water'){
|
||||
str = "换水提醒";
|
||||
}else if(row.pushType === 'offline_push'){
|
||||
str = "离线通知";
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
</div>
|
||||
<div class="tile-content" style="text-align:left">
|
||||
<div class="number countTo" data-from="0" data-to="${map.deviceCount}">${map.deviceCount}</div>
|
||||
<h3>设备数量</h3>
|
||||
<h3>授权数量</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -250,16 +250,16 @@
|
|||
//代表,是显示类型的时候判断值的长度是否超过8,如果是则截取
|
||||
//这里只处理了类型是显示的,过滤和排序返回原始数据
|
||||
var str = "";
|
||||
if (row.phoneNumber != null) {
|
||||
str = str + "<span class='btn btn-dark'>" + row.phoneNumber + "</span></br>";
|
||||
if (row.phoneNumber !== undefined && row.phoneNumber !== '') {
|
||||
str = str + "<span class='label label-dark mr10 mb10'>" + row.phoneNumber + "</span></br>";
|
||||
}
|
||||
if (row.userEmail != null) {
|
||||
str = str + "<span class='btn btn-primary'>" + row.userEmail + "</span></br>";
|
||||
if (row.userEmail !== undefined && row.userEmail !== '') {
|
||||
str = str + "<span class='label label-primary mr10 mb10'>" + row.userEmail + "</span></br>";
|
||||
}
|
||||
if (row.nickName != null && row.nickName != '') {
|
||||
if (row.nickName !== undefined && row.nickName !== '') {
|
||||
str = str + "<span class='btn btn-xs btn-purple'>" + row.nickName + "</span></br>";
|
||||
}
|
||||
if (row.phoneNumber == null && row.userEmail == null && ((row.nickName == null || row.nickName == ''))) {
|
||||
if (row.phoneNumber === null && row.userEmail === null && ((row.nickName === null || row.nickName === ''))) {
|
||||
str = str + "<span class='btn btn-info'>游客登录</span></br>";
|
||||
}
|
||||
return str;
|
||||
|
|
@ -269,13 +269,13 @@
|
|||
"data": "userId",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.createTime != null) {
|
||||
str = str + "<span class='btn btn-dark btn-alt'>" + row.createTime + "</span></br>";
|
||||
if (row.createTime !== undefined) {
|
||||
str = str + "<span class='btn btn-xs btn-default'>注册时间:" + row.createTime + "</span></br>";
|
||||
}
|
||||
if (row.phoneType != null) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>" + row.phoneType + "</span></br>";
|
||||
} else if ((row.phoneType == null || row.phoneType == '') && (row.loginType != null && row.loginType != '')) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>" + row.loginType + "</span></br>";
|
||||
if (row.phoneType !== undefined) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>手机类型:" + row.phoneType + "</span></br>";
|
||||
} else if ((row.phoneType === undefined || row.phoneType === '') && (row.loginType !== undefined && row.loginType !== '')) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>手机类型:" + row.loginType + "</span></br>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -285,15 +285,15 @@
|
|||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.loginTime != null) {
|
||||
str = str + "<span class='btn btn-dark btn-alt'>" + row.loginTime + "</span></br>";
|
||||
str = str + "<span class='btn btn-xs btn-default'>登陆时间:" + row.loginTime + "</span></br>";
|
||||
}
|
||||
if (row.loginType != null) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>" + row.loginType + "</span>";
|
||||
str = str + "<span class='label label-info mr10 mb10'>登陆手机:" + row.loginType + "</span>";
|
||||
}
|
||||
if (row.loginCount != null) {
|
||||
str = str + "<span class='label label-info mr10 mb10'>" + row.loginCount + "</span>";
|
||||
str = str + "<span class='label label-info mr10 mb10'>登陆次数:" + row.loginCount + "</span>";
|
||||
} else {
|
||||
str = str + "<span class='label label-info mr10 mb10'>0</span>";
|
||||
str = str + "<span class='label label-info mr10 mb10'>登陆次数:0</span>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -303,7 +303,7 @@
|
|||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.address != null) {
|
||||
str = str + "<span class='btn btn-dark btn-alt'>" + row.address + "</span></br>";
|
||||
str = row.address;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -313,9 +313,9 @@
|
|||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.isRegisterGwell != null && row.isRegisterGwell == '1') {
|
||||
str = "<span class='btn btn-success btn-alt'>是</span></br>";
|
||||
str = "<span class='badge badge-success'>是</span></br>";
|
||||
} else {
|
||||
str = "<span class='btn btn-danger btn-alt'>否</span></br>";
|
||||
str = "<span class='badge badge-default'>否</span></br>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -325,9 +325,9 @@
|
|||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.jiguangUserid != null && row.jiguangUserid !== '') {
|
||||
str = "<span class='btn btn-success btn-alt'>是</span></br>";
|
||||
str = "<span class='badge badge-success'>是</span></br>";
|
||||
} else {
|
||||
str = "<span class='btn btn-danger btn-alt'>否</span></br>";
|
||||
str = "<span class='badge badge-default'>否</span></br>";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
@ -369,7 +369,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
$(function () {
|
||||
var a = $('#crumb');
|
||||
a.children()[1].remove();
|
||||
a.append('<li>用户详情<li>');
|
||||
a.append('<li>鱼缸厂详情<li>');
|
||||
var b = $('.hasSub')[3];
|
||||
b.children[0].className = 'expand active-state';
|
||||
b.children[1].className = 'nav sub show';
|
||||
|
|
|
|||
|
|
@ -229,6 +229,6 @@
|
|||
}
|
||||
});
|
||||
|
||||
$("#datatable_length").append(' <label><a href="addVender" target="_blank" class="btn btn-primary"><i class="fa-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
$("#datatable_length").append('<label><span style="font-family:\'Times New Roman\';"> </span></label><label><a href="addVender" target="_blank" class="btn btn-primary"><i class="fa-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
<%--
|
||||
Document : detail
|
||||
Created on : 2017-8-22, 10:09:56
|
||||
Author : Administrator
|
||||
--%>
|
||||
|
||||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<form class="form-horizontal group-border hover-stripped" id="sendForm" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">版本号:</label>
|
||||
<div class="col-lg-3 col-md-3 col-xs-12">
|
||||
<input type="text" class="form-control" name="versionCode" id="versionCode" value="${version.versionCode}">
|
||||
<input type="hidden" value="${version.versionId}" name="versionId" id="versionId" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">手机类型:</label>
|
||||
<div class="col-lg-4 col-md-4 col-xs-12" >
|
||||
<select class="form-control" name="phoneType" id="phoneType" style="width:270px">
|
||||
<option selected="" value="">请选择</option>
|
||||
<option value="android">android</option>
|
||||
<option value="ios">ios</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">是否强制更新:</label>
|
||||
<div class="col-lg-4 col-md-4 col-xs-12" >
|
||||
<select class="form-control" name="isMustUpdate" id="isMustUpdate" style="width:270px">
|
||||
<option selected="" value="">请选择</option>
|
||||
<option selected="" value="0">否</option>
|
||||
<option value="1">是</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">更新内容:</label>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
<textarea class="form-control" rows="5" id="uploadContent" name="uploadContent">${version.uploadContent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-md-2 col-sm-12 control-label">下载地址:</label>
|
||||
<div class="col-lg-4 col-md-4 col-xs-12">
|
||||
<input type="text" class="form-control" id="appAddress" name="appAddress" value="${version.appAddress}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="form-group" style="margin-left: 418px;margin-top: 40px">
|
||||
<input type="hidden" id="checkType" value="${type}">
|
||||
<button class="btn btn-primary" id="btnSend"><i class="fa-ok bigger-110"></i>提交</button>
|
||||
|
||||
<button class="btn" id="btnfalse"><i class="fa-undo bigger-110"></i>取消</button>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
$(function () {
|
||||
var a = $('#crumb');
|
||||
a.children()[1].remove();
|
||||
a.append('<li>版本详情<li>');
|
||||
var b = $('.hasSub')[4];
|
||||
b.children[0].className = 'expand active-state';
|
||||
b.children[1].className = 'nav sub show';
|
||||
b.children[0].children[0].style.transform = 'rotate(-180deg)';
|
||||
b.children[1].children[1].children[0].className = 'active';
|
||||
|
||||
$('#phoneType').val('${version.phoneType}');
|
||||
$('#isMustUpdate').val(${version.isMustUpdate});
|
||||
|
||||
$('#btnSend').click(function () {
|
||||
var type = $('#checkType').val();
|
||||
var url = "";
|
||||
if (type !== undefined && type !== '') {
|
||||
url = "updateVersion";
|
||||
} else {
|
||||
url = "addVersion";
|
||||
}
|
||||
var versionCode = $('#versionCode').val();
|
||||
var phoneType = $('#phoneType').val();
|
||||
var isMustUpdate = $('#isMustUpdate').val();
|
||||
var uploadContent = $('#uploadContent').val();
|
||||
var appAddress = $('#appAddress').val();
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
data: {"versionCode": versionCode, "phoneType": phoneType, "isMustUpdate": isMustUpdate, "uploadContent": uploadContent, "appAddress": appAddress, "versionId": $('#versionId').val()},
|
||||
success: function (data) {
|
||||
if (data === '成功') {
|
||||
alert('设置成功');
|
||||
} else {
|
||||
alert('设置失败');
|
||||
}
|
||||
},
|
||||
error: function (data) {
|
||||
alert('操作出现了错误!');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$('#btnfalse').click(function () {
|
||||
window.opener = null;
|
||||
window.open('', '_self');
|
||||
window.close();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,188 @@
|
|||
<%--
|
||||
Document : list
|
||||
Created on : 2017-8-21, 17:54:25
|
||||
Author : Administrator
|
||||
--%>
|
||||
|
||||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<table class="dataTable cell-border" id="datatable" style="display: inline-block;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th >ID</th>
|
||||
<th >版本号</th>
|
||||
<th >手机类型</th>
|
||||
<th >是否强制升级</th>
|
||||
<th >更新内容</th>
|
||||
<th >下载地址</th>
|
||||
<th >创建时间</th>
|
||||
<th >修改</th>
|
||||
<th >删除</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<style type="text/css">
|
||||
td.my_class{font-size: 20px;color: green;text-align: center;font-weight: 900}
|
||||
</style>
|
||||
<script>
|
||||
function updateVersion(code) {
|
||||
window.open("versiondetail?versionId=" + code);
|
||||
//window.location.href = "hardwareTypedetail?hardwareType=" + code;
|
||||
}
|
||||
|
||||
function deleteVersion(code) {
|
||||
if (window.confirm('你确定要删除此版本类型吗?')) {
|
||||
$.ajax({
|
||||
url: 'deleteVersion',
|
||||
type: 'post',
|
||||
data: {"versionId": code},
|
||||
success: function (data) {
|
||||
alert(data);
|
||||
location.reload();
|
||||
},
|
||||
error: function (data) {
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//alert("取消");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function showUpdate(el, code) {
|
||||
$(el).attr("disabled", true);
|
||||
var isMustUpdate = el.checked ? "1" : "0";
|
||||
$.ajax({
|
||||
url: "versionShowUpdate",
|
||||
type: 'post',
|
||||
data: {"versionId": code, "isMustUpdate": isMustUpdate},
|
||||
success: function (data) {
|
||||
if (data !== '成功') {
|
||||
alert(data);
|
||||
} else {
|
||||
$(el).attr("disabled", false);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert('错误');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var table = $('#datatable').on('draw.dt', function () {
|
||||
var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
|
||||
elems.forEach(function (html) {
|
||||
var switchery = new Switchery(html);
|
||||
});
|
||||
}).DataTable({
|
||||
//记录用户状态
|
||||
stateSave: true,
|
||||
//中文自定义
|
||||
language: {
|
||||
"sProcessing": "处理中...",
|
||||
"sLengthMenu": "显示 _MENU_ 项结果",
|
||||
"sZeroRecords": "没有匹配结果",
|
||||
"sInfo": "显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
|
||||
"sInfoEmpty": "显示第 0 至 0 项结果,共 0 项",
|
||||
"sInfoFiltered": "(由 _MAX_ 项结果过滤)",
|
||||
"sInfoPostFix": "",
|
||||
"sSearch": "搜索:",
|
||||
"sUrl": "",
|
||||
"sEmptyTable": "表中数据为空",
|
||||
"sLoadingRecords": "载入中...",
|
||||
"sInfoThousands": ",",
|
||||
"oPaginate": {
|
||||
"sFirst": "首页",
|
||||
"sPrevious": "上页",
|
||||
"sNext": "下页",
|
||||
"sLast": "末页"
|
||||
},
|
||||
"oAria": {
|
||||
"sSortAscending": ": 以升序排列此列",
|
||||
"sSortDescending": ": 以降序排列此列"
|
||||
}
|
||||
},
|
||||
//是否显示排序
|
||||
bSort: false,
|
||||
//是否显示过滤搜索
|
||||
bFilter: false,
|
||||
//页脚展示风格
|
||||
pagingType: "full_numbers",
|
||||
//是否启动服务器数据处理
|
||||
serverSide: true,
|
||||
autoWidth: false,
|
||||
//ajax获取服务器数据
|
||||
ajax: {
|
||||
url: 'versionlistData',
|
||||
type: 'post',
|
||||
data: function (d) {
|
||||
}
|
||||
},
|
||||
//数据展示
|
||||
columns: [
|
||||
{
|
||||
"data": "versionId",
|
||||
"width": "20px;",
|
||||
},
|
||||
{
|
||||
"data": "versionCode",
|
||||
"width": "50px",
|
||||
},
|
||||
{
|
||||
"data": "phoneType",
|
||||
"width": "80px",
|
||||
},
|
||||
{
|
||||
"data": "versionId",
|
||||
"width": "120px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = "";
|
||||
if (row.isMustUpdate === '0') {
|
||||
str = '<input type="checkbox" id="isTaxCheck" onclick="showUpdate(this,\'' + row.versionId + '\');" class="js-switch" style="display: none;" value="0">';
|
||||
} else {
|
||||
str = '<input type="checkbox" id="isTaxCheck" onclick="showUpdate(this,\'' + row.versionId + '\');" class="js-switch" style="display: none;" value="1" checked="checked">';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "uploadContent",
|
||||
//"width": "93px",
|
||||
},
|
||||
{
|
||||
"data": "appAddress",
|
||||
//"width": "93px",
|
||||
render: function (data, type, row, meta) {
|
||||
return '<a href="' + row.appAddress + '" target="_blank">' + row.appAddress + '</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "createTime",
|
||||
"width": "150px",
|
||||
},
|
||||
{
|
||||
"data": "versionId",
|
||||
//"width": "68px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = '<button title="修改" onclick="updateVersion(\'' + row.versionId + '\')" class="btn btn-xs btn-default"><span class="fa-edit"></span>修改版本</button></br>';
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "versionId",
|
||||
//"width": "68px",
|
||||
render: function (data, type, row, meta) {
|
||||
var str = '<button title="删除" onclick="deleteVersion(\'' + row.versionId + '\')" class="btn btn-xs btn-danger"><span class="ec-trashcan"></span>删除版本</button></br>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$("#datatable_length").append('<label><span style="font-family:\'Times New Roman\';"> </span></label><label><a href="versiondetail" target="_blank" class="btn btn-sm btn-primary"><i class="fa-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,328 @@
|
|||
/*
|
||||
To change this license header, choose License Headers in Project Properties.
|
||||
To change this template file, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
*/
|
||||
/*
|
||||
Created on : 2017-8-21, 10:50:01
|
||||
Author : Administrator
|
||||
*/
|
||||
.label-transparent,.badge-transparent {
|
||||
background-color: transparent!important
|
||||
}
|
||||
|
||||
.label-grey,.badge-grey {
|
||||
background-color: #a0a0a0!important
|
||||
}
|
||||
|
||||
.label-info,.badge-info {
|
||||
background-color: #3a87ad!important
|
||||
}
|
||||
|
||||
.label-primary,.badge-primary {
|
||||
background-color: #428bca!important
|
||||
}
|
||||
|
||||
.label-success,.badge-success {
|
||||
background-color: #82af6f!important
|
||||
}
|
||||
|
||||
.label-danger,.badge-danger {
|
||||
background-color: #d15b47!important
|
||||
}
|
||||
|
||||
.label-important,.badge-important {
|
||||
background-color: #d15b47!important
|
||||
}
|
||||
|
||||
.label-inverse,.badge-inverse {
|
||||
background-color: #333!important
|
||||
}
|
||||
|
||||
.label-warning,.badge-warning {
|
||||
background-color: #f89406!important
|
||||
}
|
||||
|
||||
.label-pink,.badge-pink {
|
||||
background-color: #d6487e!important
|
||||
}
|
||||
|
||||
.label-purple,.badge-purple {
|
||||
background-color: #9585bf!important
|
||||
}
|
||||
|
||||
.label-yellow,.badge-yellow {
|
||||
background-color: #fee188!important
|
||||
}
|
||||
|
||||
.label-light,.badge-light {
|
||||
background-color: #e7e7e7!important
|
||||
}
|
||||
input[type=checkbox].ace.ace-switch {
|
||||
width: 55px;
|
||||
height: 25px
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch+.lbl {
|
||||
margin: 0 4px;
|
||||
min-height: 24px
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch+.lbl::before {
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
content: "ON\a0\a0\a0\a0\a0\a0\a0\a0\a0OFF";
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
line-height: 18px;
|
||||
line-height: 21px\9;
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
background-color: #f5f5f5;
|
||||
-webkit-box-shadow: inset 0 2px 2px 0 rgba(0,0,0,.2);
|
||||
box-shadow: inset 0 2px 2px 0 rgba(0,0,0,.2);
|
||||
border: 1px solid #CCC;
|
||||
text-align: left;
|
||||
float: left;
|
||||
padding: 0;
|
||||
width: 52px;
|
||||
text-indent: -19px;
|
||||
text-indent: -21px\9;
|
||||
margin-right: 0;
|
||||
-webkit-transition: text-indent .4s ease;
|
||||
transition: text-indent .4s ease
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch+.lbl::after {
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
content: '|||';
|
||||
font-size: 10px;
|
||||
font-weight: lighter;
|
||||
color: #d5d5d5;
|
||||
background-color: #FFF;
|
||||
text-shadow: -1px 0 0 rgba(0,0,0,0.15);
|
||||
text-align: center;
|
||||
border-radius: 100%;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
line-height: 20px;
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
left: -3px;
|
||||
padding: 0;
|
||||
-webkit-box-shadow: 0 1px 1px 1px rgba(0,0,0,.3);
|
||||
box-shadow: 0 1px 1px 1px rgba(0,0,0,.3);
|
||||
-webkit-transition: left .4s ease;
|
||||
transition: left .4s ease
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch:checked+.lbl::before {
|
||||
text-indent: 9px;
|
||||
color: #FFF;
|
||||
background-color: #8ab2c9;
|
||||
border-color: #468fcc
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch:checked+.lbl::after {
|
||||
left: 34px;
|
||||
background-color: #FFF;
|
||||
color: #8ab2c9
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-2+.lbl::before {
|
||||
content: "YES\a0\a0\a0\a0\a0\a0\a0\a0NO"
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-3+.lbl::after {
|
||||
font-family: FontAwesome;
|
||||
font-size: 13px;
|
||||
line-height: 23px;
|
||||
content: "\f00d";
|
||||
top: -1px
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-3:checked+.lbl::after {
|
||||
content: "\f00c"
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-4+.lbl::before,input[type=checkbox].ace.ace-switch.ace-switch-5+.lbl::before {
|
||||
content: "ON\a0\a0\a0\a0\a0\a0\a0\a0\a0\a0\a0OFF";
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
font-weight: bolder;
|
||||
font-size: 12px;
|
||||
line-height: 23px;
|
||||
height: 24px;
|
||||
overflow: hidden;
|
||||
line-height: 25px\9;
|
||||
border-radius: 12px;
|
||||
background-color: #8b9aa3;
|
||||
border: 1px solid #8b9aa3;
|
||||
color: #FFF;
|
||||
width: 56px;
|
||||
text-indent: -25px;
|
||||
text-indent: -28px\9;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
box-shadow: none;
|
||||
-webkit-transition: all .4s ease;
|
||||
transition: all .4s ease
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-4+.lbl::after,input[type=checkbox].ace.ace-switch.ace-switch-5+.lbl::after {
|
||||
font-family: Helvetica,Arial,sans-serif;
|
||||
content: '|||';
|
||||
text-shadow: -1px 0 0 rgba(0,0,0,0.2);
|
||||
font-size: 8px;
|
||||
font-weight: lighter;
|
||||
color: #8b9aa3;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
border-radius: 12px;
|
||||
color: #5b6a73;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 18px;
|
||||
background-color: #FFF;
|
||||
-webkit-transition: all .4s ease;
|
||||
transition: all .4s ease
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-4:checked+.lbl::before,input[type=checkbox].ace.ace-switch.ace-switch-5:checked+.lbl::before {
|
||||
text-indent: 9px;
|
||||
background-color: #468fcc;
|
||||
border-color: #468fcc
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-4:checked+.lbl::after,input[type=checkbox].ace.ace-switch.ace-switch-5:checked+.lbl::after {
|
||||
left: 34px;
|
||||
background-color: #FFF
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-5+.lbl::before {
|
||||
content: "YES\a0\a0\a0\a0\a0\a0\a0\a0\a0\a0NO"
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-5:checked+.lbl::before {
|
||||
text-indent: 8px
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-6+.lbl {
|
||||
position: relative
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-6+.lbl::before {
|
||||
font-family: FontAwesome;
|
||||
content: "\f00d";
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
|
||||
box-shadow: none;
|
||||
border: 0;
|
||||
font-weight: lighter;
|
||||
font-size: 16px;
|
||||
border-radius: 12px;
|
||||
display: inline-block;
|
||||
background-color: #888;
|
||||
color: #f2f2f2;
|
||||
width: 52px;
|
||||
height: 22px;
|
||||
line-height: 20px;
|
||||
text-indent: 32px;
|
||||
-webkit-transition: background .1s ease;
|
||||
transition: background .1s ease
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-6+.lbl::after {
|
||||
content: '';
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 3px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 -1px 0 rgba(0,0,0,0.25);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
text-align: center;
|
||||
background-color: #f2f2f2;
|
||||
border: 4px solid #f2f2f2;
|
||||
-webkit-transition: left .2s ease;
|
||||
transition: left .2s ease
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-6:checked+.lbl::before {
|
||||
content: "\f00c";
|
||||
text-indent: 6px;
|
||||
color: #FFF;
|
||||
border-color: #b7d3e5;
|
||||
background-color: #ff893c
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-6:checked+.lbl::after {
|
||||
left: 32px;
|
||||
background-color: #FFF;
|
||||
border: 4px solid #FFF;
|
||||
text-shadow: 0 -1px 0 rgba(0,200,0,0.25)
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-7 {
|
||||
width: 75px
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-7+.lbl {
|
||||
position: relative
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-7+.lbl::before {
|
||||
content: "OFF\a0\a0\a0\a0\a0\a0\a0\a0\a0\a0\a0ON";
|
||||
font-weight: bolder;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
background-color: #FFF;
|
||||
border: 2px solid #AAA;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
color: #aaa;
|
||||
width: 74px;
|
||||
height: 26px;
|
||||
line-height: 22px;
|
||||
overflow: hidden;
|
||||
text-indent: 4px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
-webkit-transition: all .2s ease;
|
||||
transition: all .2s ease
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-7+.lbl::after {
|
||||
content: '\f00d';
|
||||
font-family: FontAwesome;
|
||||
font-size: 16px;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
left: 39px;
|
||||
width: 32px;
|
||||
height: 20px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
background-color: #aaa;
|
||||
color: #FFF;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
-webkit-transition: all .2s ease-in-out;
|
||||
transition: all .2s ease-in-out
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-7:checked+.lbl::before {
|
||||
color: #468fcc;
|
||||
background-color: #FFF;
|
||||
text-indent: -33px;
|
||||
border-color: #6fb3e0
|
||||
}
|
||||
|
||||
input[type=checkbox].ace.ace-switch.ace-switch-7:checked+.lbl::after {
|
||||
left: 3px;
|
||||
content: '\f00c';
|
||||
background-color: #468fcc;
|
||||
color: #FFF
|
||||
}
|
||||
|
|
@ -1,460 +0,0 @@
|
|||
{
|
||||
"data": [
|
||||
{
|
||||
"name": "Tiger Nixon",
|
||||
"position": "System Architect",
|
||||
"salary": "$320,800",
|
||||
"start_date": "2011/04/25",
|
||||
"office": "Edinburgh",
|
||||
"extn": "5421"
|
||||
},
|
||||
{
|
||||
"name": "Garrett Winters",
|
||||
"position": "Accountant",
|
||||
"salary": "$170,750",
|
||||
"start_date": "2011/07/25",
|
||||
"office": "Tokyo",
|
||||
"extn": "8422"
|
||||
},
|
||||
{
|
||||
"name": "Ashton Cox",
|
||||
"position": "Junior Technical Author",
|
||||
"salary": "$86,000",
|
||||
"start_date": "2009/01/12",
|
||||
"office": "San Francisco",
|
||||
"extn": "1562"
|
||||
},
|
||||
{
|
||||
"name": "Cedric Kelly",
|
||||
"position": "Senior Javascript Developer",
|
||||
"salary": "$433,060",
|
||||
"start_date": "2012/03/29",
|
||||
"office": "Edinburgh",
|
||||
"extn": "6224"
|
||||
},
|
||||
{
|
||||
"name": "Airi Satou",
|
||||
"position": "Accountant",
|
||||
"salary": "$162,700",
|
||||
"start_date": "2008/11/28",
|
||||
"office": "Tokyo",
|
||||
"extn": "5407"
|
||||
},
|
||||
{
|
||||
"name": "Brielle Williamson",
|
||||
"position": "Integration Specialist",
|
||||
"salary": "$372,000",
|
||||
"start_date": "2012/12/02",
|
||||
"office": "New York",
|
||||
"extn": "4804"
|
||||
},
|
||||
{
|
||||
"name": "Herrod Chandler",
|
||||
"position": "Sales Assistant",
|
||||
"salary": "$137,500",
|
||||
"start_date": "2012/08/06",
|
||||
"office": "San Francisco",
|
||||
"extn": "9608"
|
||||
},
|
||||
{
|
||||
"name": "Rhona Davidson",
|
||||
"position": "Integration Specialist",
|
||||
"salary": "$327,900",
|
||||
"start_date": "2010/10/14",
|
||||
"office": "Tokyo",
|
||||
"extn": "6200"
|
||||
},
|
||||
{
|
||||
"name": "Colleen Hurst",
|
||||
"position": "Javascript Developer",
|
||||
"salary": "$205,500",
|
||||
"start_date": "2009/09/15",
|
||||
"office": "San Francisco",
|
||||
"extn": "2360"
|
||||
},
|
||||
{
|
||||
"name": "Sonya Frost",
|
||||
"position": "Software Engineer",
|
||||
"salary": "$103,600",
|
||||
"start_date": "2008/12/13",
|
||||
"office": "Edinburgh",
|
||||
"extn": "1667"
|
||||
},
|
||||
{
|
||||
"name": "Jena Gaines",
|
||||
"position": "Office Manager",
|
||||
"salary": "$90,560",
|
||||
"start_date": "2008/12/19",
|
||||
"office": "London",
|
||||
"extn": "3814"
|
||||
},
|
||||
{
|
||||
"name": "Quinn Flynn",
|
||||
"position": "Support Lead",
|
||||
"salary": "$342,000",
|
||||
"start_date": "2013/03/03",
|
||||
"office": "Edinburgh",
|
||||
"extn": "9497"
|
||||
},
|
||||
{
|
||||
"name": "Charde Marshall",
|
||||
"position": "Regional Director",
|
||||
"salary": "$470,600",
|
||||
"start_date": "2008/10/16",
|
||||
"office": "San Francisco",
|
||||
"extn": "6741"
|
||||
},
|
||||
{
|
||||
"name": "Haley Kennedy",
|
||||
"position": "Senior Marketing Designer",
|
||||
"salary": "$313,500",
|
||||
"start_date": "2012/12/18",
|
||||
"office": "London",
|
||||
"extn": "3597"
|
||||
},
|
||||
{
|
||||
"name": "Tatyana Fitzpatrick",
|
||||
"position": "Regional Director",
|
||||
"salary": "$385,750",
|
||||
"start_date": "2010/03/17",
|
||||
"office": "London",
|
||||
"extn": "1965"
|
||||
},
|
||||
{
|
||||
"name": "Michael Silva",
|
||||
"position": "Marketing Designer",
|
||||
"salary": "$198,500",
|
||||
"start_date": "2012/11/27",
|
||||
"office": "London",
|
||||
"extn": "1581"
|
||||
},
|
||||
{
|
||||
"name": "Paul Byrd",
|
||||
"position": "Chief Financial Officer (CFO)",
|
||||
"salary": "$725,000",
|
||||
"start_date": "2010/06/09",
|
||||
"office": "New York",
|
||||
"extn": "3059"
|
||||
},
|
||||
{
|
||||
"name": "Gloria Little",
|
||||
"position": "Systems Administrator",
|
||||
"salary": "$237,500",
|
||||
"start_date": "2009/04/10",
|
||||
"office": "New York",
|
||||
"extn": "1721"
|
||||
},
|
||||
{
|
||||
"name": "Bradley Greer",
|
||||
"position": "Software Engineer",
|
||||
"salary": "$132,000",
|
||||
"start_date": "2012/10/13",
|
||||
"office": "London",
|
||||
"extn": "2558"
|
||||
},
|
||||
{
|
||||
"name": "Dai Rios",
|
||||
"position": "Personnel Lead",
|
||||
"salary": "$217,500",
|
||||
"start_date": "2012/09/26",
|
||||
"office": "Edinburgh",
|
||||
"extn": "2290"
|
||||
},
|
||||
{
|
||||
"name": "Jenette Caldwell",
|
||||
"position": "Development Lead",
|
||||
"salary": "$345,000",
|
||||
"start_date": "2011/09/03",
|
||||
"office": "New York",
|
||||
"extn": "1937"
|
||||
},
|
||||
{
|
||||
"name": "Yuri Berry",
|
||||
"position": "Chief Marketing Officer (CMO)",
|
||||
"salary": "$675,000",
|
||||
"start_date": "2009/06/25",
|
||||
"office": "New York",
|
||||
"extn": "6154"
|
||||
},
|
||||
{
|
||||
"name": "Caesar Vance",
|
||||
"position": "Pre-Sales Support",
|
||||
"salary": "$106,450",
|
||||
"start_date": "2011/12/12",
|
||||
"office": "New York",
|
||||
"extn": "8330"
|
||||
},
|
||||
{
|
||||
"name": "Doris Wilder",
|
||||
"position": "Sales Assistant",
|
||||
"salary": "$85,600",
|
||||
"start_date": "2010/09/20",
|
||||
"office": "Sidney",
|
||||
"extn": "3023"
|
||||
},
|
||||
{
|
||||
"name": "Angelica Ramos",
|
||||
"position": "Chief Executive Officer (CEO)",
|
||||
"salary": "$1,200,000",
|
||||
"start_date": "2009/10/09",
|
||||
"office": "London",
|
||||
"extn": "5797"
|
||||
},
|
||||
{
|
||||
"name": "Gavin Joyce",
|
||||
"position": "Developer",
|
||||
"salary": "$92,575",
|
||||
"start_date": "2010/12/22",
|
||||
"office": "Edinburgh",
|
||||
"extn": "8822"
|
||||
},
|
||||
{
|
||||
"name": "Jennifer Chang",
|
||||
"position": "Regional Director",
|
||||
"salary": "$357,650",
|
||||
"start_date": "2010/11/14",
|
||||
"office": "Singapore",
|
||||
"extn": "9239"
|
||||
},
|
||||
{
|
||||
"name": "Brenden Wagner",
|
||||
"position": "Software Engineer",
|
||||
"salary": "$206,850",
|
||||
"start_date": "2011/06/07",
|
||||
"office": "San Francisco",
|
||||
"extn": "1314"
|
||||
},
|
||||
{
|
||||
"name": "Fiona Green",
|
||||
"position": "Chief Operating Officer (COO)",
|
||||
"salary": "$850,000",
|
||||
"start_date": "2010/03/11",
|
||||
"office": "San Francisco",
|
||||
"extn": "2947"
|
||||
},
|
||||
{
|
||||
"name": "Shou Itou",
|
||||
"position": "Regional Marketing",
|
||||
"salary": "$163,000",
|
||||
"start_date": "2011/08/14",
|
||||
"office": "Tokyo",
|
||||
"extn": "8899"
|
||||
},
|
||||
{
|
||||
"name": "Michelle House",
|
||||
"position": "Integration Specialist",
|
||||
"salary": "$95,400",
|
||||
"start_date": "2011/06/02",
|
||||
"office": "Sidney",
|
||||
"extn": "2769"
|
||||
},
|
||||
{
|
||||
"name": "Suki Burks",
|
||||
"position": "Developer",
|
||||
"salary": "$114,500",
|
||||
"start_date": "2009/10/22",
|
||||
"office": "London",
|
||||
"extn": "6832"
|
||||
},
|
||||
{
|
||||
"name": "Prescott Bartlett",
|
||||
"position": "Technical Author",
|
||||
"salary": "$145,000",
|
||||
"start_date": "2011/05/07",
|
||||
"office": "London",
|
||||
"extn": "3606"
|
||||
},
|
||||
{
|
||||
"name": "Gavin Cortez",
|
||||
"position": "Team Leader",
|
||||
"salary": "$235,500",
|
||||
"start_date": "2008/10/26",
|
||||
"office": "San Francisco",
|
||||
"extn": "2860"
|
||||
},
|
||||
{
|
||||
"name": "Martena Mccray",
|
||||
"position": "Post-Sales support",
|
||||
"salary": "$324,050",
|
||||
"start_date": "2011/03/09",
|
||||
"office": "Edinburgh",
|
||||
"extn": "8240"
|
||||
},
|
||||
{
|
||||
"name": "Unity Butler",
|
||||
"position": "Marketing Designer",
|
||||
"salary": "$85,675",
|
||||
"start_date": "2009/12/09",
|
||||
"office": "San Francisco",
|
||||
"extn": "5384"
|
||||
},
|
||||
{
|
||||
"name": "Howard Hatfield",
|
||||
"position": "Office Manager",
|
||||
"salary": "$164,500",
|
||||
"start_date": "2008/12/16",
|
||||
"office": "San Francisco",
|
||||
"extn": "7031"
|
||||
},
|
||||
{
|
||||
"name": "Hope Fuentes",
|
||||
"position": "Secretary",
|
||||
"salary": "$109,850",
|
||||
"start_date": "2010/02/12",
|
||||
"office": "San Francisco",
|
||||
"extn": "6318"
|
||||
},
|
||||
{
|
||||
"name": "Vivian Harrell",
|
||||
"position": "Financial Controller",
|
||||
"salary": "$452,500",
|
||||
"start_date": "2009/02/14",
|
||||
"office": "San Francisco",
|
||||
"extn": "9422"
|
||||
},
|
||||
{
|
||||
"name": "Timothy Mooney",
|
||||
"position": "Office Manager",
|
||||
"salary": "$136,200",
|
||||
"start_date": "2008/12/11",
|
||||
"office": "London",
|
||||
"extn": "7580"
|
||||
},
|
||||
{
|
||||
"name": "Jackson Bradshaw",
|
||||
"position": "Director",
|
||||
"salary": "$645,750",
|
||||
"start_date": "2008/09/26",
|
||||
"office": "New York",
|
||||
"extn": "1042"
|
||||
},
|
||||
{
|
||||
"name": "Olivia Liang",
|
||||
"position": "Support Engineer",
|
||||
"salary": "$234,500",
|
||||
"start_date": "2011/02/03",
|
||||
"office": "Singapore",
|
||||
"extn": "2120"
|
||||
},
|
||||
{
|
||||
"name": "Bruno Nash",
|
||||
"position": "Software Engineer",
|
||||
"salary": "$163,500",
|
||||
"start_date": "2011/05/03",
|
||||
"office": "London",
|
||||
"extn": "6222"
|
||||
},
|
||||
{
|
||||
"name": "Sakura Yamamoto",
|
||||
"position": "Support Engineer",
|
||||
"salary": "$139,575",
|
||||
"start_date": "2009/08/19",
|
||||
"office": "Tokyo",
|
||||
"extn": "9383"
|
||||
},
|
||||
{
|
||||
"name": "Thor Walton",
|
||||
"position": "Developer",
|
||||
"salary": "$98,540",
|
||||
"start_date": "2013/08/11",
|
||||
"office": "New York",
|
||||
"extn": "8327"
|
||||
},
|
||||
{
|
||||
"name": "Finn Camacho",
|
||||
"position": "Support Engineer",
|
||||
"salary": "$87,500",
|
||||
"start_date": "2009/07/07",
|
||||
"office": "San Francisco",
|
||||
"extn": "2927"
|
||||
},
|
||||
{
|
||||
"name": "Serge Baldwin",
|
||||
"position": "Data Coordinator",
|
||||
"salary": "$138,575",
|
||||
"start_date": "2012/04/09",
|
||||
"office": "Singapore",
|
||||
"extn": "8352"
|
||||
},
|
||||
{
|
||||
"name": "Zenaida Frank",
|
||||
"position": "Software Engineer",
|
||||
"salary": "$125,250",
|
||||
"start_date": "2010/01/04",
|
||||
"office": "New York",
|
||||
"extn": "7439"
|
||||
},
|
||||
{
|
||||
"name": "Zorita Serrano",
|
||||
"position": "Software Engineer",
|
||||
"salary": "$115,000",
|
||||
"start_date": "2012/06/01",
|
||||
"office": "San Francisco",
|
||||
"extn": "4389"
|
||||
},
|
||||
{
|
||||
"name": "Jennifer Acosta",
|
||||
"position": "Junior Javascript Developer",
|
||||
"salary": "$75,650",
|
||||
"start_date": "2013/02/01",
|
||||
"office": "Edinburgh",
|
||||
"extn": "3431"
|
||||
},
|
||||
{
|
||||
"name": "Cara Stevens",
|
||||
"position": "Sales Assistant",
|
||||
"salary": "$145,600",
|
||||
"start_date": "2011/12/06",
|
||||
"office": "New York",
|
||||
"extn": "3990"
|
||||
},
|
||||
{
|
||||
"name": "Hermione Butler",
|
||||
"position": "Regional Director",
|
||||
"salary": "$356,250",
|
||||
"start_date": "2011/03/21",
|
||||
"office": "London",
|
||||
"extn": "1016"
|
||||
},
|
||||
{
|
||||
"name": "Lael Greer",
|
||||
"position": "Systems Administrator",
|
||||
"salary": "$103,500",
|
||||
"start_date": "2009/02/27",
|
||||
"office": "London",
|
||||
"extn": "6733"
|
||||
},
|
||||
{
|
||||
"name": "Jonas Alexander",
|
||||
"position": "Developer",
|
||||
"salary": "$86,500",
|
||||
"start_date": "2010/07/14",
|
||||
"office": "San Francisco",
|
||||
"extn": "8196"
|
||||
},
|
||||
{
|
||||
"name": "Shad Decker",
|
||||
"position": "Regional Director",
|
||||
"salary": "$183,000",
|
||||
"start_date": "2008/11/13",
|
||||
"office": "Edinburgh",
|
||||
"extn": "6373"
|
||||
},
|
||||
{
|
||||
"name": "Michael Bruce",
|
||||
"position": "Javascript Developer",
|
||||
"salary": "$183,000",
|
||||
"start_date": "2011/06/27",
|
||||
"office": "Singapore",
|
||||
"extn": "5384"
|
||||
},
|
||||
{
|
||||
"name": "Donna Snider",
|
||||
"position": "Customer Support",
|
||||
"salary": "$112,000",
|
||||
"start_date": "2011/01/25",
|
||||
"office": "New York",
|
||||
"extn": "4226"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue