Commit 02557039 authored by Administrator's avatar Administrator

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	pom.xml
#	src/main/java/com/yxproject/start/api/ShiroApi.java
#	src/main/java/com/yxproject/start/config/JerseyConfig.java
#	src/main/java/com/yxproject/start/entity/GroupinfoEntity.java
#	src/main/java/com/yxproject/start/entity/ProductionTaskListEntity.java
#	src/main/java/com/yxproject/start/mapper/GroupinfoMapper.java
#	src/main/java/com/yxproject/start/mapper/ProductionTaskListMapper.java
#	src/main/java/com/yxproject/start/service/ProductionTaskListService.java
#	src/main/java/com/yxproject/start/service/impl/TaskServiceImpl.java
#	src/main/resources/application.properties
#	src/main/resources/mapper/GroupinfoMapper.xml
#	src/main/resources/mapper/ProductionTaskListMapper.xml
parents feead0f3 fe728525
...@@ -29,11 +29,7 @@ ...@@ -29,11 +29,7 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<!--引入jersey作为http rest接口实现-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.mybatis.spring.boot</groupId> <groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
...@@ -46,35 +42,11 @@ ...@@ -46,35 +42,11 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId> <artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.13</version>
</dependency>
<!--引入log4j2作为日志组件--> <!--引入log4j2作为日志组件-->
<!--<dependency>--> <!--<dependency>-->
<!--<groupId>org.springframework.boot</groupId>--> <!--<groupId>org.springframework.boot</groupId>-->
...@@ -84,23 +56,14 @@ ...@@ -84,23 +56,14 @@
<!-- shiro相关 --> <!-- shiro相关 -->
<dependency> <dependency>
<groupId>org.apache.shiro</groupId> <groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId> <artifactId>shiro-spring-boot-web-starter</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>1.4.0</version> <version>1.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.github.theborakompanioni</groupId>
<artifactId>thymeleaf-extras-shiro</artifactId>
<version>2.0.0</version>
</dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
...@@ -108,20 +71,34 @@ ...@@ -108,20 +71,34 @@
<version>1.1.8</version> <version>1.1.8</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency> <dependency>
<groupId>net.sf.json-lib</groupId> <groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId> <artifactId>json-lib</artifactId>
<version>2.4</version> <version>2.4</version>
<classifier>jdk15</classifier> <classifier>jdk15</classifier>
</dependency> </dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.13</version>
</dependency>
<!-- MyBatis分页插件 -->
<!--<dependency>-->
<!--<groupId>com.github.pagehelper</groupId>-->
<!--<artifactId>pagehelper</artifactId>-->
<!--<version>4.2.1</version>-->
<!--</dependency>-->
<!-- sql解析工具 -->
<!--<dependency>-->
<!--<groupId>com.github.jsqlparser</groupId>-->
<!--<artifactId>jsqlparser</artifactId>-->
<!--<version>0.9.5</version>-->
<!--</dependency>-->
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
package com.yxproject.start; package com.yxproject.start;
import com.yxproject.start.config.JerseyConfig;
import org.glassfish.jersey.servlet.ServletContainer;
import org.glassfish.jersey.servlet.ServletProperties;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
/** /**
* @author Administrator * @author Administrator
*/ */
@SpringBootApplication @SpringBootApplication
public class Main{ public class Main{
@Bean
public ServletRegistrationBean jerseyServlet() {
ServletRegistrationBean registration = new ServletRegistrationBean(new ServletContainer(), "/rest/*");
registration.addInitParameter(ServletProperties.JAXRS_APPLICATION_CLASS,
JerseyConfig.class.getName());
return registration;
}
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(Main.class, args); SpringApplication.run(Main.class, args);
} }
......
package com.yxproject.start.SqlProvider; package com.yxproject.start.SqlProvider;
import com.yxproject.start.entity.FailedinfoEntity;
import org.apache.ibatis.jdbc.SQL;
/** /**
* Created by zhangyusheng on 2018/10/23 13:52 * Created by zhangyusheng on 2018/10/23 13:52
*/ */
......
This diff is collapsed.
This diff is collapsed.
package com.yxproject.start.config;
import com.yxproject.start.api.TestApi;
import com.yxproject.start.api.UserInfoApi;
import org.glassfish.jersey.server.ResourceConfig;
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() {
register(UserInfoApi.class);
register(TestApi.class);
}
}
package com.yxproject.start.config; package com.yxproject.start.config;
import com.yxproject.start.entity.ProductionTaskListEntity;
import com.yxproject.start.entity.SysPermission; import com.yxproject.start.entity.SysPermission;
import com.yxproject.start.entity.SysRole; import com.yxproject.start.entity.SysRole;
import com.yxproject.start.entity.UserInfo; import com.yxproject.start.entity.UserInfo;
import com.yxproject.start.service.ProductionTaskListService;
import com.yxproject.start.service.LoginService;
import com.yxproject.start.service.UserInfoService; import com.yxproject.start.service.UserInfoService;
import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken; import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.SimpleAuthenticationInfo; import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.apache.shiro.authz.AuthorizationInfo; import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo; import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.realm.AuthorizingRealm;
...@@ -27,20 +25,24 @@ public class MyShiroRealm extends AuthorizingRealm { ...@@ -27,20 +25,24 @@ public class MyShiroRealm extends AuthorizingRealm {
@Autowired @Autowired
private UserInfoService userInfoService; private UserInfoService userInfoService;
@Autowired //告诉shiro如何根据获取到的用户信息中的密码和盐值来校验密码
private ProductionTaskListService productionTaskListService; {
@Autowired //设置用于匹配密码的CredentialsMatcher
private LoginService loginService; HashedCredentialsMatcher hashMatcher = new HashedCredentialsMatcher();
hashMatcher.setHashAlgorithmName("md5");
hashMatcher.setHashIterations(1024);
this.setCredentialsMatcher(hashMatcher);
}
@Override @Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
System.out.println(principals.getPrimaryPrincipal());
System.out.println("权限配置-->MyShiroRealm.doGetAuthorizationInfo()"); System.out.println("权限配置-->MyShiroRealm.doGetAuthorizationInfo()");
SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo(); SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo();
UserInfo user = (UserInfo)principals.getPrimaryPrincipal(); UserInfo userInfo = (UserInfo)principals.getPrimaryPrincipal();
for(SysRole role:user.getRoleList()){ for(SysRole role:userInfo.getRoleList()){
authorizationInfo.addRole(role.getRole()); authorizationInfo.addRole(role.getRole());
for(SysPermission memu:role.getPermissions()){ for(SysPermission p:role.getPermissions()){
authorizationInfo.addStringPermission(memu.getPermission()); authorizationInfo.addStringPermission(p.getPermission());
} }
} }
return authorizationInfo; return authorizationInfo;
...@@ -62,7 +64,7 @@ public class MyShiroRealm extends AuthorizingRealm { ...@@ -62,7 +64,7 @@ public class MyShiroRealm extends AuthorizingRealm {
System.out.println(token.getCredentials().toString()); System.out.println(token.getCredentials().toString());
//通过username从数据库中查找 User对象,如果找到,没找到. //通过username从数据库中查找 User对象,如果找到,没找到.
//实际项目中,这里可以根据实际情况做缓存,如果不做,Shiro自己也是有时间间隔机制,2分钟内不会重复执行该方法 //实际项目中,这里可以根据实际情况做缓存,如果不做,Shiro自己也是有时间间隔机制,2分钟内不会重复执行该方法
UserInfo user = loginService.findByUsername(username); UserInfo user = userInfoService.findByUsername(username);
if(user == null || user.getState()==1){ if(user == null || user.getState()==1){
return null; return null;
} }
......
package com.yxproject.start.config; package com.yxproject.start.config;
import at.pollux.thymeleaf.shiro.dialect.ShiroDialect;
import com.alibaba.druid.pool.DruidDataSourceFactory; import com.alibaba.druid.pool.DruidDataSourceFactory;
import com.yxproject.start.utils.DatabaseType; import com.yxproject.start.utils.DatabaseType;
import com.yxproject.start.utils.DynamicDataSource; import com.yxproject.start.utils.DynamicDataSource;
...@@ -10,8 +9,11 @@ import org.apache.shiro.mgt.SecurityManager; ...@@ -10,8 +9,11 @@ import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.realm.Realm; import org.apache.shiro.realm.Realm;
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor; import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean; import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.spring.web.config.DefaultShiroFilterChainDefinition;
import org.apache.shiro.spring.web.config.ShiroFilterChainDefinition;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager; import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionFactoryBean;
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
...@@ -30,181 +32,44 @@ import java.util.*; ...@@ -30,181 +32,44 @@ import java.util.*;
*/ */
@Configuration @Configuration
public class ShiroConfig { public class ShiroConfig {
@Bean
public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) {
System.out.println("ShiroConfiguration.shiroFilter()");
ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
shiroFilterFactoryBean.setSecurityManager(securityManager);
//拦截器.
Map<String,String> filterChainDefinitionMap = new LinkedHashMap<String,String>();
// 配置不会被拦截的链接 顺序判断
filterChainDefinitionMap.put("/favicon.ico", "anon");
filterChainDefinitionMap.put("/static/**", "anon");
filterChainDefinitionMap.put("/css/**", "anon");
filterChainDefinitionMap.put("/js/**", "anon");
filterChainDefinitionMap.put("/fonts/**", "anon");
filterChainDefinitionMap.put("/images/**", "anon");
filterChainDefinitionMap.put("/lib/**", "anon");
filterChainDefinitionMap.put("/layui/**", "anon");
filterChainDefinitionMap.put("/modules/**", "anon");
filterChainDefinitionMap.put("/laydate/**", "anon");
filterChainDefinitionMap.put("/default/**", "anon");
filterChainDefinitionMap.put("/layer/**", "anon");
filterChainDefinitionMap.put("/lay/**", "anon");
//配置退出 过滤器,其中的具体的退出代码Shiro已经替我们实现了
filterChainDefinitionMap.put("/logout", "logout");
//<!-- 过滤链定义,从上向下顺序执行,一般将/**放在最为下边 -->:这是一个坑呢,一不小心代码就不好使了;
filterChainDefinitionMap.put("/**", "authc");
// 如果不设置默认会自动寻找Web工程根目录下的"/login.jsp"页面
shiroFilterFactoryBean.setLoginUrl("/userLogin");
// 登录成功后要跳转的链接
shiroFilterFactoryBean.setSuccessUrl("/index");
//<!-- authc:所有url都必须认证通过才可以访问; anon:所有url都都可以匿名访问-->
@Autowired
private MyShiroRealm realm;
//未授权界面;
shiroFilterFactoryBean.setUnauthorizedUrl("/403");
shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
return shiroFilterFactoryBean;
}
/**
* 凭证匹配器
* (由于我们的密码校验交给Shiro的SimpleAuthenticationInfo进行处理了
* )
* @return
*/
@Bean @Bean
public HashedCredentialsMatcher hashedCredentialsMatcher(){ public MyShiroRealm customRealm() {
HashedCredentialsMatcher hashedCredentialsMatcher = new HashedCredentialsMatcher(); return new MyShiroRealm();
//散列算法:这里使用MD5算法;
hashedCredentialsMatcher.setHashAlgorithmName("md5");
//散列的次数,比如散列两次,相当于 md5("");
hashedCredentialsMatcher.setHashIterations(1024);
return hashedCredentialsMatcher;
} }
@Bean @Bean
public MyShiroRealm myShiroRealm(){ public DefaultWebSecurityManager securityManager() {
MyShiroRealm myShiroRealm = new MyShiroRealm(); System.out.println("添加了DefaultWebSecurityManager");
myShiroRealm.setCredentialsMatcher(hashedCredentialsMatcher()); DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
return myShiroRealm; securityManager.setRealm(realm);
}
@Bean
public SecurityManager securityManager(){
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
List<Realm> realms = new ArrayList<>();
realms.add(myShiroRealm());
securityManager.setRealms(realms);
return securityManager; return securityManager;
} }
@Bean
public static DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator(){
DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator=new DefaultAdvisorAutoProxyCreator();
defaultAdvisorAutoProxyCreator.setUsePrefix(true);
/** return defaultAdvisorAutoProxyCreator;
* 开启shiro aop注解支持.
* 使用代理方式;所以需要开启代码支持;
* @param securityManager
* @return
*/
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager){
AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor();
authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
return authorizationAttributeSourceAdvisor;
} }
@Bean(name="simpleMappingExceptionResolver") @Bean
public SimpleMappingExceptionResolver public ShiroFilterChainDefinition shiroFilterChainDefinition() {
createSimpleMappingExceptionResolver() { System.out.println("添加了过滤器链");
SimpleMappingExceptionResolver r = new SimpleMappingExceptionResolver(); DefaultShiroFilterChainDefinition chainDefinition = new DefaultShiroFilterChainDefinition();
Properties mappings = new Properties();
//数据库异常处理 chainDefinition.addPathDefinition("/admin/**", "authc");
mappings.setProperty("DatabaseException", "databaseError"); chainDefinition.addPathDefinition("/admin/**", "roles[admin]");
mappings.setProperty("UnauthorizedException","403"); chainDefinition.addPathDefinition("/user/login", "anon");
r.setExceptionMappings(mappings); chainDefinition.addPathDefinition("/user/logout", "anon");
r.setDefaultErrorView("error"); chainDefinition.addPathDefinition("/user/**", "authc");
r.setExceptionAttribute("ex"); chainDefinition.addPathDefinition("/**", "anon");
return r;
} return chainDefinition;
@Bean(name = "shiroDialect")
public ShiroDialect shiroDialect(){
return new ShiroDialect();
} }
}
// @Autowired
// private Environment env;
//
// /**
// * 创建数据源(数据源的名称:方法名可以取为XXXDataSource(),XXX为数据库名称,该名称也就是数据源的名称)
// */
// @Bean
// public DataSource prodDataSource() throws Exception {
// Properties props = new Properties();
// props.put("driverClassName", env.getProperty("jdbc.driverClassName"));
// props.put("url", env.getProperty("jdbc.url"));
// props.put("username", env.getProperty("jdbc.username"));
// props.put("password", env.getProperty("jdbc.password"));
// return DruidDataSourceFactory.createDataSource(props);
// }
//
// @Bean
// public DataSource accuDataSource() throws Exception {
// Properties props = new Properties();
// props.put("driverClassName", env.getProperty("jdbc2.driverClassName"));
// props.put("url", env.getProperty("jdbc2.url"));
// props.put("username", env.getProperty("jdbc2.username"));
// props.put("password", env.getProperty("jdbc2.password"));
// return DruidDataSourceFactory.createDataSource(props);
// }
//
// /**
// * @Primary 该注解表示在同一个接口有多个实现类可以注入的时候,默认选择哪一个,而不是让@autowire注解报错
// * @Qualifier 根据名称进行注入,通常是在具有相同的多个类型的实例的一个注入(例如有多个DataSource类型的实例)
// */
// @Bean
// @Primary
// public DynamicDataSource dataSource(@Qualifier("prodDataSource") DataSource myTestDbDataSource,
// @Qualifier("accuDataSource") DataSource myTestDb2DataSource) {
// Map<Object, Object> targetDataSources = new HashMap<>();
// targetDataSources.put(DatabaseType.mytestdb, myTestDbDataSource);
// targetDataSources.put(DatabaseType.mytestdb2, myTestDb2DataSource);
//
// DynamicDataSource dataSource = new DynamicDataSource();
// dataSource.setTargetDataSources(targetDataSources);// 该方法是AbstractRoutingDataSource的方法
// dataSource.setDefaultTargetDataSource(myTestDbDataSource);// 默认的datasource设置为myTestDbDataSource
//
// return dataSource;
// }
//
// /**
// * 根据数据源创建SqlSessionFactory
// */
// @Bean
// public SqlSessionFactory sqlSessionFactory(DynamicDataSource ds) throws Exception {
// SqlSessionFactoryBean fb = new SqlSessionFactoryBean();
// fb.setDataSource(ds);// 指定数据源(这个必须有,否则报错)
// // 下边两句仅仅用于*.xml文件,如果整个持久层操作不需要使用到xml文件的话(只用注解就可以搞定),则不加
// fb.setTypeAliasesPackage(env.getProperty("mybatis.typeAliasesPackage"));// 指定基包
// fb.setMapperLocations(
// new PathMatchingResourcePatternResolver().getResources(env.getProperty("mybatis.mapperLocations")));//
//
// return fb.getObject();
// }
//
// /**
// * 配置事务管理器
// */
// @Bean
// public DataSourceTransactionManager transactionManager(DynamicDataSource dataSource) throws Exception {
// return new DataSourceTransactionManager(dataSource);
// }
}
\ No newline at end of file
package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "CARD_BODY", schema = "DAHAI", catalog = "")
public class CardBodyEntity {
private long cardBodyId;
private Time saveDate;
private long isActive;
private long totalCount;
@Id
@Column(name = "CARD_BODY_ID", nullable = false, precision = 0)
public long getCardBodyId() {
return cardBodyId;
}
public void setCardBodyId(long cardBodyId) {
this.cardBodyId = cardBodyId;
}
@Basic
@Column(name = "SAVE_DATE", nullable = false)
public Time getSaveDate() {
return saveDate;
}
public void setSaveDate(Time saveDate) {
this.saveDate = saveDate;
}
@Basic
@Column(name = "IS_ACTIVE", nullable = false, precision = 0)
public long getIsActive() {
return isActive;
}
public void setIsActive(long isActive) {
this.isActive = isActive;
}
@Basic
@Column(name = "TOTAL_COUNT", nullable = false, precision = 0)
public long getTotalCount() {
return totalCount;
}
public void setTotalCount(long totalCount) {
this.totalCount = totalCount;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CardBodyEntity that = (CardBodyEntity) o;
return cardBodyId == that.cardBodyId &&
isActive == that.isActive &&
totalCount == that.totalCount &&
Objects.equals(saveDate, that.saveDate);
}
@Override
public int hashCode() {
return Objects.hash(cardBodyId, saveDate, isActive, totalCount);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "CITY_DIC", schema = "DAHAI", catalog = "")
public class CityDicEntity {
private String citycode;
private String cityname;
@Id
@Column(name = "CITYCODE", nullable = false, length = 6)
public String getCitycode() {
return citycode;
}
public void setCitycode(String citycode) {
this.citycode = citycode;
}
@Basic
@Column(name = "CITYNAME", nullable = false, length = 20)
public String getCityname() {
return cityname;
}
public void setCityname(String cityname) {
this.cityname = cityname;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CityDicEntity that = (CityDicEntity) o;
return Objects.equals(citycode, that.citycode) &&
Objects.equals(cityname, that.cityname);
}
@Override
public int hashCode() {
return Objects.hash(citycode, cityname);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "COUNTY_LIST", schema = "DAHAI", catalog = "")
public class CountyListEntity {
private long countyListId;
private Time saveDate;
private Long finishCount;
private Long inStorageCount;
private Long outStorageCount;
@Id
@Column(name = "COUNTY_LIST_ID", nullable = false, precision = 0)
public long getCountyListId() {
return countyListId;
}
public void setCountyListId(long countyListId) {
this.countyListId = countyListId;
}
@Basic
@Column(name = "SAVE_DATE", nullable = false)
public Time getSaveDate() {
return saveDate;
}
public void setSaveDate(Time saveDate) {
this.saveDate = saveDate;
}
@Basic
@Column(name = "FINISH_COUNT", nullable = true, precision = 0)
public Long getFinishCount() {
return finishCount;
}
public void setFinishCount(Long finishCount) {
this.finishCount = finishCount;
}
@Basic
@Column(name = "IN_STORAGE_COUNT", nullable = true, precision = 0)
public Long getInStorageCount() {
return inStorageCount;
}
public void setInStorageCount(Long inStorageCount) {
this.inStorageCount = inStorageCount;
}
@Basic
@Column(name = "OUT_STORAGE_COUNT", nullable = true, precision = 0)
public Long getOutStorageCount() {
return outStorageCount;
}
public void setOutStorageCount(Long outStorageCount) {
this.outStorageCount = outStorageCount;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CountyListEntity that = (CountyListEntity) o;
return countyListId == that.countyListId &&
Objects.equals(saveDate, that.saveDate) &&
Objects.equals(finishCount, that.finishCount) &&
Objects.equals(inStorageCount, that.inStorageCount) &&
Objects.equals(outStorageCount, that.outStorageCount);
}
@Override
public int hashCode() {
return Objects.hash(countyListId, saveDate, finishCount, inStorageCount, outStorageCount);
}
}
package com.yxproject.start.entity; package com.yxproject.start.entity;
import javax.persistence.*; import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects; import java.util.Objects;
/** /**
* Created by zhangyusheng on 2018/10/30 9:02 * Created by zhangyusheng on 2018/11/16 10:51
*/ */
@Entity @Entity
@Table(name = "FAILEDINFO", schema = "DAHAI", catalog = "") @Table(name = "FAILED_CARD", schema = "DAHAI")
public class FailedinfoEntity { public class FailedCardEntity {
private String failedinfoid; private long failed_Card_Id;
private long failed_Reason; private long failed_Card_Reason_Id;
private String groupno; private String accept_No;
private String cyclesheetid; private long task_Id;
private String position_Date; private Date position_Date;
private String finish_Date; private Date finish_Date;
private String allot_Date; private Date allot_Date;
private String print_Date; private Date print_Date;
private long state; private long state;
@Id @Id
@Column(name = "FAILEDINFOID", nullable = false, length = 20) @Column(name = "FAILED_CARD_ID", nullable = false, precision = 0)
public String getFailedinfoid() { public long getFailed_Card_Id() {
return failedinfoid; return failed_Card_Id;
} }
public void setFailedinfoid(String failedinfoid) { public void setFailed_Card_Id(long failed_Card_Id) {
this.failedinfoid = failedinfoid; this.failed_Card_Id = failed_Card_Id;
} }
@Basic @Basic
@Column(name = "FAILED_REASON", nullable = true, precision = 0) @Column(name = "FAILED_CARD_REASON_ID", nullable = true, precision = 0)
public long getFailed_Reason() { public long getFailed_Card_Reason_Id() {
return failed_Reason; return failed_Card_Reason_Id;
} }
public void setFailed_Reason(long failed_Reason) { public void setFailed_Card_Reason_Id(long failed_Card_Reason_Id) {
this.failed_Reason = failed_Reason; this.failed_Card_Reason_Id = failed_Card_Reason_Id;
} }
@Basic @Basic
@Column(name = "GROUPNO", nullable = true, length = 20) @Column(name = "ACCEPT_NO", nullable = true, length = 20)
public String getGroupno() { public String getAccept_No() {
return groupno; return accept_No;
} }
public void setGroupno(String groupno) { public void setAccept_No(String accept_No) {
this.groupno = groupno; this.accept_No = accept_No;
} }
@Basic @Basic
@Column(name = "CYCLESHEETID", nullable = true, length = 20) @Column(name = "TASK_ID", nullable = false, precision = 0)
public String getCyclesheetid() { public long getTask_Id() {
return cyclesheetid; return task_Id;
} }
public void setCyclesheetid(String cyclesheetid) { public void setTask_Id(long task_Id) {
this.cyclesheetid = cyclesheetid; this.task_Id = task_Id;
} }
@Basic @Basic
@Column(name = "POSITION_DATE", nullable = true, length = 20) @Column(name = "POSITION_DATE", nullable = true, length = 20)
public Date getPosition_Date() {
public String getPosition_Date() {
return position_Date; return position_Date;
} }
public void setPosition_Date(String position_Date) { public void setPosition_Date(Date position_Date) {
this.position_Date = position_Date; this.position_Date = position_Date;
} }
@Basic @Basic
@Column(name = "FINISH_DATE", nullable = true, length = 20) @Column(name = "FINISH_DATE", nullable = true, length = 20)
public Date getFinish_Date() {
public String getFinish_Date() {
return finish_Date; return finish_Date;
} }
public void setFinish_Date(String finish_Date) { public void setFinish_Date(Date finish_Date) {
this.finish_Date = finish_Date; this.finish_Date = finish_Date;
} }
@Basic @Basic
@Column(name = "ALLOT_DATE", nullable = true, length = 20) @Column(name = "ALLOT_DATE", nullable = true, length = 20)
public String getAllot_Date() { public Date getAllot_Date() {
return allot_Date; return allot_Date;
} }
public void setAllot_Date(String allot_Date) {
public void setAllot_Date(Date allot_Date) {
this.allot_Date = allot_Date; this.allot_Date = allot_Date;
} }
@Basic @Basic
@Column(name = "PRINT_DATE", nullable = true, length = 20) @Column(name = "PRINT_DATE", nullable = true, length = 20)
public String getPrint_Date() { public Date getPrint_Date() {
return print_Date; return print_Date;
} }
public void setPrint_Date(Date print_Date) {
public void setPrint_Date(String print_Date) {
this.print_Date = print_Date; this.print_Date = print_Date;
} }
@Basic @Basic
@Column(name = "STATE", nullable = false, precision = 0) @Column(name = "STATE", nullable = false, precision = 0)
public long getState() { public long getState() {
...@@ -115,11 +115,11 @@ public class FailedinfoEntity { ...@@ -115,11 +115,11 @@ public class FailedinfoEntity {
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
FailedinfoEntity that = (FailedinfoEntity) o; FailedCardEntity that = (FailedCardEntity) o;
return Objects.equals(failedinfoid, that.failedinfoid) && return Objects.equals(failed_Card_Id, that.failed_Card_Id) &&
Objects.equals(failed_Reason, that.failed_Reason) && Objects.equals(failed_Card_Reason_Id, that.failed_Card_Reason_Id) &&
Objects.equals(groupno, that.groupno) && Objects.equals(accept_No, that.accept_No) &&
Objects.equals(cyclesheetid, that.cyclesheetid) && Objects.equals(task_Id, that.task_Id) &&
Objects.equals(position_Date, that.position_Date) && Objects.equals(position_Date, that.position_Date) &&
Objects.equals(allot_Date, that.allot_Date) && Objects.equals(allot_Date, that.allot_Date) &&
Objects.equals(print_Date, that.print_Date) && Objects.equals(print_Date, that.print_Date) &&
...@@ -130,8 +130,7 @@ public class FailedinfoEntity { ...@@ -130,8 +130,7 @@ public class FailedinfoEntity {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(failedinfoid, failed_Reason, groupno, cyclesheetid, position_Date, finish_Date, allot_Date, print_Date, state); return Objects.hash(failed_Card_Id, failed_Card_Reason_Id, accept_No, task_Id, position_Date, finish_Date, allot_Date, print_Date, state);
} }
} }
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "GROUP_NO", schema = "DAHAI", catalog = "")
public class GroupNoEntity {
private long group_Id;
private long task_Id;
private String group_No;
private long vaild_Count;
private long invalid_Count;
private long special_Card_Count;
@Basic
@Column(name = "GROUP_ID", nullable = false, precision = 0)
public long getGroup_Id() {
return group_Id;
}
public void setGroup_Id(long group_Id) {
this.group_Id = group_Id;
}
@Basic
@Column(name = "TASK_ID", nullable = false, precision = 0)
public long getTask_Id() {
return task_Id;
}
public void setTask_Id(long task_Id) {
this.task_Id = task_Id;
}
@Id
@Column(name = "GROUP_NO", nullable = false, length = 8)
public String getGroup_No() {
return group_No;
}
public void setGroup_No(String group_No) {
this.group_No = group_No;
}
@Basic
@Column(name = "VAILD_COUNT", nullable = false, precision = 0)
public long getVaild_Count() {
return vaild_Count;
}
public void setVaild_Count(long vaild_Count) {
this.vaild_Count = vaild_Count;
}
@Basic
@Column(name = "INVALID_COUNT", nullable = false, precision = 0)
public long getInvalid_Count() {
return invalid_Count;
}
public void setInvalid_Count(long invalid_Count) {
this.invalid_Count = invalid_Count;
}
@Basic
@Column(name = "SPECIAL_CARD_COUNT", nullable = false, precision = 0)
public long getSpecial_Card_Count() {
return special_Card_Count;
}
public void setSpecial_Card_Count(long special_Card_Count) {
this.special_Card_Count = special_Card_Count;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
GroupNoEntity that = (GroupNoEntity) o;
return group_Id == that.group_Id &&
vaild_Count == that.vaild_Count &&
invalid_Count == that.invalid_Count &&
special_Card_Count == that.special_Card_Count &&
task_Id == that.task_Id &&
Objects.equals(group_No, that.group_No);
}
@Override
public int hashCode() {
return Objects.hash(group_Id, group_No, task_Id, vaild_Count, invalid_Count,special_Card_Count);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
@Entity
@Table(name = "GROUPINFO", schema = "DAHAI", catalog = "")
public class GroupinfoEntity {
private String groupid;
private String groupno;
private String cyclesheetid;
private Long valid_Count;
private Long invalid_Count;
private Long special_Card_Count;
public Long totalinvalidCount;
@Id
@Column(name = "GROUPID", nullable = false, length = 20)
public String getGroupid() {
return groupid;
}
public void setGroupid(String groupid) {
this.groupid = groupid;
}
@Basic
@Column(name = "GROUPNO", nullable = true, length = 20)
public String getGroupno() {
return groupno;
}
public void setGroupno(String groupno) {
this.groupno = groupno;
}
@Basic
@Column(name = "CYCLESHEETID", nullable = true, length = 20)
public String getCyclesheetid() {
return cyclesheetid;
}
public void setCyclesheetid(String cyclesheetid) {
this.cyclesheetid = cyclesheetid;
}
@Basic
@Column(name = "VAILD_COUNT", nullable = true, precision = 0)
public Long getValid_Count() {
return valid_Count;
}
public void setValid_Count(Long valid_Count) {
this.valid_Count = valid_Count;
}
@Basic
@Column(name = "INVALID_COUNT", nullable = true, precision = 0)
public Long getInvalid_Count() {
return invalid_Count;
}
public void setInvalid_Count(Long invalid_Count) {
this.invalid_Count = invalid_Count;
}
@Basic
@Column(name = "SPECIAL_CARD_COUNT", nullable = true, precision = 0)
public Long getSpecial_Card_Count() {
return special_Card_Count;
}
public void setSpecial_Card_Count(Long special_Card_Count) {
this.special_Card_Count = special_Card_Count;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
GroupinfoEntity that = (GroupinfoEntity) o;
return Objects.equals(groupid, that.groupid) &&
Objects.equals(groupno, that.groupno) &&
Objects.equals(cyclesheetid, that.cyclesheetid) &&
Objects.equals(valid_Count, that.valid_Count) &&
Objects.equals(special_Card_Count, that.special_Card_Count) &&
Objects.equals(invalid_Count, that.invalid_Count);
}
@Override
public int hashCode() {
return Objects.hash(groupid, groupno, cyclesheetid, valid_Count, special_Card_Count,invalid_Count);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Date;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/12 14:12
*/
@Entity
@Table(name = "POLICE_STATION_APPLY_REASON", schema = "DAHAI", catalog = "")
public class PoliceStationApplyReasonEntity {
private Long police_Station_Apply_Reason_Id;
private Date save_Date;
private Long task_Id;
private String police_Station_Code;
private Long apply_Code;
private Long apply_Count;
@Id
@Column(name = "POLICE_STATION_APPLY_REASON_ID", nullable = false, precision = 0)
public Long getPolice_Station_Apply_Reason_Id() {
return police_Station_Apply_Reason_Id;
}
public void setPolice_Station_Apply_Reason_Id(Long police_Station_Apply_Reason_Id) {
this.police_Station_Apply_Reason_Id = police_Station_Apply_Reason_Id;
}
@Basic
@Column(name = "SAVE_DATE", nullable = true)
public Date getSave_Date() {
return save_Date;
}
public void setSave_Date(Date save_Date) {
this.save_Date = save_Date;
}
@Basic
@Column(name = "TASK_ID", nullable = false, precision = 0)
public Long getTask_Id() {
return task_Id;
}
public void setTask_Id(Long task_Id) {
this.task_Id = task_Id;
}
@Basic
@Column(name = "POLICE_STATION_CODE", nullable = true, length = 20)
public String getPolice_Station_Code() {
return police_Station_Code;
}
public void setPolice_Station_Code(String police_Station_Code) {
this.police_Station_Code = police_Station_Code;
}
@Basic
@Column(name = "APPLY_CODE", nullable = true, precision = 0)
public Long getApply_Code() {
return apply_Code;
}
public void setApply_Code(Long apply_Code) {
this.apply_Code = apply_Code;
}
@Basic
@Column(name = "APPLY_COUNT", nullable = true, precision = 0)
public Long getApply_Count() {
return apply_Count;
}
public void setApply_Count(Long apply_Count) {
this.apply_Count = apply_Count;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PoliceStationApplyReasonEntity that = (PoliceStationApplyReasonEntity) o;
return Objects.equals(police_Station_Apply_Reason_Id, that.police_Station_Apply_Reason_Id) &&
Objects.equals(save_Date, that.save_Date) &&
Objects.equals(task_Id, that.task_Id) &&
Objects.equals(police_Station_Code, that.police_Station_Code) &&
Objects.equals(apply_Code, that.apply_Code) &&
Objects.equals(apply_Count, that.apply_Count);
}
@Override
public int hashCode() {
return Objects.hash(police_Station_Apply_Reason_Id, save_Date, task_Id, police_Station_Code, apply_Code, apply_Count);
}
}
package com.yxproject.start.entity; package com.yxproject.start.entity;
import javax.persistence.*; import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects; import java.util.Objects;
/** /**
* Created by zhangyusheng on 2018/10/25 13:38 * Created by zhangyusheng on 2018/11/16 10:51
*/ */
@Entity @Entity
@Table(name = "POLICE_STATION_VAILED_INFO", schema = "DAHAI", catalog = "") @Table(name = "POLICE_STATION_VAILED", schema = "DAHAI", catalog = "")
public class PoliceStationVailedInfoEntity { public class PoliceStationVailedEntity {
private String police_Station_Vailed_Info_Id; private long police_Station_Vailed_Id;
private String cyclesheetid; private long task_Id;
private String police_Station_Code; private String police_Station_Code;
private Long vailed_Count; private long vailed_Count;
private Long invalid_Count; private long invalid_Count;
private String sava_Date; private Date sava_Date;
@Id @Id
@Column(name = "POLICE_STATION_VAILED_INFO_ID", nullable = false, length = 20) @Column(name = "POLICE_STATION_VAILED_ID", nullable = false, precision = 0)
public String getPolice_Station_Vailed_Info_Id() { public long getPolice_Station_Vailed_Id() {
return police_Station_Vailed_Info_Id; return police_Station_Vailed_Id;
} }
public void setPolice_Station_Vailed_Info_Id(String police_Station_Vailed_Info_Id) { public void setPolice_Station_Vailed_Id(long police_Station_Vailed_Id) {
this.police_Station_Vailed_Info_Id = police_Station_Vailed_Info_Id; this.police_Station_Vailed_Id = police_Station_Vailed_Id;
} }
@Basic @Basic
@Column(name = "CYCLESHEETID", nullable = true, precision = 0) @Column(name = "TASK_ID", nullable = false, precision = 0)
public String getCyclesheetid() { public long getTask_Id() {
return cyclesheetid; return task_Id;
} }
public void setCyclesheetid(String cyclesheetid) { public void setTask_Id(long task_Id) {
this.cyclesheetid = cyclesheetid; this.task_Id = task_Id;
} }
@Basic @Basic
@Column(name = "POLICE_STATION_CODE", nullable = true, precision = 0) @Column(name = "POLICE_STATION_CODE", nullable = true, length = 20)
public String getPolice_Station_Code() { public String getPolice_Station_Code() {
return police_Station_Code; return police_Station_Code;
} }
...@@ -47,50 +46,57 @@ public class PoliceStationVailedInfoEntity { ...@@ -47,50 +46,57 @@ public class PoliceStationVailedInfoEntity {
} }
@Basic @Basic
@Column(name = "VAILED_COUNT", nullable = true, precision = 0) @Column(name = "INVALID_COUNT", nullable = false, precision = 0)
public Long getVailed_Count() { public long getVailed_Count() {
return vailed_Count; return vailed_Count;
} }
public void setVailed_Count(Long vailed_Count) { public void setVailed_Count(long vailed_Count) {
this.vailed_Count = vailed_Count; this.vailed_Count = vailed_Count;
} }
@Basic @Basic
@Column(name = "INVALID_COUNT", nullable = true, precision = 0) @Column(name = "VAILED_COUNT", nullable = false, precision = 0)
public Long getInvalid_Count() { public long getInvalid_Count() {
return invalid_Count; return invalid_Count;
} }
public void setInvalid_Count(Long invalid_Count) { public void setInvalid_Count(long invalid_Count) {
this.invalid_Count = invalid_Count; this.invalid_Count = invalid_Count;
} }
@Basic @Basic
@Column(name = "SAVA_DATE", nullable = true, length = 20) @Column(name = "SAVA_DATE", nullable = false)
public String getSava_Date() { public Date getSava_Date() {
return sava_Date; return sava_Date;
} }
public void setSava_Date(String sava_Date) { public void setSava_Date(Date sava_Date) {
this.sava_Date = sava_Date; this.sava_Date = sava_Date;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
PoliceStationVailedInfoEntity that = (PoliceStationVailedInfoEntity) o; PoliceStationVailedEntity that = (PoliceStationVailedEntity) o;
return Objects.equals(police_Station_Vailed_Info_Id, that.police_Station_Vailed_Info_Id) && return police_Station_Vailed_Id == that.police_Station_Vailed_Id &&
Objects.equals(cyclesheetid, that.cyclesheetid) && task_Id == that.task_Id &&
Objects.equals(police_Station_Code, that.police_Station_Code) && vailed_Count == that.vailed_Count &&
Objects.equals(vailed_Count, that.vailed_Count) && invalid_Count == that.invalid_Count &&
Objects.equals(invalid_Count, that.invalid_Count) && Objects.equals(police_Station_Code, that.police_Station_Code)&&
Objects.equals(sava_Date, that.sava_Date); Objects.equals(sava_Date, that.sava_Date);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(police_Station_Vailed_Info_Id, cyclesheetid, police_Station_Code, vailed_Count, invalid_Count, sava_Date); return Objects.hash(police_Station_Vailed_Id, task_Id, police_Station_Code, vailed_Count,invalid_Count,sava_Date);
} }
} }
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* Created by Administrator on 2018/11/13.
*/
@Entity
@Table(name = "PRODUCTION_TASK_LIST", schema = "DAHAI")
public class ProductionTaskListEntity {
private String production_Task_List_Id;
private long make_Type;
private Long old_Make_Type;
private String workshop;
private String citycode;
private String submit_Date;
private String handout_Date;
private Long is_Print;
private String download_Date;
private String print_Out;
private String permanent_Position_Date;
private String roll_Out_Workshop_Date;
private String qualityinspection_Name;
private String qualityinspection_Date;
private String exception_Information;
private String outbound_Date;
private String putinstorage_Date;
private Long state;
private Long exception_State;
@Id
@Column(name = "PRODUCTION_TASK_LIST_ID", nullable = false, length = 20)
public String getProduction_Task_List_Id() {
return production_Task_List_Id;
}
public void setProduction_Task_List_Id(String production_Task_List_Id) {
this.production_Task_List_Id = production_Task_List_Id;
}
@Basic
@Column(name = "MAKE_TYPE", nullable = false, precision = 0)
public long getMake_Type() {
return make_Type;
}
public void setMake_Type(long setMake_Type){
setMake_Type= make_Type;
}
@Basic
@Column(name = "OLD_MAKE_TYPE", nullable = true, precision = 0)
public Long getOld_Make_Type() {
return old_Make_Type;
}
public void setOld_Make_Type(Long old_Make_Type) {
this.old_Make_Type = old_Make_Type;
}
@Basic
@Column(name = "CITYCODE",nullable = true, length = 8)
public String getCitycode() {
return citycode;
}
public void setCitycode(String citycode) {
this.citycode = citycode;
}
@Basic
@Column(name = "WORKSHOP", nullable = true, length = 2)
public String getWorkshop() {
return workshop;
}
public void setWorkshop(String workshop) {
this.workshop = workshop;
}
@Basic
@Column(name = "SUBMIT_DATE", nullable = true, length = 8)
public String getSubmit_Date() {
return submit_Date;
}
public void setSubmit_Date(String submit_Date) {
this.submit_Date = submit_Date;
}
@Basic
@Column(name = "HANDOUT_DATE", nullable = true, length = 8)
public String getHandout_Date() {
return handout_Date;
}
public void setHandout_Date(String handout_Date) {
this.handout_Date = handout_Date;
}
@Basic
@Column(name = "IS_PRINT", nullable = true, precision = 0)
public Long getIs_Print() {
return is_Print;
}
public void setIs_Print(Long is_Print) {
this.is_Print = is_Print;
}
@Basic
@Column(name = "DOWNLOAD_DATE", nullable = true, length = 8)
public String getDownload_Date() {
return download_Date;
}
public void setDownload_Date(String download_Date) {
this.download_Date = download_Date;
}
@Basic
@Column(name = "PRINT_OUT", nullable = true, length = 8)
public String getPrint_Out() {
return print_Out;
}
public void setPrint_Out(String print_Out) {
this.print_Out = print_Out;
}
@Basic
@Column(name = "PERMANENT_POSITION_DATE", nullable = true, length = 8)
public String getPermanent_Position_Date() {
return permanent_Position_Date;
}
public void setPermanent_Position_Date(String permanent_Position_Date) {
this.permanent_Position_Date = permanent_Position_Date;
}
@Basic
@Column(name = "ROLL_OUT_WORKSHOP_DATE", nullable = true, length = 8)
public String getRoll_Out_Workshop_Date() {
return roll_Out_Workshop_Date;
}
public void setRoll_Out_Workshop_Date(String roll_Out_Workshop_Date) {
this.roll_Out_Workshop_Date = roll_Out_Workshop_Date;
}
@Basic
@Column(name = "QUALITYINSPECTION_NAME", nullable = true, length = 20)
public String getQualityinspection_Name() {
return qualityinspection_Name;
}
public void setQualityinspection_Name(String qualityinspection_Name) {
this.qualityinspection_Name = qualityinspection_Name;
}
@Basic
@Column(name = "QUALITYINSPECTION_DATE", nullable = true, length = 8)
public String getQualityinspection_Date() {
return qualityinspection_Date;
}
public void setQualityinspection_Date(String qualityinspection_Date) {
this.qualityinspection_Date = qualityinspection_Date;
}
@Basic
@Column(name = "EXCEPTION_INFORMATION", nullable = true, length = 120)
public String getException_Information() {
return exception_Information;
}
public void setException_Information(String exception_Information) {
this.exception_Information = exception_Information;
}
@Basic
@Column(name = "OUTBOUND_DATE", nullable = true, length = 8)
public String getOutbound_Date() {
return outbound_Date;
}
public void setOutbound_Date(String outbound_Date) {
this.outbound_Date = outbound_Date;
}
@Basic
@Column(name = "PUTINSTORAGE_DATE", nullable = true, length = 8)
public String getPutinstorage_Date() {
return putinstorage_Date;
}
public void setPutinstorage_Date(String putinstorage_Date) {
this.putinstorage_Date = putinstorage_Date;
}
@Basic
@Column(name = "STATE", nullable = true, precision = 0)
public Long getState() {
return state;
}
public void setState(Long state) {
this.state = state;
}
@Basic
@Column(name = "EXCEPTION_STATE", nullable = true, precision = 0)
public Long getException_State() {
return exception_State;
}
public void setException_State(Long exception_State) {
this.exception_State = exception_State;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProductionTaskListEntity that = (ProductionTaskListEntity) o;
return make_Type == that.make_Type &&
Objects.equals(production_Task_List_Id, that.production_Task_List_Id) &&
Objects.equals(old_Make_Type, that.old_Make_Type) &&
Objects.equals(citycode, that.citycode) &&
Objects.equals(workshop, that.workshop) &&
Objects.equals(submit_Date, that.submit_Date) &&
Objects.equals(handout_Date, that.handout_Date) &&
Objects.equals(is_Print, that.is_Print) &&
Objects.equals(download_Date, that.download_Date) &&
Objects.equals(print_Out, that.print_Out) &&
Objects.equals(permanent_Position_Date, that.permanent_Position_Date) &&
Objects.equals(roll_Out_Workshop_Date, that.roll_Out_Workshop_Date) &&
Objects.equals(qualityinspection_Name, that.qualityinspection_Name) &&
Objects.equals(qualityinspection_Date, that.qualityinspection_Date) &&
Objects.equals(exception_Information, that.exception_Information) &&
Objects.equals(outbound_Date, that.outbound_Date) &&
Objects.equals(exception_State, that.exception_State) &&
Objects.equals(state, that.state) &&
Objects.equals(putinstorage_Date, that.putinstorage_Date);
}
@Override
public int hashCode() {
return Objects.hash(production_Task_List_Id, make_Type, old_Make_Type,exception_State, citycode,workshop, submit_Date, handout_Date, is_Print, download_Date, print_Out, permanent_Position_Date, roll_Out_Workshop_Date, qualityinspection_Name, qualityinspection_Date, exception_Information, outbound_Date, putinstorage_Date,state);
}
}
...@@ -4,29 +4,29 @@ import javax.persistence.*; ...@@ -4,29 +4,29 @@ import javax.persistence.*;
import java.util.Objects; import java.util.Objects;
/** /**
* Created by zhangyusheng on 2018/11/7 14:04 * Created by zhangyusheng on 2018/11/19 10:43
*/ */
@Entity @Entity
@Table(name = "ACCEPT_NO_INFO", schema = "DAHAI", catalog = "") @Table(name = "SPECIAL_CARD", schema = "DAHAI")
public class AcceptNoInfoEntity { public class SpecialCardEntity {
private String accept_No_Info_Id; private long special_Card_Id;
private String accept_No; private String accept_No;
private String cyclesheetid; private long task_Id;
private Long accept_Type; private long special_Type;
private String group_No; private String group_No;
@Id @Id
@Column(name = "ACCEPT_NO_INFO_ID", nullable = false, length = 20) @Column(name = "SPECIAL_CARD_ID", nullable = false, precision = 0)
public String getAccept_No_Info_Id() { public long getSpecial_Card_Id() {
return accept_No_Info_Id; return special_Card_Id;
} }
public void setAccept_No_Info_Id(String accept_No_Info_Id) { public void setSpecial_Card_Id(long special_Card_Id) {
this.accept_No_Info_Id = accept_No_Info_Id; this.special_Card_Id = special_Card_Id;
} }
@Basic @Basic
@Column(name = "ACCEPT_NO", nullable = true, length = 20) @Column(name = "ACCEPT_NO", nullable = false, length = 10)
public String getAccept_No() { public String getAccept_No() {
return accept_No; return accept_No;
} }
...@@ -36,26 +36,26 @@ public class AcceptNoInfoEntity { ...@@ -36,26 +36,26 @@ public class AcceptNoInfoEntity {
} }
@Basic @Basic
@Column(name = "ACCEPT_TYPE", nullable = true, precision = 0) @Column(name = "TASK_ID", nullable = false, precision = 0)
public Long getAccept_Type() { public long getTask_Id() {
return accept_Type; return task_Id;
} }
public void setAccept_Type(Long accept_Type) { public void setTask_Id(long task_Id) {
this.accept_Type = accept_Type; this.task_Id = task_Id;
} }
@Basic @Basic
@Column(name = "CYCLESHEETID", nullable = true, length = 20) @Column(name = "SPECIAL_TYPE", nullable = false, precision = 0)
public String getCyclesheetid() { public long getSpecial_Type() {
return cyclesheetid; return special_Type;
} }
public void setCyclesheetid(String cyclesheetid) { public void setSpecial_Type(long special_Type) {
this.cyclesheetid = cyclesheetid; this.special_Type = special_Type;
} }
@Basic @Basic
@Column(name = "GROUP_NO", nullable = true, length = 20) @Column(name = "GROUP_NO", nullable = false, length = 10)
public String getGroup_No() { public String getGroup_No() {
return group_No; return group_No;
} }
...@@ -64,23 +64,20 @@ public class AcceptNoInfoEntity { ...@@ -64,23 +64,20 @@ public class AcceptNoInfoEntity {
this.group_No = group_No; this.group_No = group_No;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
AcceptNoInfoEntity that = (AcceptNoInfoEntity) o; SpecialCardEntity that = (SpecialCardEntity) o;
return Objects.equals(accept_No_Info_Id, that.accept_No_Info_Id) && return special_Card_Id == that.special_Card_Id &&
Objects.equals(accept_No, that.accept_No) && special_Type == that.special_Type &&
Objects.equals(cyclesheetid, that.cyclesheetid) && task_Id == that.task_Id &&
Objects.equals(group_No, that.group_No) && Objects.equals(accept_No, that.accept_No)&&
Objects.equals(accept_Type, that.accept_Type); Objects.equals(group_No, that.group_No);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(accept_No_Info_Id, accept_No, cyclesheetid, accept_Type,group_No); return Objects.hash(special_Card_Id, accept_No,task_Id,group_No, special_Type);
} }
} }
package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "TASK", schema = "DAHAI")
public class TaskEntity {
private long task_Id;
private long card_Type;
private long old_Card_Type;
private String citycode;
private Date submit_Date;
private Date issued_Date;
private long print_State;
private Date download_Date;
private Date print_Out_Date;
private Date position_Date;
private Date out_Workshop_Date;
private String quality_People_Name;
private Date quality_Test_Date;
private String exception_Information;
private Date out_Storage_Date;
private Date in_Storage_Date;
private long task_State_Id;
private long is_Exception;
private long printer_Id;
@Id
@Column(name = "TASK_ID", nullable = false, precision = 0)
public long getTask_Id() {
return task_Id;
}
public void setTask_Id(long task_Id) {
this.task_Id = task_Id;
}
@Basic
@Column(name = "CARD_TYPE", nullable = false, precision = 0)
public long getCard_Type() {
return card_Type;
}
public void setCard_Type(long card_Type) {
this.card_Type = card_Type;
}
@Basic
@Column(name = "OLD_CARD_TYPE", nullable = false, precision = 0)
public long getOld_Card_Type() {
return old_Card_Type;
}
public void setOld_Card_Type(long old_Card_Type) {
this.old_Card_Type = old_Card_Type;
}
@Basic
@Column(name = "CITYCODE", nullable = true, length = 20)
public String getCitycode() {
return citycode;
}
public void setCitycode(String citycode) {
this.citycode = citycode;
}
@Basic
@Column(name = "SUBMIT_DATE", nullable = true)
public Date getSubmit_Date() {
return submit_Date;
}
public void setSubmit_Date(Date submit_Date) {
this.submit_Date = submit_Date;
}
@Basic
@Column(name = "ISSUED_DATE", nullable = true)
public Date getIssued_Date() {
return issued_Date;
}
public void setIssued_Date(Date issued_Date) {
this.issued_Date = issued_Date;
}
@Basic
@Column(name = "PRINT_STATE", nullable = true, precision = 0)
public long getPrint_State() {
return print_State;
}
public void setPrint_State(long print_State) {
this.print_State = print_State;
}
@Basic
@Column(name = "DOWNLOAD_DATE", nullable = true)
public Date getDownload_Date() {
return download_Date;
}
public void setDownload_Date(Date download_Date) {
this.download_Date = download_Date;
}
@Basic
@Column(name = "PRINT_OUT_DATE", nullable = true)
public Date getPrint_Out_Date() {
return print_Out_Date;
}
public void setPrint_Out_Date(Date print_Out_Date) {
this.print_Out_Date = print_Out_Date;
}
@Basic
@Column(name = "POSITION_DATE", nullable = true)
public Date getPosition_Date() {
return position_Date;
}
public void setPosition_Date(Date position_Date) {
this.position_Date = position_Date;
}
@Basic
@Column(name = "OUT_WORKSHOP_DATE", nullable = true)
public Date getOut_Workshop_Date() {
return out_Workshop_Date;
}
public void setOut_Workshop_Date(Date out_Workshop_Date) {
this.out_Workshop_Date = out_Workshop_Date;
}
@Basic
@Column(name = "QUALITY_PEOPLE_NAME", nullable = true, length = 20)
public String getQuality_People_Name() {
return quality_People_Name;
}
public void setQuality_People_Name(String quality_People_Name) {
this.quality_People_Name = quality_People_Name;
}
@Basic
@Column(name = "QUALITY_TEST_DATE", nullable = true)
public Date getQuality_Test_Date() {
return quality_Test_Date;
}
public void setQuality_Test_Date(Date quality_Test_Date) {
this.quality_Test_Date = quality_Test_Date;
}
@Basic
@Column(name = "EXCEPTION_INFORMATION", nullable = true, length = 120)
public String getException_Information() {
return exception_Information;
}
public void setException_Information(String exception_Information) {
this.exception_Information = exception_Information;
}
@Basic
@Column(name = "OUT_STORAGE_DATE", nullable = true)
public Date getOut_Storage_Date() {
return out_Storage_Date;
}
public void setOut_Storage_Date(Date out_Storage_Date) {
this.out_Storage_Date = out_Storage_Date;
}
@Basic
@Column(name = "IN_STORAGE_DATE", nullable = true)
public Date getIn_Storage_Date() {
return in_Storage_Date;
}
public void setIn_Storage_Date(Date in_Storage_Date) {
this.in_Storage_Date = in_Storage_Date;
}
@Basic
@Column(name = "TASK_STATE_ID", nullable = true, precision = 0)
public long getTask_State_Id() {
return task_State_Id;
}
public void setTask_State_Id(long task_State_Id) {
this.task_State_Id = task_State_Id;
}
@Basic
@Column(name = "IS_EXCEPTION", nullable = true, precision = 0)
public long getIs_Exception() {
return is_Exception;
}
public void setIs_Exception(long is_Exception) {
this.is_Exception = is_Exception;
}
@Basic
@Column(name = "PRINTER_ID", nullable = true, precision = 0)
public long getPrinter_Id() {
return printer_Id;
}
public void setPrinter_Id(long printer_Id) {
this.printer_Id = printer_Id;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TaskEntity that = (TaskEntity) o;
return task_Id == that.task_Id &&
card_Type == that.card_Type &&
old_Card_Type == that.old_Card_Type &&
Objects.equals(citycode, that.citycode) &&
Objects.equals(submit_Date, that.submit_Date) &&
Objects.equals(issued_Date, that.issued_Date) &&
Objects.equals(print_State, that.print_State) &&
Objects.equals(download_Date, that.download_Date) &&
Objects.equals(print_Out_Date, that.print_Out_Date) &&
Objects.equals(position_Date, that.position_Date) &&
Objects.equals(out_Workshop_Date, that.out_Workshop_Date) &&
Objects.equals(quality_People_Name, that.quality_People_Name) &&
Objects.equals(quality_Test_Date, that.quality_Test_Date) &&
Objects.equals(exception_Information, that.exception_Information) &&
Objects.equals(out_Storage_Date, that.out_Storage_Date) &&
Objects.equals(in_Storage_Date, that.in_Storage_Date) &&
printer_Id == that.printer_Id &&
task_State_Id == that.task_State_Id &&
Objects.equals(is_Exception, that.is_Exception);
}
@Override
public int hashCode() {
return Objects.hash(task_Id, card_Type, old_Card_Type, citycode, submit_Date, issued_Date, print_State, download_Date, print_Out_Date, position_Date, out_Workshop_Date, quality_People_Name, quality_Test_Date, exception_Information,out_Storage_Date,in_Storage_Date,printer_Id,task_State_Id,is_Exception);
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.AcceptNoInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by zhangyusheng on 2018/11/7 15:06
*/
@Mapper
public interface AcceptNoInfoMapper {
public List<AcceptNoInfoEntity> findAcceptNoInfoEntityByAcceptNo(String acceptNo);
public void saveAcceptNoInfoEntity(AcceptNoInfoEntity acceptNoInfoEntity);
public void updateAcceptNoInfoEntity(AcceptNoInfoEntity acceptNoInfoEntity);
public List<AcceptNoInfoEntity> findAcceptNoInfoEntityByGroupNo(String groupNo);
}
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.FailedinfoEntity; import com.yxproject.start.entity.FailedCardEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
...@@ -10,29 +10,29 @@ import java.util.Map; ...@@ -10,29 +10,29 @@ import java.util.Map;
* Created by zhangyusheng on 2018/10/30 9:42 * Created by zhangyusheng on 2018/10/30 9:42
*/ */
@Mapper @Mapper
public interface FailedinfoMapper { public interface FailedCardMapper {
/** /**
* 新增废证 * 新增废证
* @param failedinfoEntity * @param failedCardEntity
* @return * @return
*/ */
// @InsertProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="saveFailedinfoEntity") // @InsertProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="saveFailedinfoEntity")
//// @Options(useGeneratedKeys=true,keyProperty="failedinfoid") //// @Options(useGeneratedKeys=true,keyProperty="failedinfoid")
public void saveFailedinfoEntity(FailedinfoEntity failedinfoEntity); public void saveFailedCardEntity(FailedCardEntity failedCardEntity);
/** /**
* 更新废证 * 更新废证
* @param failedinfoEntity * @param failedCardEntity
*/ */
// @UpdateProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="updateFailedinfoEntity") // @UpdateProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="updateFailedinfoEntity")
public void updateFailedinfoEntity(FailedinfoEntity failedinfoEntity); public void updateFailedCardEntity(FailedCardEntity failedCardEntity);
/** /**
* 查询废证详情 * 查询废证详情
* @return * @return
*/ */
// @SelectProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="selectFailedinfoBycolumnName") // @SelectProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="selectFailedinfoBycolumnName")
public List<Map<String,Object>> selectFailedinfoByState(int state); public List<Map<String,Object>> selectFailedCardEntityByState(int state);
......
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyListInfoEntity; import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.entity.GroupinfoEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
...@@ -11,24 +10,20 @@ import java.util.Map; ...@@ -11,24 +10,20 @@ import java.util.Map;
* Created by zhangyusheng on 2018/10/13 9:36 * Created by zhangyusheng on 2018/10/13 9:36
*/ */
@Mapper @Mapper
public interface GroupinfoMapper { public interface GroupNoMapper {
public int insertGroupinfoEntity(GroupinfoEntity groupinfoEntity); public int insertGroupNoEntity(GroupNoEntity groupNoEntity);
public List<GroupinfoEntity> findGroupinfoEntityByAcceptNo(String acceptNo); public List<GroupNoEntity> findGroupNoEntityByAcceptNo(String acceptNo);
public int updateGroupinfoEntity(GroupinfoEntity groupinfoEntity); public int updateGroupinfoEntity(GroupNoEntity groupNoEntity);
public List<GroupinfoEntity> findGroupinfoEntityListByProductionTaskListId(String cyclesheetid); public List<GroupNoEntity> findGroupNoEntityListByTaskId(long task_Id);
public int findGroupInfoCountByProductionTaskListId(String cyclesheetid); public int findGroupNoCountByTaskId(String task_Id);
public List<Map<String,Object>> findSpecialCountyList(String cyclesheetid); public List<Map<String,Object>> findSpecialCountyList(String task_Id);
public List<Map<String,Object>> findNormalCountyList(String cyclesheetid); public List<Map<String,Object>> findNormalCountyList(String task_Id);
public List<CountyListInfoEntity> findCountyList(String cyclesheetid);
public int equalsvalidCount(GroupinfoEntity groupinfoEntity);
} }
package com.yxproject.start.mapper;
import com.yxproject.start.entity.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import java.util.Map;
/**
* @author Administrator
*/
@Repository
public interface LoginMapper extends CrudRepository<UserInfo,Long> {
/**
* 通过用户名查询用户信息
* @param username
* @return
*/
public UserInfo findUserByUsername(String username);
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.PoliceStationApplyReasonEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* Created by zhangyusheng on 2018/11/12 14:24
*/
@Mapper
public interface PoliceStationApplyReasonMapper {
public int savePoliceStationApplyReasonEntity(PoliceStationApplyReasonEntity policeStationApplyReasonEntity);
public int updatePoliceStationApplyReasonEntity(PoliceStationApplyReasonEntity policeStationApplyReasonEntity);
public List<Map<String,Object>> findNormalApplyReasonByCyclesheetID(String cyclesheetid);
public List<Map<String,Object>> findSpecialApplyReasonByCyclesheetID(String cyclesheetid);
}
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.PoliceStationVailedInfoEntity; import com.yxproject.start.entity.PoliceStationVailedEntity;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import java.util.List; import java.util.List;
...@@ -9,16 +9,16 @@ import java.util.List; ...@@ -9,16 +9,16 @@ import java.util.List;
* Created by zhangyusheng on 2018/10/25 13:45 * Created by zhangyusheng on 2018/10/25 13:45
*/ */
@Mapper @Mapper
public interface PoliceStationVailedInfoMapper { public interface PoliceStationVailedMapper {
/** /**
* 保存派出所照片质量报表 * 保存派出所照片质量报表
* @param policeStationVailedInfoEntity * @param policeStationVailedEntity
* @return * @return
*/ */
@Insert("INSERT INTO POLICE_STATION_VAILED_INFO (POLICE_STATION_VAILED_INFO_ID,CYCLESHEETID,POLICE_STATION_CODE,VAILED_COUNT,INVALID_COUNT,SAVA_DATE) " + @Insert("INSERT INTO POLICE_STATION_VAILED_INFO (POLICE_STATION_VAILED_INFO_ID,CYCLESHEETID,POLICE_STATION_CODE,VAILED_COUNT,INVALID_COUNT,SAVA_DATE) " +
"values (#{police_Station_Vailed_Info_Id},#{cyclesheetid},#{police_Station_Code},#{vailed_Count},#{invalid_Count},#{sava_Date})") "values (#{police_Station_Vailed_Info_Id},#{cyclesheetid},#{police_Station_Code},#{vailed_Count},#{invalid_Count},#{sava_Date})")
@Options(useGeneratedKeys = true, keyProperty = "police_Station_Vailed_Info_Id",keyColumn = "police_Station_Vailed_Info_Id") @Options(useGeneratedKeys = true, keyProperty = "police_Station_Vailed_Info_Id",keyColumn = "police_Station_Vailed_Info_Id")
public void savePoliceStationVailedInfoEntity(PoliceStationVailedInfoEntity policeStationVailedInfoEntity); public void savePoliceStationVailedInfoEntity(PoliceStationVailedEntity policeStationVailedEntity);
@Select("select * from POLICE_STATION_VAILED_INFO WHERE POLICE_STATION_VAILED_INFO_ID=#{id}") @Select("select * from POLICE_STATION_VAILED_INFO WHERE POLICE_STATION_VAILED_INFO_ID=#{id}")
@Results({@Result(property = "police_Station_Vailed_Info_Id",column = "police_Station_Vailed_Info_Id"), @Results({@Result(property = "police_Station_Vailed_Info_Id",column = "police_Station_Vailed_Info_Id"),
...@@ -27,7 +27,7 @@ public interface PoliceStationVailedInfoMapper { ...@@ -27,7 +27,7 @@ public interface PoliceStationVailedInfoMapper {
@Result(property = "vailed_Count",column = "vailed_Count"), @Result(property = "vailed_Count",column = "vailed_Count"),
@Result(property = "invalid_Count",column = "invalid_Count"), @Result(property = "invalid_Count",column = "invalid_Count"),
@Result(property = "sava_Date",column = "sava_Date")}) @Result(property = "sava_Date",column = "sava_Date")})
public List<PoliceStationVailedInfoEntity> findPoliceStationVailedInfoEntityByID(String id); public List<PoliceStationVailedEntity> findPoliceStationVailedEntity(String id);
} }
//@Mapper //@Mapper
//interface Inter { //interface Inter {
......
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.ProductionTaskListEntity;
import com.yxproject.start.entity.prod.ProdCardTEntity; import com.yxproject.start.entity.prod.ProdCardTEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;
import java.util.List; import java.util.List;
......
package com.yxproject.start.mapper;
import com.yxproject.start.entity.ProductionTaskListEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.UpdateProvider;
import java.util.List;
/**
* Created by zhangyusheng on 2018/10/13 9:36
*/
@Mapper
public interface ProductionTaskListMapper {
public List<ProductionTaskListEntity> findProductionTaskListEntity(String id);
public int insertProductionTaskListEntity(ProductionTaskListEntity productionTaskListEntity);
public int updateProductionTask(ProductionTaskListEntity productionTaskListEntity);
public List<ProductionTaskListEntity> findProductionTaskListEntityByAcceptNo(String acceptNo);
public List<ProductionTaskListEntity> findProductionTaskListEntityByState(int state);
public int addExceptionState(ProductionTaskListEntity productionTaskListEntity);
public int replaceExceptionInformation(ProductionTaskListEntity productionTaskListEntity);
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.SpecialCardEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by zhangyusheng on 2018/11/7 15:06
*/
@Mapper
public interface SpecialCardMapper {
public List<SpecialCardEntity> findSpecialCardEntityByAcceptNo(String acceptNo);
public void saveSpecialCardEntity(SpecialCardEntity specialCardEntity);
public void updateSpecialCardEntity(SpecialCardEntity specialCardEntity);
public List<SpecialCardEntity> findSpecialCardEntityByGroupNo(String groupNo);
}
...@@ -17,7 +17,7 @@ public interface SysPermissionMapper{ ...@@ -17,7 +17,7 @@ public interface SysPermissionMapper{
* @param sysPermission * @param sysPermission
*/ */
@Insert("INSERT INTO sys_permission (id,available,name,parent_id,parent_ids,permission,resource_type,url)\n" + @Insert("INSERT INTO sys_permission (id,available,name,parent_id,parent_ids,permission,resource_type,url)\n" +
"VALUES (PERMISSION_seq.nextval,0,#{name},#{parent_id},#{parent_ids},#{permission},#{resource_type},#{url})") "VALUES (PERMISSION_seq.nextval,0,#{name},'0','0/',#{permission},#{resource_type},'')")
public void addPermissionByMap(SysPermission sysPermission); public void addPermissionByMap(SysPermission sysPermission);
/** /**
...@@ -53,7 +53,7 @@ public interface SysPermissionMapper{ ...@@ -53,7 +53,7 @@ public interface SysPermissionMapper{
* @param roleId * @param roleId
* @return * @return
*/ */
@Select("select sp.id,sp.name from SYS_ROLE_PERMISSION srp ,SYS_PERMISSION sp where srp.PERMISSION_ID=sp.ID and srp.ROLE_ID=#{roleId}") @Select("select * from SYS_ROLE_PERMISSION srp ,SYS_PERMISSION sp where srp.PERMISSION_ID=sp.ID and srp.ROLE_ID=#{roleId}")
public List<SysPermission> selectPermissionByRoleId(@Param("roleId") Integer roleId); public List<SysPermission> selectPermissionByRoleId(@Param("roleId") Integer roleId);
/** /**
...@@ -77,6 +77,6 @@ public interface SysPermissionMapper{ ...@@ -77,6 +77,6 @@ public interface SysPermissionMapper{
* @param sysPermission * @param sysPermission
*/ */
@Update("update SYS_PERMISSION SET NAME=#{name},resource_type=#{resource_type},url=#{url}," + @Update("update SYS_PERMISSION SET NAME=#{name},resource_type=#{resource_type},url=#{url}," +
"permission=#{permission},parent_id=#{parent_id},parent_ids=#{parent_ids} where id=#{id}") "permission=#{permission} where id=#{id}")
public void updatePermission(SysPermission sysPermission); public void updatePermission(SysPermission sysPermission);
} }
...@@ -56,6 +56,20 @@ public interface SysRoleMapper { ...@@ -56,6 +56,20 @@ public interface SysRoleMapper {
@Select("select sr.id,sr.role from SYS_USER_ROLE sur ,SYS_ROLE sr where sur.ROLE_ID=sr.ID and sur.USER_ID=#{userId}") @Select("select sr.id,sr.role from SYS_USER_ROLE sur ,SYS_ROLE sr where sur.ROLE_ID=sr.ID and sur.USER_ID=#{userId}")
List<SysRole> selectRoleByUserId(@Param("userId") Integer userId); List<SysRole> selectRoleByUserId(@Param("userId") Integer userId);
/**
* 通过用户id查询角色
* @param userId
* @return
*/
@Select("select * from SYS_USER_ROLE sur ,SYS_ROLE sr where sur.ROLE_ID=sr.ID and sur.USER_ID=#{userId}")
@Results({@Result(property = "id",column = "id"),
@Result(property = "role",column = "role"),
@Result(property = "description",column = "description"),
@Result(property = "available",column = "available"),
@Result(property = "permissions",javaType = List.class,column ="id",
many = @Many(select = "com.yxproject.start.mapper.SysPermissionMapper.selectPermissionByRoleId"))})
List<SysRole> selectRoleAndPermissionByUserId(@Param("userId") Integer userId);
/** /**
* 更新用户的角色 * 更新用户的角色
......
package com.yxproject.start.mapper;
import com.yxproject.start.entity.TaskEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by zhangyusheng on 2018/10/13 9:36
*/
@Mapper
public interface TaskMapper {
public List<TaskEntity> findTaskEntity(long id);
public int insertTaskEntity(TaskEntity taskEntity);
public int updateTaskEntity(TaskEntity taskEntity);
public List<TaskEntity> findTaskEntityByAcceptNo(String acceptNo);
public List<TaskEntity> findTaskEntityByState(int state);
}
...@@ -10,6 +10,25 @@ import java.util.List; ...@@ -10,6 +10,25 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface UserInfoMapper { public interface UserInfoMapper {
/**
* 通过用户名查询用户信息
* @param username
* @return
*/
@Select("select * from USER_INFO where username=#{username}")
@Results({@Result(property = "id",column = "id"),
@Result(property = "username",column = "username"),
@Result(property = "name",column = "name"),
@Result(property = "password",column = "password"),
@Result(property = "salt",column = "salt"),
@Result(property = "state",column = "state"),
@Result(property = "roleList",javaType = List.class,column ="id",
many = @Many(select = "com.yxproject.start.mapper.SysRoleMapper.selectRoleAndPermissionByUserId"))})
public UserInfo findUserByUsername(String username);
/** /**
* 新增用户 * 新增用户
* @param userinfo * @param userinfo
...@@ -40,7 +59,7 @@ public interface UserInfoMapper { ...@@ -40,7 +59,7 @@ public interface UserInfoMapper {
@Result(property = "salt",column = "salt"), @Result(property = "salt",column = "salt"),
@Result(property = "state",column = "state"), @Result(property = "state",column = "state"),
@Result(property = "roleList",javaType = List.class,column ="id", @Result(property = "roleList",javaType = List.class,column ="id",
many = @Many(select = "com.yxproject.start.mapper.SysRoleMapper.selectRoleByUserId"))}) many = @Many(select = "com.yxproject.start.mapper.SysRoleMapper.selectRoleAndPermissionByUserId"))})
public List<UserInfo> selectAllUserInfo(); public List<UserInfo> selectAllUserInfo();
......
...@@ -31,6 +31,10 @@ public interface UtilMapper { ...@@ -31,6 +31,10 @@ public interface UtilMapper {
* 查询受理号表序列值 * 查询受理号表序列值
*/ */
public int findAcceptInfoSequenceNextValue(); public int findAcceptInfoSequenceNextValue();
/**
* 查询派出所证件申请表序列值
*/
public int findPoliceStationApplyReasonSequenceNextValue();
} }
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.FailedinfoEntity; import com.yxproject.start.entity.FailedCardEntity;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -8,8 +8,8 @@ import java.util.Map; ...@@ -8,8 +8,8 @@ import java.util.Map;
/** /**
* Created by zhangyusheng on 2018/10/30 10:01 * Created by zhangyusheng on 2018/10/30 10:01
*/ */
public interface FailedinfoService { public interface FailedCardService {
public int saveFailedinfo(List<FailedinfoEntity> failedinfoEntityList); public int saveFailedinfo(List<FailedCardEntity> failedinfoEntityList);
public int updateFailedinfo(List<FailedinfoEntity> failedinfoEntityList); public int updateFailedinfo(List<FailedCardEntity> failedinfoEntityList);
public List<Map<String,Object>> selectFailedinfo(int state); public List<Map<String,Object>> selectFailedinfo(int state);
} }
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.GroupinfoEntity;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* Created by zhangyusheng on 2018/11/1 14:22 * Created by zhangyusheng on 2018/11/1 14:22
*/ */
public interface GroupinfoService { public interface GroupNoService {
public List<Map<String, Object>> findCountyInfoList(String cyclesheetID); public List<Map<String, Object>> findCountyInfoList(String taskID);
} }
package com.yxproject.start.service;
import com.yxproject.start.entity.UserInfo;
/**
* @author liboyang
*/
public interface LoginService {
/**
* 查询用户
* @param username
* @return
*/
public UserInfo findByUsername(String username);
}
package com.yxproject.start.service;
/**
* Created by zhangyusheng on 2018/11/12 14:27
*/
public interface PoliceStationApplyReasonService {
public int savePoliceStationApplyReasonEntity(String cyclesheetID);
}
package com.yxproject.start.service;
import com.yxproject.start.entity.GroupinfoEntity;
import com.yxproject.start.entity.PoliceStationVailedInfoEntity;
import com.yxproject.start.entity.ProductionTaskListEntity;
import java.util.List;
import java.util.Map;
public interface ProductionTaskListService {
public List<ProductionTaskListEntity> findProductionTaskListEntityByID(String id);
public int updateProductionTask(ProductionTaskListEntity map);
public int addProductionTaskListEntity(ProductionTaskListEntity productionTaskListEntity, List<GroupinfoEntity> groupinfoEntities);
public int addQuickCyclesheetInfo(String acceptNo);
public List<Object> findCardInfoByCardIDOrAcceptNo(String cardInfo);
public List<Object> findAccuProductionInfo(String importDate);
public int savePoliceStationVailedInfoEntity(List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities);
// public int replaceExceptionInformation(ProductionTaskListEntity state);
public List<PoliceStationVailedInfoEntity> find(String id);
public List<Map<String,Object>> findProductionTaskListEntityByState(int state);
public int addExceptionState(ProductionTaskListEntity state);
public int updateOutboundDate(ProductionTaskListEntity map);
public int updatePutinstorageDate(ProductionTaskListEntity map);
}
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.SysRole; import com.yxproject.start.entity.SysRole;
import net.sf.json.JSONArray;
import java.util.List; import java.util.List;
...@@ -11,10 +12,10 @@ public interface SysRoleService { ...@@ -11,10 +12,10 @@ public interface SysRoleService {
/** /**
* 添加角色并分配权限 * 添加角色并分配权限
* @param sysRole * @param sysRole
* @param ids * @param jsonArray
* @return * @return
*/ */
public boolean addRole(SysRole sysRole,String[] ids); public boolean addRole(SysRole sysRole, JSONArray jsonArray);
/** /**
* 修改角色和权限 * 修改角色和权限
...@@ -24,7 +25,7 @@ public interface SysRoleService { ...@@ -24,7 +25,7 @@ public interface SysRoleService {
* @return * @return
*/ */
public boolean updateRole(SysRole sysRole,String[] ids,String[] oldIds); public boolean updateRole(SysRole sysRole,JSONArray ids,JSONArray oldIds);
/** /**
* 查询所有角色 * 查询所有角色
......
package com.yxproject.start.service;
import com.yxproject.start.entity.*;
import java.util.List;
import java.util.Map;
public interface TaskService {
public List<TaskEntity> findProductionTaskListEntityByID(long id);
public int updateProductionTask(TaskEntity map);
public int addProductionTaskListEntity(TaskEntity taskEntity, List<GroupNoEntity> groupNoEntities);
public int addQuickCyclesheetInfo(String acceptNo);
public List<Object> findCardInfoByCardIDOrAcceptNo(String cardInfo);
public List<Object> findAccuProductionInfo(String importDate);
public int savePoliceStationVailedEntity(List<PoliceStationVailedEntity> policeStationVailedInfoEntities);
public List<PoliceStationVailedEntity> find(String id);
public List<Map<String,Object>> findProductionTaskListEntityByState(int state);
}
...@@ -2,14 +2,20 @@ package com.yxproject.start.service; ...@@ -2,14 +2,20 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.UserInfo; import com.yxproject.start.entity.UserInfo;
import javax.persistence.criteria.CriteriaBuilder;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author liboyang * @author liboyang
*/ */
public interface UserInfoService{ public interface UserInfoService{
/**
* 查询用户
* @param username
* @return
*/
public UserInfo findByUsername(String username);
/** /**
* 新增用户 * 新增用户
* @param userinfo * @param userinfo
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.FailedinfoEntity; import com.yxproject.start.entity.FailedCardEntity;
import com.yxproject.start.mapper.FailedinfoMapper; import com.yxproject.start.mapper.FailedCardMapper;
import com.yxproject.start.mapper.UtilMapper; import com.yxproject.start.service.FailedCardService;
import com.yxproject.start.service.FailedinfoService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -16,35 +13,29 @@ import java.util.Map; ...@@ -16,35 +13,29 @@ import java.util.Map;
* Created by zhangyusheng on 2018/10/30 10:02 * Created by zhangyusheng on 2018/10/30 10:02
*/ */
@Service @Service
public class FailedinfoServiceImpl implements FailedinfoService { public class FailedCardServiceImpl implements FailedCardService {
@Autowired @Autowired
private UtilMapper utilMapper; private FailedCardMapper failedCardMapper;
@Autowired
private FailedinfoMapper failedinfoMapper;
@Override @Override
public int saveFailedinfo(List<FailedinfoEntity> failedinfoEntityList) { public int saveFailedinfo(List<FailedCardEntity> failedinfoEntityList) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); for (FailedCardEntity failedinfoEntity:failedinfoEntityList){
for (FailedinfoEntity failedinfoEntity:failedinfoEntityList){ failedCardMapper.saveFailedCardEntity(failedinfoEntity);
int failedinfoSequenceNextValue = utilMapper.findFailedinfoSequenceNextValue();
failedinfoEntity.setFailedinfoid(simpleDateFormat.format(new Date())+failedinfoSequenceNextValue);
failedinfoMapper.saveFailedinfoEntity(failedinfoEntity);
} }
return 1; return 1;
} }
@Override @Override
public int updateFailedinfo(List<FailedinfoEntity> failedinfoEntityList) { public int updateFailedinfo(List<FailedCardEntity> failedinfoEntityList) {
for (FailedinfoEntity failedinfoEntity:failedinfoEntityList){ for (FailedCardEntity failedinfoEntity:failedinfoEntityList){
failedinfoMapper.updateFailedinfoEntity(failedinfoEntity); failedCardMapper.updateFailedCardEntity(failedinfoEntity);
} }
return 1; return 1;
} }
@Override @Override
public List<Map<String,Object>> selectFailedinfo(int state) { public List<Map<String,Object>> selectFailedinfo(int state) {
List<Map<String, Object>> maps = failedinfoMapper.selectFailedinfoByState(state); List<Map<String, Object>> maps = failedCardMapper.selectFailedCardEntityByState(state);
return maps; return maps;
} }
} }
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.mapper.GroupinfoMapper; import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.service.GroupinfoService; import com.yxproject.start.service.GroupNoService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -13,18 +13,18 @@ import java.util.Map; ...@@ -13,18 +13,18 @@ import java.util.Map;
* Created by zhangyusheng on 2018/11/1 14:26 * Created by zhangyusheng on 2018/11/1 14:26
*/ */
@Service @Service
public class GroupinfoServiceImpl implements GroupinfoService { public class GroupNoServiceImpl implements GroupNoService {
@Autowired @Autowired
public GroupinfoMapper groupinfoMapper; public GroupNoMapper groupNoMapper;
@Override @Override
public List<Map<String, Object>> findCountyInfoList(String cyclesheetid) { public List<Map<String, Object>> findCountyInfoList(String cyclesheetid) {
int count = groupinfoMapper.findGroupInfoCountByProductionTaskListId(cyclesheetid); int count = groupNoMapper.findGroupNoCountByTaskId(cyclesheetid);
List<Map<String,Object>> list = new ArrayList<>(); List<Map<String,Object>> list = new ArrayList<>();
if (count==0){ if (count==0){
list = groupinfoMapper.findSpecialCountyList(cyclesheetid); list = groupNoMapper.findSpecialCountyList(cyclesheetid);
}else{ }else{
list = groupinfoMapper.findNormalCountyList(cyclesheetid); list = groupNoMapper.findNormalCountyList(cyclesheetid);
} }
return list; return list;
} }
......
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.UserInfo;
import com.yxproject.start.mapper.LoginMapper;
import com.yxproject.start.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author liboyang
*/
@Service
public class LoginServiceImpl implements LoginService {
@Autowired
private LoginMapper loginMapper;
@Override
public UserInfo findByUsername(String username) {
UserInfo user = loginMapper.findUserByUsername(username);
return user;
}
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.PoliceStationApplyReasonEntity;
import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.mapper.PoliceStationApplyReasonMapper;
import com.yxproject.start.mapper.UtilMapper;
import com.yxproject.start.service.PoliceStationApplyReasonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* Created by zhangyusheng on 2018/11/12 14:28
*/
@Service
public class PoliceStationApplyReasonServiceImpl implements PoliceStationApplyReasonService {
@Autowired
private PoliceStationApplyReasonMapper policeStationApplyReasonMapper;
@Autowired
private GroupNoMapper groupinfoMapper;
@Autowired
private UtilMapper utilMapper;
@Override
@Transactional(rollbackFor=Exception.class)
public int savePoliceStationApplyReasonEntity(String cyclesheetid) {
int count = groupinfoMapper.findGroupNoCountByTaskId(cyclesheetid);
List<Map<String,Object>> list = new ArrayList<>();
if (count==0){
list = policeStationApplyReasonMapper.findSpecialApplyReasonByCyclesheetID(cyclesheetid);
}else{
list = policeStationApplyReasonMapper.findNormalApplyReasonByCyclesheetID(cyclesheetid);
}
for (Map<String,Object> map :list){
PoliceStationApplyReasonEntity policeStationApplyReasonEntity = new PoliceStationApplyReasonEntity();
policeStationApplyReasonEntity.setTask_Id(Long.valueOf(cyclesheetid));
policeStationApplyReasonEntity.setSave_Date(new Date());
policeStationApplyReasonEntity.setApply_Count(Long.valueOf(map.get("APPLY_COUNT").toString()));
policeStationApplyReasonEntity.setApply_Code(Long.valueOf(map.get("APPLY_CODE").toString()));
policeStationApplyReasonEntity.setPolice_Station_Code(map.get("POLICE_STATION_CODE").toString());
policeStationApplyReasonMapper.savePoliceStationApplyReasonEntity(policeStationApplyReasonEntity);
}
return 1;
}
}
...@@ -3,7 +3,9 @@ package com.yxproject.start.service.impl; ...@@ -3,7 +3,9 @@ package com.yxproject.start.service.impl;
import com.yxproject.start.entity.SysRole; import com.yxproject.start.entity.SysRole;
import com.yxproject.start.mapper.SysRoleMapper; import com.yxproject.start.mapper.SysRoleMapper;
import com.yxproject.start.service.SysRoleService; import com.yxproject.start.service.SysRoleService;
import net.sf.json.JSONArray;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.omg.CORBA.OBJ_ADAPTER;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Isolation;
...@@ -22,24 +24,24 @@ public class SysRoleServiceImpl implements SysRoleService { ...@@ -22,24 +24,24 @@ public class SysRoleServiceImpl implements SysRoleService {
private SysRoleMapper sysRoleMapper; private SysRoleMapper sysRoleMapper;
@Override @Override
@Transactional(rollbackFor=Exception.class) @Transactional(rollbackFor=Exception.class)
public boolean addRole(SysRole sysRole,String[] ids) { public boolean addRole(SysRole sysRole, JSONArray jsonArray) {
sysRoleMapper.addRoleByMap(sysRole); sysRoleMapper.addRoleByMap(sysRole);
Integer roleId = sysRole.getId(); Integer roleId = sysRole.getId();
for (int i=0;i<ids.length;i++){ for (Object object:jsonArray){
sysRoleMapper.addRolePermission(roleId,Integer.parseInt(ids[i])); sysRoleMapper.addRolePermission(roleId,Integer.parseInt(object.toString()));
} }
return true; return true;
} }
@Override @Override
@Transactional(rollbackFor=Exception.class) @Transactional(rollbackFor=Exception.class)
public boolean updateRole(SysRole sysRole, String[] ids, String[] oldIds) { public boolean updateRole(SysRole sysRole, JSONArray ids, JSONArray oldIds) {
sysRoleMapper.updateSysRole(sysRole); sysRoleMapper.updateSysRole(sysRole);
for (int i=0;i<oldIds.length;i++){ for (Object object:oldIds){
sysRoleMapper.delRolePermission(sysRole.getId(),Integer.parseInt(oldIds[i])); sysRoleMapper.delRolePermission(sysRole.getId(),Integer.parseInt(object.toString()));
} }
for (int i=0;i<ids.length;i++){ for (Object object:ids){
sysRoleMapper.addRolePermission(sysRole.getId(),Integer.parseInt(ids[i])); sysRoleMapper.addRolePermission(sysRole.getId(),Integer.parseInt(object.toString()));
} }
return true; return true;
} }
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.UserInfo; import com.yxproject.start.entity.UserInfo;
import com.yxproject.start.mapper.LoginMapper;
import com.yxproject.start.mapper.SysRoleMapper; import com.yxproject.start.mapper.SysRoleMapper;
import com.yxproject.start.mapper.UserInfoMapper; import com.yxproject.start.mapper.UserInfoMapper;
import com.yxproject.start.service.UserInfoService; import com.yxproject.start.service.UserInfoService;
...@@ -25,6 +24,14 @@ public class UserInfoServiceImpl implements UserInfoService { ...@@ -25,6 +24,14 @@ public class UserInfoServiceImpl implements UserInfoService {
@Autowired @Autowired
private SysRoleMapper sysRoleMapper; private SysRoleMapper sysRoleMapper;
@Override
public UserInfo findByUsername(String username) {
UserInfo user = userInfoMapper.findUserByUsername(username);
return user;
}
@Override @Override
@Transactional(rollbackFor=Exception.class) @Transactional(rollbackFor=Exception.class)
public boolean addUser(UserInfo userinfo,Integer roleId) { public boolean addUser(UserInfo userinfo,Integer roleId) {
......
#spring集成Mybatis环境
mybatis.type-aliases-package=com.yx_project.start.entity
#加载Mybatis配置文件
mybatis.mapper-locations = classpath:mapper/*Mapper.xml
mybatis.config-location = classpath:mapper/config/mybatis-config.xml
#配置调度生产库数据库
spring.datasource.driver-class-name= oracle.jdbc.driver.OracleDriver
spring.datasource.url = jdbc:oracle:thin:@192.168.10.208:1521:GTYX
spring.datasource.username = dahai
spring.datasource.password = dahai
#spring.datasource.schema = classpath:database/import.sql
#配置mysql数据库
#spring.datasource.driver-class-name= com.mysql.jdbc.Driver
#spring.datasource.url = jdbc:mysql://localhost:3306/test
#spring.datasource.username = root
#spring.datasource.password = root
##配置调度生产库数据库
#spring.01.datasource.driver-class-name= oracle.jdbc.driver.OracleDriver
#spring.01.datasource.url = jdbc:oracle:thin:@192.168.10.208:1521:GTYX
#spring.01.datasource.username = dahai
#spring.01.datasource.password = dahai
#
##配置受理库数据库
#spring.02.datasource.driver-class-name= oracle.jdbc.driver.OracleDriver
#spring.02.datasource.url = jdbc:oracle:thin:@192.168.10.208:1521:GTYX
#spring.02.datasource.username = dahai
#spring.02.datasource.password = dahai
#
##配置制证库数据库
#spring.03.datasource.driver-class-name= oracle.jdbc.driver.OracleDriver
#spring.03.datasource.url = jdbc:oracle:thin:@192.168.10.208:1521:GTYX
#spring.03.datasource.username = dahai
#spring.03.datasource.password = dahai
#自动根据实体类生成数据库表
#spring.jpa.hibernate.ddl-auto= update
spring.jpa.show-sql=true
##jsp 支持
#spring.mvc.view.suffix=.jsp
#spring.mvc.view.prefix=/WEB-INF/jsp/
# thymeleaf
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.encoding=UTF-8
## 多数据源配置
#slave.datasource.names=test,test1
#slave.datasource.test.driverClassName =oracle.jdbc.driver.OracleDriver
#slave.datasource.test.url=jdbc:oracle:thin:@192.168.10.208:1521:GTYX
#slave.datasource.test.username=dahai
#slave.datasource.test.password=dahai
## test1
#slave.datasource.test1.driverClassName =oracle.jdbc.driver.OracleDriver
#slave.datasource.test1.url=jdbc:oracle:thin:@192.168.10.208:1521:GTYX
#slave.datasource.test1.username=dahai
#slave.datasource.test1.password=dahai
server:
port: 8081
#spring集成Mybatis环境
mybatis:
type-aliases-package: com.yx_project.start.entity
#加载Mybatis配置文件
mapper-locations: classpath:mapper/*Mapper.xml
config-location: classpath:mapper/config/mybatis-config.xml
#配置调度生产Oracle数据库
spring:
datasource:
driver-class-name: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@192.168.10.208:1521:GTYX
username: dahai
password: dahai
#配置shiro
shiro:
loginUrl: http://localhost:8081
web:
enabled: true
unauthorizedUrl: /page_404.html
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.AcceptNoInfoMapper">
<resultMap id="AcceptNoInfoMapper" type="com.yxproject.start.entity.AcceptNoInfoEntity">
<id column="ACCEPT_NO_INFO_ID" property="accept_No_Info_Id" jdbcType="VARCHAR"/>
<result column="ACCEPT_NO" property="accept_No" jdbcType="VARCHAR"/>
<result column="CYCLESHEETID" property="cyclesheetid" jdbcType="VARCHAR"/>
<result column="GROUP_NO" property="group_No" jdbcType="VARCHAR"/>
<result column="ACCEPT_TYPE" property="accept_Type" jdbcType="NUMERIC"/>
</resultMap>
<select id="findAcceptNoInfoEntityByAcceptNo" resultType="com.yxproject.start.entity.AcceptNoInfoEntity" parameterType="String">
select * from ACCEPT_NO_INFO where ACCEPT_NO =#{accept_No}
</select>
<insert id="saveAcceptNoInfoEntity" parameterType="com.yxproject.start.entity.AcceptNoInfoEntity">
INSERT INTO ACCEPT_NO_INFO (ACCEPT_NO_INFO_ID, ACCEPT_NO, CYCLESHEETID, ACCEPT_TYPE,GROUP_NO) VALUES (#{accept_No_Info_Id}, #{accept_No}, #{cyclesheetid}, #{accept_Type},#{group_No})
</insert>
<update id="updateAcceptNoInfoEntity" parameterType="com.yxproject.start.entity.AcceptNoInfoEntity">
update ACCEPT_NO_INFO
<set>
<if test="accept_No" >accept_No=#{accept_No} </if>
<if test="cyclesheetid" >cyclesheetid=#{cyclesheetid} </if>
<if test="group_No" >group_No=#{group_No} </if>
<if test="accept_Type" >accept_Type=#{accept_Type} </if>
</set>
where accept_No_Info_Id =#{accept_No_Info_Id}
</update>
<select id="findAcceptNoInfoEntityByGroupNo" resultType="com.yxproject.start.entity.AcceptNoInfoEntity" parameterType="String">
select * from ACCEPT_NO_INFO where GROUP_NO =#{group_No}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.FailedinfoMapper"> <mapper namespace="com.yxproject.start.mapper.FailedCardMapper">
<resultMap id="FailedinfoMapper" type="com.yxproject.start.entity.FailedinfoEntity"> <resultMap id="FailedCardMapper" type="com.yxproject.start.entity.FailedCardEntity">
<id column="FAILEDINFOID" property="failedinfoid" jdbcType="VARCHAR"/> <id column="FAILED_CARD_ID" property="failed_Card_Id" jdbcType="NUMERIC"/>
<result column="FAILED_REASON" property="failed_Reason" jdbcType="NUMERIC"/> <result column="FAILED_CARD_REASON_ID" property="failed_Card_Reason_Id" jdbcType="NUMERIC"/>
<result column="GROUPNO" property="groupno" jdbcType="VARCHAR"/> <result column="ACCEPT_NO" property="accept_No" jdbcType="VARCHAR"/>
<result column="CYCLESHEETID" property="cyclesheetid" jdbcType="VARCHAR"/> <result column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/>
<result column="POSITION_DATE" property="position_Date" jdbcType="VARCHAR"/> <result column="POSITION_DATE" property="position_Date" jdbcType="DATE"/>
<result column="FINISH_DATE" property="finish_Date" jdbcType="VARCHAR"/> <result column="FINISH_DATE" property="finish_Date" jdbcType="DATE"/>
<result column="ALLOT_DATE" property="allot_Date" jdbcType="VARCHAR"/> <result column="ALLOT_DATE" property="allot_Date" jdbcType="DATE"/>
<result column="PRINT_DATE" property="print_Date" jdbcType="VARCHAR"/> <result column="PRINT_DATE" property="print_Date" jdbcType="DATE"/>
<result column="STATE" property="state" jdbcType="NUMERIC"/> <result column="STATE" property="state" jdbcType="NUMERIC"/>
</resultMap> </resultMap>
<select id="selectFailedinfoByState" resultType="java.util.HashMap" parameterType="java.lang.Integer"> <select id="selectFailedCardEntityByState" resultType="java.util.HashMap" parameterType="java.lang.Integer">
select * from failedinfo where state = #{state} select * from FAILED_CARD where state = #{state}
</select> </select>
<insert id="saveFailedinfoEntity" parameterType="com.yxproject.start.entity.FailedinfoEntity" > <insert id="saveFailedCardEntity" parameterType="com.yxproject.start.entity.FailedCardEntity" >
insert into FAILEDINFO (FAILEDINFOID,FAILED_REASON,GROUPNO,CYCLESHEETID,POSITION_DATE,FINISH_DATE,ALLOT_DATE,PRINT_DATE,STATE ) insert into FAILED_CARD (FAILED_CARD_ID,FAILED_CARD_REASON_ID,ACCEPT_NO,TASK_ID,POSITION_DATE,FINISH_DATE,ALLOT_DATE,PRINT_DATE,STATE )
values (#{failedinfoid},#{failed_Reason},#{groupno},#{cyclesheetid},#{position_Date},#{finish_Date},#{allot_Date},#{print_Date},#{state}) values (#{failed_Card_Id},#{failed_Card_Reason_Id},#{accept_No},#{task_Id},#{position_Date},#{finish_Date},#{allot_Date},#{print_Date},#{state})
</insert> </insert>
<update id="updateFailedinfoEntity" parameterType="com.yxproject.start.entity.FailedinfoEntity"> <update id="updateFailedCardEntity" parameterType="com.yxproject.start.entity.FailedCardEntity">
update FAILEDINFO update FAILED_CARD
<set> <set>
<if test="failed_Reason" >FAILED_REASON=#{failed_Reason} </if> <if test="failed_Card_Reason_Id" >FAILED_CARD_REASON_ID=#{failed_Card_Reason_Id} </if>
<if test="groupno" >GROUPNO=#{groupno} </if> <if test="accept_No" >accept_No=#{accept_No} </if>
<if test="cyclesheetid" >cyclesheetid=#{cyclesheetid} </if> <if test="task_Id" >task_Id=#{task_Id} </if>
<if test="position_Date" >position_Date=#{position_Date} </if> <if test="position_Date" >position_Date=#{position_Date} </if>
<if test="finish_Date" >finish_Date=#{finish_Date} </if> <if test="finish_Date" >finish_Date=#{finish_Date} </if>
<if test="allot_Date" >allot_Date=#{allot_Date} </if> <if test="allot_Date" >allot_Date=#{allot_Date} </if>
<if test="print_Date" >print_Date=#{print_Date} </if> <if test="print_Date" >print_Date=#{print_Date} </if>
<if test="state" >state=#{state} </if> <if test="state" >state=#{state} </if>
</set> </set>
where failedinfoid =#{failedinfoid} where failed_Card_Id =#{failed_Card_Id}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.GroupinfoMapper"> <mapper namespace="com.yxproject.start.mapper.GroupNoMapper">
<resultMap id="GroupinfoMapper" type="com.yxproject.start.entity.GroupinfoEntity"> <resultMap id="GroupNoMapper" type="com.yxproject.start.entity.GroupNoEntity">
<id column="GROUPID" property="groupid" jdbcType="VARCHAR"/> <id column="GROUP_ID" property="group_Id" jdbcType="NUMERIC"/>
<result column="GROUPNO" property="groupno" jdbcType="VARCHAR"/> <result column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/>
<result column="CYCLESHEETID" property="cyclesheetid" jdbcType="VARCHAR"/> <result column="GROUP_NO" property="group_No" jdbcType="VARCHAR"/>
<result column="VAILD_COUNT" property="vaild_Count" jdbcType="NUMERIC"/> <result column="VAILD_COUNT" property="vaild_Count" jdbcType="NUMERIC"/>
<result column="INVALID_COUNT" property="invalid_Count" jdbcType="NUMERIC"/> <result column="INVALID_COUNT" property="invalid_Count" jdbcType="NUMERIC"/>
<result column="SPECIAL_CARD_COUNT" property="special_Card_Count" jdbcType="NUMERIC"/> <result column="SPECIAL_CARD_COUNT" property="special_Card_Count" jdbcType="NUMERIC"/>
</resultMap> </resultMap>
<select id="findGroupinfoEntityListByProductionTaskListId" resultType="com.yxproject.start.entity.GroupinfoEntity" parameterType="String"> <select id="findGroupNoEntityListByTaskId" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String">
select * from GROUPINFO where cyclesheetid like #{cyclesheetid} select * from GROUP_NO where task_Id like #{task_Id}
</select> </select>
<insert id="insertGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity"> <insert id="insertGroupNoEntity" parameterType="com.yxproject.start.entity.GroupNoEntity">
Insert into GROUPINFO (GROUPID,GROUPNO,CYCLESHEETID,VAILD_COUNT,INVALID_COUNT,special_Card_Count) values Insert into GROUP_NO (GROUP_ID,GROUP_NO,task_Id,VAILD_COUNT,INVALID_COUNT,special_Card_Count) values
(#{groupid},#{groupno},#{grouptype},#{cyclesheetid},#{vaildCount},#{invalidCount},#{special_Card_Count}) (#{group_Id},#{group_No},#{task_Id},#{vaild_Count},#{invalid_Count},#{special_Card_Count})
</insert> </insert>
<select id="findGroupinfoEntityByAcceptNo" resultType="com.yxproject.start.entity.GroupinfoEntity" parameterType="String"> <select id="findGroupNoEntityByAcceptNo" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String">
select * from GROUPINFO where GROUPNO =substr(#{acceptNo},0,8) select * from GROUP_NO where GROUP_NO =substr(#{acceptNo},0,8)
</select> </select>
<update id="updateGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity"> <update id="updateGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupNoEntity">
update GROUPINFO set GROUPID=#{groupid} update GROUP_NO set GROUP_ID=#{group_Id}
<if test="groupno">,groupno =#{groupno}</if> <if test="group_No">,group_No =#{group_No}</if>
<if test="cyclesheetid">,cyclesheetid =#{cyclesheetid}</if> <if test="task_Id">,task_Id =#{task_Id}</if>
<if test="grouptype">,grouptype =#{grouptype}</if> <if test="vaild_Count">,vaild_Count =#{vaild_Count}</if>
<if test="valid_Count">,vaild_Count =#{vaild_Count}</if>
<if test="invalid_Count">,invalid_Count =#{invalid_Count}</if> <if test="invalid_Count">,invalid_Count =#{invalid_Count}</if>
<if test="special_Card_Count">,special_Card_Count =#{special_Card_Count}</if> <if test="special_Card_Count">,special_Card_Count =#{special_Card_Count}</if>
where GROUPID=#{groupid} where GROUP_ID=#{group_Id}
</update> </update>
<select id="findGroupInfoCountByProductionTaskListId" parameterType="String" resultType="int"> <select id="findGroupNoCountByTaskId" parameterType="String" resultType="int">
select count(GROUPNO) from GROUPINFO where CYCLESHEETID =#{cyclesheetid} select count(GROUP_NO) from GROUP_NO where task_Id =#{task_Id}
</select> </select>
<select id="findSpecialCountyList" resultType="java.util.HashMap" parameterType="String"> <select id="findSpecialCountyList" resultType="java.util.HashMap" parameterType="String">
SELECT * FROM TABLE(FIND_SPECIAL_COUNTY_LIST.GET_county_infos(#{cyclesheetid})) SELECT * FROM TABLE(FIND_SPECIAL_COUNTY_LIST.GET_county_infos(#{task_Id}))
</select> </select>
<select id="findNormalCountyList" resultType="java.util.HashMap" parameterType="String"> <select id="findNormalCountyList" resultType="java.util.HashMap" parameterType="String">
SELECT * FROM TABLE(find_normal_county_list.GET_county_infos(#{cyclesheetid})) SELECT * FROM TABLE(find_normal_county_list.GET_county_infos(#{task_Id}))
</select> </select>
<select id="findCountyList" resultType="com.yxproject.start.entity.CountyListInfoEntity" parameterType="String">
SELECT * FROM COUNTY_LIST_INFO where CYCLESHEETID =#{cyclesheetid}
</select>
<!--<select id="equalsvalidCount" resultType="com.yxproject.start.entity.CountyListInfoEntity" parameterType="String">-->
<!--select SUM(invalid_Count) AS totalinvalidCount where PRODUCTION_TASK_LIST_ID =#{production_Task_List_Id}-->
<!--</select>-->
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.PoliceStationApplyReasonMapper">
<resultMap id="PoliceStationApplyReasonMapper" type="com.yxproject.start.entity.PoliceStationApplyReasonEntity">
<id column="POLICE_STATION_APPLY_REASON_ID" property="police_Station_Apply_Reason_Id" jdbcType="VARCHAR"/>
<result column="APPLY_REASON_SAVEDATE" property="apply_Reason_Savedate" jdbcType="VARCHAR"/>
<result column="CYCLESHEETID" property="cyclesheetid" jdbcType="VARCHAR"/>
<result column="POLICE_STATION_CODE" property="police_Station_Code" jdbcType="VARCHAR"/>
<result column="APPLY_REASON_CODE" property="apply_Reason_Code" jdbcType="NUMERIC"/>
<result column="APPLY_COUNT" property="apply_Count" jdbcType="NUMERIC"/>
</resultMap>
<insert id="savePoliceStationApplyReasonEntity" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity">
Insert into POLICE_STATION_APPLY_REASON (POLICE_STATION_APPLY_REASON_ID,APPLY_REASON_SAVEDATE,CYCLESHEETID,POLICE_STATION_CODE,APPLY_REASON_CODE,APPLY_COUNT)
values (#{police_Station_Apply_Reason_Id},#{apply_Reason_Savedate},#{cyclesheetid},#{police_Station_Code},#{apply_Reason_Code},#{apply_Count})
</insert>
<update id="updatePoliceStationApplyReasonEntity" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity">
update POLICE_STATION_APPLY_REASON set POLICE_STATION_APPLY_REASON_ID=#{police_Station_Apply_Reason_Id}
<if test="apply_Reason_Savedate">,APPLY_REASON_SAVEDATE =#{apply_Reason_Savedate}</if>
<if test="cyclesheetid">,cyclesheetid =#{cyclesheetid}</if>
<if test="police_Station_Code">,police_Station_Code =#{police_Station_Code}</if>
<if test="apply_Reason_Code">,apply_Reason_Code =#{apply_Reason_Code}</if>
<if test="apply_Count">,apply_Count =#{apply_Count}</if>
where POLICE_STATION_APPLY_REASON_ID=#{police_Station_Apply_Reason_Id}
</update>
<select id="findNormalApplyReasonByCyclesheetID" resultType="java.util.HashMap" parameterType="String">
SELECT * FROM TABLE(find_normal_apply_reason_list.get_apply_reason_list(#{cyclesheetid}))
</select>
<select id="findSpecialApplyReasonByCyclesheetID" resultType="java.util.HashMap" parameterType="String">
SELECT * FROM TABLE(find_special_apply_reason_list.get_apply_reason_list(#{cyclesheetid}))
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.ProductionTaskListMapper">
<resultMap id="ProductionTaskListMap" type="com.yxproject.start.entity.ProductionTaskListEntity">
<id column="PRODUCTION_TASK_LIST_ID" property="production_Task_List_Id" jdbcType="VARCHAR"/>
<result column="MAKE_TYPE" property="make_Type" jdbcType="NUMERIC"/>
<result column="OLD_MAKE_TYPE" property="old_Make_Type" jdbcType="NUMERIC"/>
<result column="CITYCODE" property="citycode" jdbcType="VARCHAR"/>
<result column="WORKSHOP" property="workshop" jdbcType="VARCHAR"/>
<result column="SUBMIT_DATE" property="submit_Date" jdbcType="VARCHAR"/>
<result column="HANDOUT_DATE" property="handout_Date" jdbcType="VARCHAR"/>
<result column="IS_PRINT" property="is_Print" jdbcType="NUMERIC"/>
<result column="DOWNLOAD_DATE" property="download_Date" jdbcType="VARCHAR"/>
<result column="PRINT_OUT" property="print_Out" jdbcType="VARCHAR"/>
<result column="PERMANENT_POSITION_DATE" property="permanent_Position_Date" jdbcType="VARCHAR"/>
<result column="ROLL_OUT_WORKSHOP_DATE" property="roll_Out_Workshop_Date" jdbcType="VARCHAR"/>
<result column="QUALITYINSPECTION_NAME" property="qualityinspection_Name" jdbcType="VARCHAR"/>
<result column="QUALITYINSPECTION_DATE" property="qualityinspection_Date" jdbcType="VARCHAR"/>
<result column="EXCEPTION_INFORMATION" property="exception_Information" jdbcType="VARCHAR"/>
<result column="OUTBOUND_DATE" property="outbound_Date" jdbcType="VARCHAR"/>
<result column="PUTINSTORAGE_DATE" property="putinstorage_Date" jdbcType="VARCHAR"/>
<result column="STATE" property="state" jdbcType="NUMERIC"/>
</resultMap>
<select id="findProductionTaskListEntity" resultType="com.yxproject.start.entity.ProductionTaskListEntity" parameterType="String">
select * from PRODUCTION_TASK_LIST where PRODUCTION_TASK_LIST_ID like #{id}
</select>
<insert id="insertProductionTaskListEntity" parameterType="com.yxproject.start.entity.ProductionTaskListEntity">
Insert into PRODUCTION_TASK_LIST (PRODUCTION_TASK_LIST_ID,MAKE_TYPE,OLD_MAKE_TYPE,CITYCODE,WORKSHOP,SUBMIT_DATE,HANDOUT_DATE,IS_PRINT,DOWNLOAD_DATE,PRINT_OUT,PERMANENT_POSITION_DATE,ROLL_OUT_WORKSHOP_DATE,QUALITYINSPECTION_NAME,QUALITYINSPECTION_DATE,EXCEPTION_INFORMATION,OUTBOUND_DATE,PUTINSTORAGE_DATE,STATE)
values (#{production_Task_List_Id},#{make_Type},#{old_Make_Type},#{citycode},#{workshop},#{submit_Date},#{handout_Date},#{is_Print},#{download_Date},#{print_Out},#{permanent_Position_Date},#{roll_Out_Workshop_Date},#{qualityinspection_Name},#{qualityinspection_Date},#{exception_Information},#{outbound_Date},#{putinstorage_Date},#{state})
</insert>
<update id="updateProductionTask" parameterType="com.yxproject.start.entity.ProductionTaskListEntity" >
update PRODUCTION_TASK_LIST
<set>
<if test="old_Make_Type ">OLD_MAKE_TYPE =#{old_Make_Type},</if>
<if test="make_Type ">MAKE_TYPE =#{make_Type},</if>
<if test="citycode ">CITYCODE =#{citycode},</if>
<if test="workshop">WORKSHOP =#{workshop},</if>
<if test="submit_Date ">SUBMIT_DATE =#{submit_Date},</if>
<if test="handout_Date ">HANDOUT_DATE =#{handout_Date},</if>
<if test="is_Print">IS_PRINT =#{is_Print},</if>
<if test="download_Date">DOWNLOAD_DATE =#{download_Date},</if>
<if test="print_Out">PRINT_OUT =#{print_Out},</if>
<if test="permanent_Position_Date">PERMANENT_POSITION_DATE =#{permanent_Position_Date},</if>
<if test="roll_Out_Workshop_Date ">ROLL_OUT_WORKSHOP_DATE =#{roll_Out_Workshop_Date},</if>
<if test="qualityinspection_Name">QUALITYINSPECTION_NAME =#{qualityinspection_Name},</if>
<if test="qualityinspection_Date">QUALITYINSPECTION_DATE =#{qualityinspection_Date},</if>
<if test="exception_Information">EXCEPTION_INFORMATION =#{exception_Information},</if>
<if test="outbound_Date">OUTBOUND_DATE =#{outbound_Date},</if>
<if test="state">STATE =#{state},</if>
<if test="putinstorage_Date">PUTINSTORAGE_DATE =#{putinstorage_Date},</if>
<if test="exception_State != null ">EXCEPTION_STATE =#{exception_State}</if>
</set>
<!--SET PRODUCTION_TASK_LIST_ID =#{production_Task_List_Id}-->
<!--<if test="old_Make_Type">,old_Make_Type =#{old_Make_Type}</if>-->
<!--<if test="make_Type">,make_Type =#{make_Type}</if>-->
<!--<if test="exception_State">,exception_State =#{exception_State}</if>-->
where PRODUCTION_TASK_LIST_ID =#{production_Task_List_Id}
</update>
<update id="replaceExceptionInformation" parameterType="com.yxproject.start.entity.ProductionTaskListEntity" >
update PRODUCTION_TASK_LIST SET exception_Information = NULL,EXCEPTION_STATE =#{exception_State} where PRODUCTION_TASK_LIST_ID =#{production_Task_List_Id}
</update>
<select id="findProductionTaskListEntityByState" resultType="com.yxproject.start.entity.ProductionTaskListEntity" parameterType="Integer">
select * from PRODUCTION_TASK_LIST where STATE =#{state}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.SpecialCardMapper">
<resultMap id="SpecialCardMapper" type="com.yxproject.start.entity.SpecialCardEntity">
<id column="SPECIAL_CARD_ID" property="special_Card_Id" jdbcType="NUMERIC"/>
<result column="ACCEPT_NO" property="accept_No" jdbcType="VARCHAR"/>
<result column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/>
<result column="SPECIAL_TYPE" property="special_Type" jdbcType="NUMERIC"/>
<result column="GROUP_NO" property="group_No" jdbcType="VARCHAR"/>
</resultMap>
<select id="findSpecialCardEntityByAcceptNo" resultType="com.yxproject.start.entity.SpecialCardEntity" parameterType="String">
select * from SPECIAL_CARD where ACCEPT_NO =#{accept_No}
</select>
<insert id="saveSpecialCardEntity" parameterType="com.yxproject.start.entity.SpecialCardEntity">
INSERT INTO SPECIAL_CARD (SPECIAL_CARD_ID, ACCEPT_NO, TASK_ID, SPECIAL_TYPE,GROUP_NO) VALUES (#{special_Card_Id}, #{accept_No}, #{task_Id}, #{special_Type},#{group_No})
</insert>
<update id="updateSpecialCardEntity" parameterType="com.yxproject.start.entity.SpecialCardEntity">
update SPECIAL_CARD
<set>
<if test="accept_No" >accept_No=#{accept_No} </if>
<if test="task_Id" >task_Id=#{task_Id} </if>
<if test="group_No" >group_No=#{group_No} </if>
<if test="special_Type" >special_Type=#{special_Type} </if>
</set>
where special_Card_Id =#{special_Card_Id}
</update>
<select id="findSpecialCardEntityByGroupNo" resultType="com.yxproject.start.entity.SpecialCardEntity" parameterType="String">
select * from SPECIAL_CARD where GROUP_NO =#{group_No}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.UserInfoMapper"> <mapper namespace="com.yxproject.start.mapper.UserInfoMapper">
<!--用户--> <!--用户-->
<resultMap id="UserRoleMenuMap" type="com.yxproject.start.entity.UserInfo"> <resultMap id="UserRoleMenuMap" type="com.yxproject.start.entity.UserInfo">
<id property="uid" column="uid"/> <id property="uid" column="uid"/>
<result column="username" property="username"/> <result column="username" property="username"/>
<result column="password" property="password"/> <result column="password" property="password"/>
<result column="state" property="state"/> <result column="state" property="state"/>
<result column="name" property="name"/> <result column="name" property="name"/>
<!--角色集合--> <!--角色集合-->
<collection property="roleList" ofType="com.yxproject.start.entity.SysRole"> <collection property="roleList" ofType="com.yxproject.start.entity.SysRole">
<id column="id" property="rid" /> <id column="id" property="rid"/>
<result column="description" property="description"/> <result column="description" property="description"/>
<result column="role" property="role"/> <result column="role" property="role"/>
<!--权限集合--> <!--权限集合-->
<collection property="permissions" ofType="com.yxproject.start.entity.SysPermission"> <collection property="permissions" ofType="com.yxproject.start.entity.SysPermission">
<id column="id" property="pid" /> <id column="id" property="pid"/>
<result column="name" property="pname"/> <result column="name" property="pname"/>
<result column="url" property="url"/> <result column="url" property="url"/>
</collection> </collection>
</collection> </collection>
</resultMap> </resultMap>
<!--<select id="findUserByUsername" resultMap="UserRoleMenuMap" parameterType="string">-->
<!--select user_info.uid,user_info.username,user_info.password,user_info.name,sys_role.id as rid,sys_role.role,sys_role.description,-->
<!--sys_permission.id as pid,sys_permission.name as pname,sys_permission.url-->
<!--from user_info-->
<!--left join sys_user_role on user_info.uid = sys_user_role.uid-->
<!--left join sys_role on sys_user_role.role_id= sys_role.id-->
<!--left join sys_role_permission on sys_role.id = sys_role_permission.permission_id-->
<!--left join sys_permission on sys_role_permission.permission_id = sys_permission.id-->
<!--where username=#{username}-->
<!--</select>-->
<insert id = "addUserInfo" parameterType = "map" statementType = "PREPARED" keyProperty = "u_id" useGeneratedKeys = "true" >
insert into USER_INFO (`u_id`,`username`,`name`,`password`,`salt`,`state`) VALUES (USER_INFO_seq.nextval, 'admin', '管理员', 'd3c59d25033dbf980d29554025c23a75', '8d78869f470951332959580424d4bf4f', 0)
</insert>
<!--<update id = "delUserInfo" parameterType = "int" >-->
<!--update user_info set STATE = 1 where u_id =#{uId}-->
<!--</update>-->
<!--<update id = "updateUserInfo" parameterType = "map" >-->
<!--update user_info set username =#{username},name =#{name},password =#{password} where u_id =#{uId}-->
<!--</update>-->
<!--<select id="findUserByUsername" resultMap="UserRoleMenuMap" parameterType="string">-->
<!--select user_info.uid,user_info.username,user_info.password,user_info.name,sys_role.id as rid,sys_role.role,sys_role.description,-->
<!--sys_permission.id as pid,sys_permission.name as pname,sys_permission.url-->
<!--from user_info-->
<!--left join sys_user_role on user_info.uid = sys_user_role.uid-->
<!--left join sys_role on sys_user_role.role_id= sys_role.id-->
<!--left join sys_role_permission on sys_role.id = sys_role_permission.permission_id-->
<!--left join sys_permission on sys_role_permission.permission_id = sys_permission.id-->
<!--where username=#{username}-->
<!--</select>-->
<select id="findUserByUsername" resultType="com.yxproject.start.entity.UserInfo" parameterType="String">
select * from "SYSTEM_USER" where username=#{username}
</select>
</mapper> </mapper>
\ No newline at end of file
This diff is collapsed.
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
<select id="findAcceptInfoSequenceNextValue" resultType="int"> <select id="findAcceptInfoSequenceNextValue" resultType="int">
select ACCEPTINFO_SEQ.nextval from dual select ACCEPTINFO_SEQ.nextval from dual
</select> </select>
<select id="findPoliceStationApplyReasonSequenceNextValue" resultType="int">
select APPLY_REASON_SEQ.nextval from dual
</select>
</mapper> </mapper>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
module.exports = {
options: {
color: false,
production: false,
directory: 'bower_components'
}
};
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
var requireDirectory = require('require-directory');
module.exports = requireDirectory(module);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment