From 2200ef48801e6ad6113e8331e2bb6a40d0447769 Mon Sep 17 00:00:00 2001 From: yuyongle <1150359267@qq.com> Date: Fri, 29 Aug 2025 20:16:10 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=B4=BE=E5=8D=95=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/service/impl/ServiceWorkOrdersServiceImpl.java | 2 +- .../ruoyi-nacos/src/main/resources/application.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java index 4acdfb3f..2d4e25aa 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java @@ -243,7 +243,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService { new LambdaQueryWrapper() .le(AttendanceUserGroup::getStartDate, today) .ge(AttendanceUserGroup::getEndDate, today) - .eq(AttendanceUserGroup::getDeptId, serviceWorkOrders.getCreateDept()) + //.eq(AttendanceUserGroup::getDeptId, serviceWorkOrders.getCreateDept()) .orderByAsc(AttendanceUserGroup::getStartDate) ); if (CollUtil.isEmpty(attendanceUserGroups)|| attendanceUserGroups.size() != attendanceUserGroupList.size()) { diff --git a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties index ef3ece6a..4385908f 100644 --- a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties +++ b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties @@ -40,9 +40,9 @@ spring.sql.init.platform=mysql db.num=1 ### Connect URL of DB: -db.url.0=jdbc:mysql://10.20.1.65:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true +db.url.0=jdbc:mysql://113.249.101.254:18000/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true db.user.0=root -db.password.0=By@2025! +db.password.0=by@2025?? ### the maximum retry times for push nacos.config.push.maxRetryTime=50 From e2fbd251b3a6fc92c8ce0e1a059bc02ea1f7d32e Mon Sep 17 00:00:00 2001 From: yuyongle <1150359267@qq.com> Date: Fri, 29 Aug 2025 20:19:48 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=B4=BE=E5=8D=95=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi-nacos/src/main/resources/application.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties index 4385908f..ef3ece6a 100644 --- a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties +++ b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties @@ -40,9 +40,9 @@ spring.sql.init.platform=mysql db.num=1 ### Connect URL of DB: -db.url.0=jdbc:mysql://113.249.101.254:18000/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true +db.url.0=jdbc:mysql://10.20.1.65:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true db.user.0=root -db.password.0=by@2025?? +db.password.0=By@2025! ### the maximum retry times for push nacos.config.push.maxRetryTime=50 From 826684ed667225819a8fd7e60062c9291bc21a2f Mon Sep 17 00:00:00 2001 From: yuyongle <1150359267@qq.com> Date: Fri, 29 Aug 2025 20:43:58 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=B4=BE=E5=8D=95=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/property/domain/ServiceWorkOrdersType.java | 4 ++++ .../property/domain/bo/ServiceWorkOrdersTypeBo.java | 6 +++++- .../property/domain/vo/ServiceWorkOrdersTypeVo.java | 4 ++++ .../service/impl/ServiceWorkOrdersServiceImpl.java | 8 ++++---- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/ServiceWorkOrdersType.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/ServiceWorkOrdersType.java index 118998aa..7dd4c22c 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/ServiceWorkOrdersType.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/ServiceWorkOrdersType.java @@ -41,6 +41,10 @@ public class ServiceWorkOrdersType extends TenantEntity { * 运作模式(0派单+抢单,1派单,2自动派单) */ private String operationMode; + /** + *部门id + */ + private Long deptId; /** * 排序值 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/ServiceWorkOrdersTypeBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/ServiceWorkOrdersTypeBo.java index a9a15f6c..5e97ec4b 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/ServiceWorkOrdersTypeBo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/ServiceWorkOrdersTypeBo.java @@ -36,7 +36,11 @@ public class ServiceWorkOrdersTypeBo extends BaseEntity { */ @NotNull(message = "工单类型名称不能为空", groups = { AddGroup.class, EditGroup.class }) private String orderTypeName; - + /** + *部门id + */ + @NotNull(message = "部门id", groups = { EditGroup.class }) + private Long deptId; /** * 运作模式 */ diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrdersTypeVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrdersTypeVo.java index 9b44e8a4..29d10cfb 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrdersTypeVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrdersTypeVo.java @@ -44,6 +44,10 @@ public class ServiceWorkOrdersTypeVo implements Serializable { */ @ExcelProperty(value = "工单类型名称") private String orderTypeName; + /** + *部门id + */ + private Long deptId; /** * 运作模式 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java index 2d4e25aa..fe199976 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersServiceImpl.java @@ -227,7 +227,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService { boolean flags = workOrdersRecordMapper.insert(serviceWorkOrdersRecord) > 0; if (flags) { if (serviceWorkOrdersType.getOperationMode().equals(OrderTypeOperationEnum.AUTOMATE_DISPATCH.getValue())) { - handleServiceWorkOrder(add); + handleServiceWorkOrder(add,serviceWorkOrdersType); } } } @@ -235,7 +235,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService { } //自动派单 - private void handleServiceWorkOrder(ServiceWorkOrders serviceWorkOrders) { + private void handleServiceWorkOrder(ServiceWorkOrders serviceWorkOrders,ServiceWorkOrdersType serviceWorkOrdersType) { LocalDate today = LocalDate.now(); // 1. 获取今日排班人员(优先查缓存,未命中则查询数据库并缓存) List attendanceUserGroups = RedisUtils.getCacheList(DateUtil.today()); @@ -243,7 +243,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService { new LambdaQueryWrapper() .le(AttendanceUserGroup::getStartDate, today) .ge(AttendanceUserGroup::getEndDate, today) - //.eq(AttendanceUserGroup::getDeptId, serviceWorkOrders.getCreateDept()) + .eq(AttendanceUserGroup::getDeptId, serviceWorkOrdersType.getCreateDept()) .orderByAsc(AttendanceUserGroup::getStartDate) ); if (CollUtil.isEmpty(attendanceUserGroups)|| attendanceUserGroups.size() != attendanceUserGroupList.size()) { @@ -591,7 +591,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService { boolean flags = workOrdersRecordMapper.insert(serviceWorkOrdersRecord) > 0; if (flags) { if (serviceWorkOrdersType.getOperationMode().equals(OrderTypeOperationEnum.AUTOMATE_DISPATCH.getValue())) { - handleServiceWorkOrder(add); + handleServiceWorkOrder(add,serviceWorkOrdersType); } } } From 0b2216964941542c49efb1f7659e0ca2bd5a3aeb Mon Sep 17 00:00:00 2001 From: yuyongle <1150359267@qq.com> Date: Fri, 29 Aug 2025 21:22:59 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=B4=BE=E5=8D=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/vo/ServiceWorkOrdersTypeVo.java | 4 ++++ .../ServiceWorkOrdersTypeServiceImpl.java | 24 +++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrdersTypeVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrdersTypeVo.java index 29d10cfb..ec128904 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrdersTypeVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrdersTypeVo.java @@ -48,6 +48,10 @@ public class ServiceWorkOrdersTypeVo implements Serializable { *部门id */ private Long deptId; + /** + *部门名称 + */ + private String deptName; /** * 运作模式 diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersTypeServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersTypeServiceImpl.java index 48912b8b..0e487feb 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersTypeServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/ServiceWorkOrdersTypeServiceImpl.java @@ -3,6 +3,7 @@ package org.dromara.property.service.impl; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.apache.dubbo.config.annotation.DubboReference; import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; @@ -18,6 +19,8 @@ import org.dromara.property.domain.bo.ServiceWorkOrdersTypeBo; import org.dromara.property.domain.vo.ServiceWorkOrdersTypeVo; import org.dromara.property.mapper.ServiceWorkOrdersTypeMapper; import org.dromara.property.service.IServiceWorkOrdersTypeService; +import org.dromara.system.api.RemoteDeptService; +import org.dromara.system.api.domain.vo.RemoteDeptVo; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -39,6 +42,8 @@ public class ServiceWorkOrdersTypeServiceImpl implements IServiceWorkOrdersTypeS private final ServiceWorkOrdersTypeMapper baseMapper; + @DubboReference + private RemoteDeptService remoteDeptService; /** * 查询【工单类型】 * @@ -47,7 +52,11 @@ public class ServiceWorkOrdersTypeServiceImpl implements IServiceWorkOrdersTypeS */ @Override public ServiceWorkOrdersTypeVo queryById(Long id) { - return baseMapper.selectVoById(id); + ServiceWorkOrdersTypeVo serviceWorkOrdersTypeVo= baseMapper.selectVoById(id); + Long deptId = serviceWorkOrdersTypeVo.getDeptId(); + RemoteDeptVo remoteDeptVo = remoteDeptService.selectDeptVoById(deptId); + serviceWorkOrdersTypeVo.setDeptName(remoteDeptVo.getDeptName()); + return serviceWorkOrdersTypeVo; } /** @@ -61,6 +70,11 @@ public class ServiceWorkOrdersTypeServiceImpl implements IServiceWorkOrdersTypeS public TableDataInfo queryPageList(ServiceWorkOrdersTypeBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + result.getRecords().stream().forEach(vo -> { + Long deptId = vo.getDeptId(); + RemoteDeptVo remoteDeptVo = remoteDeptService.selectDeptVoById(deptId); + vo.setDeptName(remoteDeptVo.getDeptName()); + }); return TableDataInfo.build(result); } @@ -73,7 +87,13 @@ public class ServiceWorkOrdersTypeServiceImpl implements IServiceWorkOrdersTypeS @Override public List queryList(ServiceWorkOrdersTypeBo bo) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); + List serviceWorkOrdersTypeVoList= baseMapper.selectVoList(lqw); + serviceWorkOrdersTypeVoList.stream().forEach(vo -> { + Long deptId = vo.getDeptId(); + RemoteDeptVo remoteDeptVo = remoteDeptService.selectDeptVoById(deptId); + vo.setDeptName(remoteDeptVo.getDeptName()); + }); + return serviceWorkOrdersTypeVoList; } private LambdaQueryWrapper buildQueryWrapper(ServiceWorkOrdersTypeBo bo) {