Compare commits
	
		
			125 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 32647c035c | |||
| 9546ceec03 | |||
| 3a583ac09f | |||
|  | e149150b1d | ||
|  | 3d5e5e5845 | ||
|  | 5a9f5ee38b | ||
|  | 7c21dfe8e1 | ||
|  | 2bc72469a0 | ||
|  | cafcdd65e0 | ||
| cc5848e5cd | |||
| 445c7c0c3f | |||
| 214f0a8ec9 | |||
|  | 74aaf857f0 | ||
|  | 353471b1f7 | ||
|  | 23aa6d5f89 | ||
| ea70ac4a6b | |||
| b6990dc4a0 | |||
|  | 8b14c369fb | ||
|  | c1d37a3dbc | ||
| 5e32971f26 | |||
| 1ce177ab5d | |||
| 8b4e6b116e | |||
|  | 9b545a9a03 | ||
|  | c75c89cab9 | ||
| 04e8cc187a | |||
| add0eea2ac | |||
|  | 69f911c07c | ||
|  | 5e8110ad2c | ||
|  | 7e3e028eb0 | ||
| 37f0dbe548 | |||
| b501e8cd98 | |||
| 98baf93cff | |||
|  | ff63c194ee | ||
| 1173d670e4 | |||
| c7c43cd906 | |||
|  | 1798ba8d1d | ||
|  | 652812d3ba | ||
| 1562854e59 | |||
| d03a3e06a3 | |||
| c9d01c9e11 | |||
|  | de3fe9b95c | ||
|  | 53f0c58507 | ||
| 95a82b042d | |||
| b15ad64d76 | |||
|  | bf67380718 | ||
|  | b93869c4a1 | ||
| 6829169a4a | |||
|  | 2d9b0ea1f1 | ||
| 0e3f0f9168 | |||
| b515eacbab | |||
|  | 515df64760 | ||
| ab35b10130 | |||
| 4864545f12 | |||
|  | f7712f184a | ||
|  | 8bfcaaf429 | ||
|  | 650e9a2324 | ||
|  | a2d91083f2 | ||
|  | bd9276036b | ||
| 8a4f0094a1 | |||
| 1b9c3499a3 | |||
| e6b5583d05 | |||
| a3cc4df25c | |||
| 7abcafb93d | |||
| 559e76f6fb | |||
| fb65441dcc | |||
| dda48c610f | |||
| c0ce68f5b2 | |||
| 0fb22fa625 | |||
| db901ef527 | |||
| 96f9808e02 | |||
|  | 60b7c940fa | ||
|  | 0b4f717fa8 | ||
| aa41bf403d | |||
| 848eb60f43 | |||
| d9c13516cb | |||
| 63f3f98ca8 | |||
| 16a52e69c8 | |||
|  | d22b778b8a | ||
|  | 61dbaf92e1 | ||
|  | 01c95bfe1d | ||
|  | f5988be736 | ||
|  | 78fa6f42b0 | ||
|  | 030abafd1f | ||
|  | 16e656d820 | ||
|  | c0f460e1e4 | ||
| b1a9c6e77c | |||
| 73efee55e7 | |||
| 959b1a0b77 | |||
| ba88da6982 | |||
| 314380cd74 | |||
| 1b01150a7e | |||
| e9e0c47536 | |||
|  | 0750c9583e | ||
|  | e9c8f7857b | ||
|  | 227a27295d | ||
|  | 2d1ef3d743 | ||
| 46b6e5e66e | |||
| bac1ec5b70 | |||
|  | 8a3a037bda | ||
|  | e7a542d386 | ||
|  | fde6a8b684 | ||
|  | d26600892f | ||
|  | 3a91f8b8fe | ||
|  | 1477d05a69 | ||
|  | f498afd856 | ||
| 4cfd541f06 | |||
| 297d5f04ea | |||
| f44f701dad | |||
| c3460f6dc4 | |||
|  | 23b5ce90c9 | ||
|  | 2b34011129 | ||
| 3a77498965 | |||
| 3bd383a347 | |||
| 718ad8a8c2 | |||
|  | 13020d05c9 | ||
|  | 970359823b | ||
|  | 0f239f7978 | ||
|  | e9a39ae11b | ||
|  | d3e337d622 | ||
| f154d361a8 | |||
| cd1d203d87 | |||
|  | facfe5c7a2 | ||
|  | d3500d195b | ||
|  | 1f85905317 | ||
|  | ccedf0ab5c | 
							
								
								
									
										29
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | |||||||
|  | **项目说明** | ||||||
|  | - 这是根据renren框架重新修改出来的框架 | ||||||
|  | - 采用SpringBoot、MyBatis、spring security框架 | ||||||
|  | - 提供了代码生成器,只需编写30%左右代码,其余的代码交给系统自动生成,可快速完成开发任务 | ||||||
|  | - 代码生成器是用的Velocity模版引擎,如果需要可以在ym-generator模块中进行vm模板的修改和一些包名等基础修改 | ||||||
|  | <br> | ||||||
|  |  | ||||||
|  | **新增业务模块需要注意** | ||||||
|  | - 新增业务模块时,业务模块需要依赖ym-admin,并且ym-gateway模块maven需要依赖新建模块 | ||||||
|  | - 自动生成的controller接口都带鉴权注解,如果开发阶段可以先注释掉,后面开发完成之后再把鉴权添加到数据库 | ||||||
|  | <br> | ||||||
|  |  | ||||||
|  | **技术选型:** | ||||||
|  | - 核心框架:Spring Boot 2.7 | ||||||
|  | - 安全框架:Spring Security  | ||||||
|  | - 持久层框架:MyBatis 3.5 | ||||||
|  | - 定时器:Quartz 2.3 | ||||||
|  | - 数据库连接池:HikariCP  | ||||||
|  | - 日志管理:log4j2 | ||||||
|  | - 页面交互:Vue2.x | ||||||
|  |  | ||||||
|  | <br> | ||||||
|  |  | ||||||
|  | **软件需求** | ||||||
|  | - JDK1.8 | ||||||
|  | - Maven3.0+ | ||||||
|  | - MySQL8.0 | ||||||
|  | - redis6.0+ | ||||||
|  | <br> | ||||||
							
								
								
									
										35
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								pom.xml
									
									
									
									
									
								
							| @@ -15,6 +15,8 @@ | |||||||
|         <module>ym-baisc</module> |         <module>ym-baisc</module> | ||||||
|         <module>ym-schedule-task</module> |         <module>ym-schedule-task</module> | ||||||
|         <module>ym-influx</module> |         <module>ym-influx</module> | ||||||
|  |         <module>ym-quality-planning</module> | ||||||
|  |         <module>ym-process-inspection</module> | ||||||
|     </modules> |     </modules> | ||||||
|     <packaging>pom</packaging> |     <packaging>pom</packaging> | ||||||
|  |  | ||||||
| @@ -33,7 +35,7 @@ | |||||||
|         <java.version>1.8</java.version> |         <java.version>1.8</java.version> | ||||||
|         <junit.version>4.13.2</junit.version> |         <junit.version>4.13.2</junit.version> | ||||||
|         <jedis.version>4.2.2</jedis.version> |         <jedis.version>4.2.2</jedis.version> | ||||||
| <!--        <druid.version>1.2.9</druid.version>--> |         <druid.version>1.2.9</druid.version> | ||||||
|         <mybatisplus.version>3.5.1</mybatisplus.version> |         <mybatisplus.version>3.5.1</mybatisplus.version> | ||||||
|         <sqlserver.version>4.0</sqlserver.version> |         <sqlserver.version>4.0</sqlserver.version> | ||||||
|         <oracle.version>11.2.0.3</oracle.version> |         <oracle.version>11.2.0.3</oracle.version> | ||||||
| @@ -92,17 +94,17 @@ | |||||||
|         </dependency> |         </dependency> | ||||||
|  |  | ||||||
|         <!-- influx start--> |         <!-- influx start--> | ||||||
|         <dependency> | <!--        <dependency>--> | ||||||
|             <groupId>org.springframework.boot</groupId> | <!--            <groupId>org.springframework.boot</groupId>--> | ||||||
|             <artifactId>spring-boot-actuator-autoconfigure</artifactId> | <!--            <artifactId>spring-boot-actuator-autoconfigure</artifactId>--> | ||||||
|             <optional>true</optional> | <!--            <optional>true</optional>--> | ||||||
|             <exclusions> | <!--            <exclusions>--> | ||||||
|                 <exclusion> | <!--                <exclusion>--> | ||||||
|                     <groupId>com.fasterxml.jackson.core</groupId> | <!--                    <groupId>com.fasterxml.jackson.core</groupId>--> | ||||||
|                     <artifactId>jackson-databind</artifactId> | <!--                    <artifactId>jackson-databind</artifactId>--> | ||||||
|                 </exclusion> | <!--                </exclusion>--> | ||||||
|             </exclusions> | <!--            </exclusions>--> | ||||||
|         </dependency> | <!--        </dependency>--> | ||||||
|  |  | ||||||
|         <!-- influx end--> |         <!-- influx end--> | ||||||
|  |  | ||||||
| @@ -134,9 +136,14 @@ | |||||||
|             <artifactId>postgresql</artifactId> |             <artifactId>postgresql</artifactId> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.springframework.boot</groupId> |             <groupId>com.alibaba</groupId> | ||||||
|             <artifactId>spring-boot-starter-data-jdbc</artifactId> |             <artifactId>druid-spring-boot-starter</artifactId> | ||||||
|  |             <version>${druid.version}</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|  | <!--        <dependency>--> | ||||||
|  | <!--            <groupId>org.springframework.boot</groupId>--> | ||||||
|  | <!--            <artifactId>spring-boot-starter-data-jdbc</artifactId>--> | ||||||
|  | <!--        </dependency>--> | ||||||
|  |  | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>cn.afterturn</groupId> |             <groupId>cn.afterturn</groupId> | ||||||
|   | |||||||
| @@ -15,6 +15,7 @@ CREATE TABLE sys_user ( | |||||||
|   create_date datetime COMMENT '创建时间', |   create_date datetime COMMENT '创建时间', | ||||||
|   updater bigint COMMENT '更新者', |   updater bigint COMMENT '更新者', | ||||||
|   update_date datetime COMMENT '更新时间', |   update_date datetime COMMENT '更新时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   unique key uk_username (username), |   unique key uk_username (username), | ||||||
|   key idx_create_date (create_date) |   key idx_create_date (create_date) | ||||||
| @@ -31,6 +32,7 @@ CREATE TABLE sys_dept ( | |||||||
|   create_date datetime COMMENT '创建时间', |   create_date datetime COMMENT '创建时间', | ||||||
|   updater bigint COMMENT '更新者', |   updater bigint COMMENT '更新者', | ||||||
|   update_date datetime COMMENT '更新时间', |   update_date datetime COMMENT '更新时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   key idx_pid (pid), |   key idx_pid (pid), | ||||||
|   key idx_sort (sort) |   key idx_sort (sort) | ||||||
| @@ -47,6 +49,7 @@ create table sys_role | |||||||
|   create_date          datetime COMMENT '创建时间', |   create_date          datetime COMMENT '创建时间', | ||||||
|   updater              bigint COMMENT '更新者', |   updater              bigint COMMENT '更新者', | ||||||
|   update_date          datetime COMMENT '更新时间', |   update_date          datetime COMMENT '更新时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   key idx_dept_id (dept_id) |   key idx_dept_id (dept_id) | ||||||
| )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='角色管理'; | )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='角色管理'; | ||||||
| @@ -66,6 +69,7 @@ create table sys_menu | |||||||
|   create_date          datetime COMMENT '创建时间', |   create_date          datetime COMMENT '创建时间', | ||||||
|   updater              bigint COMMENT '更新者', |   updater              bigint COMMENT '更新者', | ||||||
|   update_date          datetime COMMENT '更新时间', |   update_date          datetime COMMENT '更新时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   key idx_pid (pid), |   key idx_pid (pid), | ||||||
|   key idx_sort (sort) |   key idx_sort (sort) | ||||||
| @@ -79,6 +83,7 @@ create table sys_role_user | |||||||
|   user_id              bigint COMMENT '用户ID', |   user_id              bigint COMMENT '用户ID', | ||||||
|   creator              bigint COMMENT '创建者', |   creator              bigint COMMENT '创建者', | ||||||
|   create_date          datetime COMMENT '创建时间', |   create_date          datetime COMMENT '创建时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   key idx_role_id (role_id), |   key idx_role_id (role_id), | ||||||
|   key idx_user_id (user_id) |   key idx_user_id (user_id) | ||||||
| @@ -92,6 +97,7 @@ create table sys_role_menu | |||||||
|   menu_id              bigint COMMENT '菜单ID', |   menu_id              bigint COMMENT '菜单ID', | ||||||
|   creator              bigint COMMENT '创建者', |   creator              bigint COMMENT '创建者', | ||||||
|   create_date          datetime COMMENT '创建时间', |   create_date          datetime COMMENT '创建时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   key idx_role_id (role_id), |   key idx_role_id (role_id), | ||||||
|   key idx_menu_id (menu_id) |   key idx_menu_id (menu_id) | ||||||
| @@ -105,6 +111,7 @@ create table sys_role_data_scope | |||||||
|   dept_id              bigint COMMENT '部门ID', |   dept_id              bigint COMMENT '部门ID', | ||||||
|   creator              bigint COMMENT '创建者', |   creator              bigint COMMENT '创建者', | ||||||
|   create_date          datetime COMMENT '创建时间', |   create_date          datetime COMMENT '创建时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   key idx_role_id (role_id) |   key idx_role_id (role_id) | ||||||
| )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='角色数据权限'; | )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='角色数据权限'; | ||||||
| @@ -121,6 +128,7 @@ create table sys_params | |||||||
|   create_date          datetime COMMENT '创建时间', |   create_date          datetime COMMENT '创建时间', | ||||||
|   updater              bigint COMMENT '更新者', |   updater              bigint COMMENT '更新者', | ||||||
|   update_date          datetime COMMENT '更新时间', |   update_date          datetime COMMENT '更新时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   unique key uk_param_code (param_code), |   unique key uk_param_code (param_code), | ||||||
|   key idx_create_date (create_date) |   key idx_create_date (create_date) | ||||||
| @@ -138,6 +146,7 @@ create table sys_dict_type | |||||||
|     create_date          datetime COMMENT '创建时间', |     create_date          datetime COMMENT '创建时间', | ||||||
|     updater              bigint COMMENT '更新者', |     updater              bigint COMMENT '更新者', | ||||||
|     update_date          datetime COMMENT '更新时间', |     update_date          datetime COMMENT '更新时间', | ||||||
|  |     valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|     primary key (id), |     primary key (id), | ||||||
|     UNIQUE KEY(dict_type) |     UNIQUE KEY(dict_type) | ||||||
| )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='字典类型'; | )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='字典类型'; | ||||||
| @@ -155,6 +164,7 @@ create table sys_dict_data | |||||||
|     create_date          datetime COMMENT '创建时间', |     create_date          datetime COMMENT '创建时间', | ||||||
|     updater              bigint COMMENT '更新者', |     updater              bigint COMMENT '更新者', | ||||||
|     update_date          datetime COMMENT '更新时间', |     update_date          datetime COMMENT '更新时间', | ||||||
|  |     valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|     primary key (id), |     primary key (id), | ||||||
|     unique key uk_dict_type_value (dict_type_id, dict_value), |     unique key uk_dict_type_value (dict_type_id, dict_value), | ||||||
|     key idx_sort (sort) |     key idx_sort (sort) | ||||||
| @@ -171,6 +181,7 @@ create table sys_log_login | |||||||
|   creator_name         varchar(50) COMMENT '用户名', |   creator_name         varchar(50) COMMENT '用户名', | ||||||
|   creator              bigint COMMENT '创建者', |   creator              bigint COMMENT '创建者', | ||||||
|   create_date          datetime COMMENT '创建时间', |   create_date          datetime COMMENT '创建时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   key idx_status (status), |   key idx_status (status), | ||||||
|   key idx_create_date (create_date) |   key idx_create_date (create_date) | ||||||
| @@ -191,6 +202,7 @@ create table sys_log_operation | |||||||
|   creator_name         varchar(50) COMMENT '用户名', |   creator_name         varchar(50) COMMENT '用户名', | ||||||
|   creator              bigint COMMENT '创建者', |   creator              bigint COMMENT '创建者', | ||||||
|   create_date          datetime COMMENT '创建时间', |   create_date          datetime COMMENT '创建时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   key idx_create_date (create_date) |   key idx_create_date (create_date) | ||||||
| )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='操作日志'; | )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='操作日志'; | ||||||
| @@ -207,6 +219,7 @@ create table sys_log_error | |||||||
|   error_info           text COMMENT '异常信息', |   error_info           text COMMENT '异常信息', | ||||||
|   creator              bigint COMMENT '创建者', |   creator              bigint COMMENT '创建者', | ||||||
|   create_date          datetime COMMENT '创建时间', |   create_date          datetime COMMENT '创建时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   primary key (id), |   primary key (id), | ||||||
|   key idx_create_date (create_date) |   key idx_create_date (create_date) | ||||||
| )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='异常日志'; | )ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='异常日志'; | ||||||
| @@ -218,6 +231,7 @@ CREATE TABLE sys_oss ( | |||||||
|   url varchar(200) COMMENT 'URL地址', |   url varchar(200) COMMENT 'URL地址', | ||||||
|   creator bigint COMMENT '创建者', |   creator bigint COMMENT '创建者', | ||||||
|   create_date datetime COMMENT '创建时间', |   create_date datetime COMMENT '创建时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   PRIMARY KEY (id), |   PRIMARY KEY (id), | ||||||
|   key idx_create_date (create_date) |   key idx_create_date (create_date) | ||||||
| ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='文件上传'; | ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='文件上传'; | ||||||
| @@ -234,6 +248,7 @@ CREATE TABLE schedule_job ( | |||||||
|   create_date datetime COMMENT '创建时间', |   create_date datetime COMMENT '创建时间', | ||||||
|   updater bigint COMMENT '更新者', |   updater bigint COMMENT '更新者', | ||||||
|   update_date datetime COMMENT '更新时间', |   update_date datetime COMMENT '更新时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   PRIMARY KEY (id), |   PRIMARY KEY (id), | ||||||
|   key idx_create_date (create_date) |   key idx_create_date (create_date) | ||||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='定时任务'; | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='定时任务'; | ||||||
| @@ -248,6 +263,7 @@ CREATE TABLE schedule_job_log ( | |||||||
|   error varchar(2000) DEFAULT NULL COMMENT '失败信息', |   error varchar(2000) DEFAULT NULL COMMENT '失败信息', | ||||||
|   times int NOT NULL COMMENT '耗时(单位:毫秒)', |   times int NOT NULL COMMENT '耗时(单位:毫秒)', | ||||||
|   create_date datetime COMMENT '创建时间', |   create_date datetime COMMENT '创建时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   PRIMARY KEY (id), |   PRIMARY KEY (id), | ||||||
|   key idx_job_id (job_id), |   key idx_job_id (job_id), | ||||||
|   key idx_create_date (create_date) |   key idx_create_date (create_date) | ||||||
| @@ -261,6 +277,7 @@ CREATE TABLE sys_user_token ( | |||||||
|   expire_date datetime COMMENT '过期时间', |   expire_date datetime COMMENT '过期时间', | ||||||
|   update_date datetime COMMENT '更新时间', |   update_date datetime COMMENT '更新时间', | ||||||
|   create_date datetime COMMENT '创建时间', |   create_date datetime COMMENT '创建时间', | ||||||
|  |   valid tinyint COMMENT '删除标识,是否有效:1可用  0不可用', | ||||||
|   PRIMARY KEY (id), |   PRIMARY KEY (id), | ||||||
|   UNIQUE KEY user_id (user_id), |   UNIQUE KEY user_id (user_id), | ||||||
|   UNIQUE KEY token (token) |   UNIQUE KEY token (token) | ||||||
|   | |||||||
| @@ -21,6 +21,7 @@ import org.springframework.stereotype.Component; | |||||||
|  |  | ||||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||||
| import java.lang.reflect.Method; | import java.lang.reflect.Method; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @Author weihongyang |  * @Author weihongyang | ||||||
| @@ -78,6 +79,7 @@ public class LogOperationAspect { | |||||||
|         LoginUser loginUser = (LoginUser) authentication.getPrincipal(); |         LoginUser loginUser = (LoginUser) authentication.getPrincipal(); | ||||||
|         if(loginUser != null){ |         if(loginUser != null){ | ||||||
|             log.setCreatorName(loginUser.getUsername()); |             log.setCreatorName(loginUser.getUsername()); | ||||||
|  |             log.setCreator(loginUser.getSysUserEntity().getCreator()); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         log.setStatus(status); |         log.setStatus(status); | ||||||
| @@ -89,6 +91,7 @@ public class LogOperationAspect { | |||||||
|         log.setUserAgent(request.getHeader(HttpHeaders.USER_AGENT)); |         log.setUserAgent(request.getHeader(HttpHeaders.USER_AGENT)); | ||||||
|         log.setRequestUri(request.getRequestURI()); |         log.setRequestUri(request.getRequestURI()); | ||||||
|         log.setRequestMethod(request.getMethod()); |         log.setRequestMethod(request.getMethod()); | ||||||
|  |         log.setCreateDate(new Date()); | ||||||
|  |  | ||||||
|         //请求参数 |         //请求参数 | ||||||
|         Object[] args = joinPoint.getArgs(); |         Object[] args = joinPoint.getArgs(); | ||||||
|   | |||||||
							
								
								
									
										18
									
								
								ym-admin/src/main/java/com/cnbm/admin/basic/BaseParam.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								ym-admin/src/main/java/com/cnbm/admin/basic/BaseParam.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (c) 2018. | ||||||
|  |  * http://www.ulabcare.com | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | package com.cnbm.admin.basic; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 接口请求参数基类 | ||||||
|  |  * | ||||||
|  |  * @author jiff | ||||||
|  |  * @date 2018/11/1 | ||||||
|  |  * @since 1.0 | ||||||
|  |  */ | ||||||
|  | public class BaseParam implements Serializable { | ||||||
|  | } | ||||||
| @@ -0,0 +1,29 @@ | |||||||
|  | package com.cnbm.admin.config; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; | ||||||
|  | import com.cnbm.common.interceptor.DataFilterInterceptor; | ||||||
|  | import org.springframework.context.annotation.Bean; | ||||||
|  | import org.springframework.context.annotation.Configuration; | ||||||
|  |  | ||||||
|  | @Configuration | ||||||
|  | public class MybatisPlusConfig { | ||||||
|  |  | ||||||
|  |     @Bean | ||||||
|  |     public MybatisPlusInterceptor mybatisPlusInterceptor() { | ||||||
|  |         MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor(); | ||||||
|  |         // 数据权限 | ||||||
|  |         mybatisPlusInterceptor.addInnerInterceptor(new DataFilterInterceptor()); | ||||||
|  |         // 分页插件 | ||||||
|  |         mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor()); | ||||||
|  |         // 乐观锁 | ||||||
|  |         mybatisPlusInterceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor()); | ||||||
|  |         // 防止全表更新与删除 | ||||||
|  |         mybatisPlusInterceptor.addInnerInterceptor(new BlockAttackInnerInterceptor()); | ||||||
|  |  | ||||||
|  |         return mybatisPlusInterceptor; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -73,6 +73,10 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { | |||||||
|                         "/webjars/**", |                         "/webjars/**", | ||||||
|                         "/websocket/**", |                         "/websocket/**", | ||||||
|                         "/influx/**", |                         "/influx/**", | ||||||
|  |  | ||||||
|  | //                        "/basic/**", | ||||||
|  | //                        "/qualityPlanning/**", | ||||||
|  | //                        "/processInspection/**", | ||||||
|                         "/captcha").anonymous() |                         "/captcha").anonymous() | ||||||
| //                .antMatchers("/testCors").hasAuthority("system:dept:list222") | //                .antMatchers("/testCors").hasAuthority("system:dept:list222") | ||||||
|                 // 除上面外的所有请求全部需要鉴权认证 |                 // 除上面外的所有请求全部需要鉴权认证 | ||||||
|   | |||||||
| @@ -6,6 +6,7 @@ import com.cnbm.admin.service.CaptchaService; | |||||||
| import com.cnbm.admin.service.LoginService; | import com.cnbm.admin.service.LoginService; | ||||||
| import com.cnbm.admin.utils.ResponseResult; | import com.cnbm.admin.utils.ResponseResult; | ||||||
| import com.cnbm.common.exception.ErrorCode; | import com.cnbm.common.exception.ErrorCode; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
| import com.cnbm.common.validator.AssertUtils; | import com.cnbm.common.validator.AssertUtils; | ||||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||||
| @@ -52,13 +53,16 @@ public class LoginController { | |||||||
|  |  | ||||||
|     @PostMapping("/login") |     @PostMapping("/login") | ||||||
|     @ApiOperation(value = "登录") |     @ApiOperation(value = "登录") | ||||||
|     public ResponseResult login(HttpServletRequest request, @RequestBody LoginParam loginParam) { |     public Result login(HttpServletRequest request, @RequestBody LoginParam loginParam) { | ||||||
|         return loginService.login(request,loginParam); |         return loginService.login(request,loginParam); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @PostMapping("/doLogout") |     @PostMapping("logout") | ||||||
|     @ApiOperation(value = "退出") |     @ApiOperation(value = "退出") | ||||||
|     public void logout(){ |     public Result logout(HttpServletRequest request){ | ||||||
|  |         loginService.logout(request); | ||||||
|  |         return new Result(); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -40,10 +40,11 @@ public class SysDictDataController { | |||||||
|             @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , |             @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|             @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , |             @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|             @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) , |             @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |             @ApiImplicitParam(name = "dictTypeId", value = "字典类型id", paramType = "query", dataTypeClass = String.class), | ||||||
|             @ApiImplicitParam(name = "dictLabel", value = "字典标签", paramType = "query", dataTypeClass=String.class), |             @ApiImplicitParam(name = "dictLabel", value = "字典标签", paramType = "query", dataTypeClass=String.class), | ||||||
|             @ApiImplicitParam(name = "dictValue", value = "字典值", paramType = "query", dataTypeClass=String.class) |             @ApiImplicitParam(name = "dictValue", value = "字典值", paramType = "query", dataTypeClass=String.class) | ||||||
|     }) |     }) | ||||||
|     @PreAuthorize("@ex.hasAuthority('sys:dept:page')") |     @PreAuthorize("@ex.hasAuthority('sys:dict:page')") | ||||||
|     public Result<PageData<SysDictDataDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ |     public Result<PageData<SysDictDataDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|         //字典类型 |         //字典类型 | ||||||
|         PageData<SysDictDataDTO> page = sysDictDataService.page(params); |         PageData<SysDictDataDTO> page = sysDictDataService.page(params); | ||||||
|   | |||||||
| @@ -0,0 +1,69 @@ | |||||||
|  | package com.cnbm.admin.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.dto.SysLogLoginDTO; | ||||||
|  | import com.cnbm.admin.execl.SysLogLoginExcel; | ||||||
|  | import com.cnbm.admin.service.SysLogLoginService; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import lombok.extern.log4j.Log4j2; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.web.bind.annotation.GetMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RequestParam; | ||||||
|  | import org.springframework.web.bind.annotation.RestController; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("sys/log/login") | ||||||
|  | @Api(tags="登录日志") | ||||||
|  | @Log4j2 | ||||||
|  | public class SysLogLoginController { | ||||||
|  |     @Autowired | ||||||
|  |     private SysLogLoginService sysLogLoginService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |             @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |             @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |             @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |             @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |             @ApiImplicitParam(name = "status", value = "状态  0:失败    1:成功    2:账号已锁定", paramType = "query", dataTypeClass=Integer.class), | ||||||
|  |             @ApiImplicitParam(name = "creatorName", value = "用户名", paramType = "query", dataTypeClass=String.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('sys:log:login')") | ||||||
|  |     public Result<PageData<SysLogLoginDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<SysLogLoginDTO> page = sysLogLoginService.page(params); | ||||||
|  |  | ||||||
|  |         log.info("PageData<SysLogLoginDTO>====={}",page.toString()); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<SysLogLoginDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |             @ApiImplicitParam(name = "status", value = "状态  0:失败    1:成功    2:账号已锁定", paramType = "query", dataTypeClass=Integer.class), | ||||||
|  |             @ApiImplicitParam(name = "creatorName", value = "用户名", paramType = "query", dataTypeClass=String.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('sys:log:login')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<SysLogLoginDTO> list = sysLogLoginService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, null, list, SysLogLoginExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -44,13 +44,13 @@ public class SysRoleController { | |||||||
|  |  | ||||||
|     @GetMapping("page") |     @GetMapping("page") | ||||||
|     @ApiOperation("分页") |     @ApiOperation("分页") | ||||||
|     @ApiImplicitParams({ | //    @ApiImplicitParams({ | ||||||
|             @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | //            @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|             @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | //            @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|             @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | //            @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|             @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) , | //            @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) , | ||||||
|             @ApiImplicitParam(name = "name", value = "角色名", paramType = "query", dataTypeClass=String.class) | //            @ApiImplicitParam(name = "name", value = "角色名", paramType = "query", dataTypeClass=String.class) | ||||||
|     }) | //    }) | ||||||
|     @PreAuthorize("@ex.hasAuthority('sys:role:page')") |     @PreAuthorize("@ex.hasAuthority('sys:role:page')") | ||||||
|     public Result<PageData<SysRoleDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ |     public Result<PageData<SysRoleDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|         PageData<SysRoleDTO> page = sysRoleService.page(params); |         PageData<SysRoleDTO> page = sysRoleService.page(params); | ||||||
|   | |||||||
| @@ -160,4 +160,10 @@ public class SysUserController { | |||||||
|  |  | ||||||
|         ExcelUtils.exportExcelToTarget(response, null, list, SysUserExcel.class); |         ExcelUtils.exportExcelToTarget(response, null, list, SysUserExcel.class); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取用户列表") | ||||||
|  |     @LogOperation("获取用户列表") | ||||||
|  |     public List<SysUserDTO> list(@ApiIgnore @RequestParam Map<String, Object> params) { | ||||||
|  |         return sysUserService.list(params); } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -0,0 +1,10 @@ | |||||||
|  | package com.cnbm.admin.dao; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.entity.SysLogLoginEntity; | ||||||
|  | import com.cnbm.common.dao.BaseDao; | ||||||
|  | import org.apache.ibatis.annotations.Mapper; | ||||||
|  |  | ||||||
|  | @Mapper | ||||||
|  | public interface SysLogLoginDao extends BaseDao<SysLogLoginEntity> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,36 @@ | |||||||
|  | package com.cnbm.admin.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "登录日志") | ||||||
|  | public class SysLogLoginDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "用户操作  0:用户登录   1:用户退出") | ||||||
|  |     private Integer operation; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "状态  0:失败    1:成功    2:账号已锁定") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "用户代理") | ||||||
|  |     private String userAgent; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "操作IP") | ||||||
|  |     private String ip; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "用户名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "创建时间") | ||||||
|  |     private Date createDate; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -1,16 +1,19 @@ | |||||||
| package com.cnbm.admin.entity; | package com.cnbm.admin.entity; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonIgnore; | import java.io.Serializable; | ||||||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | import java.util.Collection; | ||||||
| import lombok.Data; | import java.util.List; | ||||||
| import lombok.NoArgsConstructor; | import java.util.stream.Collectors; | ||||||
|  |  | ||||||
| import org.springframework.security.core.GrantedAuthority; | import org.springframework.security.core.GrantedAuthority; | ||||||
| import org.springframework.security.core.authority.SimpleGrantedAuthority; | import org.springframework.security.core.authority.SimpleGrantedAuthority; | ||||||
| import org.springframework.security.core.userdetails.UserDetails; | import org.springframework.security.core.userdetails.UserDetails; | ||||||
|  |  | ||||||
| import java.util.Collection; | import com.fasterxml.jackson.annotation.JsonIgnore; | ||||||
| import java.util.List; | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||||||
| import java.util.stream.Collectors; |  | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @Author weihongyang |  * @Author weihongyang | ||||||
| @@ -20,7 +23,9 @@ import java.util.stream.Collectors; | |||||||
| @Data | @Data | ||||||
| @NoArgsConstructor | @NoArgsConstructor | ||||||
| @JsonIgnoreProperties(ignoreUnknown = true) | @JsonIgnoreProperties(ignoreUnknown = true) | ||||||
| public class LoginUser implements UserDetails { | public class LoginUser implements UserDetails,Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|     private SysUserEntity sysUserEntity; |     private SysUserEntity sysUserEntity; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -0,0 +1,35 @@ | |||||||
|  | package com.cnbm.admin.entity; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import com.cnbm.common.entity.BaseEntity; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper=false) | ||||||
|  | @TableName("sys_log_login") | ||||||
|  | public class SysLogLoginEntity extends BaseEntity { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 用户操作   0:用户登录   1:用户退出 | ||||||
|  |      */ | ||||||
|  |     private Integer operation; | ||||||
|  |     /** | ||||||
|  |      * 状态  0:失败    1:成功    2:账号已锁定 | ||||||
|  |      */ | ||||||
|  |     private Integer status; | ||||||
|  |     /** | ||||||
|  |      * 用户代理 | ||||||
|  |      */ | ||||||
|  |     private String userAgent; | ||||||
|  |     /** | ||||||
|  |      * 操作IP | ||||||
|  |      */ | ||||||
|  |     private String ip; | ||||||
|  |     /** | ||||||
|  |      * 用户名 | ||||||
|  |      */ | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,22 @@ | |||||||
|  | package com.cnbm.admin.enums; | ||||||
|  |  | ||||||
|  | public enum LoginOperationEnum { | ||||||
|  |     /** | ||||||
|  |      * 用户登录 | ||||||
|  |      */ | ||||||
|  |     LOGIN(0), | ||||||
|  |     /** | ||||||
|  |      * 用户退出 | ||||||
|  |      */ | ||||||
|  |     LOGOUT(1); | ||||||
|  |  | ||||||
|  |     private int value; | ||||||
|  |  | ||||||
|  |     LoginOperationEnum(int value) { | ||||||
|  |         this.value = value; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public int value() { | ||||||
|  |         return this.value; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -0,0 +1,26 @@ | |||||||
|  | package com.cnbm.admin.enums; | ||||||
|  |  | ||||||
|  | public enum LoginStatusEnum { | ||||||
|  |     /** | ||||||
|  |      * 失败 | ||||||
|  |      */ | ||||||
|  |     FAIL(0), | ||||||
|  |     /** | ||||||
|  |      * 成功 | ||||||
|  |      */ | ||||||
|  |     SUCCESS(1), | ||||||
|  |     /** | ||||||
|  |      * 账号已锁定 | ||||||
|  |      */ | ||||||
|  |     LOCK(2); | ||||||
|  |  | ||||||
|  |     private int value; | ||||||
|  |  | ||||||
|  |     LoginStatusEnum(int value) { | ||||||
|  |         this.value = value; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public int value() { | ||||||
|  |         return this.value; | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										52
									
								
								ym-admin/src/main/java/com/cnbm/admin/enums/WhetherEnum.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								ym-admin/src/main/java/com/cnbm/admin/enums/WhetherEnum.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,52 @@ | |||||||
|  | package com.cnbm.admin.enums; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 是、否有效枚举 | ||||||
|  |  * </P> | ||||||
|  |  * | ||||||
|  |  * @author xcc | ||||||
|  |  * @date 2022年7月5日 | ||||||
|  |  * @since 1.0 | ||||||
|  |  */ | ||||||
|  | public enum WhetherEnum { | ||||||
|  |  | ||||||
|  |     NO(0, "否"), | ||||||
|  |  | ||||||
|  |     YES(1, "是"); | ||||||
|  |  | ||||||
|  |     private final Integer value; | ||||||
|  |     private final String label; | ||||||
|  |     private final String remark; | ||||||
|  |  | ||||||
|  |     WhetherEnum(final int value, final String label) { | ||||||
|  |         this(value, label, null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     WhetherEnum(final int value, final String label, final String remark) { | ||||||
|  |         this.value = value; | ||||||
|  |         this.label = label; | ||||||
|  |         this.remark = remark; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * @return 数据值 | ||||||
|  |      */ | ||||||
|  |     public Integer getValue() { | ||||||
|  |         return value; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * @return 标签名 | ||||||
|  |      */ | ||||||
|  |     public String getLabel() { | ||||||
|  |         return label; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * @return 备注 | ||||||
|  |      */ | ||||||
|  |     public String getRemark() { | ||||||
|  |         return remark; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -0,0 +1,24 @@ | |||||||
|  | package com.cnbm.admin.execl; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | public class SysLogLoginExcel { | ||||||
|  |     @Excel(name = "用户操作") | ||||||
|  |     private String operation; | ||||||
|  |     @Excel(name = "状态", replace = {"失败_0", "成功_1", "账号已锁定_1"}) | ||||||
|  |     private Integer status; | ||||||
|  |     @Excel(name = "User-Agent") | ||||||
|  |     private String userAgent; | ||||||
|  |     @Excel(name = "操作IP") | ||||||
|  |     private String ip; | ||||||
|  |     @Excel(name = "用户名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间", format = "yyyy-MM-dd HH:mm:ss") | ||||||
|  |     private Date createDate; | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
							
								
								
									
										36
									
								
								ym-admin/src/main/java/com/cnbm/admin/params/IdParam.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								ym-admin/src/main/java/com/cnbm/admin/params/IdParam.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (c) 2018. | ||||||
|  |  * http://www.ulabcare.com | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | package com.cnbm.admin.params; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.basic.BaseParam; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Builder; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
|  | import javax.validation.constraints.NotNull; | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 主键请求参数对象 | ||||||
|  |  * | ||||||
|  |  * @author jiff | ||||||
|  |  * @date 2018/11/9 | ||||||
|  |  * @since 1.0 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel("主键参数对象") | ||||||
|  | public class IdParam implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @NotNull(message = "主键不能为空") | ||||||
|  |     @ApiModelProperty(value = "主键", required = true, example = "1", notes = "根据实际接口传递不同对象的主键") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| package com.cnbm.admin.service; | package com.cnbm.admin.service; | ||||||
|  |  | ||||||
| import com.cnbm.admin.params.LoginParam; | import com.cnbm.admin.params.LoginParam; | ||||||
| import com.cnbm.admin.utils.ResponseResult; | import com.cnbm.common.utils.Result; | ||||||
|  |  | ||||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||||
|  |  | ||||||
| @@ -12,6 +12,8 @@ import javax.servlet.http.HttpServletRequest; | |||||||
|  */ |  */ | ||||||
| public interface LoginService { | public interface LoginService { | ||||||
|  |  | ||||||
|     ResponseResult login(HttpServletRequest request, LoginParam loginParam); |     Result login(HttpServletRequest request, LoginParam loginParam); | ||||||
|  |  | ||||||
|  |     void logout(HttpServletRequest request); | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -0,0 +1,18 @@ | |||||||
|  | package com.cnbm.admin.service; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.dto.SysLogLoginDTO; | ||||||
|  | import com.cnbm.admin.entity.SysLogLoginEntity; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.service.BaseService; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | public interface SysLogLoginService extends BaseService<SysLogLoginEntity> { | ||||||
|  |  | ||||||
|  |     PageData<SysLogLoginDTO> page(Map<String, Object> params); | ||||||
|  |  | ||||||
|  |     List<SysLogLoginDTO> list(Map<String, Object> params); | ||||||
|  |  | ||||||
|  |     void save(SysLogLoginEntity entity); | ||||||
|  | } | ||||||
| @@ -1,14 +1,22 @@ | |||||||
| package com.cnbm.admin.service.impl; | package com.cnbm.admin.service.impl; | ||||||
|  |  | ||||||
| import com.cnbm.admin.entity.LoginUser; | import com.cnbm.admin.entity.LoginUser; | ||||||
|  | import com.cnbm.admin.entity.SysLogLoginEntity; | ||||||
|  | import com.cnbm.admin.enums.LoginOperationEnum; | ||||||
|  | import com.cnbm.admin.enums.LoginStatusEnum; | ||||||
| import com.cnbm.admin.params.LoginParam; | import com.cnbm.admin.params.LoginParam; | ||||||
| import com.cnbm.admin.service.CaptchaService; | import com.cnbm.admin.service.CaptchaService; | ||||||
|  | import com.cnbm.admin.service.SysLogLoginService; | ||||||
| import com.cnbm.admin.utils.JwtUtil; | import com.cnbm.admin.utils.JwtUtil; | ||||||
| import com.cnbm.admin.service.LoginService; | import com.cnbm.admin.service.LoginService; | ||||||
| import com.cnbm.admin.utils.ResponseResult; | import com.cnbm.admin.utils.ResponseResult; | ||||||
| import com.cnbm.common.exception.ErrorCode; | import com.cnbm.common.exception.ErrorCode; | ||||||
|  | import com.cnbm.common.utils.IpUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  |  | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
| import org.springframework.data.redis.core.RedisTemplate; | import org.springframework.data.redis.core.RedisTemplate; | ||||||
|  | import org.springframework.http.HttpHeaders; | ||||||
| import org.springframework.security.authentication.AuthenticationManager; | import org.springframework.security.authentication.AuthenticationManager; | ||||||
| import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; | ||||||
| import org.springframework.security.core.Authentication; | import org.springframework.security.core.Authentication; | ||||||
| @@ -16,6 +24,7 @@ import org.springframework.security.core.context.SecurityContextHolder; | |||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.Date; | ||||||
| import java.util.HashMap; | import java.util.HashMap; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
| import java.util.Objects; | import java.util.Objects; | ||||||
| @@ -37,16 +46,30 @@ public class LoginServiceImpl implements LoginService { | |||||||
|     @Autowired |     @Autowired | ||||||
|     private CaptchaService captchaService; |     private CaptchaService captchaService; | ||||||
|  |  | ||||||
|  |     @Autowired | ||||||
|  |     private SysLogLoginService sysLogLoginService; | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public ResponseResult login(HttpServletRequest request, LoginParam loginParam) { |     public Result login(HttpServletRequest request, LoginParam loginParam) { | ||||||
|         //验证码是否正确 |         //验证码是否正确 | ||||||
|         boolean flag = captchaService.validate(loginParam.getUuid(), loginParam.getCaptcha()); |         boolean flag = captchaService.validate(loginParam.getUuid(), loginParam.getCaptcha()); | ||||||
|         if(!flag){ |         if(!flag){ | ||||||
|             return new ResponseResult(ErrorCode.CAPTCHA_ERROR,"验证码错误"); |             return new Result<>().error(ErrorCode.CAPTCHA_ERROR, "验证码错误"); | ||||||
|         } |         } | ||||||
|         UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginParam.getUsername(),loginParam.getPassword()); |         UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginParam.getUsername(),loginParam.getPassword()); | ||||||
|         Authentication authenticate = authenticationManager.authenticate(authenticationToken); |         Authentication authenticate = authenticationManager.authenticate(authenticationToken); | ||||||
|  |         //登录日志 | ||||||
|  |         SysLogLoginEntity log = new SysLogLoginEntity(); | ||||||
|  |         log.setOperation(LoginOperationEnum.LOGIN.value()); | ||||||
|  |         log.setCreateDate(new Date()); | ||||||
|  |         log.setIp(IpUtils.getIpAddr(request)); | ||||||
|  |         log.setUserAgent(request.getHeader(HttpHeaders.USER_AGENT)); | ||||||
|  |         log.setCreatorName(loginParam.getUsername()); | ||||||
|  |  | ||||||
|         if (Objects.isNull(authenticate)) { |         if (Objects.isNull(authenticate)) { | ||||||
|  |             log.setStatus(LoginStatusEnum.FAIL.value()); | ||||||
|  |             log.setCreatorName(loginParam.getUsername()); | ||||||
|  |             sysLogLoginService.save(log); | ||||||
|             throw new RuntimeException("登录失败"); |             throw new RuntimeException("登录失败"); | ||||||
|         } |         } | ||||||
|         //如果认证通过了,使用userid生成一个jwt jwt存入ResponseResult返回 |         //如果认证通过了,使用userid生成一个jwt jwt存入ResponseResult返回 | ||||||
| @@ -57,7 +80,33 @@ public class LoginServiceImpl implements LoginService { | |||||||
|         map.put("token",jwt); |         map.put("token",jwt); | ||||||
|         //把完整的用户信息存入redis  userid作为key |         //把完整的用户信息存入redis  userid作为key | ||||||
|         redisTemplate.opsForValue().set("login:"+userid,loginUser); |         redisTemplate.opsForValue().set("login:"+userid,loginUser); | ||||||
|         return new ResponseResult(200,"登录成功",map); |         //登录成功 | ||||||
|  |         log.setStatus(LoginStatusEnum.SUCCESS.value()); | ||||||
|  |         log.setCreator(loginUser.getSysUserEntity().getId()); | ||||||
|  |         log.setCreatorName(loginUser.getUsername()); | ||||||
|  |         sysLogLoginService.save(log); | ||||||
|  |         return new Result<>().ok(map); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public void logout(HttpServletRequest request) { | ||||||
|  |         //获取SecurityContextHolder中的用户id | ||||||
|  |         UsernamePasswordAuthenticationToken authentication = (UsernamePasswordAuthenticationToken) SecurityContextHolder.getContext().getAuthentication(); | ||||||
|  |         LoginUser loginUser = (LoginUser) authentication.getPrincipal(); | ||||||
|  |         Long userid = loginUser.getSysUserEntity().getId(); | ||||||
|  |         //日志 | ||||||
|  | 		SysLogLoginEntity log = new SysLogLoginEntity(); | ||||||
|  | 		log.setOperation(LoginOperationEnum.LOGOUT.value()); | ||||||
|  | 		log.setIp(IpUtils.getIpAddr(request)); | ||||||
|  | 		log.setUserAgent(request.getHeader(HttpHeaders.USER_AGENT)); | ||||||
|  | 		log.setIp(IpUtils.getIpAddr(request)); | ||||||
|  | 		log.setStatus(LoginStatusEnum.SUCCESS.value()); | ||||||
|  | 		log.setCreator(userid); | ||||||
|  | 		log.setCreatorName(loginUser.getUsername()); | ||||||
|  | 		log.setCreateDate(new Date()); | ||||||
|  | 		sysLogLoginService.save(log); | ||||||
|  |         //删除redis中的值 | ||||||
|  |         redisTemplate.delete("login:"+userid); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -0,0 +1,59 @@ | |||||||
|  | package com.cnbm.admin.service.impl; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.metadata.IPage; | ||||||
|  | import com.cnbm.admin.dao.SysLogLoginDao; | ||||||
|  | import com.cnbm.admin.dto.SysLogLoginDTO; | ||||||
|  | import com.cnbm.admin.entity.SysLogLoginEntity; | ||||||
|  | import com.cnbm.admin.service.SysLogLoginService; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.service.impl.BaseServiceImpl; | ||||||
|  | import com.cnbm.common.utils.ConvertUtils; | ||||||
|  | import lombok.extern.log4j.Log4j2; | ||||||
|  | import org.apache.commons.lang3.StringUtils; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | @Service | ||||||
|  | @Log4j2 | ||||||
|  | public class SysLogLoginServiceImpl extends BaseServiceImpl<SysLogLoginDao, SysLogLoginEntity> implements SysLogLoginService { | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public PageData<SysLogLoginDTO> page(Map<String, Object> params) { | ||||||
|  |         IPage<SysLogLoginEntity> page = baseDao.selectPage( | ||||||
|  |                 getPage(params, Constant.CREATE_DATE, false), | ||||||
|  |                 getWrapper(params) | ||||||
|  |         ); | ||||||
|  |         log.info("page======{}",page.toString()); | ||||||
|  |  | ||||||
|  |         return getPageData(page, SysLogLoginDTO.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public List<SysLogLoginDTO> list(Map<String, Object> params) { | ||||||
|  |         List<SysLogLoginEntity> entityList = baseDao.selectList(getWrapper(params)); | ||||||
|  |  | ||||||
|  |         return ConvertUtils.sourceToTarget(entityList, SysLogLoginDTO.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private QueryWrapper<SysLogLoginEntity> getWrapper(Map<String, Object> params){ | ||||||
|  |         String status = (String) params.get("status"); | ||||||
|  |         String creatorName = (String) params.get("creatorName"); | ||||||
|  |  | ||||||
|  |         QueryWrapper<SysLogLoginEntity> wrapper = new QueryWrapper<>(); | ||||||
|  |         wrapper.eq(StringUtils.isNotBlank(status), "status", status); | ||||||
|  |         wrapper.like(StringUtils.isNotBlank(creatorName), "creator_name", creatorName); | ||||||
|  |         return wrapper; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     @Transactional(rollbackFor = Exception.class) | ||||||
|  |     public void save(SysLogLoginEntity entity) { | ||||||
|  |         insert(entity); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -5,23 +5,24 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||||
| import com.cnbm.admin.dto.SysMenuDTO; | import com.cnbm.admin.dto.SysMenuDTO; | ||||||
| import com.cnbm.admin.dto.SysUserDTO; | import com.cnbm.admin.dto.SysUserDTO; | ||||||
| import com.cnbm.admin.entity.LoginUser; | import com.cnbm.admin.entity.LoginUser; | ||||||
|  | import com.cnbm.admin.entity.SysLogLoginEntity; | ||||||
| import com.cnbm.admin.entity.SysMenuEntity; | import com.cnbm.admin.entity.SysMenuEntity; | ||||||
| import com.cnbm.admin.entity.SysUserEntity; | import com.cnbm.admin.entity.SysUserEntity; | ||||||
|  | import com.cnbm.admin.enums.LoginOperationEnum; | ||||||
| import com.cnbm.admin.exception.LoginStatusException; | import com.cnbm.admin.exception.LoginStatusException; | ||||||
| import com.cnbm.admin.service.SysMenuService; | import com.cnbm.admin.service.SysMenuService; | ||||||
| import com.cnbm.common.utils.ConvertUtils; | import com.cnbm.common.utils.ConvertUtils; | ||||||
|  | import com.cnbm.common.utils.IpUtils; | ||||||
| import lombok.extern.log4j.Log4j2; | import lombok.extern.log4j.Log4j2; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.http.HttpHeaders; | ||||||
| import org.springframework.security.authentication.DisabledException; | import org.springframework.security.authentication.DisabledException; | ||||||
| import org.springframework.security.core.userdetails.UserDetails; | import org.springframework.security.core.userdetails.UserDetails; | ||||||
| import org.springframework.security.core.userdetails.UserDetailsService; | import org.springframework.security.core.userdetails.UserDetailsService; | ||||||
| import org.springframework.security.core.userdetails.UsernameNotFoundException; | import org.springframework.security.core.userdetails.UsernameNotFoundException; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
| import java.util.ArrayList; | import java.util.*; | ||||||
| import java.util.List; |  | ||||||
| import java.util.Objects; |  | ||||||
| import java.util.Set; |  | ||||||
| import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -45,6 +46,7 @@ public class UserDetailsServiceImpl implements UserDetailsService { | |||||||
|         LambdaQueryWrapper<SysUserEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |         LambdaQueryWrapper<SysUserEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>(); | ||||||
|         lambdaQueryWrapper.eq(SysUserEntity::getUsername,username); |         lambdaQueryWrapper.eq(SysUserEntity::getUsername,username); | ||||||
|         SysUserEntity sysUserEntity = userDao.selectOne(lambdaQueryWrapper); |         SysUserEntity sysUserEntity = userDao.selectOne(lambdaQueryWrapper); | ||||||
|  |  | ||||||
|         if (Objects.isNull(sysUserEntity)) { |         if (Objects.isNull(sysUserEntity)) { | ||||||
|             throw new UsernameNotFoundException("用户名不存在"); |             throw new UsernameNotFoundException("用户名不存在"); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -0,0 +1,136 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (c) 2018. | ||||||
|  |  * http://www.ulabcare.com | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | package com.cnbm.admin.utils; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.entity.LoginUser; | ||||||
|  | import com.cnbm.admin.entity.SysUserEntity; | ||||||
|  | import com.cnbm.admin.enums.WhetherEnum; | ||||||
|  | import lombok.Builder; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.springframework.beans.BeanUtils; | ||||||
|  | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; | ||||||
|  | import org.springframework.security.core.context.SecurityContextHolder; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 接口支持基类 | ||||||
|  |  * | ||||||
|  |  * @author jiff | ||||||
|  |  * @date 2018/11/1 | ||||||
|  |  * @since 1.0 | ||||||
|  |  */ | ||||||
|  | public abstract class BaseSupportUtils { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取当前登录用户信息 | ||||||
|  |      * | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     private static SysUserEntity getLoginUser() { | ||||||
|  |         //登录用户信息 | ||||||
|  |         UsernamePasswordAuthenticationToken authentication = (UsernamePasswordAuthenticationToken) SecurityContextHolder.getContext().getAuthentication(); | ||||||
|  |         LoginUser loginUser = (LoginUser) authentication.getPrincipal(); | ||||||
|  |         return loginUser.getSysUserEntity(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设置公共字段值,一般用于创建新记录,包含以下字段: | ||||||
|  |      * | ||||||
|  |      * <p> | ||||||
|  |      * {@link CommonField#enabled}<br> | ||||||
|  |      * {@link CommonField#valid}<br> | ||||||
|  |      * {@link CommonField#creatorId}<br> | ||||||
|  |      * {@link CommonField#creatorName}<br> | ||||||
|  |      * {@link CommonField#createTime}<br> | ||||||
|  |      * {@link CommonField#updaterId}<br> | ||||||
|  |      * {@link CommonField#updaterName}<br> | ||||||
|  |      * {@link CommonField#updateTime}<br> | ||||||
|  |      * </p> | ||||||
|  |      * | ||||||
|  |      * @param t                需要设置的对象 | ||||||
|  |      * @param ignoreProperties 忽略的字段 | ||||||
|  |      * @param <T> | ||||||
|  |      */ | ||||||
|  |     public static <T extends Serializable> T setCommonField(T t, String... ignoreProperties) { | ||||||
|  |         CommonField commonField = CommonField.builder() | ||||||
|  |                 .enabled(WhetherEnum.YES.getValue()) | ||||||
|  |                 .valid(WhetherEnum.YES.getValue()) | ||||||
|  |                 .createTime(LocalDateTime.now()) | ||||||
|  |                 .creatorId(getLoginUser().getId()) | ||||||
|  |                 .creatorName(getLoginUser().getUsername()) | ||||||
|  |                 .updateTime(LocalDateTime.now()) | ||||||
|  |                 .updaterId(getLoginUser().getId()) | ||||||
|  |                 .updaterName(getLoginUser().getUsername()) | ||||||
|  |                 .build(); | ||||||
|  |         BeanUtils.copyProperties(commonField, t, ignoreProperties); | ||||||
|  |         return t; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 设置更新的公共字段值,一般用于更新记录,包含以下字段: | ||||||
|  |      * | ||||||
|  |      * <p> | ||||||
|  |      * {@link CommonField#updaterId}<br> | ||||||
|  |      * {@link CommonField#updaterName}<br> | ||||||
|  |      * {@link CommonField#updateTime}<br> | ||||||
|  |      * </p> | ||||||
|  |      * | ||||||
|  |      * @param t   需要设置的对象 | ||||||
|  |      * @param <T> | ||||||
|  |      */ | ||||||
|  |     public static <T extends Serializable> T setUpdateCommonField(T t) { | ||||||
|  |         CommonField commonField = CommonField.builder() | ||||||
|  |                 .updaterId(getLoginUser().getId()) | ||||||
|  |                 .updaterName(getLoginUser().getUsername()) | ||||||
|  |                 .updateTime(LocalDateTime.now()) | ||||||
|  |                 .build(); | ||||||
|  |         BeanUtils.copyProperties(commonField, t, "enabled", "valid"); | ||||||
|  |         return t; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Data | ||||||
|  |     @Builder | ||||||
|  |     private static class CommonField implements Serializable { | ||||||
|  |         /** | ||||||
|  |          * 启用状态:0 、停用,1、启用 | ||||||
|  |          */ | ||||||
|  |         private Integer enabled; | ||||||
|  |         /** | ||||||
|  |          * 删除标志,是否有效:1 可用 0不可用 | ||||||
|  |          */ | ||||||
|  |         private Integer valid; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         /** | ||||||
|  |          * 创建人 | ||||||
|  |          */ | ||||||
|  |         private Long creatorId; | ||||||
|  |         /** | ||||||
|  |          * 创建人 | ||||||
|  |          */ | ||||||
|  |         private String creatorName; | ||||||
|  |         /** | ||||||
|  |          * 创建时间 | ||||||
|  |          */ | ||||||
|  |         private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         /** | ||||||
|  |          * 更新人 | ||||||
|  |          */ | ||||||
|  |         private Long updaterId; | ||||||
|  |         /** | ||||||
|  |          * 更新人 | ||||||
|  |          */ | ||||||
|  |         private String updaterName; | ||||||
|  |         /** | ||||||
|  |          * 更新时间 | ||||||
|  |          */ | ||||||
|  |         private LocalDateTime updateTime; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -1,5 +1,6 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
| <mapper namespace="com.cnbm.generator.code.mapper.ProductTypeMapper"> | 
 | ||||||
|  | <mapper namespace="com.cnbm.admin.dao.SysLogLoginDao"> | ||||||
| 
 | 
 | ||||||
| </mapper> | </mapper> | ||||||
| @@ -0,0 +1,133 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.FactoryDTO; | ||||||
|  | import com.cnbm.basic.excel.FactoryExcel; | ||||||
|  | import com.cnbm.basic.service.IFactoryService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工厂 表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/factory") | ||||||
|  | @Api(tags="工厂 表") | ||||||
|  | public class FactoryController { | ||||||
|  |     @Autowired | ||||||
|  |     private IFactoryService factoryService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "type", value = "工厂类型", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:factory:page')") | ||||||
|  |     public Result<PageData<FactoryDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<FactoryDTO> page = factoryService.page(params); | ||||||
|  |         return new Result<PageData<FactoryDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:factory:info')") | ||||||
|  |     public Result<FactoryDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         FactoryDTO data = factoryService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<FactoryDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:factory:save')") | ||||||
|  |     public Result save(@RequestBody FactoryDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         factoryService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:factory:update')") | ||||||
|  |     public Result update(@RequestBody FactoryDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |         factoryService.update(dto); | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:factory:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         factoryService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:factory:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<FactoryDTO> list = factoryService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, "Factory", list, FactoryExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("status") | ||||||
|  |     @ApiOperation("改变状态") | ||||||
|  |     @LogOperation("改变状态") | ||||||
|  |     public Result changeStatus(@RequestBody IdParam id){ | ||||||
|  |         factoryService.changeStatus(id.getId()); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取工厂列表") | ||||||
|  |     @LogOperation("获取工厂列表") | ||||||
|  |     public List<FactoryDTO> list() { | ||||||
|  |         return factoryService.list(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -0,0 +1,142 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.FeaturesStageProcedureRelationDTO; | ||||||
|  | import com.cnbm.basic.excel.FeaturesStageProcedureRelationExcel; | ||||||
|  | import com.cnbm.basic.service.IFeaturesStageProcedureRelationService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 过程检验-工艺-检验参数 关系表   前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-09-01 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/featuresStageProcedureRelation") | ||||||
|  | @Api(tags="过程检验-工艺-检验参数 关系表 ") | ||||||
|  | public class FeaturesStageProcedureRelationController { | ||||||
|  |     @Autowired | ||||||
|  |     private IFeaturesStageProcedureRelationService featuresStageProcedureRelationService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:page')") | ||||||
|  |     public Result<PageData<FeaturesStageProcedureRelationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<FeaturesStageProcedureRelationDTO> page = featuresStageProcedureRelationService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<FeaturesStageProcedureRelationDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:info')") | ||||||
|  |     public Result<FeaturesStageProcedureRelationDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         FeaturesStageProcedureRelationDTO data = featuresStageProcedureRelationService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<FeaturesStageProcedureRelationDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:save')") | ||||||
|  |     public Result<Long> save(@RequestBody FeaturesStageProcedureRelationDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         featuresStageProcedureRelationService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result<Long>().ok(dto.getId()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:update')") | ||||||
|  |     public Result<Long> update(@RequestBody FeaturesStageProcedureRelationDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         featuresStageProcedureRelationService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result<Long>().ok(dto.getId()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         featuresStageProcedureRelationService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<FeaturesStageProcedureRelationDTO> list = featuresStageProcedureRelationService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, null, list, FeaturesStageProcedureRelationExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("batchInsert") | ||||||
|  |     @ApiOperation("批量保存") | ||||||
|  |     public Result<Long> batchInsert(@RequestBody FeaturesStageProcedureRelationDTO[] lists){ | ||||||
|  |         //效验数据 | ||||||
|  |         //ValidatorUtils.validateEntity(lists, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         featuresStageProcedureRelationService.batchInsert(lists); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping("deleteByStageProcedure") | ||||||
|  |     @ApiOperation("删除 依据工序id 检验阶段") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |             @ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class), | ||||||
|  |             @ApiImplicitParam(name = "inspectionStage", value = "检测阶段", paramType = "query", dataTypeClass = Integer.class), | ||||||
|  |             @ApiImplicitParam(name = "workingProcedureId", value = "工序", paramType = "query", dataTypeClass = Long.class) | ||||||
|  |     }) | ||||||
|  |     public Result deleteByStageProcedure(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |  | ||||||
|  |         featuresStageProcedureRelationService.deleteByStageProcedure(params); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,155 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.MachineDTO; | ||||||
|  | import com.cnbm.basic.excel.MachineExcel; | ||||||
|  | import com.cnbm.basic.service.IMachineService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 机台表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/machine") | ||||||
|  | @Api(tags="机台表") | ||||||
|  | public class MachineController { | ||||||
|  |     @Autowired | ||||||
|  |     private IMachineService machineService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:machine:page')") | ||||||
|  |     public Result<PageData<MachineDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<MachineDTO> page = machineService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<MachineDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /* | ||||||
|  |     @GetMapping("page2") | ||||||
|  |     @ApiOperation("分页2") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |             @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |             @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |             @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |             @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |             @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     }) | ||||||
|  |     //@PreAuthorize("@ex.hasAuthority('basic:machine:page')") | ||||||
|  |     public Result<PageData<MachineDTO>> page2(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<MachineDTO> page = machineService.page1(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<MachineDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |      */ | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:machine:info')") | ||||||
|  |     public Result<MachineDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         MachineDTO data = machineService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<MachineDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:machine:save')") | ||||||
|  |     public Result save(@RequestBody MachineDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         machineService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:machine:update')") | ||||||
|  |     public Result update(@RequestBody MachineDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         machineService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:machine:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         machineService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:machine:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<MachineDTO> list = machineService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, "Machine", list, MachineExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("status") | ||||||
|  |     @ApiOperation("改变状态") | ||||||
|  |     @LogOperation("改变状态") | ||||||
|  |     public Result changeStatus(@RequestBody IdParam id){ | ||||||
|  |         machineService.changeStatus(id.getId()); | ||||||
|  |  | ||||||
|  |         return new Result().ok(true); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取机台列表") | ||||||
|  |     @LogOperation("获取机台列表") | ||||||
|  |     @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     public List<MachineDTO> list(@ApiIgnore @RequestParam Map<String, Object> params) { | ||||||
|  |         return machineService.list(params); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,135 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.MeasureToolDTO; | ||||||
|  | import com.cnbm.basic.excel.MeasureToolExcel; | ||||||
|  | import com.cnbm.basic.service.IMeasureToolService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 量具表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/measureTool") | ||||||
|  | @Api(tags="量具表") | ||||||
|  | public class MeasureToolController { | ||||||
|  |     @Autowired | ||||||
|  |     private IMeasureToolService measureToolService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:measureTool:page')") | ||||||
|  |     public Result<PageData<MeasureToolDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<MeasureToolDTO> page = measureToolService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<MeasureToolDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:measureTool:info')") | ||||||
|  |     public Result<MeasureToolDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         MeasureToolDTO data = measureToolService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<MeasureToolDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:measureTool:save')") | ||||||
|  |     public Result save(@RequestBody MeasureToolDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         measureToolService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:measureTool:update')") | ||||||
|  |     public Result update(@RequestBody MeasureToolDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         measureToolService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:measureTool:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         measureToolService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:measureTool:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<MeasureToolDTO> list = measureToolService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, null, list, MeasureToolExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("status") | ||||||
|  |     @ApiOperation("改变状态") | ||||||
|  |     @LogOperation("改变状态") | ||||||
|  |     public Result changeStatus(@RequestBody IdParam id){ | ||||||
|  |         measureToolService.changeStatus(id.getId()); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取量具列表") | ||||||
|  |     @LogOperation("获取控制图形列表") | ||||||
|  |     public List<MeasureToolDTO> list() { | ||||||
|  |         return measureToolService.list(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -0,0 +1,129 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.PlatformDTO; | ||||||
|  | import com.cnbm.basic.excel.PlatformExcel; | ||||||
|  | import com.cnbm.basic.service.IPlatformService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 站点表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/platform") | ||||||
|  | @Api(tags="站点表") | ||||||
|  | public class PlatformController { | ||||||
|  |     @Autowired | ||||||
|  |     private IPlatformService platformService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:platform:page')") | ||||||
|  |     public Result<PageData<PlatformDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<PlatformDTO> page = platformService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<PlatformDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:platform:info')") | ||||||
|  |     public Result<PlatformDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         PlatformDTO data = platformService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<PlatformDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:platform:save')") | ||||||
|  |     public Result save(@RequestBody PlatformDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         platformService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:platform:update')") | ||||||
|  |     public Result update(@RequestBody PlatformDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         platformService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:platform:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         platformService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:platform:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<PlatformDTO> list = platformService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, "Platform", list, PlatformExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("status") | ||||||
|  |     @ApiOperation("改变状态") | ||||||
|  |     @LogOperation("改变状态") | ||||||
|  |     public Result changeStatus(@RequestBody IdParam id){ | ||||||
|  |         platformService.changeStatus(id.getId()); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,139 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.ProductDTO; | ||||||
|  | import com.cnbm.basic.excel.ProductExcel; | ||||||
|  | import com.cnbm.basic.service.IProductService; | ||||||
|  | import com.cnbm.common.vo.IdVo; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品 表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-11 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/product") | ||||||
|  | @Api(tags="产品 表") | ||||||
|  | public class ProductController { | ||||||
|  |     @Autowired | ||||||
|  |     private IProductService productService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class), | ||||||
|  |         @ApiImplicitParam(name = "product_type_id", value = "产品类型id", paramType = "query", dataTypeClass = Integer.class), | ||||||
|  |         @ApiImplicitParam(name = "inspection_stage", value = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验", paramType = "query", dataTypeClass = String.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:product:page')") | ||||||
|  |     public Result<PageData<ProductDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<ProductDTO> page = productService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<ProductDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:product:info')") | ||||||
|  |     public Result<ProductDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         ProductDTO data = productService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<ProductDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("save") | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:product:save')") | ||||||
|  |     public IdVo save(@RequestBody ProductDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         return productService.add(dto); | ||||||
|  |  | ||||||
|  |         //return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping("update") | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:product:update')") | ||||||
|  |     public Result update(@RequestBody ProductDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         productService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping("delete") | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:product:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         productService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:product:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<ProductDTO> list = productService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, null, list, ProductExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("status") | ||||||
|  |     @ApiOperation("改变状态") | ||||||
|  |     @LogOperation("改变状态") | ||||||
|  |     public Result changeStatus(@RequestBody IdParam id){ | ||||||
|  |         productService.changeStatus(id.getId()); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取产品列表") | ||||||
|  |     @LogOperation("获取产品列表") | ||||||
|  |     public List<ProductDTO> list() { | ||||||
|  |         return productService.list(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,128 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.basic.dto.ProductWorkingprocedureRelationDTO; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.ProductFactoryRelationDTO; | ||||||
|  | import com.cnbm.basic.excel.ProductFactoryRelationExcel; | ||||||
|  | import com.cnbm.basic.service.IProductFactoryRelationService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品-工厂 关系表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-27 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/productFactoryRelation") | ||||||
|  | @Api(tags="产品-工厂 关系表") | ||||||
|  | public class ProductFactoryRelationController { | ||||||
|  |     @Autowired | ||||||
|  |     private IProductFactoryRelationService productFactoryRelationService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:page')") | ||||||
|  |     public Result<PageData<ProductFactoryRelationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<ProductFactoryRelationDTO> page = productFactoryRelationService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<ProductFactoryRelationDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:info')") | ||||||
|  |     public Result<ProductFactoryRelationDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         ProductFactoryRelationDTO data = productFactoryRelationService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<ProductFactoryRelationDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:save')") | ||||||
|  |     public Result save(@RequestBody ProductFactoryRelationDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         productFactoryRelationService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:update')") | ||||||
|  |     public Result update(@RequestBody ProductFactoryRelationDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         productFactoryRelationService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         productFactoryRelationService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<ProductFactoryRelationDTO> list = productFactoryRelationService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, null, list, ProductFactoryRelationExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("batchInsertFactory") | ||||||
|  |     @ApiOperation("添加多个工厂关联") | ||||||
|  |     @LogOperation("添加多个工厂关联") | ||||||
|  |     public Result batchInsertFactory(@RequestBody ProductFactoryRelationDTO[] lists){ | ||||||
|  |  | ||||||
|  |         productFactoryRelationService.batchInsertFactory(lists); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,175 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
|  | import com.cnbm.basic.dto.*; | ||||||
|  | import com.cnbm.basic.entity.ProductFeatures; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.excel.ProductFeaturesExcel; | ||||||
|  | import com.cnbm.basic.service.IProductFeaturesService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品特性 表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/productFeatures") | ||||||
|  | @Api(tags="产品特性 表") | ||||||
|  | public class ProductFeaturesController { | ||||||
|  |     @Autowired | ||||||
|  |     private IProductFeaturesService productFeaturesService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeatures:page')") | ||||||
|  |     public Result<PageData<ProductFeaturesDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<ProductFeaturesDTO> page = productFeaturesService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<ProductFeaturesDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeatures:info')") | ||||||
|  |     public Result<ProductFeaturesDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         ProductFeaturesDTO data = productFeaturesService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<ProductFeaturesDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeatures:save')") | ||||||
|  |     public Result save(@RequestBody ProductFeaturesDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         productFeaturesService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeatures:update')") | ||||||
|  |     public Result update(@RequestBody ProductFeaturesDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         productFeaturesService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeatures:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         productFeaturesService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |             @ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class), | ||||||
|  |             @ApiImplicitParam(name = "inspectionStage", value = "检测阶段", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeatures:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<ProductFeaturesDTO> list = productFeaturesService.getFeaturesList(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, "ProductFeatures", list, ProductFeaturesExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("getProductFeaturesByProductId") | ||||||
|  |     @ApiOperation("查询产品特性 依据产品id") | ||||||
|  |     public Result<List<ProductFeaturesDTO>> getProductFeaturesByProductId(@RequestBody IdParam id){ | ||||||
|  |         List<ProductFeaturesDTO> list = productFeaturesService.getProductFeaturesByProductId(id.getId()); | ||||||
|  |         return new Result<List<ProductFeaturesDTO>>().ok(list); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("getFeaturesByStageProcedure") | ||||||
|  |     @ApiOperation("查询依据工序id 检验阶段") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |             @ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class), | ||||||
|  |             //@ApiImplicitParam(name = "workingProcedureId", value = "工序", paramType = "query", dataTypeClass = Long.class), | ||||||
|  |             @ApiImplicitParam(name = "inspectionStage", value = "检测阶段", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     }) | ||||||
|  |     public Result<List<FeaturesProcedureDTO>> getFeaturesByStageProcedure(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         List<FeaturesProcedureDTO> list = productFeaturesService.getFeaturesByStageProcedure(params); | ||||||
|  |         return new Result<List<FeaturesProcedureDTO>>().ok(list); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping("batchUpdate") | ||||||
|  |     @ApiOperation("批量更新特性") | ||||||
|  |     public Result batchUpdate(@RequestBody ProductFeaturesDTO[] lists){ | ||||||
|  |  | ||||||
|  |         productFeaturesService.batchUpdate(lists); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("getFeaturesList") | ||||||
|  |     @ApiOperation("特性列表") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |             @ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class), | ||||||
|  |             @ApiImplicitParam(name = "inspectionStage", value = "检测阶段", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     }) | ||||||
|  |     public Result<List<ProductFeaturesDTO>> getFeaturesList(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         List<ProductFeaturesDTO> list = productFeaturesService.getFeaturesList(params); | ||||||
|  |         return new Result<List<ProductFeaturesDTO>>().ok(list); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取特性列表") | ||||||
|  |     @LogOperation("获取特性列表") | ||||||
|  |     public List<ProductFeaturesDTO> list() { | ||||||
|  |         return productFeaturesService.list(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("getProductFeaturesByType") | ||||||
|  |     @ApiOperation("根据特性类型 获取特性列表 计量型1 计数型2") | ||||||
|  |     public List<ProductFeaturesDTO> getProductFeaturesByType(Integer type){ | ||||||
|  |         return productFeaturesService.getProductFeaturesByType(type); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,117 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.ProductFeaturesHisDTO; | ||||||
|  | import com.cnbm.basic.excel.ProductFeaturesHisExcel; | ||||||
|  | import com.cnbm.basic.service.IProductFeaturesHisService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品特性 历史表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/productFeaturesHis") | ||||||
|  | @Api(tags="产品特性 历史表") | ||||||
|  | public class ProductFeaturesHisController { | ||||||
|  |     @Autowired | ||||||
|  |     private IProductFeaturesHisService productFeaturesHisService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:page')") | ||||||
|  |     public Result<PageData<ProductFeaturesHisDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<ProductFeaturesHisDTO> page = productFeaturesHisService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<ProductFeaturesHisDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:info')") | ||||||
|  |     public Result<ProductFeaturesHisDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         ProductFeaturesHisDTO data = productFeaturesHisService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<ProductFeaturesHisDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:save')") | ||||||
|  |     public Result save(@RequestBody ProductFeaturesHisDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         productFeaturesHisService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:update')") | ||||||
|  |     public Result update(@RequestBody ProductFeaturesHisDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         productFeaturesHisService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         productFeaturesHisService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<ProductFeaturesHisDTO> list = productFeaturesHisService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, null, list, ProductFeaturesHisExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -1,6 +1,8 @@ | |||||||
| package com.cnbm.basic.controller; | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
| import com.cnbm.admin.annotation.LogOperation; | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
|  | import com.cnbm.basic.dto.UnitDTO; | ||||||
| import com.cnbm.common.constant.Constant; | import com.cnbm.common.constant.Constant; | ||||||
| import com.cnbm.common.page.PageData; | import com.cnbm.common.page.PageData; | ||||||
| import com.cnbm.common.utils.ExcelUtils; | import com.cnbm.common.utils.ExcelUtils; | ||||||
| @@ -34,21 +36,25 @@ import java.util.Map; | |||||||
|  * @since  2022-06-30 |  * @since  2022-06-30 | ||||||
|  */ |  */ | ||||||
| @RestController | @RestController | ||||||
| @RequestMapping("/code/productType") | @RequestMapping("/basic/productType") | ||||||
| @Api(tags="产品类型 表") | @Api(tags="产品类型 表") | ||||||
| public class ProductTypeController { | public class ProductTypeController { | ||||||
|     @Autowired |     @Autowired | ||||||
|     private IProductTypeService productTypeService; |     private IProductTypeService productTypeService; | ||||||
|  |  | ||||||
|  |  | ||||||
|     @GetMapping("page") |     @GetMapping("page") | ||||||
|     @ApiOperation("分页") |     @ApiOperation("分页") | ||||||
|     @ApiImplicitParams({ |     @ApiImplicitParams({ | ||||||
|         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) | ||||||
|     }) |     }) | ||||||
| //    @PreAuthorize("@ex.hasAuthority('code:productType:page')") |     @PreAuthorize("@ex.hasAuthority('basic:productType:page')") | ||||||
|     public Result<PageData<ProductTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ |     public Result<PageData<ProductTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|         PageData<ProductTypeDTO> page = productTypeService.page(params); |         PageData<ProductTypeDTO> page = productTypeService.page(params); | ||||||
|  |  | ||||||
| @@ -57,7 +63,7 @@ public class ProductTypeController { | |||||||
|  |  | ||||||
|     @GetMapping("{id}") |     @GetMapping("{id}") | ||||||
|     @ApiOperation("信息") |     @ApiOperation("信息") | ||||||
| //    @PreAuthorize("@ex.hasAuthority('code:productType:info')") |     @PreAuthorize("@ex.hasAuthority('basic:productType:info')") | ||||||
|     public Result<ProductTypeDTO> get(@PathVariable("id") Long id){ |     public Result<ProductTypeDTO> get(@PathVariable("id") Long id){ | ||||||
|         ProductTypeDTO data = productTypeService.get(id); |         ProductTypeDTO data = productTypeService.get(id); | ||||||
|  |  | ||||||
| @@ -67,7 +73,7 @@ public class ProductTypeController { | |||||||
|     @PostMapping |     @PostMapping | ||||||
|     @ApiOperation("保存") |     @ApiOperation("保存") | ||||||
|     @LogOperation("保存") |     @LogOperation("保存") | ||||||
| //    @PreAuthorize("@ex.hasAuthority('code:productType:save')") |     @PreAuthorize("@ex.hasAuthority('basic:productType:save')") | ||||||
|     public Result save(@RequestBody ProductTypeDTO dto){ |     public Result save(@RequestBody ProductTypeDTO dto){ | ||||||
|         //效验数据 |         //效验数据 | ||||||
|         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
| @@ -80,7 +86,7 @@ public class ProductTypeController { | |||||||
|     @PutMapping |     @PutMapping | ||||||
|     @ApiOperation("修改") |     @ApiOperation("修改") | ||||||
|     @LogOperation("修改") |     @LogOperation("修改") | ||||||
| //    @PreAuthorize("@ex.hasAuthority('code:productType:update')") |     @PreAuthorize("@ex.hasAuthority('basic:productType:update')") | ||||||
|     public Result update(@RequestBody ProductTypeDTO dto){ |     public Result update(@RequestBody ProductTypeDTO dto){ | ||||||
|         //效验数据 |         //效验数据 | ||||||
|         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
| @@ -93,7 +99,7 @@ public class ProductTypeController { | |||||||
|     @DeleteMapping |     @DeleteMapping | ||||||
|     @ApiOperation("删除") |     @ApiOperation("删除") | ||||||
|     @LogOperation("删除") |     @LogOperation("删除") | ||||||
| //    @PreAuthorize("@ex.hasAuthority('code:productType:delete')") |     @PreAuthorize("@ex.hasAuthority('basic:productType:delete')") | ||||||
|     public Result delete(@RequestBody Long[] ids){ |     public Result delete(@RequestBody Long[] ids){ | ||||||
|         //效验数据 |         //效验数据 | ||||||
|         AssertUtils.isArrayEmpty(ids, "id"); |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
| @@ -106,11 +112,25 @@ public class ProductTypeController { | |||||||
|     @GetMapping("export") |     @GetMapping("export") | ||||||
|     @ApiOperation("导出") |     @ApiOperation("导出") | ||||||
|     @LogOperation("导出") |     @LogOperation("导出") | ||||||
| //    @PreAuthorize("@ex.hasAuthority('code:productType:export')") |     @PreAuthorize("@ex.hasAuthority('basic:productType:export')") | ||||||
|     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|         List<ProductTypeDTO> list = productTypeService.list(params); |         List<ProductTypeDTO> list = productTypeService.list(params); | ||||||
|  |  | ||||||
|         ExcelUtils.exportExcelToTarget(response, null, list, ProductTypeExcel.class); |         ExcelUtils.exportExcelToTarget(response, null, list, ProductTypeExcel.class); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("status") | ||||||
|  |     @ApiOperation("改变状态") | ||||||
|  |     @LogOperation("改变状态") | ||||||
|  |     public Result changeStatus(@RequestBody IdParam id){ | ||||||
|  |         productTypeService.changeStatus(id.getId()); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取产品类型列表") | ||||||
|  |     public List<ProductTypeDTO> list() { | ||||||
|  |         return productTypeService.list(); | ||||||
|  |     } | ||||||
| } | } | ||||||
| @@ -0,0 +1,170 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
|  | import com.cnbm.basic.dto.SequenceDTO; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.ProductWorkingprocedureRelationDTO; | ||||||
|  | import com.cnbm.basic.excel.ProductWorkingprocedureRelationExcel; | ||||||
|  | import com.cnbm.basic.service.IProductWorkingprocedureRelationService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工序 表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/productWorkingprocedureRelation") | ||||||
|  | @Api(tags="产品-工序 关系表") | ||||||
|  | public class ProductWorkingprocedureRelationController { | ||||||
|  |     @Autowired | ||||||
|  |     private IProductWorkingprocedureRelationService productWorkingprocedureRelationService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:page')") | ||||||
|  |     public Result<PageData<ProductWorkingprocedureRelationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<ProductWorkingprocedureRelationDTO> page = productWorkingprocedureRelationService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<ProductWorkingprocedureRelationDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:info')") | ||||||
|  |     public Result<ProductWorkingprocedureRelationDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         ProductWorkingprocedureRelationDTO data = productWorkingprocedureRelationService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<ProductWorkingprocedureRelationDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("save") | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:save')") | ||||||
|  |     public Result save(@RequestBody ProductWorkingprocedureRelationDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         productWorkingprocedureRelationService.save(dto); | ||||||
|  |  | ||||||
|  |         if(ObjectUtils.isNotNull(dto.getWorkingProcedureId())) { | ||||||
|  |             return new Result(); | ||||||
|  |         } | ||||||
|  |         else{ | ||||||
|  |             return new Result().error(1,"该工艺已经绑定"); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:update')") | ||||||
|  |     public Result update(@RequestBody ProductWorkingprocedureRelationDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         productWorkingprocedureRelationService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         productWorkingprocedureRelationService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<ProductWorkingprocedureRelationDTO> list = productWorkingprocedureRelationService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, null, list, ProductWorkingprocedureRelationExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("getWorkingprocedureByProductId/{productId}") | ||||||
|  |     @ApiOperation("查询所有工序 依据产品id") | ||||||
|  |     @LogOperation("查询所有工序 依据产品id") | ||||||
|  |     public Result<List<ProductWorkingprocedureRelationDTO>> getWorkingprocedureByProductId(@PathVariable("productId") Long productId){ | ||||||
|  |         List<ProductWorkingprocedureRelationDTO> list = productWorkingprocedureRelationService.getWorkingprocedureByProductId(productId); | ||||||
|  |         return new Result<List<ProductWorkingprocedureRelationDTO>>().ok(list); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("batchInsertWorkingprocedure") | ||||||
|  |     @ApiOperation("添加工序流程") | ||||||
|  |     @LogOperation("添加工序流程") | ||||||
|  |     //@PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:batchInsertWorkingprocedure')") | ||||||
|  |     public Result batchInsertWorkingprocedure(@RequestBody ProductWorkingprocedureRelationDTO[] lists){ | ||||||
|  |  | ||||||
|  |         productWorkingprocedureRelationService.batchInsertWorkingprocedure(lists); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping("sequenceUp") | ||||||
|  |     @ApiOperation("产品工序上移") | ||||||
|  | //    @ApiImplicitParams({ | ||||||
|  | //            @ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class), | ||||||
|  | //            @ApiImplicitParam(name = "index", value = "产品工序序号", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  | //    }) | ||||||
|  |     public Result sequenceUp(@RequestBody SequenceDTO sequenceDTO){ | ||||||
|  |  | ||||||
|  |         productWorkingprocedureRelationService.sequenceUp(sequenceDTO); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping("sequenceDown") | ||||||
|  |     @ApiOperation("产品工序下移") | ||||||
|  | //    @ApiImplicitParams({ | ||||||
|  | //            @ApiImplicitParam(name = "productId", value = "产品", paramType = "query", dataTypeClass = Long.class), | ||||||
|  | //            @ApiImplicitParam(name = "index", value = "产品工序序号", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  | //    }) | ||||||
|  |     public Result sequenceDown(@RequestBody SequenceDTO sequenceDTO){ | ||||||
|  |  | ||||||
|  |         productWorkingprocedureRelationService.sequenceDown(sequenceDTO); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,124 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.ShiftDTO; | ||||||
|  | import com.cnbm.basic.excel.ShiftExcel; | ||||||
|  | import com.cnbm.basic.service.IShiftService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 班次 表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/shift") | ||||||
|  | @Api(tags="班次 表") | ||||||
|  | public class ShiftController { | ||||||
|  |     @Autowired | ||||||
|  |     private IShiftService shiftService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:shift:page')") | ||||||
|  |     public Result<PageData<ShiftDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<ShiftDTO> page = shiftService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<ShiftDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:shift:info')") | ||||||
|  |     public Result<ShiftDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         ShiftDTO data = shiftService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<ShiftDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:shift:save')") | ||||||
|  |     public Result save(@RequestBody ShiftDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         shiftService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:shift:update')") | ||||||
|  |     public Result update(@RequestBody ShiftDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         shiftService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:shift:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         shiftService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:shift:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<ShiftDTO> list = shiftService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, null, list, ShiftExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取班次列表") | ||||||
|  |     @LogOperation("获取班次列表") | ||||||
|  |     public List<ShiftDTO> list() { | ||||||
|  |         return shiftService.list(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,123 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.basic.dto.ShiftDTO; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.TeamDTO; | ||||||
|  | import com.cnbm.basic.excel.TeamExcel; | ||||||
|  | import com.cnbm.basic.service.ITeamService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 班组 表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/team") | ||||||
|  | @Api(tags="班组 表") | ||||||
|  | public class TeamController { | ||||||
|  |     @Autowired | ||||||
|  |     private ITeamService teamService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:team:page')") | ||||||
|  |     public Result<PageData<TeamDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<TeamDTO> page = teamService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<TeamDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:team:info')") | ||||||
|  |     public Result<TeamDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         TeamDTO data = teamService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<TeamDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:team:save')") | ||||||
|  |     public Result save(@RequestBody TeamDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         teamService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:team:update')") | ||||||
|  |     public Result update(@RequestBody TeamDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         teamService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:team:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         teamService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:team:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<TeamDTO> list = teamService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, null, list, TeamExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取班组列表") | ||||||
|  |     @LogOperation("获取班组列表") | ||||||
|  |     public List<TeamDTO> list() { return teamService.list(); } | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -1,6 +1,7 @@ | |||||||
| package com.cnbm.basic.controller; | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
| import com.cnbm.admin.annotation.LogOperation; | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
| import com.cnbm.common.constant.Constant; | import com.cnbm.common.constant.Constant; | ||||||
| import com.cnbm.common.page.PageData; | import com.cnbm.common.page.PageData; | ||||||
| import com.cnbm.common.utils.ExcelUtils; | import com.cnbm.common.utils.ExcelUtils; | ||||||
| @@ -19,10 +20,12 @@ import io.swagger.annotations.ApiImplicitParams; | |||||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
| import org.springframework.security.access.prepost.PreAuthorize; | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||||
| import springfox.documentation.annotations.ApiIgnore; | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import javax.validation.groups.Default; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
|  |  | ||||||
| @@ -34,7 +37,7 @@ import java.util.Map; | |||||||
|  * @since  2022-06-30 |  * @since  2022-06-30 | ||||||
|  */ |  */ | ||||||
| @RestController | @RestController | ||||||
| @RequestMapping("/code/unit") | @RequestMapping("/basic/unit") | ||||||
| @Api(tags="单位 表") | @Api(tags="单位 表") | ||||||
| public class UnitController { | public class UnitController { | ||||||
|     @Autowired |     @Autowired | ||||||
| @@ -46,9 +49,12 @@ public class UnitController { | |||||||
|         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) | ||||||
|     }) |     }) | ||||||
|     @PreAuthorize("@ex.hasAuthority('code:unit:page')") |     @PreAuthorize("@ex.hasAuthority('basic:unit:page')") | ||||||
|     public Result<PageData<UnitDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ |     public Result<PageData<UnitDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|         PageData<UnitDTO> page = unitService.page(params); |         PageData<UnitDTO> page = unitService.page(params); | ||||||
|  |  | ||||||
| @@ -57,7 +63,7 @@ public class UnitController { | |||||||
|  |  | ||||||
|     @GetMapping("{id}") |     @GetMapping("{id}") | ||||||
|     @ApiOperation("信息") |     @ApiOperation("信息") | ||||||
|     @PreAuthorize("@ex.hasAuthority('code:unit:info')") |     //@PreAuthorize("@ex.hasAuthority('basic:unit:info')") | ||||||
|     public Result<UnitDTO> get(@PathVariable("id") Long id){ |     public Result<UnitDTO> get(@PathVariable("id") Long id){ | ||||||
|         UnitDTO data = unitService.get(id); |         UnitDTO data = unitService.get(id); | ||||||
|  |  | ||||||
| @@ -67,7 +73,7 @@ public class UnitController { | |||||||
|     @PostMapping |     @PostMapping | ||||||
|     @ApiOperation("保存") |     @ApiOperation("保存") | ||||||
|     @LogOperation("保存") |     @LogOperation("保存") | ||||||
|     @PreAuthorize("@ex.hasAuthority('code:unit:save')") |     @PreAuthorize("@ex.hasAuthority('basic:unit:save')") | ||||||
|     public Result save(@RequestBody UnitDTO dto){ |     public Result save(@RequestBody UnitDTO dto){ | ||||||
|         //效验数据 |         //效验数据 | ||||||
|         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
| @@ -80,7 +86,7 @@ public class UnitController { | |||||||
|     @PutMapping |     @PutMapping | ||||||
|     @ApiOperation("修改") |     @ApiOperation("修改") | ||||||
|     @LogOperation("修改") |     @LogOperation("修改") | ||||||
|     @PreAuthorize("@ex.hasAuthority('code:unit:update')") |     @PreAuthorize("@ex.hasAuthority('basic:unit:update')") | ||||||
|     public Result update(@RequestBody UnitDTO dto){ |     public Result update(@RequestBody UnitDTO dto){ | ||||||
|         //效验数据 |         //效验数据 | ||||||
|         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
| @@ -93,7 +99,7 @@ public class UnitController { | |||||||
|     @DeleteMapping |     @DeleteMapping | ||||||
|     @ApiOperation("删除") |     @ApiOperation("删除") | ||||||
|     @LogOperation("删除") |     @LogOperation("删除") | ||||||
|     @PreAuthorize("@ex.hasAuthority('code:unit:delete')") |     @PreAuthorize("@ex.hasAuthority('basic:unit:delete')") | ||||||
|     public Result delete(@RequestBody Long[] ids){ |     public Result delete(@RequestBody Long[] ids){ | ||||||
|         //效验数据 |         //效验数据 | ||||||
|         AssertUtils.isArrayEmpty(ids, "id"); |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
| @@ -106,11 +112,26 @@ public class UnitController { | |||||||
|     @GetMapping("export") |     @GetMapping("export") | ||||||
|     @ApiOperation("导出") |     @ApiOperation("导出") | ||||||
|     @LogOperation("导出") |     @LogOperation("导出") | ||||||
|     @PreAuthorize("@ex.hasAuthority('code:unit:export')") |     @PreAuthorize("@ex.hasAuthority('basic:unit:export')") | ||||||
|     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|         List<UnitDTO> list = unitService.list(params); |         List<UnitDTO> list = unitService.list(params); | ||||||
|  |  | ||||||
|         ExcelUtils.exportExcelToTarget(response, null, list, UnitExcel.class); |         ExcelUtils.exportExcelToTarget(response, "Unit", list, UnitExcel.class); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("status") | ||||||
|  |     @ApiOperation("改变状态") | ||||||
|  |     @LogOperation("改变状态") | ||||||
|  |     public Result changeStatus(@RequestBody IdParam id){ | ||||||
|  |         unitService.changeStatus(id.getId()); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取单位列表") | ||||||
|  |     @LogOperation("获取单位列表") | ||||||
|  |     public List<UnitDTO> list() { | ||||||
|  |         return unitService.list(); | ||||||
|  |     } | ||||||
| } | } | ||||||
| @@ -0,0 +1,157 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
|  | import com.cnbm.basic.dto.UnitDTO; | ||||||
|  | import com.cnbm.basic.dto.WorkingProcedureTypeDTO; | ||||||
|  | import com.cnbm.basic.entity.WorkingProcedure; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.WorkingProcedureDTO; | ||||||
|  | import com.cnbm.basic.excel.WorkingProcedureExcel; | ||||||
|  | import com.cnbm.basic.service.IWorkingProcedureService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工序 表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/workingProcedure") | ||||||
|  | @Api(tags="工序 表") | ||||||
|  | public class WorkingProcedureController { | ||||||
|  |     @Autowired | ||||||
|  |     private IWorkingProcedureService workingProcedureService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:page')") | ||||||
|  |     public Result<PageData<WorkingProcedureDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<WorkingProcedureDTO> page = workingProcedureService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<WorkingProcedureDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:info')") | ||||||
|  |     public Result<WorkingProcedureDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         WorkingProcedureDTO data = workingProcedureService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<WorkingProcedureDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:save')") | ||||||
|  |     public Result save(@RequestBody WorkingProcedureDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         workingProcedureService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:update')") | ||||||
|  |     public Result update(@RequestBody WorkingProcedureDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         workingProcedureService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         workingProcedureService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<WorkingProcedureDTO> list = workingProcedureService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, null, list, WorkingProcedureExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("status") | ||||||
|  |     @ApiOperation("改变状态") | ||||||
|  |     @LogOperation("改变状态") | ||||||
|  |     public Result changeStatus(@RequestBody IdParam id){ | ||||||
|  |         workingProcedureService.changeStatus(id.getId()); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("getWorkingprocedureByProductId/{productId}") | ||||||
|  |     @ApiOperation("查询所有工序 依据产品id") | ||||||
|  |     @LogOperation("查询所有工序 依据产品id") | ||||||
|  |     public Result<List<WorkingProcedureDTO>> getWorkingprocedureByProductId(@PathVariable("productId") Long productId){ | ||||||
|  |         List<WorkingProcedureDTO> list = workingProcedureService.getWorkingProcedureByProductId(productId); | ||||||
|  |         return new Result<List<WorkingProcedureDTO>>().ok(list); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取工序列表") | ||||||
|  |     public List<WorkingProcedureDTO> list() { | ||||||
|  |         return workingProcedureService.list(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "listByType/{typeId}") | ||||||
|  |     @ApiOperation(value = "根据工序类型 获取工序列表") | ||||||
|  |     public List<WorkingProcedure> listByType(@PathVariable("typeId") Long typeId) { | ||||||
|  |         return workingProcedureService.listByType(typeId); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "listWithType") | ||||||
|  |     @ApiOperation(value = "工序类型及对应工序列表") | ||||||
|  |     public List<WorkingProcedureTypeDTO> listWithType () { | ||||||
|  |         return workingProcedureService.listWithType(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -0,0 +1,136 @@ | |||||||
|  | package com.cnbm.basic.controller; | ||||||
|  |  | ||||||
|  | import com.cnbm.admin.annotation.LogOperation; | ||||||
|  | import com.cnbm.admin.params.IdParam; | ||||||
|  | import com.cnbm.basic.dto.WorkingProcedureDTO; | ||||||
|  | import com.cnbm.common.constant.Constant; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import com.cnbm.common.utils.ExcelUtils; | ||||||
|  | import com.cnbm.common.utils.Result; | ||||||
|  | import com.cnbm.common.validator.AssertUtils; | ||||||
|  | import com.cnbm.common.validator.ValidatorUtils; | ||||||
|  | import com.cnbm.common.validator.group.AddGroup; | ||||||
|  | import com.cnbm.common.validator.group.DefaultGroup; | ||||||
|  | import com.cnbm.common.validator.group.UpdateGroup; | ||||||
|  | import com.cnbm.basic.dto.WorkingProcedureTypeDTO; | ||||||
|  | import com.cnbm.basic.excel.WorkingProcedureTypeExcel; | ||||||
|  | import com.cnbm.basic.service.IWorkingProcedureTypeService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiImplicitParam; | ||||||
|  | import io.swagger.annotations.ApiImplicitParams; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.security.access.prepost.PreAuthorize; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import springfox.documentation.annotations.ApiIgnore; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工序类型表 表  前端控制器 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/basic/workingProcedureType") | ||||||
|  | @Api(tags="工序类型表 表") | ||||||
|  | public class WorkingProcedureTypeController { | ||||||
|  |     @Autowired | ||||||
|  |     private IWorkingProcedureTypeService workingProcedureTypeService; | ||||||
|  |  | ||||||
|  |     @GetMapping("page") | ||||||
|  |     @ApiOperation("分页") | ||||||
|  |     @ApiImplicitParams({ | ||||||
|  |         @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , | ||||||
|  |         @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), | ||||||
|  |         @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), | ||||||
|  |         @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) | ||||||
|  |     }) | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:page')") | ||||||
|  |     public Result<PageData<WorkingProcedureTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ | ||||||
|  |         PageData<WorkingProcedureTypeDTO> page = workingProcedureTypeService.page(params); | ||||||
|  |  | ||||||
|  |         return new Result<PageData<WorkingProcedureTypeDTO>>().ok(page); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("{id}") | ||||||
|  |     @ApiOperation("信息") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:info')") | ||||||
|  |     public Result<WorkingProcedureTypeDTO> get(@PathVariable("id") Long id){ | ||||||
|  |         WorkingProcedureTypeDTO data = workingProcedureTypeService.get(id); | ||||||
|  |  | ||||||
|  |         return new Result<WorkingProcedureTypeDTO>().ok(data); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping | ||||||
|  |     @ApiOperation("保存") | ||||||
|  |     @LogOperation("保存") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:save')") | ||||||
|  |     public Result save(@RequestBody WorkingProcedureTypeDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         workingProcedureTypeService.save(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PutMapping | ||||||
|  |     @ApiOperation("修改") | ||||||
|  |     @LogOperation("修改") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:update')") | ||||||
|  |     public Result update(@RequestBody WorkingProcedureTypeDTO dto){ | ||||||
|  |         //效验数据 | ||||||
|  |         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | ||||||
|  |  | ||||||
|  |         workingProcedureTypeService.update(dto); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @DeleteMapping | ||||||
|  |     @ApiOperation("删除") | ||||||
|  |     @LogOperation("删除") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:delete')") | ||||||
|  |     public Result delete(@RequestBody Long[] ids){ | ||||||
|  |         //效验数据 | ||||||
|  |         AssertUtils.isArrayEmpty(ids, "id"); | ||||||
|  |  | ||||||
|  |         workingProcedureTypeService.delete(ids); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @GetMapping("export") | ||||||
|  |     @ApiOperation("导出") | ||||||
|  |     @LogOperation("导出") | ||||||
|  |     @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:export')") | ||||||
|  |     public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | ||||||
|  |         List<WorkingProcedureTypeDTO> list = workingProcedureTypeService.list(params); | ||||||
|  |  | ||||||
|  |         ExcelUtils.exportExcelToTarget(response, "WorkingProcedureType", list, WorkingProcedureTypeExcel.class); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping("status") | ||||||
|  |     @ApiOperation("改变状态") | ||||||
|  |     @LogOperation("改变状态") | ||||||
|  |     public Result changeStatus(@RequestBody IdParam id){ | ||||||
|  |         workingProcedureTypeService.changeStatus(id.getId()); | ||||||
|  |  | ||||||
|  |         return new Result(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @PostMapping(value = "list") | ||||||
|  |     @ApiOperation(value = "获取工序类型列表") | ||||||
|  |     private List<WorkingProcedureTypeDTO> list(@ApiIgnore @RequestParam Map<String, Object> params) { | ||||||
|  |         return workingProcedureTypeService.list(params); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										72
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/FactoryDTO.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/FactoryDTO.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,72 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工厂 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "工厂 表DTO对象") | ||||||
|  | public class FactoryDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工厂 名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工厂 编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工厂 描述") | ||||||
|  | 	private String descs; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工厂 联系地址") | ||||||
|  | 	private String address; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工厂类型,1-内部工厂;2-供应商") | ||||||
|  | 	private String type; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,18 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "工艺特性-工序 DTO对象") | ||||||
|  | public class FeaturesProcedureDTO implements Serializable { | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "检验参数id,关联product_features表") | ||||||
|  |     private Long productFeaturesId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "工序id,关联 working_procedure 表") | ||||||
|  |     private Long workingProcedureId; | ||||||
|  | } | ||||||
| @@ -0,0 +1,63 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 过程检验-工艺-检验参数 关系表  | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-09-01 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "过程检验-工艺-检验参数 关系表 DTO对象") | ||||||
|  | public class FeaturesStageProcedureRelationDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "检验参数id,关联product_features表") | ||||||
|  | 	private Long productFeaturesId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序id,关联 working_procedure 表") | ||||||
|  | 	private Long workingProcedureId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "(如果为空就代表4个阶段都不是)检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验") | ||||||
|  | 	private Integer inspectionStage; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										69
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/MachineDTO.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/MachineDTO.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 机台表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "机台表DTO对象") | ||||||
|  | public class MachineDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "机台名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "机台编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "机台id,关联platform id") | ||||||
|  | 	private Long platformId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "机台名称,关联platform id") | ||||||
|  | 	private String platformName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,66 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 量具表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "量具表DTO对象") | ||||||
|  | public class MeasureToolDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "量具 名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "量具 编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "量具类型;计量型=1 计数型=2") | ||||||
|  | 	private String type; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										66
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/PlatformDTO.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/PlatformDTO.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,66 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 站点表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "站点表DTO对象") | ||||||
|  | public class PlatformDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "站台名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "站台编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "站台分组") | ||||||
|  | 	private String platformGroup; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										89
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/ProductDTO.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/ProductDTO.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,89 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-11 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "产品 表DTO对象") | ||||||
|  | public class ProductDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品 名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品 编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品 规格") | ||||||
|  | 	private String specifications; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品 图纸") | ||||||
|  | 	private String drawing; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "描述") | ||||||
|  | 	private String descs; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品类型id,关联product_type表") | ||||||
|  | 	private Long productTypeId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品类型 名,product_type表") | ||||||
|  | 	private String productType; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "单位 id,关联unit表") | ||||||
|  | 	private Long unitId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;; 如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") | ||||||
|  | 	private String inspectionStage; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "检验标准") | ||||||
|  | 	private String inspectionStandard; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工厂") | ||||||
|  | 	private List<Long> factoryList; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,63 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品-工厂 关系表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-27 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "产品-工厂 关系表DTO对象") | ||||||
|  | public class ProductFactoryRelationDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品id,关联product表") | ||||||
|  | 	private Long productId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工厂id,关联 factory 表") | ||||||
|  | 	private Long factoryId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,121 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品特性 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "产品特性 表DTO对象") | ||||||
|  | public class ProductFeaturesDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品id,关联product表") | ||||||
|  | 	private Long productId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "量具id,关联measure_tool表") | ||||||
|  | 	private Long measureToolId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "量具名称,关联measure_tool表") | ||||||
|  | 	private String measureToolName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "单位 id,关联unit表") | ||||||
|  | 	private Long unitId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "单位名称,关联unit表") | ||||||
|  | 	private String unitName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品特性 名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品特性 编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品特性类型:1 计量型;2 计数型") | ||||||
|  | 	private Integer type; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") | ||||||
|  | 	private Integer defectLevel; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品特性 规格") | ||||||
|  | 	private String specifications; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "检验参数  规格下线") | ||||||
|  | 	private Float lsl; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "检验参数  规格中心线") | ||||||
|  | 	private Float sl; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "检验参数  规格上线") | ||||||
|  | 	private Float usl; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "分析图形,关联control_graph表id") | ||||||
|  | 	private Long controlGraphId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "分析图形名,关联control_graph表id") | ||||||
|  | 	private String controlGraphName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "是否需要spc分析,1 yes;0 no") | ||||||
|  | 	private Integer isSpc; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") | ||||||
|  | 	private Integer sampleSize; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "采样频率,只用于展示") | ||||||
|  | 	private String samplingFrequency; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") | ||||||
|  | 	private Integer decimalPlaces; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "目标cpk") | ||||||
|  | 	private Float targetCpk; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "目标cpk") | ||||||
|  | 	private Float targetPpk; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序id,关联 working_procedure 表") | ||||||
|  | 	private Long workingProcedureId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序 名,关联working_procedure表") | ||||||
|  | 	private String workingProcedureName; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,108 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品特性 历史表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "产品特性 历史表DTO对象") | ||||||
|  | public class ProductFeaturesHisDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品特性id,关联product_features表") | ||||||
|  | 	private Long productFeaturesId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品id,关联product表") | ||||||
|  | 	private Long productId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品特性 名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品特性 编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品特性类型:1 计量型;2 计数型") | ||||||
|  | 	private Integer type; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") | ||||||
|  | 	private Integer defectLevel; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "量具id,关联measure_tool表") | ||||||
|  | 	private Long measureToolId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "单位 id,关联unit表") | ||||||
|  | 	private Long unitId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品特性 规格") | ||||||
|  | 	private String specifications; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "检验参数  规格下线") | ||||||
|  | 	private Float lsl; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "检验参数  规格中心线") | ||||||
|  | 	private Float sl; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "检验参数  规格上线") | ||||||
|  | 	private Float usl; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "是否需要spc分析,1 yes;0 no") | ||||||
|  | 	private Integer isSpc; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "分析图形,关联control_graph表id") | ||||||
|  | 	private Long controlGraphId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") | ||||||
|  | 	private Integer sampleSize; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "采样频率,只用于展示") | ||||||
|  | 	private String samplingFrequency; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") | ||||||
|  | 	private Integer decimalPlaces; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "目标cpk") | ||||||
|  | 	private Float targetCpk; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "目标cpk") | ||||||
|  | 	private Float targetPpk; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty; | |||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  |  | ||||||
| import java.io.Serializable; | import java.io.Serializable; | ||||||
| import java.math.BigDecimal; |  | ||||||
| import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -20,10 +19,8 @@ import java.time.LocalDateTime; | |||||||
| public class ProductTypeDTO implements Serializable { | public class ProductTypeDTO implements Serializable { | ||||||
|     private static final long serialVersionUID = 1L; |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "ID") | 	@ApiModelProperty(value = "ID") | ||||||
| 	private BigDecimal id; | 	private Long id; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "产品类型 名") | 	@ApiModelProperty(value = "产品类型 名") | ||||||
| 	private String name; | 	private String name; | ||||||
| @@ -32,19 +29,19 @@ public class ProductTypeDTO implements Serializable { | |||||||
| 	private String code; | 	private String code; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "描述") | 	@ApiModelProperty(value = "描述") | ||||||
| 	private String desc; | 	private String descs; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "1 可用,0 不可用") | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
| 	private BigDecimal status; | 	private Integer status; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "备注") | 	@ApiModelProperty(value = "备注") | ||||||
| 	private String remark; | 	private String remark; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
| 	private BigDecimal valid; | 	private Integer valid; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "创建人") | 	@ApiModelProperty(value = "创建人") | ||||||
| 	private BigDecimal creatorId; | 	private Long creatorId; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "创建人姓名") | 	@ApiModelProperty(value = "创建人姓名") | ||||||
| 	private String creatorName; | 	private String creatorName; | ||||||
| @@ -53,7 +50,7 @@ public class ProductTypeDTO implements Serializable { | |||||||
| 	private LocalDateTime createTime; | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "更新人") | 	@ApiModelProperty(value = "更新人") | ||||||
| 	private BigDecimal updaterId; | 	private Long updaterId; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "更新人姓名") | 	@ApiModelProperty(value = "更新人姓名") | ||||||
| 	private String updaterName; | 	private String updaterName; | ||||||
| @@ -62,6 +59,6 @@ public class ProductTypeDTO implements Serializable { | |||||||
| 	private LocalDateTime updateTime; | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "版本号") | 	@ApiModelProperty(value = "版本号") | ||||||
| 	private BigDecimal version; | 	private Integer version; | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -0,0 +1,96 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工序 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "产品-工序 关系表DTO对象") | ||||||
|  | public class ProductWorkingprocedureRelationDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "产品id,关联product表") | ||||||
|  | 	private Long productId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序id,关联 working_procedure 表") | ||||||
|  | 	private Long workingProcedureId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序名称,关联 working_procedure 表") | ||||||
|  | 	private String workingProcedureName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序编码,关联 working_procedure 表") | ||||||
|  | 	private String workingProcedureCode; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "顺序,工序是有先后顺序的。") | ||||||
|  | 	private Integer sequence; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "node.shape") | ||||||
|  | 	private String shape; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "node.x") | ||||||
|  | 	private Integer x; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "node.y") | ||||||
|  | 	private Integer y; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "node.width") | ||||||
|  | 	private Integer width; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "node.width") | ||||||
|  | 	private Integer height; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "node.lable") | ||||||
|  | 	private String lable; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "字体颜色") | ||||||
|  | 	private String fontcolor; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "背景颜色") | ||||||
|  | 	private String backcolor; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										18
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/SequenceDTO.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/SequenceDTO.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "顺序更新参数") | ||||||
|  | public class SequenceDTO implements Serializable { | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "产品id") | ||||||
|  |     private Long productId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty(value = "产品工序序号") | ||||||
|  |     private Integer index; | ||||||
|  | } | ||||||
							
								
								
									
										65
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/ShiftDTO.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/ShiftDTO.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,65 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 班次 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "班次 表DTO对象") | ||||||
|  | public class ShiftDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "班次 名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "班次 编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "班次 描述") | ||||||
|  | 	private String descs; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										65
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/TeamDTO.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								ym-baisc/src/main/java/com/cnbm/basic/dto/TeamDTO.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,65 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 班组 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "班组 表DTO对象") | ||||||
|  | public class TeamDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "班组 名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "班组 编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "班组 描述") | ||||||
|  | 	private String descs; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty; | |||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  |  | ||||||
| import java.io.Serializable; | import java.io.Serializable; | ||||||
| import java.math.BigDecimal; |  | ||||||
| import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -23,7 +22,7 @@ public class UnitDTO implements Serializable { | |||||||
|  |  | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "ID") | 	@ApiModelProperty(value = "ID") | ||||||
| 	private BigDecimal id; | 	private Long id; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "单位 名") | 	@ApiModelProperty(value = "单位 名") | ||||||
| 	private String name; | 	private String name; | ||||||
| @@ -32,19 +31,19 @@ public class UnitDTO implements Serializable { | |||||||
| 	private String code; | 	private String code; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "单位类型,1 可计数,2 不可计数") | 	@ApiModelProperty(value = "单位类型,1 可计数,2 不可计数") | ||||||
| 	private BigDecimal type; | 	private Integer type; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "1 可用,0 不可用") | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
| 	private BigDecimal status; | 	private Integer status; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "备注") | 	@ApiModelProperty(value = "备注") | ||||||
| 	private String remark; | 	private String remark; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
| 	private BigDecimal valid; | 	private Integer valid; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "创建人") | 	@ApiModelProperty(value = "创建人") | ||||||
| 	private BigDecimal creatorId; | 	private Long creatorId; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "创建人姓名") | 	@ApiModelProperty(value = "创建人姓名") | ||||||
| 	private String creatorName; | 	private String creatorName; | ||||||
| @@ -53,7 +52,7 @@ public class UnitDTO implements Serializable { | |||||||
| 	private LocalDateTime createTime; | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "更新人") | 	@ApiModelProperty(value = "更新人") | ||||||
| 	private BigDecimal updaterId; | 	private Long updaterId; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "更新人姓名") | 	@ApiModelProperty(value = "更新人姓名") | ||||||
| 	private String updaterName; | 	private String updaterName; | ||||||
| @@ -62,6 +61,6 @@ public class UnitDTO implements Serializable { | |||||||
| 	private LocalDateTime updateTime; | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
| 	@ApiModelProperty(value = "版本号") | 	@ApiModelProperty(value = "版本号") | ||||||
| 	private BigDecimal version; | 	private Integer version; | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -0,0 +1,74 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工序 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "工序 表DTO对象") | ||||||
|  | public class WorkingProcedureDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序 名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序 编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序类型 id,关联working_procedure_type表") | ||||||
|  | 	private Long workingProcedureTypeId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序类型 名,关联working_procedure_type表") | ||||||
|  | 	private String workingProcedureTypeName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") | ||||||
|  | 	private String machineId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "机台id对应名称") | ||||||
|  | 	private String machineName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,67 @@ | |||||||
|  | package com.cnbm.basic.dto; | ||||||
|  |  | ||||||
|  | import com.cnbm.basic.entity.WorkingProcedure; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工序类型表 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "工序类型表 表DTO对象") | ||||||
|  | public class WorkingProcedureTypeDTO implements Serializable { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序类型 名") | ||||||
|  | 	private String name; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序类型 编码") | ||||||
|  | 	private String code; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "1 可用,0 不可用") | ||||||
|  | 	private Integer status; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "备注") | ||||||
|  | 	private String remark; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | 	private Integer valid; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人") | ||||||
|  | 	private Long creatorId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建人姓名") | ||||||
|  | 	private String creatorName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人") | ||||||
|  | 	private Long updaterId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新人姓名") | ||||||
|  | 	private String updaterName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "版本号") | ||||||
|  | 	private Integer version; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty(value = "工序列表") | ||||||
|  | 	private List<WorkingProcedure> workingProcedureList; | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										72
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Factory.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Factory.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,72 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 工厂 表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "Factory对象", description = "工厂 表") | ||||||
|  | public class Factory implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工厂 名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工厂 编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工厂 描述") | ||||||
|  |     private String descs; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工厂 联系地址") | ||||||
|  |     private String address; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工厂类型,1-内部工厂;2-供应商") | ||||||
|  |     private String type; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,67 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableLogic; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 过程检验-工艺-检验参数 关系表  | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-09-01 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @TableName("features_stage_procedure_relation") | ||||||
|  | @ApiModel(value = "FeaturesStageProcedureRelation对象", description = "过程检验-工艺-检验参数 关系表 ") | ||||||
|  | public class FeaturesStageProcedureRelation implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("检验参数id,关联product_features表") | ||||||
|  |     private Long productFeaturesId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工序id,关联 working_procedure 表") | ||||||
|  |     private Long workingProcedureId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("(如果为空就代表4个阶段都不是)检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验") | ||||||
|  |     private Integer inspectionStage; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										66
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Machine.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Machine.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,66 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 机台表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "Machine对象", description = "机台表") | ||||||
|  | public class Machine implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("机台名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("机台编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("机台id,关联platform id") | ||||||
|  |     private Long platformId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,68 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 量具表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @TableName("measure_tool") | ||||||
|  | @ApiModel(value = "MeasureTool对象", description = "量具表") | ||||||
|  | public class MeasureTool implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("量具 名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("量具 编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("量具类型;计量型=1 计数型=2") | ||||||
|  |     private String type; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										66
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Platform.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Platform.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,66 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 站点表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "Platform对象", description = "站点表") | ||||||
|  | public class Platform implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("站台名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("站台编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("站台分组") | ||||||
|  |     private String platformGroup; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										84
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Product.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Product.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,84 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 产品 表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-11 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "Product对象", description = "产品 表") | ||||||
|  | public class Product implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品 名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品 编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品 规格") | ||||||
|  |     private String specifications; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品 图纸") | ||||||
|  |     private String drawing; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("描述") | ||||||
|  |     private String descs; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品类型id,关联product_type表") | ||||||
|  |     private Long productTypeId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("单位 id,关联unit表") | ||||||
|  |     private Long unitId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;; 如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") | ||||||
|  |     private String inspectionStage; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("检验标准") | ||||||
|  |     private String inspectionStandard; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,65 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 产品-工厂 关系表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-27 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @TableName("product_factory_relation") | ||||||
|  | @ApiModel(value = "ProductFactoryRelation对象", description = "产品-工厂 关系表") | ||||||
|  | public class ProductFactoryRelation implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品id,关联product表") | ||||||
|  |     private Long productId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工厂id,关联 factory 表") | ||||||
|  |     private Long factoryId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,110 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 产品特性 表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @TableName("product_features") | ||||||
|  | @ApiModel(value = "ProductFeatures对象", description = "产品特性 表") | ||||||
|  | public class ProductFeatures implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品id,关联product表") | ||||||
|  |     private Long productId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("量具id,关联measure_tool表") | ||||||
|  |     private Long measureToolId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("单位 id,关联unit表") | ||||||
|  |     private Long unitId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品特性 名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品特性 编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品特性类型:1 计量型;2 计数型") | ||||||
|  |     private Integer type; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") | ||||||
|  |     private Integer defectLevel; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品特性 规格") | ||||||
|  |     private String specifications; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("检验参数  规格下线") | ||||||
|  |     private Float lsl; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("检验参数  规格中心线") | ||||||
|  |     private Float sl; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("检验参数  规格上线") | ||||||
|  |     private Float usl; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("分析图形,关联control_graph表id") | ||||||
|  |     private Long controlGraphId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("是否需要spc分析,1 yes;0 no") | ||||||
|  |     private Integer isSpc; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") | ||||||
|  |     private Integer sampleSize; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("采样频率,只用于展示") | ||||||
|  |     private String samplingFrequency; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") | ||||||
|  |     private Integer decimalPlaces; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("目标cpk") | ||||||
|  |     private Float targetCpk; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("目标cpk") | ||||||
|  |     private Float targetPpk; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,113 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 产品特性 历史表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @TableName("product_features_his") | ||||||
|  | @ApiModel(value = "ProductFeaturesHis对象", description = "产品特性 历史表") | ||||||
|  | public class ProductFeaturesHis implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品特性id,关联product_features表") | ||||||
|  |     private Long productFeaturesId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品id,关联product表") | ||||||
|  |     private Long productId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品特性 名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品特性 编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品特性类型:1 计量型;2 计数型") | ||||||
|  |     private Integer type; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") | ||||||
|  |     private Integer defectLevel; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("量具id,关联measure_tool表") | ||||||
|  |     private Long measureToolId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("单位 id,关联unit表") | ||||||
|  |     private Long unitId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品特性 规格") | ||||||
|  |     private String specifications; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("检验参数  规格下线") | ||||||
|  |     private Float lsl; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("检验参数  规格中心线") | ||||||
|  |     private Float sl; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("检验参数  规格上线") | ||||||
|  |     private Float usl; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("是否需要spc分析,1 yes;0 no") | ||||||
|  |     private Integer isSpc; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("分析图形,关联control_graph表id") | ||||||
|  |     private Long controlGraphId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") | ||||||
|  |     private Integer sampleSize; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("采样频率,只用于展示") | ||||||
|  |     private String samplingFrequency; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") | ||||||
|  |     private Integer decimalPlaces; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("目标cpk") | ||||||
|  |     private Float targetCpk; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("目标cpk") | ||||||
|  |     private Float targetPpk; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -6,7 +6,6 @@ import io.swagger.annotations.ApiModelProperty; | |||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  |  | ||||||
| import java.io.Serializable; | import java.io.Serializable; | ||||||
| import java.math.BigDecimal; |  | ||||||
| import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -25,7 +24,7 @@ public class ProductType implements Serializable { | |||||||
|     private static final long serialVersionUID = 1L; |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|     @ApiModelProperty("ID") |     @ApiModelProperty("ID") | ||||||
|     private BigDecimal id; |     private Long id; | ||||||
|  |  | ||||||
|     @ApiModelProperty("产品类型 名") |     @ApiModelProperty("产品类型 名") | ||||||
|     private String name; |     private String name; | ||||||
| @@ -37,16 +36,16 @@ public class ProductType implements Serializable { | |||||||
|     private String descs; |     private String descs; | ||||||
|  |  | ||||||
|     @ApiModelProperty("1 可用,0 不可用") |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|     private BigDecimal status; |     private Integer status; | ||||||
|  |  | ||||||
|     @ApiModelProperty("备注") |     @ApiModelProperty("备注") | ||||||
|     private String remark; |     private String remark; | ||||||
|  |  | ||||||
|     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|     private BigDecimal valid; |     private Integer valid; | ||||||
|  |  | ||||||
|     @ApiModelProperty("创建人") |     @ApiModelProperty("创建人") | ||||||
|     private BigDecimal creatorId; |     private Long creatorId; | ||||||
|  |  | ||||||
|     @ApiModelProperty("创建人姓名") |     @ApiModelProperty("创建人姓名") | ||||||
|     private String creatorName; |     private String creatorName; | ||||||
| @@ -55,7 +54,7 @@ public class ProductType implements Serializable { | |||||||
|     private LocalDateTime createTime; |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|     @ApiModelProperty("更新人") |     @ApiModelProperty("更新人") | ||||||
|     private BigDecimal updaterId; |     private Long updaterId; | ||||||
|  |  | ||||||
|     @ApiModelProperty("更新人姓名") |     @ApiModelProperty("更新人姓名") | ||||||
|     private String updaterName; |     private String updaterName; | ||||||
| @@ -64,7 +63,7 @@ public class ProductType implements Serializable { | |||||||
|     private LocalDateTime updateTime; |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|     @ApiModelProperty("版本号") |     @ApiModelProperty("版本号") | ||||||
|     private BigDecimal version; |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -0,0 +1,93 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import io.swagger.models.auth.In; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 工序 表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @TableName("product_workingprocedure_relation") | ||||||
|  | @ApiModel(value = "ProductWorkingprocedureRelation对象", description = "产品-工序 关系表") | ||||||
|  | public class ProductWorkingprocedureRelation implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("产品id,关联product表") | ||||||
|  |     private Long productId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工序id,关联 working_procedure 表") | ||||||
|  |     private Long workingProcedureId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("顺序,工序是有先后顺序的。") | ||||||
|  |     private Integer sequence; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("node.shape") | ||||||
|  |     private String shape; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("node.x") | ||||||
|  |     private Integer x; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("node.y") | ||||||
|  |     private Integer y; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("node.width") | ||||||
|  |     private Integer width; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("node.width") | ||||||
|  |     private Integer height; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("node.lable") | ||||||
|  |     private String lable; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("字体颜色") | ||||||
|  |     private String fontcolor; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("背景颜色") | ||||||
|  |     private String backcolor; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										66
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Shift.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Shift.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,66 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 班次 表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "Shift对象", description = "班次 表") | ||||||
|  | public class Shift implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("班次 名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("班次 编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("班次 描述") | ||||||
|  |     private String descs; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										66
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Team.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								ym-baisc/src/main/java/com/cnbm/basic/entity/Team.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,66 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 班组 表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ApiModel(value = "Team对象", description = "班组 表") | ||||||
|  | public class Team implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("班组 名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("班组 编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("班组 描述") | ||||||
|  |     private String descs; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty; | |||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  |  | ||||||
| import java.io.Serializable; | import java.io.Serializable; | ||||||
| import java.math.BigDecimal; |  | ||||||
| import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -23,7 +22,7 @@ public class Unit implements Serializable { | |||||||
|     private static final long serialVersionUID = 1L; |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|     @ApiModelProperty("ID") |     @ApiModelProperty("ID") | ||||||
|     private BigDecimal id; |     private Long id; | ||||||
|  |  | ||||||
|     @ApiModelProperty("单位 名") |     @ApiModelProperty("单位 名") | ||||||
|     private String name; |     private String name; | ||||||
| @@ -32,19 +31,19 @@ public class Unit implements Serializable { | |||||||
|     private String code; |     private String code; | ||||||
|  |  | ||||||
|     @ApiModelProperty("单位类型,1 可计数,2 不可计数") |     @ApiModelProperty("单位类型,1 可计数,2 不可计数") | ||||||
|     private BigDecimal type; |     private Integer type; | ||||||
|  |  | ||||||
|     @ApiModelProperty("1 可用,0 不可用") |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|     private BigDecimal status; |     private Integer status; | ||||||
|  |  | ||||||
|     @ApiModelProperty("备注") |     @ApiModelProperty("备注") | ||||||
|     private String remark; |     private String remark; | ||||||
|  |  | ||||||
|     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|     private BigDecimal valid; |     private Integer valid; | ||||||
|  |  | ||||||
|     @ApiModelProperty("创建人") |     @ApiModelProperty("创建人") | ||||||
|     private BigDecimal creatorId; |     private Long creatorId; | ||||||
|  |  | ||||||
|     @ApiModelProperty("创建人姓名") |     @ApiModelProperty("创建人姓名") | ||||||
|     private String creatorName; |     private String creatorName; | ||||||
| @@ -53,7 +52,7 @@ public class Unit implements Serializable { | |||||||
|     private LocalDateTime createTime; |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|     @ApiModelProperty("更新人") |     @ApiModelProperty("更新人") | ||||||
|     private BigDecimal updaterId; |     private Long updaterId; | ||||||
|  |  | ||||||
|     @ApiModelProperty("更新人姓名") |     @ApiModelProperty("更新人姓名") | ||||||
|     private String updaterName; |     private String updaterName; | ||||||
| @@ -62,7 +61,7 @@ public class Unit implements Serializable { | |||||||
|     private LocalDateTime updateTime; |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|     @ApiModelProperty("版本号") |     @ApiModelProperty("版本号") | ||||||
|     private BigDecimal version; |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -0,0 +1,71 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 工序 表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @TableName("working_procedure") | ||||||
|  | @ApiModel(value = "WorkingProcedure对象", description = "工序 表") | ||||||
|  | public class WorkingProcedure implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工序 名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工序 编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工序类型 id,关联working_procedure_type表") | ||||||
|  |     private Long workingProcedureTypeId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") | ||||||
|  |     private String machineId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,65 @@ | |||||||
|  | package com.cnbm.basic.entity; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * <p> | ||||||
|  |  * 工序类型表 表 | ||||||
|  |  * </p> | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @TableName("working_procedure_type") | ||||||
|  | @ApiModel(value = "WorkingProcedureType对象", description = "工序类型表 表") | ||||||
|  | public class WorkingProcedureType implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工序类型 名") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("工序类型 编码") | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  |     @ApiModelProperty("版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,51 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工厂 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class FactoryExcel { | ||||||
|  | //    @Excel(name = "ID") | ||||||
|  | //    private Long id; | ||||||
|  |     @Excel(name = "工厂名称") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "工厂编码") | ||||||
|  |     private String code; | ||||||
|  |     @Excel(name = "描述") | ||||||
|  |     private String descs; | ||||||
|  |     @Excel(name = "联系地址") | ||||||
|  |     private String address; | ||||||
|  |     @Excel(name = "工厂类型") | ||||||
|  |     private String type; | ||||||
|  | //    @Excel(name = "1 可用,0 不可用") | ||||||
|  | //    private Integer status; | ||||||
|  | //    @Excel(name = "备注") | ||||||
|  | //    private String remark; | ||||||
|  | //    @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | //    private Integer valid; | ||||||
|  | //    @Excel(name = "创建人") | ||||||
|  | //    private Long creatorId; | ||||||
|  | //    @Excel(name = "创建人姓名") | ||||||
|  | //    private String creatorName; | ||||||
|  | //    @Excel(name = "创建时间") | ||||||
|  | //    private LocalDateTime createTime; | ||||||
|  | //    @Excel(name = "更新人") | ||||||
|  | //    private Long updaterId; | ||||||
|  | //    @Excel(name = "更新人姓名") | ||||||
|  | //    private String updaterName; | ||||||
|  | //    @Excel(name = "更新时间") | ||||||
|  | //    private LocalDateTime updateTime; | ||||||
|  | //    @Excel(name = "版本号") | ||||||
|  | //    private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,43 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 过程检验-工艺-检验参数 关系表  | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-09-01 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class FeaturesStageProcedureRelationExcel { | ||||||
|  |     @Excel(name = "ID") | ||||||
|  |     private Long id; | ||||||
|  |     @Excel(name = "检验参数id,关联product_features表") | ||||||
|  |     private Long productFeaturesId; | ||||||
|  |     @Excel(name = "工序id,关联 working_procedure 表") | ||||||
|  |     private Long workingProcedureId; | ||||||
|  |     @Excel(name = "(如果为空就代表4个阶段都不是)检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验") | ||||||
|  |     private Integer inspectionStage; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |     @Excel(name = "创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |     @Excel(name = "创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |     @Excel(name = "更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |     @Excel(name = "更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |     @Excel(name = "更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |     @Excel(name = "版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,47 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 机台表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class MachineExcel { | ||||||
|  | //    @Excel(name = "ID") | ||||||
|  | //    private Long id; | ||||||
|  |     @Excel(name = "机台名") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "机台编码") | ||||||
|  |     private String code; | ||||||
|  | //    @Excel(name = "机台id,关联platform id") | ||||||
|  | //    private Long platformId; | ||||||
|  |     @Excel(name = "站点") | ||||||
|  |     private String platformName; | ||||||
|  | //    @Excel(name = "1 可用,0 不可用") | ||||||
|  | //    private Integer status; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  | //    @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | //    private Integer valid; | ||||||
|  | //    @Excel(name = "创建人") | ||||||
|  | //    private Long creatorId; | ||||||
|  | //    @Excel(name = "创建人姓名") | ||||||
|  | //    private String creatorName; | ||||||
|  | //    @Excel(name = "创建时间") | ||||||
|  | //    private LocalDateTime createTime; | ||||||
|  | //    @Excel(name = "更新人") | ||||||
|  | //    private Long updaterId; | ||||||
|  | //    @Excel(name = "更新人姓名") | ||||||
|  | //    private String updaterName; | ||||||
|  | //    @Excel(name = "更新时间") | ||||||
|  | //    private LocalDateTime updateTime; | ||||||
|  | //    @Excel(name = "版本号") | ||||||
|  | //    private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,45 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 量具表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class MeasureToolExcel { | ||||||
|  |     @Excel(name = "ID") | ||||||
|  |     private Long id; | ||||||
|  |     @Excel(name = "量具 名") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "量具 编码") | ||||||
|  |     private String code; | ||||||
|  |     @Excel(name = "量具类型;计量型=1 计数型=2") | ||||||
|  |     private String type; | ||||||
|  |     @Excel(name = "1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |     @Excel(name = "创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |     @Excel(name = "创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |     @Excel(name = "更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |     @Excel(name = "更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |     @Excel(name = "更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |     @Excel(name = "版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,45 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 站点表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class PlatformExcel { | ||||||
|  | //    @Excel(name = "ID") | ||||||
|  | //    private Long id; | ||||||
|  |     @Excel(name = "站台名") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "站台编码") | ||||||
|  |     private String code; | ||||||
|  |     @Excel(name = "站台分组") | ||||||
|  |     private String platformGroup; | ||||||
|  | //    @Excel(name = "1 可用,0 不可用") | ||||||
|  | //    private Integer status; | ||||||
|  | //    @Excel(name = "备注") | ||||||
|  | //    private String remark; | ||||||
|  | //    @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | //    private Integer valid; | ||||||
|  | //    @Excel(name = "创建人") | ||||||
|  | //    private Long creatorId; | ||||||
|  | //    @Excel(name = "创建人姓名") | ||||||
|  | //    private String creatorName; | ||||||
|  | //    @Excel(name = "创建时间") | ||||||
|  | //    private LocalDateTime createTime; | ||||||
|  | //    @Excel(name = "更新人") | ||||||
|  | //    private Long updaterId; | ||||||
|  | //    @Excel(name = "更新人姓名") | ||||||
|  | //    private String updaterName; | ||||||
|  | //    @Excel(name = "更新时间") | ||||||
|  | //    private LocalDateTime updateTime; | ||||||
|  | //    @Excel(name = "版本号") | ||||||
|  | //    private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,57 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-11 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class ProductExcel { | ||||||
|  |     @Excel(name = "ID") | ||||||
|  |     private Long id; | ||||||
|  |     @Excel(name = "产品 名") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "产品 编码") | ||||||
|  |     private String code; | ||||||
|  |     @Excel(name = "产品 规格") | ||||||
|  |     private String specifications; | ||||||
|  |     @Excel(name = "产品 图纸") | ||||||
|  |     private String drawing; | ||||||
|  |     @Excel(name = "描述") | ||||||
|  |     private String descs; | ||||||
|  |     @Excel(name = "产品类型id,关联product_type表") | ||||||
|  |     private Long productTypeId; | ||||||
|  |     @Excel(name = "单位 id,关联unit表") | ||||||
|  |     private Long unitId; | ||||||
|  |     @Excel(name = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;; 如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") | ||||||
|  |     private String inspectionStage; | ||||||
|  |     @Excel(name = "检验标准") | ||||||
|  |     private String inspectionStandard; | ||||||
|  |     @Excel(name = "1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |     @Excel(name = "创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |     @Excel(name = "创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |     @Excel(name = "更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |     @Excel(name = "更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |     @Excel(name = "更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |     @Excel(name = "版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,43 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品-工厂 关系表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-27 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class ProductFactoryRelationExcel { | ||||||
|  |     @Excel(name = "ID") | ||||||
|  |     private Long id; | ||||||
|  |     @Excel(name = "产品id,关联product表") | ||||||
|  |     private Long productId; | ||||||
|  |     @Excel(name = "工厂id,关联 factory 表") | ||||||
|  |     private Long factoryId; | ||||||
|  |     @Excel(name = "1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |     @Excel(name = "创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |     @Excel(name = "创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |     @Excel(name = "更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |     @Excel(name = "更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |     @Excel(name = "更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |     @Excel(name = "版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,73 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品特性 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class ProductFeaturesExcel { | ||||||
|  |     @Excel(name = "ID") | ||||||
|  |     private Long id; | ||||||
|  |     @Excel(name = "产品id,关联product表") | ||||||
|  |     private Long productId; | ||||||
|  |     @Excel(name = "量具id,关联measure_tool表") | ||||||
|  |     private Long measureToolId; | ||||||
|  |     @Excel(name = "单位 id,关联unit表") | ||||||
|  |     private Long unitId; | ||||||
|  |     @Excel(name = "产品特性 名") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "产品特性 编码") | ||||||
|  |     private String code; | ||||||
|  |     @Excel(name = "产品特性类型:1 计量型;2 计数型") | ||||||
|  |     private Integer type; | ||||||
|  |     @Excel(name = "缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") | ||||||
|  |     private Integer defectLevel; | ||||||
|  |     @Excel(name = "产品特性 规格") | ||||||
|  |     private String specifications; | ||||||
|  |     @Excel(name = "检验参数  规格下线") | ||||||
|  |     private Float lsl; | ||||||
|  |     @Excel(name = "检验参数  规格中心线") | ||||||
|  |     private Float sl; | ||||||
|  |     @Excel(name = "检验参数  规格上线") | ||||||
|  |     private Float usl; | ||||||
|  |     @Excel(name = "分析图形,关联control_graph表id") | ||||||
|  |     private Long controlGraphId; | ||||||
|  |     @Excel(name = "是否需要spc分析,1 yes;0 no") | ||||||
|  |     private Integer isSpc; | ||||||
|  |     @Excel(name = "样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") | ||||||
|  |     private Integer sampleSize; | ||||||
|  |     @Excel(name = "采样频率,只用于展示") | ||||||
|  |     private String samplingFrequency; | ||||||
|  |     @Excel(name = "小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") | ||||||
|  |     private Integer decimalPlaces; | ||||||
|  |     @Excel(name = "目标cpk") | ||||||
|  |     private Float targetCpk; | ||||||
|  |     @Excel(name = "目标cpk") | ||||||
|  |     private Float targetPpk; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |     @Excel(name = "创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |     @Excel(name = "创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |     @Excel(name = "更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |     @Excel(name = "更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |     @Excel(name = "更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |     @Excel(name = "版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,75 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品特性 历史表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class ProductFeaturesHisExcel { | ||||||
|  |     @Excel(name = "ID") | ||||||
|  |     private Long id; | ||||||
|  |     @Excel(name = "产品特性id,关联product_features表") | ||||||
|  |     private Long productFeaturesId; | ||||||
|  |     @Excel(name = "产品id,关联product表") | ||||||
|  |     private Long productId; | ||||||
|  |     @Excel(name = "产品特性 名") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "产品特性 编码") | ||||||
|  |     private String code; | ||||||
|  |     @Excel(name = "产品特性类型:1 计量型;2 计数型") | ||||||
|  |     private Integer type; | ||||||
|  |     @Excel(name = "缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") | ||||||
|  |     private Integer defectLevel; | ||||||
|  |     @Excel(name = "量具id,关联measure_tool表") | ||||||
|  |     private Long measureToolId; | ||||||
|  |     @Excel(name = "单位 id,关联unit表") | ||||||
|  |     private Long unitId; | ||||||
|  |     @Excel(name = "产品特性 规格") | ||||||
|  |     private String specifications; | ||||||
|  |     @Excel(name = "检验参数  规格下线") | ||||||
|  |     private Float lsl; | ||||||
|  |     @Excel(name = "检验参数  规格中心线") | ||||||
|  |     private Float sl; | ||||||
|  |     @Excel(name = "检验参数  规格上线") | ||||||
|  |     private Float usl; | ||||||
|  |     @Excel(name = "是否需要spc分析,1 yes;0 no") | ||||||
|  |     private Integer isSpc; | ||||||
|  |     @Excel(name = "分析图形,关联control_graph表id") | ||||||
|  |     private Long controlGraphId; | ||||||
|  |     @Excel(name = "样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") | ||||||
|  |     private Integer sampleSize; | ||||||
|  |     @Excel(name = "采样频率,只用于展示") | ||||||
|  |     private String samplingFrequency; | ||||||
|  |     @Excel(name = "小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") | ||||||
|  |     private Integer decimalPlaces; | ||||||
|  |     @Excel(name = "目标cpk") | ||||||
|  |     private Float targetCpk; | ||||||
|  |     @Excel(name = "目标cpk") | ||||||
|  |     private Float targetPpk; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |     @Excel(name = "创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |     @Excel(name = "创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |     @Excel(name = "更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |     @Excel(name = "更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |     @Excel(name = "更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |     @Excel(name = "版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -3,7 +3,6 @@ package com.cnbm.basic.excel; | |||||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  |  | ||||||
| import java.math.BigDecimal; |  | ||||||
| import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -15,32 +14,32 @@ import java.time.LocalDateTime; | |||||||
| @Data | @Data | ||||||
| public class ProductTypeExcel { | public class ProductTypeExcel { | ||||||
|     @Excel(name = "ID") |     @Excel(name = "ID") | ||||||
|     private BigDecimal id; |     private Long id; | ||||||
|     @Excel(name = "产品类型 名") |     @Excel(name = "产品类型 名") | ||||||
|     private String name; |     private String name; | ||||||
|     @Excel(name = "产品类型 编码") |     @Excel(name = "产品类型 编码") | ||||||
|     private String code; |     private String code; | ||||||
|     @Excel(name = "描述") |     @Excel(name = "描述") | ||||||
|     private String desc; |     private String descs; | ||||||
|     @Excel(name = "1 可用,0 不可用") |     @Excel(name = "1 可用,0 不可用") | ||||||
|     private BigDecimal status; |     private Integer status; | ||||||
|     @Excel(name = "备注") |     @Excel(name = "备注") | ||||||
|     private String remark; |     private String remark; | ||||||
|     @Excel(name = "删除标志,是否有效:1 可用 0不可用") |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|     private BigDecimal valid; |     private Integer valid; | ||||||
|     @Excel(name = "创建人") |     @Excel(name = "创建人") | ||||||
|     private BigDecimal creatorId; |     private Long creatorId; | ||||||
|     @Excel(name = "创建人姓名") |     @Excel(name = "创建人姓名") | ||||||
|     private String creatorName; |     private String creatorName; | ||||||
|     @Excel(name = "创建时间") |     @Excel(name = "创建时间") | ||||||
|     private LocalDateTime createTime; |     private LocalDateTime createTime; | ||||||
|     @Excel(name = "更新人") |     @Excel(name = "更新人") | ||||||
|     private BigDecimal updaterId; |     private Long updaterId; | ||||||
|     @Excel(name = "更新人姓名") |     @Excel(name = "更新人姓名") | ||||||
|     private String updaterName; |     private String updaterName; | ||||||
|     @Excel(name = "更新时间") |     @Excel(name = "更新时间") | ||||||
|     private LocalDateTime updateTime; |     private LocalDateTime updateTime; | ||||||
|     @Excel(name = "版本号") |     @Excel(name = "版本号") | ||||||
|     private BigDecimal version; |     private Integer version; | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -0,0 +1,61 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工序 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class ProductWorkingprocedureRelationExcel { | ||||||
|  |     @Excel(name = "ID") | ||||||
|  |     private Long id; | ||||||
|  |     @Excel(name = "产品id,关联product表") | ||||||
|  |     private Long productId; | ||||||
|  |     @Excel(name = "工序id,关联 working_procedure 表") | ||||||
|  |     private Long workingProcedureId; | ||||||
|  |     @Excel(name = "顺序,工序是有先后顺序的。") | ||||||
|  |     private Integer sequence; | ||||||
|  |     @Excel(name = "1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |     @Excel(name = "node.shape") | ||||||
|  |     private String shape; | ||||||
|  |     @Excel(name = "node.x") | ||||||
|  |     private Integer x; | ||||||
|  |     @Excel(name = "node.y") | ||||||
|  |     private Integer y; | ||||||
|  |     @Excel(name = "node.width") | ||||||
|  |     private Integer width; | ||||||
|  |     @Excel(name = "node.width") | ||||||
|  |     private Integer height; | ||||||
|  |     @Excel(name = "node.lable") | ||||||
|  |     private String lable; | ||||||
|  |     @Excel(name = "字体颜色") | ||||||
|  |     private String fontcolor; | ||||||
|  |     @Excel(name = "背景颜色") | ||||||
|  |     private String backcolor; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |     @Excel(name = "创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |     @Excel(name = "创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |     @Excel(name = "更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |     @Excel(name = "更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |     @Excel(name = "更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |     @Excel(name = "版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										45
									
								
								ym-baisc/src/main/java/com/cnbm/basic/excel/ShiftExcel.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								ym-baisc/src/main/java/com/cnbm/basic/excel/ShiftExcel.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 班次 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class ShiftExcel { | ||||||
|  |     @Excel(name = "ID") | ||||||
|  |     private Long id; | ||||||
|  |     @Excel(name = "班次 名") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "班次 编码") | ||||||
|  |     private String code; | ||||||
|  |     @Excel(name = "班次 描述") | ||||||
|  |     private String descs; | ||||||
|  |     @Excel(name = "1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |     @Excel(name = "创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |     @Excel(name = "创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |     @Excel(name = "更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |     @Excel(name = "更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |     @Excel(name = "更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |     @Excel(name = "版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										45
									
								
								ym-baisc/src/main/java/com/cnbm/basic/excel/TeamExcel.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								ym-baisc/src/main/java/com/cnbm/basic/excel/TeamExcel.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 班组 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class TeamExcel { | ||||||
|  |     @Excel(name = "ID") | ||||||
|  |     private Long id; | ||||||
|  |     @Excel(name = "班组 名") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "班组 编码") | ||||||
|  |     private String code; | ||||||
|  |     @Excel(name = "班组 描述") | ||||||
|  |     private String descs; | ||||||
|  |     @Excel(name = "1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |     @Excel(name = "创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |     @Excel(name = "创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |     @Excel(name = "更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |     @Excel(name = "更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |     @Excel(name = "更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |     @Excel(name = "版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -3,7 +3,6 @@ package com.cnbm.basic.excel; | |||||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  |  | ||||||
| import java.math.BigDecimal; |  | ||||||
| import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -14,33 +13,33 @@ import java.time.LocalDateTime; | |||||||
|  */ |  */ | ||||||
| @Data | @Data | ||||||
| public class UnitExcel { | public class UnitExcel { | ||||||
|     @Excel(name = "ID") | //    @Excel(name = "ID") | ||||||
|     private BigDecimal id; | //    private Long id; | ||||||
|     @Excel(name = "单位 名") |     @Excel(name = "单位 名") | ||||||
|     private String name; |     private String name; | ||||||
|     @Excel(name = "单位 编码") |     @Excel(name = "单位 编码") | ||||||
|     private String code; |     private String code; | ||||||
|     @Excel(name = "单位类型,1 可计数,2 不可计数") | //    @Excel(name = "单位类型,1 可计数,2 不可计数") | ||||||
|     private BigDecimal type; | //    private Integer type; | ||||||
|     @Excel(name = "1 可用,0 不可用") | //    @Excel(name = "1 可用,0 不可用") | ||||||
|     private BigDecimal status; | //    private Integer status; | ||||||
|     @Excel(name = "备注") | //    @Excel(name = "备注") | ||||||
|     private String remark; | //    private String remark; | ||||||
|     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | //    @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|     private BigDecimal valid; | //    private Integer valid; | ||||||
|     @Excel(name = "创建人") | //    @Excel(name = "创建人") | ||||||
|     private BigDecimal creatorId; | //    private Long creatorId; | ||||||
|     @Excel(name = "创建人姓名") | //    @Excel(name = "创建人姓名") | ||||||
|     private String creatorName; | //    private String creatorName; | ||||||
|     @Excel(name = "创建时间") | //    @Excel(name = "创建时间") | ||||||
|     private LocalDateTime createTime; | //    private LocalDateTime createTime; | ||||||
|     @Excel(name = "更新人") | //    @Excel(name = "更新人") | ||||||
|     private BigDecimal updaterId; | //    private Long updaterId; | ||||||
|     @Excel(name = "更新人姓名") | //    @Excel(name = "更新人姓名") | ||||||
|     private String updaterName; | //    private String updaterName; | ||||||
|     @Excel(name = "更新时间") | //    @Excel(name = "更新时间") | ||||||
|     private LocalDateTime updateTime; | //    private LocalDateTime updateTime; | ||||||
|     @Excel(name = "版本号") | //    @Excel(name = "版本号") | ||||||
|     private BigDecimal version; | //    private Integer version; | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -0,0 +1,47 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工序 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class WorkingProcedureExcel { | ||||||
|  |     @Excel(name = "ID") | ||||||
|  |     private Long id; | ||||||
|  |     @Excel(name = "工序 名") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "工序 编码") | ||||||
|  |     private String code; | ||||||
|  |     @Excel(name = "工序类型 id,关联working_procedure_type表") | ||||||
|  |     private Long workingProcedureTypeId; | ||||||
|  |     @Excel(name = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") | ||||||
|  |     private String machineId; | ||||||
|  |     @Excel(name = "1 可用,0 不可用") | ||||||
|  |     private Integer status; | ||||||
|  |     @Excel(name = "备注") | ||||||
|  |     private String remark; | ||||||
|  |     @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  |     private Integer valid; | ||||||
|  |     @Excel(name = "创建人") | ||||||
|  |     private Long creatorId; | ||||||
|  |     @Excel(name = "创建人姓名") | ||||||
|  |     private String creatorName; | ||||||
|  |     @Excel(name = "创建时间") | ||||||
|  |     private LocalDateTime createTime; | ||||||
|  |     @Excel(name = "更新人") | ||||||
|  |     private Long updaterId; | ||||||
|  |     @Excel(name = "更新人姓名") | ||||||
|  |     private String updaterName; | ||||||
|  |     @Excel(name = "更新时间") | ||||||
|  |     private LocalDateTime updateTime; | ||||||
|  |     @Excel(name = "版本号") | ||||||
|  |     private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,43 @@ | |||||||
|  | package com.cnbm.basic.excel; | ||||||
|  |  | ||||||
|  | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工序类型表 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since  2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class WorkingProcedureTypeExcel { | ||||||
|  | //    @Excel(name = "ID") | ||||||
|  | //    private Long id; | ||||||
|  |     @Excel(name = "工序类型 名") | ||||||
|  |     private String name; | ||||||
|  |     @Excel(name = "工序类型 编码") | ||||||
|  |     private String code; | ||||||
|  | //    @Excel(name = "1 可用,0 不可用") | ||||||
|  | //    private Integer status; | ||||||
|  | //    @Excel(name = "备注") | ||||||
|  | //    private String remark; | ||||||
|  | //    @Excel(name = "删除标志,是否有效:1 可用 0不可用") | ||||||
|  | //    private Integer valid; | ||||||
|  | //    @Excel(name = "创建人") | ||||||
|  | //    private Long creatorId; | ||||||
|  | //    @Excel(name = "创建人姓名") | ||||||
|  | //    private String creatorName; | ||||||
|  | //    @Excel(name = "创建时间") | ||||||
|  | //    private LocalDateTime createTime; | ||||||
|  | //    @Excel(name = "更新人") | ||||||
|  | //    private Long updaterId; | ||||||
|  | //    @Excel(name = "更新人姓名") | ||||||
|  | //    private String updaterName; | ||||||
|  | //    @Excel(name = "更新时间") | ||||||
|  | //    private LocalDateTime updateTime; | ||||||
|  | //    @Excel(name = "版本号") | ||||||
|  | //    private Integer version; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -0,0 +1,20 @@ | |||||||
|  | package com.cnbm.basic.mapper; | ||||||
|  |  | ||||||
|  | import com.cnbm.basic.dto.FactoryDTO; | ||||||
|  | import com.cnbm.common.dao.BaseDao; | ||||||
|  | import com.cnbm.basic.entity.Factory; | ||||||
|  | import org.apache.ibatis.annotations.Mapper; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工厂 表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Mapper | ||||||
|  | public interface FactoryMapper extends BaseDao<Factory> { | ||||||
|  |  | ||||||
|  |     List<FactoryDTO> list(); | ||||||
|  | } | ||||||
| @@ -0,0 +1,21 @@ | |||||||
|  | package com.cnbm.basic.mapper; | ||||||
|  |  | ||||||
|  | import com.cnbm.basic.dto.ProductFeaturesDTO; | ||||||
|  | import com.cnbm.common.dao.BaseDao; | ||||||
|  | import com.cnbm.basic.entity.FeaturesStageProcedureRelation; | ||||||
|  | import org.apache.ibatis.annotations.Mapper; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 过程检验-工艺-检验参数 关系表  | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-09-01 | ||||||
|  |  */ | ||||||
|  | @Mapper | ||||||
|  | public interface FeaturesStageProcedureRelationMapper extends BaseDao<FeaturesStageProcedureRelation> { | ||||||
|  |  | ||||||
|  |     void deleteByStageProcedure(Map<String, Object> params); | ||||||
|  | } | ||||||
| @@ -0,0 +1,26 @@ | |||||||
|  | package com.cnbm.basic.mapper; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.metadata.IPage; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.cnbm.basic.dto.MachineDTO; | ||||||
|  | import com.cnbm.common.dao.BaseDao; | ||||||
|  | import com.cnbm.basic.entity.Machine; | ||||||
|  | import com.cnbm.common.page.PageData; | ||||||
|  | import org.apache.ibatis.annotations.Mapper; | ||||||
|  | import org.apache.ibatis.annotations.Param; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 机台表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-15 | ||||||
|  |  */ | ||||||
|  | @Mapper | ||||||
|  | public interface MachineMapper extends BaseDao<Machine> { | ||||||
|  | 	PageData<MachineDTO> page(Map<String, Object> params); | ||||||
|  |  | ||||||
|  | 	List<MachineDTO> list(Map<String, Object> params); | ||||||
|  | } | ||||||
| @@ -0,0 +1,19 @@ | |||||||
|  | package com.cnbm.basic.mapper; | ||||||
|  |  | ||||||
|  | import com.cnbm.basic.dto.MeasureToolDTO; | ||||||
|  | import com.cnbm.common.dao.BaseDao; | ||||||
|  | import com.cnbm.basic.entity.MeasureTool; | ||||||
|  | import org.apache.ibatis.annotations.Mapper; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 量具表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Mapper | ||||||
|  | public interface MeasureToolMapper extends BaseDao<MeasureTool> { | ||||||
|  | 	List<MeasureToolDTO> list(); | ||||||
|  | } | ||||||
| @@ -0,0 +1,20 @@ | |||||||
|  | package com.cnbm.basic.mapper; | ||||||
|  |  | ||||||
|  | import com.cnbm.basic.dto.FactoryDTO; | ||||||
|  | import com.cnbm.basic.dto.PlatformDTO; | ||||||
|  | import com.cnbm.common.dao.BaseDao; | ||||||
|  | import com.cnbm.basic.entity.Platform; | ||||||
|  | import org.apache.ibatis.annotations.Mapper; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 站点表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-13 | ||||||
|  |  */ | ||||||
|  | @Mapper | ||||||
|  | public interface PlatformMapper extends BaseDao<Platform> { | ||||||
|  |     List<PlatformDTO> list(); | ||||||
|  | } | ||||||
| @@ -0,0 +1,18 @@ | |||||||
|  | package com.cnbm.basic.mapper; | ||||||
|  |  | ||||||
|  | import com.cnbm.common.dao.BaseDao; | ||||||
|  | import com.cnbm.basic.entity.ProductFactoryRelation; | ||||||
|  | import org.apache.ibatis.annotations.Mapper; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 产品-工厂 关系表 | ||||||
|  |  * | ||||||
|  |  * @author why | ||||||
|  |  * @since 2022-07-27 | ||||||
|  |  */ | ||||||
|  | @Mapper | ||||||
|  | public interface ProductFactoryRelationMapper extends BaseDao<ProductFactoryRelation> { | ||||||
|  | 	List<Long> getFactoryListByProductId(Long productId); | ||||||
|  | } | ||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user