From c338f3c4de6a9d357e814e3acf23544809a8e385 Mon Sep 17 00:00:00 2001
From: renkang <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 25 十一月 2024 10:10:52 +0800
Subject: [PATCH] 客户资料 巡检任务业务

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
index 66f431f..eb8da05 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
@@ -57,6 +57,8 @@
     private YwRoomMapper ywRoomMapper;
     @Autowired
     private YwBuildingMapper ywBuildingMapper;
+    @Autowired
+    private YwFloorMapper ywFloorMapper;
 
     @Override
     @Transactional(rollbackFor = {BusinessException.class,Exception.class})
@@ -130,13 +132,14 @@
             model.setProjectId(room.getProjectId());
         }else{
             //濡傛灉鏄叕鍏卞尯鍩熻淇紝蹇呴』閫夋嫨妤煎畤淇℃伅
-            if(model.getBuildingId()==null){
-                throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝璇烽�夋嫨姝g‘鐨勬ゼ瀹囦俊鎭紒");
+            if(model.getFloorId()==null){
+                throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝璇烽�夋嫨姝g‘鐨勬ゼ灞備俊鎭紒");
             }
-            YwBuilding room = ywBuildingMapper.selectById(model.getRoomId());
+            YwFloor room = ywFloorMapper.selectById(model.getFloorId());
             if(room ==null || Constants.equalsInteger(room.getIsdeleted(),Constants.ONE)){
-                throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝璇烽�夋嫨姝g‘鐨勬ゼ瀹囦俊鎭紒");
+                throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝璇烽�夋嫨姝g‘鐨勬ゼ灞備俊鎭紒");
             }
+            model.setBuildingId(room.getBuildingId());
             model.setProjectId(room.getProjectId());
         }
     }

--
Gitblit v1.9.3