Commit d8622774 authored by zhoumaotao's avatar zhoumaotao

首次创建

parent b2c43345
Pipeline #156 canceled with stages

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

# Created by .ignore support plugin (hsz.mobi)
# IntelliJ project files
/.idea/
*.iml
*.log
# target
*/target
/calsses/
/.metadata/
/.recommenders/
/gavel/src/main/resources/jdbc.properties
/gavel/src/main/resources/config.properties
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.hzgd.mes</groupId>
<artifactId>erp</artifactId>
<version>1.0.0</version>
<packaging>war</packaging>
<name>gavel</name>
<description>hzgd-mes</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<log4j2.version>2.17.0</log4j2.version>
<pom.package>war</pom.package>
<pom.packageName>gavel</pom.packageName>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>webjars-locator</artifactId>
<version>0.32-1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>com.gavel.platform</groupId>
<artifactId>gavel-persistence</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.platform</groupId>
<artifactId>gavel-common</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.platform</groupId>
<artifactId>gavel-kzzx</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.platform</groupId>
<artifactId>gavel-message</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.platform</groupId>
<artifactId>gavel-framework</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.platform</groupId>
<artifactId>gavel-devonline</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.platform</groupId>
<artifactId>gavel-timer</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.platform</groupId>
<artifactId>gavel-monitor</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.webjars</groupId>
<artifactId>gavel-webjars</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.webjars</groupId>
<artifactId>gavel-erp-webjars</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-jcsj</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-kc</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-cggl</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-cgjs</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-chhs</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-bom</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-gygl</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-zlgl</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-wo</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-jit</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-xs</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-xsjs</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-cjzy</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>gavel-local</groupId>
<artifactId>access-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
</dependencies>
<profiles>
<profile>
<!-- 开发环境 -->
<id>jar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<pom.package>jar</pom.package>
<pom.packageName>${project.artifactId}-${project.version}</pom.packageName>
<pom.profiles.active>dev</pom.profiles.active>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>war</id>
<properties>
<pom.package>war</pom.package>
<pom.packageName>${project.artifactId}</pom.packageName>
<pom.profiles.active>linux</pom.profiles.active>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
</profiles>
<build>
<finalName>mes</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<prefix>git</prefix>
<verbose>false</verbose>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
<format>json</format>
<gitDescribe>
<skip>false</skip>
<always>false</always>
<dirty>-dirty</dirty>
</gitDescribe>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.gavel.hzgd;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Profile;
@SpringBootApplication
@ComponentScan("com.gavel.*")
public class GavelApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(GavelApplication.class, args);
}
@Profile(value = { "war" })
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(GavelApplication.class);
}
}
package com.gavel.hzgd.config;
import com.gavel.framework.cache.GavelCacheManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.annotation.Order;
import org.springframework.data.redis.cache.RedisCacheConfiguration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.cache.RedisCacheWriter;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializationContext;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.stereotype.Component;
import java.time.Duration;
@Conditional(CacheEnableCondition.class)
@EnableCaching
@PropertySource(value = "classpath:config.properties")
@Configuration
public class CacheConfig {
@Value("${spring.cache.ttl:240}")
private long ttl;
@Bean
public RedisCacheManager cacheManager(RedisConnectionFactory redisConnectionFactory){
//缓存配置对象
RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig();
redisCacheConfiguration = redisCacheConfiguration.entryTtl(Duration.ofMinutes(ttl)) //设置缓存的默认超时时间:30分钟
.disableCachingNullValues() //如果是空值,不缓存
.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer())) //设置key序列化器
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer((new GenericJackson2JsonRedisSerializer()))); //设置value序列化器
return RedisCacheManager
.builder(RedisCacheWriter.nonLockingRedisCacheWriter(redisConnectionFactory))
.cacheDefaults(redisCacheConfiguration).build();
}
@Component
@Order(1)
public class GavelCacheManagerInitRunner implements CommandLineRunner {
@Autowired
private GavelCacheManager cacheManager;
@Override
public void run(String... args) throws Exception {
cacheManager.init();
}
}
}
package com.gavel.hzgd.config;
import com.gavel.common.utils.PropertiesUtil;
import com.gavel.common.utils.StringUtils;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
public class CacheEnableCondition implements Condition{
@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
//判断是否在Linux环境下运行程序
return StringUtils.equalsIgnoreCase("true", PropertiesUtil.readProperty("config.properties", "spring.cache.enable"));
}
}
package com.gavel.hzgd.config;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.support.http.StatViewServlet;
import com.alibaba.druid.support.http.WebStatFilter;
import com.gavel.common.utils.StringUtils;
@Configuration
@PropertySource(value = "classpath:jdbc.properties")
public class DataSourceConfig {
@Value("${druid.allow:}")
private String druidAllow;
@Value("${druid.deny:}")
private String druidDeny;
@Value("${druid.username:}")
private String druidUserName;
@Value("${druid.password:}")
private String druidPassword;
@Bean(destroyMethod = "close", initMethod = "init")
@ConfigurationProperties(prefix = "spring.datasource")
public DataSource druidDataSource() throws SQLException {
DruidDataSource druidDataSource = new DruidDataSource();
druidDataSource.setFilters("stat,wall,logback");
return druidDataSource;
}
/**
* 注册一个StatViewServlet
*
* @return
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
@Bean
public ServletRegistrationBean druidStatViewServlet() {
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(),
"/druid/*");
// 白名单:
if (StringUtils.isNotEmpty(druidAllow)) {
servletRegistrationBean.addInitParameter("allow", druidAllow);
}
//IP黑名单 (存在共同时,deny优先于allow)
if (StringUtils.isNotEmpty(druidDeny)) {
servletRegistrationBean.addInitParameter("deny", druidDeny);
}
//用户名
if (StringUtils.isNotEmpty(druidUserName)) {
servletRegistrationBean.addInitParameter("loginUsername", druidUserName);
}
//密码
if (StringUtils.isNotEmpty(druidPassword)) {
servletRegistrationBean.addInitParameter("loginPassword", druidPassword);
}
// 是否能够重置数据.
servletRegistrationBean.addInitParameter("resetEnable", "false");
return servletRegistrationBean;
}
/**
* 注册一个:filterRegistrationBean
*
* @return
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@Bean
public FilterRegistrationBean druidStatFilter() {
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter());
// 添加过滤规则.
filterRegistrationBean.addUrlPatterns("/*");
// 添加不需要忽略的格式信息.
filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
return filterRegistrationBean;
}
}
package com.gavel.hzgd.config;
import java.util.Arrays;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.CharacterEncodingFilter;
import com.gavel.framework.filter.AuthenticationFilter;
import com.gavel.framework.filter.RequestWrapperFilter;
import com.gavel.framework.filter.ThreadContextFilter;
@Configuration
public class FilterConfig {
@Bean
public CharacterEncodingFilter characterEncodingFilter() {
CharacterEncodingFilter filter = new CharacterEncodingFilter();
filter.setEncoding("UTF-8");
filter.setForceEncoding(true);
return filter;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Bean
public FilterRegistrationBean authenticationFilter() {
// 用户认证
AuthenticationFilter authenticationFilter = new AuthenticationFilter();
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setName("authenticationFilter"); // 过滤器名称
registrationBean.setFilter(authenticationFilter); // 注入过滤器
registrationBean.setOrder(10);
registrationBean.addInitParameter("prefix", "/css,/js,/images,/lib,/fonts,/mock");
registrationBean.setUrlPatterns(Arrays.asList("/*")); //拦截规则
return registrationBean;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Bean
public FilterRegistrationBean requestWrapperFilter() {
RequestWrapperFilter requestWrapperFilter = new RequestWrapperFilter();
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setName("requestWrapperFilter"); // 过滤器名称
registrationBean.setFilter(requestWrapperFilter); // 注入过滤器
registrationBean.setOrder(30); //过滤器顺序
registrationBean.setUrlPatterns(Arrays.asList("/*")); //拦截规则
return registrationBean;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Bean
public FilterRegistrationBean threadContextFilter() {
ThreadContextFilter threadContextFilter = new ThreadContextFilter();
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setName("threadContextFilter"); // 过滤器名称
registrationBean.setFilter(threadContextFilter); // 注入过滤器
registrationBean.setOrder(40); //过滤器顺序
registrationBean.setUrlPatterns(Arrays.asList("/*")); //拦截规则
return registrationBean;
}
}
package com.gavel.hzgd.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import org.springframework.stereotype.Component;
import com.gavel.timer.scheduler.TimerJobFactory;
import com.gavel.timer.scheduler.TimerJobInit;
@Configuration
public class InitConfig {
@Autowired
private TimerJobFactory timerJobFactory;
@Component
@Order(2) //通过order值的大小来决定启动的顺序
public class TimerJobInitRunner implements CommandLineRunner {
@Autowired
private TimerJobInit timerJobInit;
@Override
public void run(String... args) throws Exception {
timerJobInit.init();
}
public void askForLeave(){
System.out.println("项目启动了,执行了方法");
}
}
//配置定时任务
@Bean("timerJobInit")
public TimerJobInit timerJobInitBean() {
TimerJobInit bean = new TimerJobInit();
return bean;
}
@Bean("timerJobFactory")
@Order(0)
public TimerJobFactory timerJobFactory() {
TimerJobFactory bean = new TimerJobFactory();
return bean;
}
@Bean("schedulerFactoryBean")
@Order(1)
public SchedulerFactoryBean schedulerFactoryBean() {
SchedulerFactoryBean bean = new SchedulerFactoryBean();
bean.setJobFactory(timerJobFactory);
bean.setWaitForJobsToCompleteOnShutdown(true);
bean.setStartupDelay(1);
return bean;
}
}
package com.gavel.hzgd.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.RedisPassword;
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
import org.springframework.data.redis.connection.jedis.JedisClientConfiguration;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import redis.clients.jedis.JedisPoolConfig;
@Configuration
@PropertySource(value = {"classpath:config.properties"})
public class RedisConfig {
@Value("${redis.username:}")
private String username;
@Value("${redis.password:}")
private String password;
@Value("${redis.host:localhost}")
private String host;
@Value("${redis.port:6379}")
private int port;
@Value("${redis.database:0}")
private Integer database;
//最大空闲数
@Value("${redis.pool.maxIdle:20}")
private int maxIdle;
//控制一个pool可分配多少个jedis实例,用来替换上面的maxActive
@Value("${redis.pool.maxTotal:100}")
private int maxTotal;
//连接池的最大数据库连接数
@Value("${redis.pool.maxActive:-1}")
private int maxActive;
//最大建立连接等待时间。如果超过此时间将接到异常
@Value("${redis.pool.maxWaitMillis:1000}")
private long maxWaitMillis;
//逐出连接的最小空闲时间 默认1800000毫秒(30分钟)
@Value("${redis.pool.minEvictableIdleTimeMillis:1800000}")
private Long minEvictableIdleTimeMillis;
//每次释放连接的最大数目
@Value("${redis.pool.numTestsPerEvictionRun:3}")
private Integer numTestsPerEvictionRun;
//逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程
@Value("${redis.pool.timeBetweenEvictionRunsMillis:-1}")
private Long timeBetweenEvictionRunsMillis;
//是否在从池中取出连接前进行检验,如果检验失败,则从池中去除连接并尝试取出另一个
@Value("${redis.pool.testOnBorrow:true}")
private boolean testOnBorrow;
//在空闲时检查有效性
@Value("${spring.redis.testWhileIdle:false}")
private boolean testWhileIdle;
/**
* JedisPoolConfig 连接池
* @return
*/
@Bean
public JedisPoolConfig jedisPoolConfig() {
JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
// 最大空闲数
jedisPoolConfig.setMaxIdle(maxIdle);
// 连接池的最大数据库连接数
jedisPoolConfig.setMaxTotal(maxTotal);
// 最大建立连接等待时间
jedisPoolConfig.setMaxWaitMillis(maxWaitMillis);
// 逐出连接的最小空闲时间 默认1800000毫秒(30分钟)
jedisPoolConfig.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
// 每次逐出检查时 逐出的最大数目 如果为负数就是 : 1/abs(n), 默认3
jedisPoolConfig.setNumTestsPerEvictionRun(numTestsPerEvictionRun);
// 逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1
jedisPoolConfig.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
// 是否在从池中取出连接前进行检验,如果检验失败,则从池中去除连接并尝试取出另一个
jedisPoolConfig.setTestOnBorrow(testOnBorrow);
// 在空闲时检查有效性, 默认false
jedisPoolConfig.setTestWhileIdle(testWhileIdle);
return jedisPoolConfig;
}
/**
* jedis连接工厂
* @param jedisPoolConfig
* @return
*/
@Bean
public RedisConnectionFactory redisConnectionFactory(JedisPoolConfig jedisPoolConfig) {
RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration();
//设置redis服务器的host或者ip地址
redisStandaloneConfiguration.setHostName(host);
redisStandaloneConfiguration.setPort(port);
redisStandaloneConfiguration.setPassword(RedisPassword.of(password));
redisStandaloneConfiguration.setDatabase(database);
//获得默认的连接池构造
//这里需要注意的是,edisConnectionFactoryJ对于Standalone模式的没有(RedisStandaloneConfiguration,JedisPoolConfig)的构造函数,对此
//我们用JedisClientConfiguration接口的builder方法实例化一个构造器,还得类型转换
JedisClientConfiguration.JedisPoolingClientConfigurationBuilder jpcf = (JedisClientConfiguration.JedisPoolingClientConfigurationBuilder) JedisClientConfiguration.builder();
//修改我们的连接池配置
jpcf.poolConfig(jedisPoolConfig);
//通过构造器来构造jedis客户端配置
JedisClientConfiguration jedisClientConfiguration = jpcf.build();
return new JedisConnectionFactory(redisStandaloneConfiguration, jedisClientConfiguration);
}
@Bean
public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
RedisTemplate<String, Object> template = new RedisTemplate<String, Object>();
template.setConnectionFactory(factory);
Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class);
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
// key采用String的序列化方式
template.setKeySerializer(stringRedisSerializer);
// hash的key也采用String的序列化方式
template.setHashKeySerializer(stringRedisSerializer);
// value序列化方式采用jackson
template.setValueSerializer(jackson2JsonRedisSerializer);
// hash的value序列化方式采用jackson
template.setHashValueSerializer(jackson2JsonRedisSerializer);
template.setEnableTransactionSupport(true);
template.afterPropertiesSet();
return template;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public Integer getDatabase() {
return database;
}
public void setDatabase(Integer database) {
this.database = database;
}
public int getMaxIdle() {
return maxIdle;
}
public void setMaxIdle(int maxIdle) {
this.maxIdle = maxIdle;
}
public int getMaxTotal() {
return maxTotal;
}
public void setMaxTotal(int maxTotal) {
this.maxTotal = maxTotal;
}
public int getMaxActive() {
return maxActive;
}
public void setMaxActive(int maxActive) {
this.maxActive = maxActive;
}
public long getMaxWaitMillis() {
return maxWaitMillis;
}
public void setMaxWaitMillis(long maxWaitMillis) {
this.maxWaitMillis = maxWaitMillis;
}
public Long getMinEvictableIdleTimeMillis() {
return minEvictableIdleTimeMillis;
}
public void setMinEvictableIdleTimeMillis(Long minEvictableIdleTimeMillis) {
this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
}
public Integer getNumTestsPerEvictionRun() {
return numTestsPerEvictionRun;
}
public void setNumTestsPerEvictionRun(Integer numTestsPerEvictionRun) {
this.numTestsPerEvictionRun = numTestsPerEvictionRun;
}
public Long getTimeBetweenEvictionRunsMillis() {
return timeBetweenEvictionRunsMillis;
}
public void setTimeBetweenEvictionRunsMillis(Long timeBetweenEvictionRunsMillis) {
this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
}
public boolean isTestOnBorrow() {
return testOnBorrow;
}
public void setTestOnBorrow(boolean testOnBorrow) {
this.testOnBorrow = testOnBorrow;
}
public boolean isTestWhileIdle() {
return testWhileIdle;
}
public void setTestWhileIdle(boolean testWhileIdle) {
this.testWhileIdle = testWhileIdle;
}
}
package com.gavel.hzgd.config;
import org.apache.shiro.cache.CacheManager;
import org.apache.shiro.cache.MemoryConstrainedCacheManager;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.session.mgt.eis.JavaUuidSessionIdGenerator;
import org.apache.shiro.session.mgt.eis.SessionIdGenerator;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
import org.crazycake.shiro.RedisCacheManager;
import org.crazycake.shiro.RedisManager;
import org.crazycake.shiro.RedisSessionDAO;
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import com.gavel.common.utils.StringUtils;
import com.gavel.kzzx.auth.shiro.GavelAuthResource;
import com.gavel.kzzx.auth.shiro.GavelAuthorizationAttributeSourceAdvisor;
import com.gavel.kzzx.auth.shiro.GavelAuthorizingRealm;
import com.gavel.kzzx.auth.shiro.GavelHashedCredentialsMatcher;
@Configuration
@PropertySource(value = {"classpath:config.properties"})
public class ShiroConfig {
@Value("${shiro.cache:}")
private String cacheType;
@Autowired
private RedisConfig redisConfig;
@Bean
public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) {
ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
// 必须设置 SecurityManager
shiroFilterFactoryBean.setSecurityManager(securityManager);
// 设置login URL
shiroFilterFactoryBean.setLoginUrl("/login_view");
// 登录成功后要跳转的链接
shiroFilterFactoryBean.setSuccessUrl("/index");
shiroFilterFactoryBean.setFilterChainDefinitionMap(GavelAuthResource.init());
return shiroFilterFactoryBean;
}
/*
* 凭证匹配器 (由于我们的密码校验交给Shiro的SimpleAuthenticationInfo进行处理了
* 所以我们需要修改下doGetAuthenticationInfo中的代码; )
*/
@Bean
public GavelHashedCredentialsMatcher hashedCredentialsMatcher() {
GavelHashedCredentialsMatcher hashedCredentialsMatcher = new GavelHashedCredentialsMatcher();
hashedCredentialsMatcher.setHashAlgorithmName("md5");// 散列算法:这里使用MD5算法;
hashedCredentialsMatcher.setHashIterations(1);// 散列的次数,比如散列两次,相当于md5(md5(""));
return hashedCredentialsMatcher;
}
@Bean
public GavelAuthorizingRealm shiroRealm() {
GavelAuthorizingRealm shiroRealm = new GavelAuthorizingRealm();
shiroRealm.setCredentialsMatcher(hashedCredentialsMatcher());
return shiroRealm;
}
@Bean
public SecurityManager securityManager() {
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
// 注入自定义的realm;
securityManager.setRealm(shiroRealm());
// 注入缓存管理器;
if (StringUtils.equals(cacheType, "redis"))
securityManager.setCacheManager(redisCacheManager());
else
securityManager.setCacheManager(cacheManager());
return securityManager;
}
/*
* 开启shiro aop注解支持 使用代理方式;所以需要开启代码支持;
*/
@Bean
public GavelAuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(
SecurityManager securityManager) {
GavelAuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new GavelAuthorizationAttributeSourceAdvisor();
authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
return authorizationAttributeSourceAdvisor;
}
/**
* DefaultAdvisorAutoProxyCreator,Spring的一个bean,由Advisor决定对哪些类的方法进行AOP代理。
*/
@Bean
public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator defaultAAP = new DefaultAdvisorAutoProxyCreator();
defaultAAP.setProxyTargetClass(true);
return defaultAAP;
}
/*
* shiro缓存管理器;
* 需要注入对应的其它的实体类中-->安全管理器:securityManager可见securityManager是整个shiro的核心;
*/
@Bean
public CacheManager cacheManager() {
return new MemoryConstrainedCacheManager();
}
/**
* 配置会话ID生成器
* @return
*/
@Bean
public SessionIdGenerator sessionIdGenerator() {
return new JavaUuidSessionIdGenerator();
}
/**
* redisManager
*
* @return
*/
@Bean
@ConditionalOnProperty(value="shiro.cache", havingValue="redis", matchIfMissing=false)
public RedisManager redisManager() {
RedisManager redisManager = new RedisManager();
redisManager.setHost(redisConfig.getHost()+":"+redisConfig.getPort());
return redisManager;
}
/**
* cacheManager
*
* @return
*/
@ConditionalOnProperty(value="shiro.cache", havingValue="redis", matchIfMissing=false)
@Bean
public RedisCacheManager redisCacheManager() {
RedisCacheManager redisCacheManager = new RedisCacheManager();
redisCacheManager.setRedisManager(redisManager());
return redisCacheManager;
}
/**
* redisSessionDAO
*/
@ConditionalOnProperty(value="shiro.cache", havingValue="redis", matchIfMissing=false)
@Bean
public RedisSessionDAO redisSessionDAO() {
RedisSessionDAO redisSessionDAO = new RedisSessionDAO();
redisSessionDAO.setRedisManager(redisManager());
return redisSessionDAO;
}
/**
* sessionManager
*/
@ConditionalOnProperty(value="shiro.cache", havingValue="redis", matchIfMissing=false)
@Bean
public DefaultWebSessionManager SessionManager() {
DefaultWebSessionManager sessionManager = new DefaultWebSessionManager();
sessionManager.setSessionDAO(redisSessionDAO());
return sessionManager;
}
}
package com.gavel.hzgd.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Value("${server.isEnableSwagger:false}")
private boolean isEnableSwagger;
@Bean
public Docket createApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.enable(isEnableSwagger)
.select()
.apis(RequestHandlerSelectors.withClassAnnotation(Controller.class))
.paths(PathSelectors.any())
.build();
}
/**
* Predicate that matches RequestHandler with given base package name for the class of the handler method.
* This predicate includes all request handlers matching the provided basePackage
*
* @param basePackage - base package of the classes
* @return this
*/
/* private static Predicate<RequestHandler> basePackage(final String basePackage) {
return new Predicate<RequestHandler>() {
@Override
public boolean apply(RequestHandler input) {
return declaringClass(input).transform(handlerPackage(basePackage)).or(true);
}
};
}*/
/**
* 处理包路径配置规则,支持多路径扫描匹配以逗号隔开
*
* @param basePackage 扫描包路径
* @return Function
*/
/*private static Function<Class<?>, Boolean> handlerPackage(final String basePackage) {
return new Function<Class<?>, Boolean>() {
@Override
public Boolean apply(Class<?> input) {
for (String strPackage : basePackage.split(";")) {
boolean isMatch = input.getPackage().getName().startsWith(strPackage);
if (isMatch) {
return true;
}
}
return false;
}
};
}*/
/**
* @param input RequestHandler
* @return Optional
*/
/*private static Optional<? extends Class<?>> declaringClass(RequestHandler input) {
return Optional.fromNullable(input.declaringClass());
}*/
/*private List<SecurityContext> securityContexts() {
List<SecurityContext> securityContexts=new ArrayList<>();
securityContexts.add(
SecurityContext.builder()
.securityReferences(defaultAuth())
.forPaths(PathSelectors.regex("^(?!auth).*$"))
.build());
return securityContexts;
}*/
/*private List<SecurityReference> defaultAuth() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
List<SecurityReference> securityReferences=new ArrayList<>();
securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
return securityReferences;
}*/
private ApiInfo apiInfo()
{
return new ApiInfoBuilder()
.title("erp")
.description("restful API specification about the erp project")
.version("1.0.0")
.contact(new Contact("", "", ""))
.build();
}
}
package com.gavel.erp.config;
import com.gavel.common.Constants;
import com.gavel.common.config.ResourceConfig;
import com.gavel.common.converter.json.Fastjson2HttpMessageConverter;
import com.gavel.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.util.unit.DataSize;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;
import javax.servlet.MultipartConfigElement;
import java.util.ArrayList;
import java.util.List;
@Configuration
@PropertySource(value = {"classpath:config.properties"})
public class WebMvcConfig implements WebMvcConfigurer{
//缺省为10G
@Value("${multipart.max-file-size:10240MB}")
private String maxFileSize;
//缺省为10G
@Value("${multipart.max-request-size:10240MB}")
private String maxRequestSize;
// @Value("${file.staticRealPath:}")
// private String realPath;
@Autowired
private ResourceConfig resourceConfig;
//设置fastjson
@Bean
public Fastjson2HttpMessageConverter fastJsonHttpMessageConverter() {
Fastjson2HttpMessageConverter fastConverter = new Fastjson2HttpMessageConverter();
List<MediaType> fastMediaTypes = new ArrayList<MediaType>();
fastMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
fastConverter.setSupportedMediaTypes(fastMediaTypes);
return fastConverter;
}
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
converters.add(fastJsonHttpMessageConverter());
}
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(true).setUseTrailingSlashMatch(true);
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations("classpath:/static/")
.addResourceLocations("classpath:/resource/")
.addResourceLocations("classpath:/META-INF/resources/")
.addResourceLocations("classpath:/public/")
.addResourceLocations("classpath:/META-INF/resources/webjars/erp/static/")
.addResourceLocations("classpath:/META-INF/resources/webjars/bigscreen/static/")
.addResourceLocations("classpath:/META-INF/resources/webjars/framework/static/")
.resourceChain(false);
registry.addResourceHandler("/**")
.addResourceLocations("classpath:/static/")
.addResourceLocations("classpath:/resource/")
.addResourceLocations("classpath:/META-INF/resources/")
.addResourceLocations("classpath:/public/")
.addResourceLocations("classpath:/META-INF/resources/webjars/erp/static/")
.addResourceLocations("classpath:/META-INF/resources/webjars/bigscreen/static/")
.addResourceLocations("classpath:/META-INF/resources/webjars/framework/static/")
.resourceChain(false);
registry.addResourceHandler("/views/**")
.addResourceLocations("classpath:/templates/views/")
.addResourceLocations("classpath:/META-INF/resources/webjars/erp/templates/views/")
.addResourceLocations("classpath:/META-INF/resources/webjars/bigscreen/templates/views/")
.addResourceLocations("classpath:/META-INF/resources/webjars/framework/templates/views/")
.resourceChain(false);
//设置swagger页面
registry.addResourceHandler("/swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/")
.resourceChain(false);
/**
* 设置用户静态资源
*/
if(StringUtils.isNotEmpty(resourceConfig.getStorePath())){
registry.addResourceHandler(Constants.RES_FILE_PATH)
.addResourceLocations("file:" + resourceConfig.getStorePath())
.resourceChain(false);
}
}
@Bean("freemarkerConfig")
public FreeMarkerConfigurer freeMarkerConfigurerBean() {
FreeMarkerConfigurer freeMarkerConfigurer = new FreeMarkerConfigurer();
freeMarkerConfigurer.setTemplateLoaderPaths("classpath:/templates/freemarker/",
"classpath:/templates/views/",
"classpath:/META-INF/resources/webjars/erp/templates/views/",
"classpath:/META-INF/resources/webjars/erp/templates/freemarker/",
"classpath:/META-INF/resources/webjars/bigscreen/templates/views/",
"classpath:/META-INF/resources/webjars/bigscreen/templates/freemarker/",
"classpath:/META-INF/resources/webjars/framework/templates/freemarker/",
"classpath:/META-INF/resources/webjars/framework/templates/views/");
freeMarkerConfigurer.setDefaultEncoding("UTF-8");
return freeMarkerConfigurer;
}
//配置FreeMarker视图解析器
@Bean
public FreeMarkerViewResolver freeMarkerViewResolverHtml() {
FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
resolver.setCache(false);
resolver.setPrefix("");
resolver.setSuffix(".html");
resolver.setOrder(0);
resolver.setContentType("text/html;charset=UTF-8");
resolver.setExposeSessionAttributes(true);
resolver.setRequestContextAttribute("request");
return resolver;
}
//配置FreeMarker视图解析器
@Bean
public FreeMarkerViewResolver freeMarkerViewResolverFtl() {
FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
resolver.setCache(false);
resolver.setPrefix("");
resolver.setSuffix(".ftl");
resolver.setOrder(1);
resolver.setContentType("text/html;charset=UTF-8");
resolver.setExposeSessionAttributes(true);
resolver.setRequestContextAttribute("request");
return resolver;
}
//配置附件上传相关参数
@Bean
public MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
factory.setMaxFileSize(DataSize.parse(maxFileSize));
factory.setMaxRequestSize(DataSize.parse(maxRequestSize));
return factory.createMultipartConfig();
}
}
package com.gavel.hzgd.controller;
import com.gavel.common.BaseURL;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.hzgd.utils.AoiDStateEnum;
import com.gavel.hzgd.utils.AoiStateEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.SystemOperation;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.Bm7dataService;
import com.gavel.hzgd.vo.Bm7dataCondition;
import com.gavel.hzgd.vo.Bm7dataVO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/bm7data")
public class Bm7dataController extends BaseController {
@Autowired
private Bm7dataService bm7dataService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/bm7data/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "hzmes/bm7data/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "hzmes/bm7data/edit";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
Bm7dataCondition condition = DataConvert.getCondition(param, Bm7dataCondition.class);
RecordSet<Bm7dataVO> records = bm7dataService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(Bm7dataVO.class, records.getRecords().get(0));
}
return buildReturnData(Bm7dataVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
Bm7dataCondition condition = DataConvert.getCondition(param, Bm7dataCondition.class);
RecordSet<Bm7dataVO> records = bm7dataService.query(condition);
return buildReturnData(records, Bm7dataVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.ADD)
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
bm7dataService.insert(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value ="syncdata", method = RequestMethod.POST)
@ResponseBody
public Object syncdata(@RequestBody JSONObject param) {
Bm7dataCondition condition = DataConvert.getCondition(param, Bm7dataCondition.class);
bm7dataService.syncdata(condition);
return ThreadContext.getReturnData();
}
@RequestMapping(value ="syncdata2", method = RequestMethod.POST)
@ResponseBody
public Object syncdata2(@RequestBody JSONObject param) {
Bm7dataCondition condition = DataConvert.getCondition(param, Bm7dataCondition.class);
bm7dataService.syncdata2(condition);
return ThreadContext.getReturnData();
}
//查看附件
@RequestMapping(value = "/preview/{barcode}")
@ResponseBody
public Object attachmentPreview(@PathVariable String barcode) {
try{
if(StringUtils.isEmpty(barcode)){
setReturnMessage("条码不能为空!");
}
Bm7dataVO bm7dataVO = bm7dataService.preveiw(barcode);
buildReturnData(bm7dataVO);
}catch (Exception e){
ThreadContext.getReturnData().setSuccess(false);
ThreadContext.getReturnData().setMessage(e.getMessage());
return ThreadContext.getReturnData();
}
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EDIT)
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
bm7dataService.update(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.DELETE)
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
bm7dataService.delete(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
Bm7dataCondition condition = DataConvert.getCondition(param, Bm7dataCondition.class);
RecordSet<Bm7dataVO> records = bm7dataService.query(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value = "init/judge", method = RequestMethod.POST)
@ResponseBody
public Object initJudge() {
return buildReturnData(AoiStateEnum.toList());
}
@RequestMapping(value = "init/defectjudg", method = RequestMethod.POST)
@ResponseBody
public Object initDefectjudg() {
return buildReturnData(AoiDStateEnum.toList());
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.hzgd.service.BxService;
import com.gavel.hzgd.vo.BxCondition;
import com.gavel.hzgd.vo.BxVO;
import com.gavel.common.BaseURL;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.ThreadContext;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/bx")
public class BxController extends BaseController {
@Autowired
private BxService bxService;
@RequestMapping("/index")
public String index() {
return "hzmes/bx/index";
}
@RequestMapping("/add")
public String add() {
return "hzmes/bx/edit";
}
@RequestMapping("/edit")
public String edit() {
return "hzmes/bx/edit";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
BxCondition condition = DataConvert.getCondition(param, BxCondition.class);
RecordSet<BxVO> records = bxService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(BxVO.class, records.getRecords().get(0));
}
return buildReturnData(BxVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
BxCondition condition = DataConvert.getCondition(param, BxCondition.class);
RecordSet<BxVO> records = bxService.query(condition);
return buildReturnData(records, BxVO.class);
}
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
bxService.insert(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
bxService.update(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
bxService.delete(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
BxCondition condition = DataConvert.getCondition(param, BxCondition.class);
RecordSet<BxVO> records = bxService.query(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value = "/count", method = RequestMethod.POST)
@ResponseBody
public Object count(@RequestBody JSONObject param) {
return buildReturnData(bxService.queryCount());
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.NoRepeatSubmit;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.HzCkdjService;
import com.gavel.hzgd.vo.HzQtckCondition;
import com.gavel.hzgd.vo.HzQtckmxVO;
import com.gavel.hzgd.vo.HzWoVO;
import com.gavel.kc.controller.QtckController;
import com.gavel.kc.vo.QtckVO;
import com.gavel.kc.vo.QtckmxCondition;
import com.gavel.persistence.sql.RecordSet;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@Controller
@RequestMapping("hzmes/ckdj")
public class CkdjController extends QtckController {
@Autowired
private HzCkdjService hzCkdjService;
@Override
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/ckdj/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "hzmes/ckdj/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "hzmes/ckdj/edit";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
HzQtckCondition condition = DataConvert.getCondition(param, HzQtckCondition.class);
RecordSet<QtckVO> records = hzCkdjService.queryHz(condition);
return buildReturnData(records, QtckVO.class);
}
@Override
@RequestMapping(value = BaseURL.QUERY_DETAIL, method = RequestMethod.POST)
@ResponseBody
public Object queryDetail(@RequestBody JSONObject param) {
QtckmxCondition condition = DataConvert.getCondition(param, QtckmxCondition.class);
RecordSet<HzQtckmxVO> records = hzCkdjService.queryHzDetail(condition);
return buildReturnData(records, HzQtckmxVO.class);
}
@ApiOperation(value = "查询箱/托码对应物料信息,传入snid")
@RequestMapping(value = "/getCkwlxx", method = RequestMethod.POST)
@ResponseBody
public Object getGpwxmxVOByGpid(@RequestBody JSONObject param) {
String snid = param.getString("snid");
if(StringUtils.isEmpty(snid)){
setReturnMessage("条码信息不允许为空!");
return returnData();
}
List<HzWoVO> hzWoVOList = hzCkdjService.queryZxwlBySnid(snid);
if(hzWoVOList != null && hzWoVOList.size() > 0){
return buildReturnData(hzWoVOList);
}else{
return ThreadContext.getReturnData();
}
}
@NoRepeatSubmit(lockTime = 40000)
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzCkdjService.insert(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzCkdjService.update(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzCkdjService.delete(editJson);
return ThreadContext.getReturnData();
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.NumberUtils;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.U_coderuleService;
import com.gavel.hzgd.service.WlsnService;
import com.gavel.hzgd.utils.WlsnLxEnum;
import com.gavel.hzgd.utils.WlsnStateEnum;
import com.gavel.hzgd.vo.CodeValueVO;
import com.gavel.hzgd.vo.WlsnCondition;
import com.gavel.hzgd.vo.WlsnVO;
import com.gavel.hzgd.vo.WoCodeValueVO;
import com.gavel.persistence.sql.RecordSet;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("hzmes/gjwlsn")
public class GjWlsnController extends BaseController {
@Autowired
private U_coderuleService u_coderuleService;
@Autowired
private WlsnService wlsnService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/gjwlsn/index";
}
@RequestMapping("/auto/add/index")
public String autoAddIndex() {
return "hzmes/gjwlsn/autoadd";
}
@ApiOperation(value = "获取当前物料的治工具条码数据,传入wlid")
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
String wlid = param.getString("wlid");
if(StringUtils.isEmpty(wlid)){
setReturnMessage("物料信息不允许为空!");
return returnData();
}
WlsnCondition condition = DataConvert.getCondition(param, WlsnCondition.class);
condition.setLx(WlsnLxEnum.GJ.getId());
RecordSet<WlsnVO> records = wlsnService.query(condition);
return buildReturnData(records, WlsnVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
WlsnCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), WlsnCondition.class);
String wlid = condition.getWlid();
if(StringUtils.isEmpty(wlid)){
setReturnMessage("物料信息不允许为空!");
return ;
}
condition.setLx(WlsnLxEnum.GJ.getId());
RecordSet<WlsnVO> records = wlsnService.query(condition);
doExport(request, response, param, records.getRecords());
}
@ApiOperation(value = "获取当前任务单条码规则数据,传入wlid")
@RequestMapping(value = "/getGjWlsnCR", method = RequestMethod.POST)
@ResponseBody
public Object getGjWlsnCR(@RequestBody JSONObject param) {
String wlid = param.getString("wlid");
if(StringUtils.isEmpty(wlid)){
setReturnMessage("物料信息不允许为空!");
return returnData();
}
WoCodeValueVO woCodeValueVO = u_coderuleService.getGjCodeValueList(wlid);
if(woCodeValueVO != null){
return buildReturnData(woCodeValueVO);
}else{
return ThreadContext.getReturnData();
}
}
@ApiOperation(value = "生成条码")
@RequestMapping(value = "/createGjWlsn", method = RequestMethod.POST)
@ResponseBody
public Object createGjWlsn(@RequestBody JSONObject param) {
String wlid = param.getString("wlid");
List<CodeValueVO> codeValueVOList = DataConvert.getData2List(param.getJSONArray("codeValueList"), CodeValueVO.class);
Integer count = param.getInteger("count");
if(StringUtils.isEmpty(wlid)){
setReturnMessage("物料信息不允许为空!");
return returnData();
}
if(!NumberUtils.Greater(count,0)){
setReturnMessage("生成条码数量必须大于0!");
return returnData();
}
if(codeValueVOList == null || codeValueVOList.size() == 0){
setReturnMessage("条码信息异常,请检查!");
return returnData();
}
u_coderuleService.createGjWlsn(wlid,codeValueVOList,count);
return ThreadContext.getReturnData();
}
@RequestMapping(value = "/init/zt", method = RequestMethod.POST)
@ResponseBody
public Object intxjfs(@RequestBody JSONObject param) {
return buildReturnData(WlsnStateEnum.toList());
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.GpfkService;
import com.gavel.hzgd.service.GphyService;
import com.gavel.hzgd.vo.*;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.zlgl.vo.JydmxVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Controller
@RequestMapping("hzmes/gpfkaoi")
public class GpaoiwxController extends BaseController {
@Autowired
private GpfkService gpfkService;
@Autowired
private GphyService gphyService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/gpfkaoi/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "hzmes/gpfkaoi/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "hzmes/gpfkaoi/edit";
}
@RequestMapping("/gx")
public String gx() {
return "hzmes/gpfkaoi/gx";
}
@RequestMapping("/split")
public String split() {
return "hzmes/gpwx/split";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkCondition condition) {
RecordSet<GpfkVO> records = gpfkService.query(condition);
return buildReturnData(records, GpfkVO.class);
}
@ApiOperation(value = "扫描生产主产品条码,{\"wosnid\":111}传入条码,返回任务单信息及历史不合格信息")
@RequestMapping(value = "/queryWxinfo", method = RequestMethod.POST)
@ResponseBody
public Object queryWxinfo(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
String gxid = param.getString("gxid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
GpWxInfoVO gpWxInfoVO = gpfkService.getGpwxinfo(wosnid,gxid);
return buildReturnData(gpWxInfoVO);
}
@ApiOperation(value = "查询条码对应的不合格检验信息,传入wosnid")
@RequestMapping(value = "/getBhgJymx", method = RequestMethod.POST)
@ResponseBody
public Object getGphymx(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码信息不允许为空!");
return returnData();
}
List<JydmxVO> jydmxVOList = gpfkService.queryBhgJydmxBySnid(wosnid);
return buildReturnData(jydmxVOList, JydmxVO.class);
}
@ApiOperation(value = "查询条码对应的可拆卸装配信息,传入wosnid")
@RequestMapping(value = "/getZpxx", method = RequestMethod.POST)
@ResponseBody
public Object getZpxx(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码信息不允许为空!");
return returnData();
}
List<GphyVO> gphyVOList = gphyService.queryWxZpInfo(wosnid);
return buildReturnData(gphyVOList, GphyVO.class);
}
@ApiOperation(value = "扫码进行维修反馈")
@RequestMapping(value = "/doGpwxfk", method = RequestMethod.POST)
@ResponseBody
public Object doGpjyfk(@RequestBody GpWxInfoVO param){
GpwxResVO gpwxResVO = gpfkService.doGpwxfk(param);
return buildReturnData(gpwxResVO);
}
@ResourcePermissions({"21"})
@RequestMapping(value = "/delGpwx", method = RequestMethod.POST)
@ResponseBody
public Object delGpwx(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("请选择一条工票信息进行操作!");
return returnData();
}
gpfkService.delGpwxById(gpfkid);
return ThreadContext.getReturnData();
}
//查看附件
@RequestMapping(value = "/preview/{id}")
@ResponseBody
public Object attachmentPreview(@PathVariable String id) {
try{
if(StringUtils.isEmpty(id)){
setReturnMessage("条码不能为空!");
}
AoiWxinfoVO aoiWxinfoVO = gpfkService.preveiw(id);
buildReturnData(aoiWxinfoVO);
}catch (Exception e){
ThreadContext.getReturnData().setSuccess(false);
ThreadContext.getReturnData().setMessage(e.getMessage());
return ThreadContext.getReturnData();
}
return ThreadContext.getReturnData();
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.hzgd.service.GpbhgcxService;
import com.gavel.hzgd.vo.GpbhgcxVO;
import com.gavel.hzgd.vo.GpbhgmxCondition;
import com.gavel.hzgd.vo.GpbhgmxVO;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/gpbhgcx")
public class GpbhgcxController extends BaseController {
@Autowired
private GpbhgcxService gpbhgcxService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/gpbhgcx/index";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
GpbhgmxCondition condition = DataConvert.getCondition(param, GpbhgmxCondition.class);
RecordSet<GpbhgcxVO> records = gpbhgcxService.queryCx(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(GpbhgcxVO.class, records.getRecords().get(0));
}
return buildReturnData(GpbhgmxVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
GpbhgmxCondition condition = DataConvert.getCondition(param, GpbhgmxCondition.class);
RecordSet<GpbhgcxVO> records = gpbhgcxService.queryCx(condition);
return buildReturnData(records, GpbhgcxVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpbhgmxCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpbhgmxCondition.class);
RecordSet<GpbhgcxVO> records = gpbhgcxService.queryCx(condition);
doExport(request, response, param, records.getRecords());
}
}
package com.gavel.hzgd.controller;
import com.gavel.common.BaseURL;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.SystemOperation;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.GpbhgmxService;
import com.gavel.hzgd.vo.GpbhgmxCondition;
import com.gavel.hzgd.vo.GpbhgmxVO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/gpbhgmx")
public class GpbhgmxController extends BaseController {
@Autowired
private GpbhgmxService gpbhgmxService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/gpbhgmx/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "hzmes/gpbhgmx/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "hzmes/gpbhgmx/edit";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
GpbhgmxCondition condition = DataConvert.getCondition(param, GpbhgmxCondition.class);
RecordSet<GpbhgmxVO> records = gpbhgmxService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(GpbhgmxVO.class, records.getRecords().get(0));
}
return buildReturnData(GpbhgmxVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
GpbhgmxCondition condition = DataConvert.getCondition(param, GpbhgmxCondition.class);
RecordSet<GpbhgmxVO> records = gpbhgmxService.query(condition);
return buildReturnData(records, GpbhgmxVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.ADD)
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpbhgmxService.insert(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EDIT)
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpbhgmxService.update(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.DELETE)
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpbhgmxService.delete(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpbhgmxCondition condition = DataConvert.getCondition(param, GpbhgmxCondition.class);
RecordSet<GpbhgmxVO> records = gpbhgmxService.query(condition);
doExport(request, response, param, records.getRecords());
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.hzgd.service.GpfkbgzlhzService;
import com.gavel.hzgd.vo.GpfkQCVO;
import com.gavel.hzgd.vo.GpfkhzCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("hzmes/gpfkbgzlfx")
public class GpfkbgzlfxController extends BaseController {
@Autowired
private GpfkbgzlhzService gpfkbgzlhzService;
@RequestMapping("/index")
public String index() {
return "hzmes/gpfkbgzlfx/index";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkhzCondition condition) {
List<GpfkQCVO> gpfkQCVOList = gpfkbgzlhzService.queryQcInfo(condition);
return buildReturnData(gpfkQCVOList,GpfkQCVO.class);
}
@ResourcePermissions({SystemOperation.BottonResource.EXPORT})
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkhzCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkhzCondition.class);
List<GpfkQCVO> records = gpfkbgzlhzService.queryQcInfo(condition);
doExport(request, response, param, records);
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.Constants;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.hzgd.service.GpfkbgzlhzService;
import com.gavel.hzgd.utils.GpfkbgzlhzEnum;
import com.gavel.hzgd.utils.GpfkllhzEnum;
import com.gavel.hzgd.vo.GpfkQCVO;
import com.gavel.hzgd.vo.GpfkhzCondition;
import com.gavel.hzgd.vo.GpfkhzVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("hzmes/gpfkbgzlhz")
public class GpfkbgzlhzController extends BaseController {
@Autowired
private GpfkbgzlhzService gpfkbgzlhzService;
@RequestMapping("/index")
public String index() {
return "hzmes/gpfkbgzlhz/index";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkhzCondition condition) {
if(StringUtils.isEmpty(condition.getHzfs())){
condition.setHzfs(GpfkbgzlhzEnum.GZZX.getId() + Constants.StringSplit.IDSPLIT + GpfkbgzlhzEnum.WL.getId());
}
List<GpfkhzVO> records = gpfkbgzlhzService.queryGpfkbgzlhz(condition);
return buildReturnData(records, GpfkhzVO.class);
}
@RequestMapping(value = "queryFkrhz", method = RequestMethod.POST)
@ResponseBody
public Object queryFkrhz(@RequestBody GpfkhzCondition condition) {
if(StringUtils.isEmpty(condition.getGzzxid())){
setReturnMessage("工作中心不允许为空!");
return returnData();
}
if(StringUtils.isEmpty(condition.getGxid())){
setReturnMessage("检验工序不允许为空!");
return returnData();
}
List<GpfkhzVO> records = gpfkbgzlhzService.queryGpfkbgzlFkrhz(condition);
return buildReturnData(records, GpfkhzVO.class);
}
@ResourcePermissions({SystemOperation.BottonResource.EXPORT})
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkhzCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkhzCondition.class);
if(StringUtils.isEmpty(condition.getHzfs())){
condition.setHzfs(GpfkbgzlhzEnum.GZZX.getId() + Constants.StringSplit.IDSPLIT + GpfkbgzlhzEnum.WL.getId());
}
List<GpfkhzVO> records = gpfkbgzlhzService.queryGpfkbgzlhz(condition);
doExport(request, response, param, records);
}
@RequestMapping(value = "init/hzfs", method = RequestMethod.POST)
@ResponseBody
public Object initHzfs() {
return buildReturnData(GpfkllhzEnum.toList());
}
@RequestMapping(value = "queryQcinfo", method = RequestMethod.POST)
@ResponseBody
public Object queryQcinfo(@RequestBody GpfkhzCondition condition) {
List<GpfkQCVO> gpfkQCVOList = gpfkbgzlhzService.queryQcInfo(condition);
return buildReturnData(gpfkQCVOList,GpfkQCVO.class);
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.gygl.vo.BzgxCondition;
import com.gavel.gygl.vo.BzgxVO;
import com.gavel.gygl.vo.GzzxCondition;
import com.gavel.gygl.vo.GzzxVO;
import com.gavel.hzgd.service.GpfkcxService;
import com.gavel.hzgd.vo.GpfkCondition;
import com.gavel.hzgd.vo.GpfkcxVO;
import com.gavel.hzgd.vo.GphyCondition;
import com.gavel.hzgd.vo.GphycxVO;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("hzmes/")
public class GpfkcxController extends BaseController {
@Autowired
private GpfkcxService gpfkcxService;
@RequestMapping("gpfkcx/index")
public String index() {
return "hzmes/gpfkcx/index";
}
@RequestMapping("gpfkcx/gpfkmxcx")
public String gpfkmxcx() {
return "hzmes/gpfkcx/gpfkmxcx";
}
@RequestMapping("gpfkcx/gpfkyy")
public String gpfkyy() {
return "hzmes/gpfkcx/gpfkyy";
}
@RequestMapping("tgpfkcx/index")
public String tsjindex() {
return "hzmes/tgpfkcx/index";
}
@RequestMapping(value = "gpfkcx/query", method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkCondition condition) {
RecordSet<GpfkcxVO> records = gpfkcxService.queryCx(condition);
return buildReturnData(records, GpfkcxVO.class);
}
@RequestMapping(value = "gpfkcx/query/detail", method = RequestMethod.POST)
@ResponseBody
public Object queryDetail(@RequestBody GphyCondition condition) {
RecordSet<GphycxVO> records = gpfkcxService.queryDetail(condition);
return buildReturnData(records, GphycxVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = "gpfkcx/export", method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkCondition.class);
RecordSet<GpfkcxVO> records = gpfkcxService.queryCx(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value ="gpfkcx/queryGzzx", method = RequestMethod.POST)
@ResponseBody
public Object queryGzzx(@RequestBody JSONObject param) {
GzzxCondition condition = DataConvert.getCondition(param, GzzxCondition.class);
List<GzzxVO> records = gpfkcxService.queryGzzx(condition);
return buildReturnData(records, GzzxVO.class);
}
@RequestMapping(value ="gpfkcx/queryBzgx", method = RequestMethod.POST)
@ResponseBody
public Object queryBzgx(@RequestBody JSONObject param) {
BzgxCondition condition = DataConvert.getCondition(param, BzgxCondition.class);
List<BzgxVO> records = gpfkcxService.queryBzgx(condition);
return buildReturnData(records, BzgxVO.class);
}
//通升捷工票记录查询
@RequestMapping(value = "tgpfkcx/query", method = RequestMethod.POST)
@ResponseBody
public Object tsjquery(@RequestBody GpfkCondition condition) {
RecordSet<GpfkcxVO> records = gpfkcxService.queryTcx(condition);
return buildReturnData(records, GpfkcxVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = "tgpfkcx/export", method = RequestMethod.POST)
@ResponseBody
public void tsjexport(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkCondition.class);
RecordSet<GpfkcxVO> records = gpfkcxService.queryTcx(condition);
doExport(request, response, param, records.getRecords());
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.hzgd.service.GpfkhzService;
import com.gavel.hzgd.utils.GpfkhzEnum;
import com.gavel.hzgd.vo.GpfkhzCondition;
import com.gavel.hzgd.vo.GpfkhzVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("hzmes/gpfkhz")
public class GpfkhzController extends BaseController {
@Autowired
private GpfkhzService gpfkhzService;
@RequestMapping("/index")
public String index() {
return "hzmes/gpfkhz/index";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkhzCondition condition) {
if(StringUtils.isEmpty(condition.getHzfs())){
setReturnMessage("汇总方式不允许为空,请重新选择!");
return returnData();
}
List<GpfkhzVO> records = gpfkhzService.queryGpfkhz(condition);
return buildReturnData(records, GpfkhzVO.class);
}
@ResourcePermissions({SystemOperation.BottonResource.EXPORT})
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkhzCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkhzCondition.class);
List<GpfkhzVO> records = gpfkhzService.queryGpfkhz(condition);
doExport(request, response, param, records);
}
@RequestMapping(value = "init/hzfs", method = RequestMethod.POST)
@ResponseBody
public Object initHzfs() {
return buildReturnData(GpfkhzEnum.toList());
}
@RequestMapping(value = "init/gxname", method = RequestMethod.POST)
@ResponseBody
public Object initGxname() {
return buildReturnData(gpfkhzService.listBzgxName());
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.hzgd.service.GpfkllhzService;
import com.gavel.hzgd.utils.GpfkllhzEnum;
import com.gavel.hzgd.vo.GpfkhzCondition;
import com.gavel.hzgd.vo.GpfkhzVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("hzmes/gpfkllhz")
public class GpfkllhzController extends BaseController {
@Autowired
private GpfkllhzService gpfkllhzService;
@RequestMapping("/index")
public String index() {
return "hzmes/gpfkllhz/index";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkhzCondition condition) {
if(StringUtils.isEmpty(condition.getHzfs())){
setReturnMessage("汇总方式不允许为空,请重新选择!");
return returnData();
}
List<GpfkhzVO> records = gpfkllhzService.queryGpfkllhz(condition);
return buildReturnData(records, GpfkhzVO.class);
}
@ResourcePermissions({SystemOperation.BottonResource.EXPORT})
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkhzCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkhzCondition.class);
List<GpfkhzVO> records = gpfkllhzService.queryGpfkllhz(condition);
doExport(request, response, param, records);
}
@RequestMapping(value = "init/hzfs", method = RequestMethod.POST)
@ResponseBody
public Object initHzfs() {
return buildReturnData(GpfkllhzEnum.toList());
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.gygl.vo.GzzxVO;
import com.gavel.hzgd.service.GpfkschzService;
import com.gavel.hzgd.utils.GpfkschzEnum;
import com.gavel.hzgd.vo.GpfkhzCondition;
import com.gavel.hzgd.vo.GpfkhzVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("hzmes/gpfkschz")
public class GpfkschzController extends BaseController {
@Autowired
private GpfkschzService gpfkschzService;
@RequestMapping("/index")
public String index() {
return "hzmes/gpfkschz/index";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkhzCondition condition) {
if(StringUtils.isEmpty(condition.getHzfs())){
setReturnMessage("汇总方式不允许为空,请重新选择!");
return returnData();
}
List<GpfkhzVO> records = gpfkschzService.queryGpfkschz(condition);
return buildReturnData(records, GpfkhzVO.class);
}
@ResourcePermissions({SystemOperation.BottonResource.EXPORT})
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkhzCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkhzCondition.class);
List<GpfkhzVO> records = gpfkschzService.queryGpfkschz(condition);
doExport(request, response, param, records);
}
@RequestMapping(value = "init/hzfs", method = RequestMethod.POST)
@ResponseBody
public Object initHzfs() {
return buildReturnData(GpfkschzEnum.toList());
}
@RequestMapping(value = "listScGzzx", method = RequestMethod.POST)
@ResponseBody
public Object listBgGzzx() {
List<GzzxVO> gzzxVOList = gpfkschzService.listScGzzx();
return buildReturnData(gzzxVOList, GzzxVO.class);
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.hzgd.service.GpfkService;
import com.gavel.hzgd.service.GphyService;
import com.gavel.hzgd.vo.*;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.persistence.sql.RecordSet;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Api(description = "装配反馈")
@Controller
@RequestMapping("hzmes/gphy")
public class GphyController extends BaseController {
@Autowired
private GphyService gphyService;
@Autowired
private GpfkService gpfkService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/gphy/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "hzmes/gphy/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "hzmes/gphy/edit";
}
@RequestMapping("/gx")
public String gx() {
return "hzmes/gphy/gx";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkCondition condition) {
RecordSet<GpfkVO> records = gpfkService.query(condition);
return buildReturnData(records, GpfkVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.ADD)
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gphyService.insert(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EDIT)
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gphyService.update(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.DELETE)
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gphyService.delete(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkCondition.class);
RecordSet<GpfkVO> records = gpfkService.query(condition);
doExport(request, response, param, records.getRecords());
}
@ApiOperation(value = "扫描生产主产品条码,{\"wosnid\":111,gxid:222}传入条码,返回任务单信息及bom信息")
@RequestMapping(value = "/queryWoinfo", method = RequestMethod.POST)
@ResponseBody
public Object getSninfo(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
String gxid = param.getString("gxid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
if(StringUtils.isEmpty(gxid)){
setReturnMessage("工序不允许为空!");
return returnData();
}
GpfkWoInfoVO gpfkWoInfoVO = gphyService.getZpinfoBySnid(wosnid,gxid);
if(gpfkWoInfoVO != null){
return buildReturnData(gpfkWoInfoVO);
}else {
return returnData();
}
}
@ApiOperation(value = "扫描装配零件条码,{\"wlsnid\":111}传入条码,返回物料信息")
@RequestMapping(value = "/queryWlxx", method = RequestMethod.POST)
@ResponseBody
public Object queryWlxx(@RequestBody JSONObject param) {
String wlsnid = param.getString("wlsnid");
String gxid = param.getString("gxid");
String woid = param.getString("woid");
if(StringUtils.isEmpty(wlsnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
if(StringUtils.isEmpty(gxid)){
setReturnMessage("工序不允许为空!");
return returnData();
}
if(StringUtils.isEmpty(woid)){
setReturnMessage("任务单不允许为空!");
return returnData();
}
HzWlsnVO wlsnVO = gphyService.getWLxxBySnid(wlsnid,gxid,woid);
if(wlsnVO != null){
return buildReturnData(wlsnVO);
}else{
return ThreadContext.getReturnData();
}
}
@ApiOperation(value = "装配完成点击完成按钮调用")
@RequestMapping(value = "/doZpGpfk", method = RequestMethod.POST)
@ResponseBody
public Object doZpGpfk(@RequestBody GphyfkCondition param){
gpfkService.doGpzpfk(param);
return returnData();
}
@ResourcePermissions({"21"})
@RequestMapping(value = "/delGpzp", method = RequestMethod.POST)
@ResponseBody
public Object delGpzp(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("请选择一条工票信息进行操作!");
return returnData();
}
gpfkService.delGpzpById(gpfkid);
return ThreadContext.getReturnData();
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.GpfkService;
import com.gavel.hzgd.vo.*;
import com.gavel.persistence.sql.RecordSet;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/gpjy")
public class GpjyController extends BaseController {
@Autowired
private GpfkService gpfkService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/gpjy/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "hzmes/gpjy/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "hzmes/gpjy/edit";
}
@RequestMapping("/gx")
public String gx() {
return "hzmes/gpjy/gx";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkCondition condition) {
RecordSet<GpfkVO> records = gpfkService.query(condition);
return buildReturnData(records, GpfkVO.class);
}
@ApiOperation(value = "扫描生产主产品条码,{\"wosnid\":111,\"gxid\":222}传入条码,返回检验标准信息")
@RequestMapping(value = "/queryJyinfo", method = RequestMethod.POST)
@ResponseBody
public Object queryJyinfo(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
String gxid = param.getString("gxid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
if(StringUtils.isEmpty(gxid)){
setReturnMessage("工序不允许为空!");
return returnData();
}
GpfkJybzinfoVO gpfkJybzinfoVO = gpfkService.getJyInfoBySnid(wosnid,gxid);
return buildReturnData(gpfkJybzinfoVO);
}
@ApiOperation(value = "扫码进行检验反馈")
@RequestMapping(value = "/doGpjyfk", method = RequestMethod.POST)
@ResponseBody
public Object doGpjyfk(@RequestBody GpfkJyjgVO param){
GpJyResVO gpJyResVO = gpfkService.doGpjyfk(param);
if(gpJyResVO != null){
return buildReturnData(gpJyResVO);
}else{
return ThreadContext.getReturnData();
}
}
@ResourcePermissions({"21"})
@RequestMapping(value = "/delGpjy", method = RequestMethod.POST)
@ResponseBody
public Object delGpjy(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("请选择一条工票信息进行操作!");
return returnData();
}
gpfkService.delGpjyById(gpfkid);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkCondition.class);
RecordSet<GpfkVO> records = gpfkService.query(condition);
doExport(request, response, param, records.getRecords());
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.GpfkService;
import com.gavel.hzgd.vo.GpResVO;
import com.gavel.hzgd.vo.GpbhgfkCondition;
import com.gavel.hzgd.vo.GpfkCondition;
import com.gavel.hzgd.vo.GpfkVO;
import com.gavel.persistence.sql.RecordSet;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/gplhend")
public class GplhEndController extends BaseController {
@Autowired
private GpfkService gpfkService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/gplhend/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "hzmes/gplhend/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "hzmes/gplhend/edit";
}
@RequestMapping("/gx")
public String gx() {
return "hzmes/gplhend/gx";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
GpfkCondition condition = DataConvert.getCondition(param, GpfkCondition.class);
RecordSet<GpfkVO> records = gpfkService.queryLh(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(GpfkVO.class, records.getRecords().get(0));
}
return buildReturnData(GpfkVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
GpfkCondition condition = DataConvert.getCondition(param, GpfkCondition.class);
RecordSet<GpfkVO> records = gpfkService.queryLh(condition);
return buildReturnData(records, GpfkVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.ADD)
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpfkService.insert(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EDIT)
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpfkService.update(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.DELETE)
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpfkService.delete(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkCondition condition = DataConvert.getCondition(param, GpfkCondition.class);
RecordSet<GpfkVO> records = gpfkService.queryLh(condition);
doExport(request, response, param, records.getRecords());
}
@ApiOperation(value = "扫码进行老化反馈")
@RequestMapping(value = "/doGplhfk", method = RequestMethod.POST)
@ResponseBody
public Object doGplhfk(@RequestBody GpbhgfkCondition param){
GpResVO gpResVO = gpfkService.doGplhfk(param);
return buildReturnData(gpResVO);
}
@ResourcePermissions({"21"})
@RequestMapping(value = "/cancelGplh", method = RequestMethod.POST)
@ResponseBody
public Object cancelGplh(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("请选择一条工票信息进行操作!");
return returnData();
}
gpfkService.cancelGplh(gpfkid);
return ThreadContext.getReturnData();
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.gygl.utils.GxlxEnum;
import com.gavel.gygl.vo.BzgxCondition;
import com.gavel.gygl.vo.BzgxVO;
import com.gavel.hzgd.service.GpfkService;
import com.gavel.hzgd.vo.GpfkCondition;
import com.gavel.hzgd.vo.GpfkVO;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("hzmes/gplhstart")
public class GplhStartController extends BaseController {
@Autowired
private GpfkService gpfkService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/gplhstart/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "hzmes/gplhstart/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "hzmes/gplhstart/edit";
}
@RequestMapping("/gx")
public String gx() {
return "hzmes/gplhstart/gx";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
GpfkCondition condition = DataConvert.getCondition(param, GpfkCondition.class);
RecordSet<GpfkVO> records = gpfkService.queryLh(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(GpfkVO.class, records.getRecords().get(0));
}
return buildReturnData(GpfkVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
GpfkCondition condition = DataConvert.getCondition(param, GpfkCondition.class);
RecordSet<GpfkVO> records = gpfkService.queryLh(condition);
return buildReturnData(records, GpfkVO.class);
}
//老化的工序类型
@RequestMapping(value = "queryLhBzgx", method = RequestMethod.POST)
@ResponseBody
public Object queryLhBzgx(@RequestBody JSONObject param) {
BzgxCondition condition = DataConvert.getCondition(param, BzgxCondition.class);
condition.setGxlx(GxlxEnum.JG.getId());
List<BzgxVO> records = gpfkService.queryLhBzgx(condition);
return buildReturnData(records, BzgxVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.ADD)
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpfkService.insert(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EDIT)
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpfkService.update(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.DELETE)
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpfkService.delete(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkCondition condition = DataConvert.getCondition(param, GpfkCondition.class);
RecordSet<GpfkVO> records = gpfkService.queryLh(condition);
doExport(request, response, param, records.getRecords());
}
@ResourcePermissions({"21"})
@RequestMapping(value = "/delGpfk", method = RequestMethod.POST)
@ResponseBody
public Object delGpfk(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("请选择一条工票信息进行操作!");
return returnData();
}
gpfkService.delGpfkById(gpfkid);
return ThreadContext.getReturnData();
}
}
package com.gavel.hzgd.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.Constants;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.hzgd.service.GpsmrkService;
import com.gavel.wo.persistent.Work;
import com.gavel.wo.persistent.Workmx;
@Controller
@RequestMapping("hzgd/gpsmrk")
public class GpsmrkController extends BaseController{
@Autowired
private GpsmrkService gpsmrkService;
@RequestMapping("/index")
public String index() {
return "hzmes/gpsmrk/index";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
/*WoCondition condition = DataConvert.getCondition(param, WoCondition.class);
RecordSet<WoVO> records = gpsmrkService.query(condition);
return buildReturnData(records, WoVO.class);*/
return returnData();
}
@RequestMapping(value = "/save", method = RequestMethod.POST)
@ResponseBody
public Object save(@RequestBody JSONObject param) {
Work work = param.getJSONObject(Constants.MASTER).toJavaObject(Work.class);
List<Workmx> workmxList = DataConvert.getData2List(param.getJSONArray(Constants.DETAIL), Workmx.class);
gpsmrkService.save(work, workmxList);
return returnData();
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.GpfkService;
import com.gavel.hzgd.service.GphyService;
import com.gavel.hzgd.vo.*;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.zlgl.vo.JydmxVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("hzmes/gpwx")
public class GpwxController extends BaseController {
@Autowired
private GpfkService gpfkService;
@Autowired
private GphyService gphyService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/gpwx/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "hzmes/gpwx/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "hzmes/gpwx/edit";
}
@RequestMapping("/gx")
public String gx() {
return "hzmes/gpwx/gx";
}
@RequestMapping("/split")
public String split() {
return "hzmes/gpwx/split";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkCondition condition) {
RecordSet<GpfkVO> records = gpfkService.query(condition);
return buildReturnData(records, GpfkVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkCondition condition = DataConvert.getCondition(param, GpfkCondition.class);
RecordSet<GpfkVO> records = gpfkService.query(condition);
doExport(request, response, param, records.getRecords());
}
@ApiOperation(value = "扫描生产主产品条码,{\"wosnid\":111}传入条码,返回任务单信息及历史不合格信息")
@RequestMapping(value = "/queryWxinfo", method = RequestMethod.POST)
@ResponseBody
public Object queryWxinfo(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
String gxid = param.getString("gxid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
GpWxInfoVO gpWxInfoVO = gpfkService.getGpwxinfo(wosnid,gxid);
return buildReturnData(gpWxInfoVO);
}
@ApiOperation(value = "查询条码对应的不合格检验信息,传入wosnid")
@RequestMapping(value = "/getBhgJymx", method = RequestMethod.POST)
@ResponseBody
public Object getGphymx(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码信息不允许为空!");
return returnData();
}
List<JydmxVO> jydmxVOList = gpfkService.queryBhgJydmxBySnid(wosnid);
return buildReturnData(jydmxVOList, JydmxVO.class);
}
@ApiOperation(value = "查询条码对应的可拆卸装配信息,传入wosnid")
@RequestMapping(value = "/getZpxx", method = RequestMethod.POST)
@ResponseBody
public Object getZpxx(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码信息不允许为空!");
return returnData();
}
List<GphyVO> gphyVOList = gphyService.queryWxZpInfo(wosnid);
return buildReturnData(gphyVOList, GphyVO.class);
}
@ApiOperation(value = "扫码进行维修反馈")
@RequestMapping(value = "/doGpwxfk", method = RequestMethod.POST)
@ResponseBody
public Object doGpjyfk(@RequestBody GpWxInfoVO param){
GpwxResVO gpwxResVO = gpfkService.doGpwxfk(param);
return buildReturnData(gpwxResVO);
}
@ResourcePermissions({"21"})
@RequestMapping(value = "/delGpwx", method = RequestMethod.POST)
@ResponseBody
public Object delGpwx(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("请选择一条工票信息进行操作!");
return returnData();
}
gpfkService.delGpwxById(gpfkid);
return ThreadContext.getReturnData();
}
}
package com.gavel.hzgd.controller;
import com.gavel.common.BaseURL;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.SystemOperation;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.GpwxmxService;
import com.gavel.hzgd.vo.GpwxmxCondition;
import com.gavel.hzgd.vo.GpwxmxVO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("cjzy/gpwxmx")
public class GpwxmxController extends BaseController {
@Autowired
private GpwxmxService gpwxmxService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "cjzy/gpwxmx/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "cjzy/gpwxmx/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "cjzy/gpwxmx/edit";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
GpwxmxCondition condition = DataConvert.getCondition(param, GpwxmxCondition.class);
RecordSet<GpwxmxVO> records = gpwxmxService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(GpwxmxVO.class, records.getRecords().get(0));
}
return buildReturnData(GpwxmxVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
GpwxmxCondition condition = DataConvert.getCondition(param, GpwxmxCondition.class);
RecordSet<GpwxmxVO> records = gpwxmxService.query(condition);
return buildReturnData(records, GpwxmxVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.ADD)
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpwxmxService.insert(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EDIT)
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpwxmxService.update(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.DELETE)
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
gpwxmxService.delete(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpwxmxCondition condition = DataConvert.getCondition(param, GpwxmxCondition.class);
RecordSet<GpwxmxVO> records = gpwxmxService.query(condition);
doExport(request, response, param, records.getRecords());
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.GyssnszService;
import com.gavel.hzgd.vo.GyssnWlxxVO;
import com.gavel.hzgd.vo.HzWlxxCondition;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("hzmes/gyssnsz")
public class GyssnszController extends BaseController {
@Autowired
private GyssnszService gyssnszService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "hzmes/gyssnsz/index";
}
@RequestMapping("/snsz")
public String edit() {
return "hzmes/gyssnsz/snsz";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
HzWlxxCondition condition = DataConvert.getCondition(param, HzWlxxCondition.class);
RecordSet<GyssnWlxxVO> records = gyssnszService.query(condition);
return buildReturnData(records, GyssnWlxxVO.class);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
HzWlxxCondition condition = DataConvert.getCondition(param, HzWlxxCondition.class);
RecordSet<GyssnWlxxVO> records = gyssnszService.query(condition);
return buildReturnData(records, GyssnWlxxVO.class);
}
@RequestMapping(value ="queryNotSnruleid", method = RequestMethod.POST)
@ResponseBody
public Object queryNotSnruleid(@RequestBody JSONObject param) {
HzWlxxCondition condition = DataConvert.getCondition(param, HzWlxxCondition.class);
RecordSet<GyssnWlxxVO> records = gyssnszService.queryNotSnruleid(condition);
return buildReturnData(records, GyssnWlxxVO.class);
}
@RequestMapping(value = "snsz", method = RequestMethod.POST)
@ResponseBody
public Object changeJldw(@RequestBody JSONObject param) {
HzWlxxCondition condition = DataConvert.getCondition(param, HzWlxxCondition.class);
gyssnszService.snsz(condition);
return ThreadContext.getReturnData();
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.HzBfckService;
import com.gavel.hzgd.vo.*;
import com.gavel.kc.controller.BfckController;
import com.gavel.persistence.sql.RecordSet;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/bfck")
public class HzBfckController extends BfckController {
@Autowired
private HzBfckService hzbfckService;
@RequestMapping("/index")
public String index() {
return "hzmes/bfck/index";
}
@RequestMapping("/add")
public String add() {
return "hzmes/bfck/edit";
}
@RequestMapping("/edit")
public String edit() {
return "hzmes/bfck/edit";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
HzBfckCondition condition = DataConvert.getCondition(param, HzBfckCondition.class);
RecordSet<HzBfckVO> records = hzbfckService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(HzBfckVO.class, records.getRecords().get(0));
}
return buildReturnData(HzBfckVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
HzBfckCondition condition = DataConvert.getCondition(param, HzBfckCondition.class);
RecordSet<HzBfckVO> records = hzbfckService.query(condition);
return buildReturnData(records, HzBfckVO.class);
}
@RequestMapping(value = BaseURL.QUERY_DETAIL, method = RequestMethod.POST)
@ResponseBody
public Object queryDetail(@RequestBody JSONObject param) {
HzBfckmxCondition condition = DataConvert.getCondition(param, HzBfckmxCondition.class);
RecordSet<HzBfckmxVO> records = hzbfckService.queryDetail(condition);
return buildReturnData(records, HzBfckmxVO.class);
}
@ResourcePermissions({SystemOperation.BottonResource.EXPORT})
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
HzBfckCondition condition = DataConvert.getCondition(param, HzBfckCondition.class);
RecordSet<HzBfckVO> records = hzbfckService.query(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzbfckService.insert(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzbfckService.update(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzbfckService.delete(editJson);
return ThreadContext.getReturnData();
}
@ApiOperation(value = "扫描条码报废,{\"wlsnid\":111}传入条码,返回条码信息")
@RequestMapping(value = "/querySnBF", method = RequestMethod.POST)
@ResponseBody
public Object getSninfo(@RequestBody JSONObject param) {
String wlsnid = param.getString("wlsnid");
if(StringUtils.isEmpty(wlsnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
WlsnVO wlsnVO = hzbfckService.queryWLsnVOForBF(wlsnid);
if(wlsnVO != null){
return buildReturnData(wlsnVO);
}else{
return ThreadContext.getReturnData();
}
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.utils.HzBhgflEnum;
import com.gavel.kzzx.utils.TybzEnum;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.zlgl.persistent.Bhgxx;
import com.gavel.zlgl.service.BhgxxService;
import com.gavel.zlgl.utils.GradeEnum;
import com.gavel.zlgl.vo.BhgxxCondition;
import com.gavel.zlgl.vo.BhgxxVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/bhgxx")
public class HzBhgxxController extends BaseController {
@Autowired
private BhgxxService bhgxxService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "zlgl/bhgxx/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "zlgl/bhgxx/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "zlgl/bhgxx/edit";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
BhgxxCondition condition = DataConvert.getCondition(param, BhgxxCondition.class);
RecordSet<BhgxxVO> records = bhgxxService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(BhgxxVO.class, records.getRecords().get(0));
}
return buildReturnData(BhgxxVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
BhgxxCondition condition = DataConvert.getCondition(param, BhgxxCondition.class);
RecordSet<BhgxxVO> records = bhgxxService.query(condition);
return buildReturnData(records, BhgxxVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.ADD)
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
bhgxxService.insert(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EDIT)
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
bhgxxService.update(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.DELETE)
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
bhgxxService.delete(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EDIT)
@RequestMapping(value = BaseURL.SETQT, method = RequestMethod.POST)
@ResponseBody
public Object recordSetQT(@RequestBody JSONObject param) {
bhgxxService.recordSetQT(DataConvert.getData(param, Bhgxx.class));
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
BhgxxCondition condition = DataConvert.getCondition(param, BhgxxCondition.class);
RecordSet<BhgxxVO> records = bhgxxService.query(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value = "init/bhgfl", method = RequestMethod.POST)
@ResponseBody
public Object initBhgfl() {
return buildReturnData(HzBhgflEnum.toList());
}
@RequestMapping(value = "init/grade", method = RequestMethod.POST)
@ResponseBody
public Object initGrade() {
return buildReturnData(GradeEnum.toList());
}
/**
* 查询所有未停用不合格现象
* @return
*/
@RequestMapping(value ="init/usedBhgxx", method = RequestMethod.POST)
@ResponseBody
public Object queryUsedBhgxx(@RequestBody BhgxxCondition bhgxxCondition) {
bhgxxCondition.setTybz(TybzEnum.NORMAL.getId());
RecordSet<BhgxxVO> records = bhgxxService.query(bhgxxCondition);
return buildReturnData(records, BhgxxVO.class);
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.HzCskcService;
import com.gavel.hzgd.vo.*;
import com.gavel.kc.controller.CskcController;
import com.gavel.persistence.sql.RecordSet;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("hzmes/cskc")
public class HzCskcController extends CskcController {
@Autowired
private HzCskcService hzcskcService;
@RequestMapping("/index")
public String index() {
return "hzmes/cskc/index";
}
@RequestMapping("/add")
public String add() {
return "hzmes/cskc/edit";
}
@RequestMapping("/edit")
public String edit() {
return "hzmes/cskc/edit";
}
@RequestMapping("/auto")
public String auto() {
return "hzmes/cskc/auto";
}
@RequestMapping("/info/index")
public String infoIndex() {
return "hzmes/info/gjwlxx/index";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
HzCskcCondition condition = DataConvert.getCondition(param, HzCskcCondition.class);
RecordSet<HzCskcVO> records = hzcskcService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(HzCskcVO.class, records.getRecords().get(0));
}
return buildReturnData(HzCskcVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
HzCskcCondition condition = DataConvert.getCondition(param, HzCskcCondition.class);
RecordSet<HzCskcVO> records = hzcskcService.query(condition);
return buildReturnData(records, HzCskcVO.class);
}
@RequestMapping(value = BaseURL.QUERY_DETAIL, method = RequestMethod.POST)
@ResponseBody
public Object queryDetail(@RequestBody JSONObject param) {
HzCskcmxCondition condition = DataConvert.getCondition(param, HzCskcmxCondition.class);
RecordSet<HzCskcmxVO> records = hzcskcService.queryDetail(condition);
return buildReturnData(records, HzCskcmxVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
HzCskcCondition condition = DataConvert.getCondition(param, HzCskcCondition.class);
RecordSet<HzCskcVO> records = hzcskcService.query(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzcskcService.insert(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzcskcService.update(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzcskcService.delete(editJson);
return ThreadContext.getReturnData();
}
@ApiOperation(value = "可传入wlid")
@RequestMapping(value = "/getWlsnForImp", method = RequestMethod.POST)
@ResponseBody
public Object getWlsnForImp(@RequestBody JSONObject param) {
WlsnCondition condition = DataConvert.getCondition(param, WlsnCondition.class);
List<WlsnVO> wlsnVOList = hzcskcService.queryGjWlsnForImp(condition);
return buildReturnData(wlsnVOList, WlsnVO.class);
}
@RequestMapping(value = "/queryExistSnGj", method = RequestMethod.POST)
@ResponseBody
public Object queryExistSnGj(@RequestBody JSONObject param) {
HzWlxxCondition condition = DataConvert.getCondition(param, HzWlxxCondition.class);
RecordSet<HzWlxxVO> records = hzcskcService.queryExistSnGj(condition);
return buildReturnData(records, HzWlxxVO.class);
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.HzGhrkService;
import com.gavel.hzgd.vo.*;
import com.gavel.kc.controller.GhrkController;
import com.gavel.persistence.sql.RecordSet;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/ghrk")
public class HzGhrkController extends GhrkController {
@Autowired
private HzGhrkService hzGhrkService;
@RequestMapping("/index")
public String index() {
return "hzmes/ghrk/index";
}
@RequestMapping("/add")
public String add() {
return "hzmes/ghrk/edit";
}
@RequestMapping("/edit")
public String edit() {
return "hzmes/ghrk/edit";
}
@RequestMapping("/hzghrksearch")
public String search() {
return "hzmes/ghrk/hzghrksearch";
}
@RequestMapping("/hzarrange")
public String arrange() {
return "hzmes/ghrk/hzarrange";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
HzGhrkCondition condition = DataConvert.getCondition(param, HzGhrkCondition.class);
RecordSet<HzGhrkVO> records = hzGhrkService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(HzGhrkVO.class, records.getRecords().get(0));
}
return buildReturnData(HzGhrkVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
HzGhrkCondition condition = DataConvert.getCondition(param, HzGhrkCondition.class);
RecordSet<HzGhrkVO> records = hzGhrkService.query(condition);
return buildReturnData(records, HzGhrkVO.class);
}
@RequestMapping(value = BaseURL.QUERY_DETAIL, method = RequestMethod.POST)
@ResponseBody
public Object queryDetail(@RequestBody JSONObject param) {
HzGhrkmxCondition condition = DataConvert.getCondition(param, HzGhrkmxCondition.class);
RecordSet<HzGhrkmxVO> records = hzGhrkService.queryDetail(condition);
return buildReturnData(records, HzGhrkmxVO.class);
}
@RequestMapping(value = "returnable/hzdetail", method = RequestMethod.POST)
@ResponseBody
public Object queryGhrkmxForJyck(@RequestBody JSONObject param) {
HzGhrkmxCondition condition = DataConvert.getCondition(param, HzGhrkmxCondition.class);
RecordSet<HzGhrkJyckmxVO> records = hzGhrkService.queryGhrkmxForJyck(condition);
return buildReturnData(records, HzGhrkJyckmxVO.class);
}
@ResourcePermissions({SystemOperation.BottonResource.EXPORT})
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
HzGhrkCondition condition = DataConvert.getCondition(param, HzGhrkCondition.class);
RecordSet<HzGhrkVO> records = hzGhrkService.query(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzGhrkService.insert(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzGhrkService.update(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzGhrkService.delete(editJson);
return ThreadContext.getReturnData();
}
@ApiOperation(value = "扫描条码归还,{\"wlsnid\":111}传入条码,返回条码信息")
@RequestMapping(value = "/querySnGH", method = RequestMethod.POST)
@ResponseBody
public Object getSninfo(@RequestBody JSONObject param) {
String wlsnid = param.getString("wlsnid");
if(StringUtils.isEmpty(wlsnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
WlsnVO wlsnVO = hzGhrkService.queryWLsnVOForGH(wlsnid);
if(wlsnVO != null){
return buildReturnData(wlsnVO);
}else{
return ThreadContext.getReturnData();
}
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.hzgd.service.HzGjsftzService;
import com.gavel.hzgd.utils.HzWlsftzXsfsEnum;
import com.gavel.hzgd.vo.HzKcswVO;
import com.gavel.kc.vo.KcswCondition;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/hzgjsftz")
public class HzGjsftzController extends BaseController {
@Autowired
private HzGjsftzService gjsftzService;
@RequestMapping("/index")
public String index() {
return "hzmes/hzgjsftz/index";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
KcswCondition condition = DataConvert.getCondition(param, KcswCondition.class);
RecordSet<HzKcswVO> records = gjsftzService.query(condition);
return buildReturnData(records, HzKcswVO.class);
}
@ResourcePermissions({SystemOperation.BottonResource.EXPORT})
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
KcswCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), KcswCondition.class);
RecordSet<HzKcswVO> records = gjsftzService.query(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value = "/init/xsfs", method = RequestMethod.POST)
@ResponseBody
public Object intxsfs(@RequestBody JSONObject param) {
return buildReturnData(HzWlsftzXsfsEnum.toList());
}
@RequestMapping(value = "/init/swlx", method = RequestMethod.POST)
@ResponseBody
public Object initSwlx(@RequestBody JSONObject param){
return buildReturnData(gjsftzService.querGjswlx());
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.base.controller.BaseController;
import com.gavel.hzgd.service.HzJcsjService;
import com.gavel.kzzx.vo.BmVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@Controller
@RequestMapping("hzmes/common")
public class HzJcsjController extends BaseController {
@Autowired
private HzJcsjService hzJcsjService;
/**
* 用户可操作的检验部门
* @param param
* @return
*/
@RequestMapping(value ="bm/queryJybm", method = RequestMethod.POST)
@ResponseBody
public Object queryJybm(@RequestBody JSONObject param) {
List<BmVO> bmVOList = hzJcsjService.queryJybm();
return buildReturnData(bmVOList, BmVO.class);
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.hzgd.service.HzJyckService;
import com.gavel.hzgd.vo.*;
import com.gavel.kc.controller.JyckController;
import com.gavel.persistence.sql.RecordSet;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("hzmes/jyck")
public class HzJyckController extends JyckController {
@Autowired
private HzJyckService hzjyckService;
@RequestMapping("/index")
public String index() {
return "hzmes/jyck/index";
}
@RequestMapping("/add")
public String add() {
return "hzmes/jyck/edit";
}
@RequestMapping("/edit")
public String edit() {
return "hzmes/jyck/edit";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
HzJyckCondition condition = DataConvert.getCondition(param, HzJyckCondition.class);
RecordSet<HzJyckVO> records = hzjyckService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(HzJyckVO.class, records.getRecords().get(0));
}
return buildReturnData(HzJyckVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
HzJyckCondition condition = DataConvert.getCondition(param, HzJyckCondition.class);
RecordSet<HzJyckVO> records = hzjyckService.query(condition);
return buildReturnData(records, HzJyckVO.class);
}
@RequestMapping(value = BaseURL.QUERY_DETAIL, method = RequestMethod.POST)
@ResponseBody
public Object queryDetail(@RequestBody JSONObject param) {
HzJyckmxCondition condition = DataConvert.getCondition(param, HzJyckmxCondition.class);
RecordSet<HzJyckmxVO> records = hzjyckService.queryDetail(condition);
return buildReturnData(records, HzJyckmxVO.class);
}
@ResourcePermissions({SystemOperation.BottonResource.EXPORT})
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
HzJyckCondition condition = DataConvert.getCondition(param, HzJyckCondition.class);
RecordSet<HzJyckVO> records = hzjyckService.query(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzjyckService.insert(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzjyckService.update(editJson);
return ThreadContext.getReturnData();
}
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
hzjyckService.delete(editJson);
return ThreadContext.getReturnData();
}
@ApiOperation(value = "扫描条码领用,{\"wlsnid\":111}传入条码,返回条码信息")
@RequestMapping(value = "/querySnJY", method = RequestMethod.POST)
@ResponseBody
public Object getSninfo(@RequestBody JSONObject param) {
String wlsnid = param.getString("wlsnid");
if(StringUtils.isEmpty(wlsnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
WlsnVO wlsnVO = hzjyckService.queryWLsnVOForJY(wlsnid);
if(wlsnVO != null){
return buildReturnData(wlsnVO);
}else{
return ThreadContext.getReturnData();
}
}
}
package com.gavel.hzgd.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.hzgd.service.HzWorkService;
import com.gavel.hzgd.vo.GpfkCondition;
import com.gavel.hzgd.vo.WorkWoGpVO;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/hzmes/wo/work")
public class UWoWorkController extends BaseController {
@Autowired
HzWorkService hzWorkService;
@RequestMapping("/edit/wogp/index")
public String woEditIndex() {
return "wo/work/editwogp";
}
@RequestMapping("/edit/wogp/query/index")
public String woIndex() {
return "wo/work/wogpsearch";
}
@RequestMapping(value = "query/wogp", method = RequestMethod.POST)
@ResponseBody
public Object queryWoGp(@RequestBody JSONObject param) {
GpfkCondition condition = DataConvert.getCondition(param, GpfkCondition.class);
RecordSet<WorkWoGpVO> records = hzWorkService.queryWoGp(condition);
return buildReturnData(records, WorkWoGpVO.class);
}
}
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.
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.
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.
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