耗材管理
This commit is contained in:
parent
6b4ddc55be
commit
d5ac905eaa
@ -4,6 +4,8 @@ import java.util.List;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import com.eqc.common.core.domain.entity.SysDictType;
|
||||||
|
import com.eqc.system.domain.Equipments;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -105,4 +107,13 @@ public class EquipmentsController extends BaseController {
|
|||||||
@PathVariable Long[] equipmentIds) {
|
@PathVariable Long[] equipmentIds) {
|
||||||
return toAjax(iEquipmentsService.deleteWithValidByIds(Arrays.asList(equipmentIds), true));
|
return toAjax(iEquipmentsService.deleteWithValidByIds(Arrays.asList(equipmentIds), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设备选择框列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/optionSelect")
|
||||||
|
public R<List<EquipmentsVo>> optionSelect() {
|
||||||
|
List<EquipmentsVo> equipmentAll = iEquipmentsService.queryList(new EquipmentsBo());
|
||||||
|
return R.ok(equipmentAll);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -253,4 +253,11 @@ public class SysUserController extends BaseController {
|
|||||||
return R.ok(deptService.selectDeptTreeList(dept));
|
return R.ok(deptService.selectDeptTreeList(dept));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/optionsSelect")
|
||||||
|
public R<List<SysUser>> userOptions() {
|
||||||
|
return R.ok(userService.selectUserList(new SysUser()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ spring.servlet.multipart.location: /eqc/server/temp
|
|||||||
--- # 监控中心配置
|
--- # 监控中心配置
|
||||||
spring.boot.admin.client:
|
spring.boot.admin.client:
|
||||||
# 增加客户端开关
|
# 增加客户端开关
|
||||||
enabled: true
|
enabled: false
|
||||||
url: http://localhost:9090/admin
|
url: http://localhost:9090/admin
|
||||||
instance:
|
instance:
|
||||||
service-host-type: IP
|
service-host-type: IP
|
||||||
@ -14,7 +14,7 @@ spring.boot.admin.client:
|
|||||||
--- # xxl-job 配置
|
--- # xxl-job 配置
|
||||||
xxl.job:
|
xxl.job:
|
||||||
# 执行器开关
|
# 执行器开关
|
||||||
enabled: true
|
enabled: false
|
||||||
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
|
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
|
||||||
admin-addresses: http://localhost:9100/xxl-job-admin
|
admin-addresses: http://localhost:9100/xxl-job-admin
|
||||||
# 执行器通讯TOKEN:非空时启用
|
# 执行器通讯TOKEN:非空时启用
|
||||||
@ -52,17 +52,17 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
url: jdbc:mysql://localhost:3306/eqcs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: 123456
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
# slave:
|
||||||
lazy: true
|
# lazy: true
|
||||||
type: ${spring.datasource.type}
|
# type: ${spring.datasource.type}
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
# url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
username:
|
# username:
|
||||||
password:
|
# password:
|
||||||
# oracle:
|
# oracle:
|
||||||
# type: ${spring.datasource.type}
|
# type: ${spring.datasource.type}
|
||||||
# driverClassName: oracle.jdbc.OracleDriver
|
# driverClassName: oracle.jdbc.OracleDriver
|
||||||
|
|||||||
@ -23,7 +23,7 @@ captcha:
|
|||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
port: 8082
|
port: 8080
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
|
|||||||
@ -267,7 +267,13 @@ insert into sys_menu values('1602', '文件下载', '118', '3', '#', '', '', 1,
|
|||||||
insert into sys_menu values('1603', '文件删除', '118', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove', '#', 'admin', sysdate(), '', null, '');
|
insert into sys_menu values('1603', '文件删除', '118', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove', '#', 'admin', sysdate(), '', null, '');
|
||||||
insert into sys_menu values('1604', '配置添加', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:add', '#', 'admin', sysdate(), '', null, '');
|
insert into sys_menu values('1604', '配置添加', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:add', '#', 'admin', sysdate(), '', null, '');
|
||||||
insert into sys_menu values('1605', '配置编辑', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit', '#', 'admin', sysdate(), '', null, '');
|
insert into sys_menu values('1605', '配置编辑', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
-- 设备管理菜单
|
||||||
|
INSERT INTO sys_menu VALUES (1741093982624108545, '设备管理', 0, 0, 'equipments', 'equipments/index', NULL, 1, 0, 'C', '0', '0', 'equipments:list', 'example', 'admin', sysdate(), '', NULL, '');
|
||||||
|
INSERT INTO sys_menu VALUES (1741094806775484418, '设备查询', 1741093982624108545, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'equipments:query', '#', 'admin', sysdate(), '', NULL, '');
|
||||||
|
INSERT INTO sys_menu VALUES (1741094806775484419, '设备新增', 1741093982624108545, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'equipments:add', '#', 'admin', sysdate(), '', NULL, '');
|
||||||
|
INSERT INTO sys_menu VALUES (1741094806775484420, '设备修改', 1741093982624108545, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'equipments:edit', '#', 'admin', sysdate(), '', NULL, '');
|
||||||
|
INSERT INTO sys_menu VALUES (1741094806775484421, '设备删除', 1741093982624108545, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'equipments:remove', '#', 'admin', sysdate(), '', NULL, '');
|
||||||
|
INSERT INTO sys_menu VALUES (1741094806775484422, '设备导出', 1741093982624108545, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'equipments:export', '#', 'admin', sysdate(), '', NULL, '');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 6、用户和角色关联表 用户N-1角色
|
-- 6、用户和角色关联表 用户N-1角色
|
||||||
|
|||||||
@ -80,7 +80,6 @@ public class EquipmentConsumablesBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -36,31 +36,31 @@ public class EquipmentsBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 设备序列号
|
* 设备序列号
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "设备序列号不能为空", groups = { AddGroup.class, EditGroup.class })
|
//@NotBlank(message = "设备序列号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private String equipmentNo;
|
private String equipmentNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备供应商
|
* 设备供应商
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "设备供应商不能为空", groups = { AddGroup.class, EditGroup.class })
|
//@NotBlank(message = "设备供应商不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private String equipmentSupplier;
|
private String equipmentSupplier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属科室
|
* 所属科室
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "所属科室不能为空", groups = { AddGroup.class, EditGroup.class })
|
//@NotBlank(message = "所属科室不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private String department;
|
private String department;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所在位置
|
* 所在位置
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "所在位置不能为空", groups = { AddGroup.class, EditGroup.class })
|
//@NotBlank(message = "所在位置不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private String location;
|
private String location;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
//@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ public class EquipmentConsumablesVo implements Serializable {
|
|||||||
* 使用期效
|
* 使用期效
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "使用期效")
|
@ExcelProperty(value = "使用期效")
|
||||||
private Long validity;
|
private Integer validity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使用期效单位
|
* 使用期效单位
|
||||||
@ -75,7 +75,7 @@ public class EquipmentConsumablesVo implements Serializable {
|
|||||||
* 状态 0正在使用,1已报废 2未使用过
|
* 状态 0正在使用,1已报废 2未使用过
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "状态 0正在使用,1已报废 2未使用过")
|
@ExcelProperty(value = "状态 0正在使用,1已报废 2未使用过")
|
||||||
private Long status;
|
private Integer status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
|
|||||||
@ -47,6 +47,7 @@ public class SysPermissionService {
|
|||||||
// 管理员拥有所有权限
|
// 管理员拥有所有权限
|
||||||
if (user.isAdmin()) {
|
if (user.isAdmin()) {
|
||||||
perms.add("*:*:*");
|
perms.add("*:*:*");
|
||||||
|
perms.add("**");
|
||||||
} else {
|
} else {
|
||||||
perms.addAll(menuService.selectMenuPermsByUserId(user.getUserId()));
|
perms.addAll(menuService.selectMenuPermsByUserId(user.getUserId()));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user