diff --git a/aidmt-auth/src/main/resources/bootstrap.yml b/aidmt-auth/src/main/resources/bootstrap.yml index 43c2e631..31a51f0b 100644 --- a/aidmt-auth/src/main/resources/bootstrap.yml +++ b/aidmt-auth/src/main/resources/bootstrap.yml @@ -6,7 +6,7 @@ server: spring: application: # 应用名称 - name: ruoyi-auth + name: aidmt-auth profiles: # 环境配置 active: dev diff --git a/aidmt-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/ServiceNameConstants.java b/aidmt-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/ServiceNameConstants.java index 421a3226..a79f5f25 100644 --- a/aidmt-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/ServiceNameConstants.java +++ b/aidmt-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/ServiceNameConstants.java @@ -10,15 +10,15 @@ public class ServiceNameConstants /** * 认证服务的serviceid */ - public static final String AUTH_SERVICE = "ruoyi-auth"; + public static final String AUTH_SERVICE = "aidmt-auth"; /** * 系统模块的serviceid */ - public static final String SYSTEM_SERVICE = "ruoyi-system"; + public static final String SYSTEM_SERVICE = "aidmt-system"; /** * 文件服务的serviceid */ - public static final String FILE_SERVICE = "ruoyi-file"; + public static final String FILE_SERVICE = "aidmt-file"; } diff --git a/aidmt-gateway/src/main/java/com/ruoyi/gateway/config/SpringDocConfig.java b/aidmt-gateway/src/main/java/com/ruoyi/gateway/config/SpringDocConfig.java index 912c3a2f..47ec5848 100644 --- a/aidmt-gateway/src/main/java/com/ruoyi/gateway/config/SpringDocConfig.java +++ b/aidmt-gateway/src/main/java/com/ruoyi/gateway/config/SpringDocConfig.java @@ -51,7 +51,7 @@ class SwaggerDocRegister extends Subscriber @Autowired private DiscoveryClient discoveryClient; - private final static String[] EXCLUDE_ROUTES = new String[] { "ruoyi-gateway", "ruoyi-auth", "ruoyi-file" }; + private final static String[] EXCLUDE_ROUTES = new String[] { "aidmt-gateway", "aidmt-auth", "aidmt-file" }; public SwaggerDocRegister(SwaggerUiConfigProperties swaggerUiConfigProperties, DiscoveryClient discoveryClient) { diff --git a/aidmt-gateway/src/main/resources/bootstrap.yml b/aidmt-gateway/src/main/resources/bootstrap.yml index bc2cc574..3d469817 100644 --- a/aidmt-gateway/src/main/resources/bootstrap.yml +++ b/aidmt-gateway/src/main/resources/bootstrap.yml @@ -1,40 +1,31 @@ -# Tomcat +# Tomcat server: port: 8080 # Spring -spring: +spring: application: - # 应用名称 - name: ruoyi-gateway + name: aidmt-gateway profiles: - # 环境配置 active: dev cloud: nacos: discovery: - # 服务注册地址 server-addr: 127.0.0.1:8848 config: - # 配置中心地址 server-addr: 127.0.0.1:8848 - # 配置文件格式 file-extension: yml - # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} sentinel: - # 取消控制台懒加载 eager: true transport: - # 控制台地址 dashboard: 127.0.0.1:8718 - # nacos配置持久化 datasource: ds1: nacos: server-addr: 127.0.0.1:8848 - dataId: sentinel-ruoyi-gateway + dataId: sentinel-aidmt-gateway groupId: DEFAULT_GROUP data-type: json rule-type: gw-flow diff --git a/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/controller/ProjectImplementationController.java b/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/controller/ProjectImplementationController.java index 3f2ed2f2..7d23da93 100644 --- a/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/controller/ProjectImplementationController.java +++ b/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/controller/ProjectImplementationController.java @@ -39,6 +39,8 @@ public class ProjectImplementationController extends BaseController { startPage(); // 只查询审批通过的项目(项目状态为2:进行中) workPlan.setProjectStatus("2"); + // 查询实施状态非0(过滤未实施) + workPlan.setImplementationStatusNot("0"); List list = workPlanService.selectWorkPlanList(workPlan); return getDataTable(list); } diff --git a/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/domain/WorkPlan.java b/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/domain/WorkPlan.java index c36c9830..b0defe96 100644 --- a/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/domain/WorkPlan.java +++ b/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/domain/WorkPlan.java @@ -87,6 +87,9 @@ public class WorkPlan extends BaseEntity { @Schema(description = "实施状态:0未实施,1实施中,2整改中,3待完工确认") private String implementationStatus; + @Schema(description = "实施状态不等于(查询条件)") + private String implementationStatusNot; + @Schema(description = "审批状态:0待审核,1已通过,2已驳回") private String approvalStatus; diff --git a/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/service/impl/WorkPlanServiceImpl.java b/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/service/impl/WorkPlanServiceImpl.java index 97f74a7e..c0fd6b11 100644 --- a/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/service/impl/WorkPlanServiceImpl.java +++ b/aidmt-modules/aidmt-manage-ms/src/main/java/com/admin/contractor/service/impl/WorkPlanServiceImpl.java @@ -560,8 +560,8 @@ public class WorkPlanServiceImpl implements IWorkPlanService { } String approver = SecurityUtils.getUsername(); String approvalTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); - // 审批通过,更新审批状态为1(已通过),项目状态改为进行中,实施状态设置为1(实施中) - return workPlanMapper.updateProjectStatusAndApproval(projectId, "2", "1", "1", approver, approvalTime, approvalComment); + // 审批通过,更新审批状态为1(已通过),项目状态改为已提交,实施状态设置为1(实施中) + return workPlanMapper.updateProjectStatusAndApproval(projectId, "1", "1", "1", approver, approvalTime, approvalComment); } @Override diff --git a/aidmt-modules/aidmt-manage-ms/src/main/resources/bootstrap.yml b/aidmt-modules/aidmt-manage-ms/src/main/resources/bootstrap.yml index ecb12c6e..b4ce0a09 100644 --- a/aidmt-modules/aidmt-manage-ms/src/main/resources/bootstrap.yml +++ b/aidmt-modules/aidmt-manage-ms/src/main/resources/bootstrap.yml @@ -6,7 +6,7 @@ server: spring: application: # 应用名称 - name: ruoyi-manage + name: aidmt-manage profiles: # 环境配置 active: dev diff --git a/aidmt-modules/aidmt-manage-ms/src/main/resources/mapper/WorkPlanMapper.xml b/aidmt-modules/aidmt-manage-ms/src/main/resources/mapper/WorkPlanMapper.xml index 91e22b0a..3ce4ebad 100644 --- a/aidmt-modules/aidmt-manage-ms/src/main/resources/mapper/WorkPlanMapper.xml +++ b/aidmt-modules/aidmt-manage-ms/src/main/resources/mapper/WorkPlanMapper.xml @@ -104,6 +104,9 @@ and project_status = #{projectStatus} + + and implementation_status != #{implementationStatusNot} + order by create_time desc diff --git a/aidmt-modules/aidmt-system-ms/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/aidmt-modules/aidmt-system-ms/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index dcb48cf3..0e089cc1 100644 --- a/aidmt-modules/aidmt-system-ms/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/aidmt-modules/aidmt-system-ms/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -371,6 +371,25 @@ public class SysDeptServiceImpl implements ISysDeptService @Override public int insertDept(SysDept dept) { + Long parentId = dept.getParentId(); + if (parentId == null || parentId == 0L) + { + if (StringUtils.isEmpty(dept.getAuditStatus())) + { + String deptType = dept.getDeptType(); + if ("1".equals(deptType) || "2".equals(deptType) || "3".equals(deptType)) + { + dept.setAuditStatus("1"); + } + else + { + dept.setAuditStatus("0"); + } + } + dept.setParentId(0L); + dept.setAncestors("0"); + return deptMapper.insertDept(dept); + } SysDept info = deptMapper.selectDeptById(dept.getParentId()); // 如果父节点不为正常状态,则不允许新增子节点 if (!UserConstants.DEPT_NORMAL.equals(info.getStatus())) @@ -547,9 +566,48 @@ public class SysDeptServiceImpl implements ISysDeptService throw new ServiceException("部门名称不能为空"); } + if (StringUtils.isEmpty(parentName)) + { + dept.setParentId(0L); + dept.setDeptName(deptName); + if (dept.getOrderNum() == null) + { + dept.setOrderNum(0); + } + if (StringUtils.isEmpty(dept.getStatus())) + { + dept.setStatus(UserConstants.DEPT_NORMAL); + } + SysDept topExistDept = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId()); + if (StringUtils.isNull(topExistDept)) + { + dept.setCreateBy(operName); + insertDept(dept); + successNum++; + successMsg.append(System.lineSeparator()).append(successNum).append("、部门 ").append(deptName).append(" 导入成功"); + } + else if (updateSupport) + { + dept.setDeptId(topExistDept.getDeptId()); + dept.setUpdateBy(operName); + updateDept(dept); + successNum++; + successMsg.append(System.lineSeparator()).append(successNum).append("、部门 ").append(deptName).append(" 更新成功"); + } + else + { + failureNum++; + failureMsg.append(System.lineSeparator()).append(failureNum).append("、部门 ").append(deptName).append(" 已存在"); + } + continue; + } SysDept parentQuery = new SysDept(); parentQuery.setDeptName(parentName); List parentList = deptMapper.selectDeptList(parentQuery); + if (parentList == null || parentList.isEmpty()) + { + throw new ServiceException("上级部门不存在: " + parentName); + } if (parentList.size() > 1) { throw new ServiceException("上级部门名称不唯一: " + parentName); @@ -573,7 +631,7 @@ public class SysDeptServiceImpl implements ISysDeptService dept.setCreateBy(operName); insertDept(dept); successNum++; - successMsg.append("
").append(successNum).append("、部门 ").append(deptName).append(" 导入成功"); + successMsg.append(System.lineSeparator()).append(successNum).append("、部门 ").append(deptName).append(" 导入成功"); } else if (updateSupport) { @@ -581,18 +639,18 @@ public class SysDeptServiceImpl implements ISysDeptService dept.setUpdateBy(operName); updateDept(dept); successNum++; - successMsg.append("
").append(successNum).append("、部门 ").append(deptName).append(" 更新成功"); + successMsg.append(System.lineSeparator()).append(successNum).append("、部门 ").append(deptName).append(" 更新成功"); } else { failureNum++; - failureMsg.append("
").append(failureNum).append("、部门 ").append(deptName).append(" 已存在"); + failureMsg.append(System.lineSeparator()).append(failureNum).append("、部门 ").append(deptName).append(" 已存在"); } } catch (Exception e) { failureNum++; - failureMsg.append("
").append(failureNum).append("、部门 ").append(StringUtils.isEmpty(deptName) ? "-" : deptName) + failureMsg.append(System.lineSeparator()).append(failureNum).append("、部门 ").append(StringUtils.isEmpty(deptName) ? "-" : deptName) .append(" 导入失败:").append(e.getMessage()); } } diff --git a/aidmt-modules/aidmt-system-ms/src/main/resources/bootstrap.yml b/aidmt-modules/aidmt-system-ms/src/main/resources/bootstrap.yml index ca94b425..cce27ed8 100644 --- a/aidmt-modules/aidmt-system-ms/src/main/resources/bootstrap.yml +++ b/aidmt-modules/aidmt-system-ms/src/main/resources/bootstrap.yml @@ -6,7 +6,7 @@ server: spring: application: # 应用名称 - name: ruoyi-system + name: aidmt-system profiles: # 环境配置 active: dev diff --git a/aidmt-modules/ruoyi-file/src/main/resources/bootstrap.yml b/aidmt-modules/ruoyi-file/src/main/resources/bootstrap.yml index c73fb0e6..74b09d98 100644 --- a/aidmt-modules/ruoyi-file/src/main/resources/bootstrap.yml +++ b/aidmt-modules/ruoyi-file/src/main/resources/bootstrap.yml @@ -6,7 +6,7 @@ server: spring: application: # 应用名称 - name: ruoyi-file + name: aidmt-file profiles: # 环境配置 active: dev diff --git a/aidmt-modules/ruoyi-job/src/main/resources/bootstrap.yml b/aidmt-modules/ruoyi-job/src/main/resources/bootstrap.yml index 817a4291..a63c29cf 100644 --- a/aidmt-modules/ruoyi-job/src/main/resources/bootstrap.yml +++ b/aidmt-modules/ruoyi-job/src/main/resources/bootstrap.yml @@ -6,7 +6,7 @@ server: spring: application: # 应用名称 - name: ruoyi-job + name: aidmt-job profiles: # 环境配置 active: dev