更新运维系统

This commit is contained in:
panshuling321 2022-09-18 17:19:22 +08:00
parent 244f2fce6f
commit c2ba419b7d
8 changed files with 90 additions and 12 deletions

View File

@ -1118,4 +1118,7 @@ ALTER TABLE `xhpc_work_user`
ALTER TABLE `xhpc_work_user` ALTER TABLE `xhpc_work_user`
ADD COLUMN `operator_ids` text COMMENT '运营商ID用逗号分隔' AFTER `type`; ADD COLUMN `operator_ids` text COMMENT '运营商ID用逗号分隔' AFTER `type`;
ALTER TABLE `xhpc_work_user` ALTER TABLE `xhpc_work_user`
ADD COLUMN `station_ids` text COMMENT '场站ID用逗号分隔' AFTER `operator_ids`; ADD COLUMN `station_ids` text COMMENT '场站ID用逗号分隔' AFTER `operator_ids`;
ALTER TABLE `xhpc_work_dept`
ADD COLUMN `type` int(4) NULL DEFAULT null COMMENT '人员类型1-管理员2-运维人员)' AFTER `status`;

View File

@ -29,34 +29,40 @@ public class WorkDeptController extends BaseController {
@GetMapping("/getPage") @GetMapping("/getPage")
public TableDataInfo getPage(HttpServletRequest request) { public TableDataInfo getPage(HttpServletRequest request,
@RequestParam(required = false) Integer type) {
LoginUser loginUser = logUserUtils.getLogUser(request); LoginUser loginUser = logUserUtils.getLogUser(request);
startPage(); startPage();
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("tenantId", loginUser.getTenantId()); params.put("tenantId", loginUser.getTenantId());
params.put("type", type);
return getDataTable(workDeptService.getPage(params)); return getDataTable(workDeptService.getPage(params));
} }
@GetMapping("/getList") @GetMapping("/getList")
public R getList(HttpServletRequest request) { public R getList(HttpServletRequest request,
@RequestParam(required = false) Integer type) {
LoginUser loginUser = logUserUtils.getLogUser(request); LoginUser loginUser = logUserUtils.getLogUser(request);
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("tenantId", loginUser.getTenantId()); params.put("tenantId", loginUser.getTenantId());
params.put("type", type);
return R.ok(workDeptService.getList(params)); return R.ok(workDeptService.getList(params));
} }
@GetMapping("/getTree") @GetMapping("/getTree")
public R getTree(HttpServletRequest request) { public R getTree(HttpServletRequest request,
@RequestParam(required = false) Integer type) {
LoginUser loginUser = logUserUtils.getLogUser(request); LoginUser loginUser = logUserUtils.getLogUser(request);
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("tenantId", loginUser.getTenantId()); params.put("tenantId", loginUser.getTenantId());
params.put("type", type);
return R.ok(workDeptService.getTree(params)); return R.ok(workDeptService.getTree(params));
} }

View File

@ -7,7 +7,7 @@ import java.util.Date;
/** /**
* xhpc_work_dept * xhpc_work_dept
* @author * @author
*/ */
@Data @Data
public class XhpcWorkDeptDomain implements Serializable { public class XhpcWorkDeptDomain implements Serializable {
@ -31,6 +31,10 @@ public class XhpcWorkDeptDomain implements Serializable {
*/ */
private Short sort; private Short sort;
/**
* 人员类型1-管理员2-运维人员
*/
private Integer type;
/** /**
* 上级部门ID * 上级部门ID
*/ */

View File

@ -57,7 +57,14 @@ public class XhpcWorkUserDomain implements Serializable {
*/ */
private Integer type; private Integer type;
/**
* 运营商ID用逗号分隔
*/
private String operatorIds; private String operatorIds;
/**
* 场站ID用逗号分隔
*/
private String stationIds; private String stationIds;
/** /**

View File

@ -0,0 +1,50 @@
package com.xhpc.activity.enums;
public enum WorkOrderTypeMeasureEnum {
SOFTWARE_UPGRADE(1, "自动升级"),
RATEMODEL_SYNC(2, "校时校价"),
REBOOT(3, "重启"),
RATEMODEL_NEW(4, "下发新费率")
;
private final Integer code;
private final String name;
WorkOrderTypeMeasureEnum(Integer code, String name){
this.code = code;
this.name = name;
}
//根据code获取name
public static String getNameByCode(Integer code) {
for (WorkOrderTypeMeasureEnum typeEnum : WorkOrderTypeMeasureEnum.values()) {
if (typeEnum.code.equals(code)) {
return typeEnum.name;
}
}
return "";
}
//根据name获取code
public static Integer getCodeByName(String name) {
for (WorkOrderTypeMeasureEnum typeEnum : WorkOrderTypeMeasureEnum.values()) {
//移除交办
if (typeEnum.name.equals(name)) {
return typeEnum.code;
}
}
return null;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
}

View File

@ -19,10 +19,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 172.31.183.135:8848 server-addr: 127.0.0.1:8858
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 172.31.183.135:8848 server-addr: 127.0.0.1:8858
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -7,6 +7,7 @@
<result column="code" jdbcType="VARCHAR" property="code" /> <result column="code" jdbcType="VARCHAR" property="code" />
<result column="sort" jdbcType="SMALLINT" property="sort" /> <result column="sort" jdbcType="SMALLINT" property="sort" />
<result column="parent_dept_id" jdbcType="BIGINT" property="parentDeptId" /> <result column="parent_dept_id" jdbcType="BIGINT" property="parentDeptId" />
<result column="type" property="type" />
<result column="status" jdbcType="SMALLINT" property="status" /> <result column="status" jdbcType="SMALLINT" property="status" />
<result column="del_flag" jdbcType="SMALLINT" property="delFlag" /> <result column="del_flag" jdbcType="SMALLINT" property="delFlag" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
@ -16,7 +17,7 @@
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
work_dept_id, dept_name, code, sort, parent_dept_id, `status`, del_flag, tenant_id, work_dept_id, dept_name, code, sort, parent_dept_id, type, `status`, del_flag, tenant_id,
create_time, create_by, update_time, update_by create_time, create_by, update_time, update_by
</sql> </sql>
@ -35,6 +36,9 @@
<if test="params.parentDeptId !=null and params.parentDeptId!=''"> <if test="params.parentDeptId !=null and params.parentDeptId!=''">
and parent_dept_id=#{params.parentDeptId} and parent_dept_id=#{params.parentDeptId}
</if> </if>
<if test="params.type !=null and params.type!=''">
and type=#{params.parentDeptId}
</if>
<choose> <choose>
<when test="params.parentDeptIds !=null and params.parentDeptIds!=''"> <when test="params.parentDeptIds !=null and params.parentDeptIds!=''">
and find_in_set(parent_dept_id, #{params.parentDeptIds}) and find_in_set(parent_dept_id, #{params.parentDeptIds})
@ -56,6 +60,9 @@
<if test="params.tenantId !=null and params.tenantId!=''"> <if test="params.tenantId !=null and params.tenantId!=''">
and tenant_id=#{params.tenantId} and tenant_id=#{params.tenantId}
</if> </if>
<if test="params.type !=null and params.type!=''">
and type=#{params.parentDeptId}
</if>
<choose> <choose>
<when test="params.parentDeptId !=null and params.parentDeptId!=''"> <when test="params.parentDeptId !=null and params.parentDeptId!=''">
and parent_dept_id=#{params.parentDeptId} and parent_dept_id=#{params.parentDeptId}
@ -100,11 +107,11 @@
<insert id="insert" keyColumn="work_dept_id" keyProperty="workDeptId" parameterType="com.xhpc.activity.domain.XhpcWorkDeptDomain" useGeneratedKeys="true"> <insert id="insert" keyColumn="work_dept_id" keyProperty="workDeptId" parameterType="com.xhpc.activity.domain.XhpcWorkDeptDomain" useGeneratedKeys="true">
insert into xhpc_work_dept (dept_name, code, sort, insert into xhpc_work_dept (dept_name, code, sort,
parent_dept_id, `status`, del_flag, parent_dept_id, type, `status`, del_flag,
tenant_id, create_time, create_by, tenant_id, create_time, create_by,
update_time, update_by) update_time, update_by)
values (#{deptName,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{sort,jdbcType=SMALLINT}, values (#{deptName,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{sort,jdbcType=SMALLINT},
#{parentDeptId,jdbcType=BIGINT}, #{status,jdbcType=SMALLINT}, 0, #{parentDeptId,jdbcType=BIGINT}, #{type}, #{status,jdbcType=SMALLINT}, 0,
#{tenantId,jdbcType=VARCHAR}, SYSDATE(), #{createBy,jdbcType=VARCHAR}, #{tenantId,jdbcType=VARCHAR}, SYSDATE(), #{createBy,jdbcType=VARCHAR},
SYSDATE(), #{updateBy,jdbcType=VARCHAR}) SYSDATE(), #{updateBy,jdbcType=VARCHAR})
</insert> </insert>
@ -116,6 +123,7 @@
code = #{code,jdbcType=VARCHAR}, code = #{code,jdbcType=VARCHAR},
sort = #{sort,jdbcType=SMALLINT}, sort = #{sort,jdbcType=SMALLINT},
parent_dept_id = #{parentDeptId,jdbcType=BIGINT}, parent_dept_id = #{parentDeptId,jdbcType=BIGINT},
type=#{type},
`status` = #{status,jdbcType=SMALLINT}, `status` = #{status,jdbcType=SMALLINT},
update_time = SYSDATE(), update_time = SYSDATE(),
update_by = #{updateBy,jdbcType=VARCHAR} update_by = #{updateBy,jdbcType=VARCHAR}

View File

@ -18,10 +18,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 172.31.183.135:8848 server-addr: 127.0.0.1:8858
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 172.31.183.135:8848 server-addr: 127.0.0.1:8858
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置