From c9aa84299c67f0b17585ef58c9c586f76a8a4796 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期六, 23 十一月 2024 17:33:53 +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