From d33ec6038e2128d9ddbf130cf05fc309efc6ca8f Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 25 十一月 2024 18:37:43 +0800
Subject: [PATCH] 开发更新

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java |   41 +++++++++++++++++++++++++++++++++--------
 1 files changed, 33 insertions(+), 8 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 f4c95e9..6c1d69a 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
@@ -79,11 +79,12 @@
                 if(StringUtils.isBlank(multifile.getFileurl())){
                     continue;
                 }
-                multifile.setCreateDate(new Date());
+                multifile.setCreateDate(model.getCreateDate());
+                multifile.setEditDate(model.getCreateDate());
                 multifile.setCreator(model.getEditor());
                 multifile.setIsdeleted(Constants.ZERO);
                 multifile.setObjId(model.getId());
-                multifile.setCreator(model.getCreator());
+                multifile.setEditor(model.getCreator());
                 multifile.setObjType(Constants.MultiFile.YW_WORKORDER_PROBLEM.getKey());
                 multifile.setSortnum(i+1);
                 fileList.add(multifile);
@@ -169,7 +170,9 @@
         if(model ==null || Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){
             throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝宸ュ崟淇℃伅涓嶅瓨鍦紒");
         }
-        if(!Constants.equalsInteger(model.getDealStatus(),Constants.ZERO) && !Constants.equalsInteger(model.getDealStatus(),Constants.ONE)){
+        if(!Constants.equalsInteger(model.getDealStatus(),Constants.ZERO)
+//                && !Constants.equalsInteger(model.getDealStatus(),Constants.ONE)
+        ){
             throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝宸ュ崟鐘舵�佸凡娴佽浆锛屼笉鏀寔褰撳墠鎿嶄綔锛�");
         }
 
@@ -200,10 +203,10 @@
             throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝宸ュ崟鐘舵�佸凡娴佽浆锛屼笉鏀寔褰撳墠鎿嶄綔锛�");
         }
 
-        SystemUser user = systemUserMapper.selectById(ywWorkorder.getDealUserId());
-        if(user ==null ||  (user.getDeleted()!=null&& user.getDeleted() )){
-            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝鍛樺伐淇℃伅涓嶅瓨鍦紒");
-        }
+//        SystemUser user = systemUserMapper.selectById(ywWorkorder.getDealUserId());
+//        if(user ==null ||  (user.getDeleted()!=null&& user.getDeleted() )){
+//            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝鍛樺伐淇℃伅涓嶅瓨鍦紒");
+//        }
         YwWorkorder update = new YwWorkorder();
         update.setId(model.getId());
         update.setEditDate(new Date());
@@ -211,8 +214,30 @@
         update.setDealStatus(Constants.TWO);
         update.setDealUserId(update.getEditor());
         update.setDealDate(update.getEditDate());
-        update.setDealInfo(ywWorkorder.getDispatchInfo());
+        update.setDealInfo(ywWorkorder.getDealInfo());
         ywWorkorderMapper.updateById(update);
+
+        List<Multifile> fileList = new ArrayList<>();
+        if(ywWorkorder.getDealFileList()!=null && ywWorkorder.getDealFileList().size()>0){
+            for (int i = 0; i <  ywWorkorder.getDealFileList().size(); i++) {
+                Multifile multifile =  ywWorkorder.getDealFileList().get(i);
+                if(StringUtils.isBlank(multifile.getFileurl())){
+                    continue;
+                }
+                multifile.setCreateDate(update.getEditDate());
+                multifile.setCreator(update.getEditor());
+                multifile.setEditDate(update.getEditDate());
+                multifile.setIsdeleted(Constants.ZERO);
+                multifile.setObjId(model.getId());
+                multifile.setEditor(update.getEditor());
+                multifile.setObjType(Constants.MultiFile.YW_WORKORDER_DEAL.getKey());
+                multifile.setSortnum(i+1);
+                fileList.add(multifile);
+            }
+        }
+        if(fileList.size()>0){
+            multifileMapper.insert(fileList);
+        }
         dealLogBiz(model,Constants.YwLogType.WORKORDER_DEAL,ywWorkorder.getLoginUserInfo().getRealname(),null);//璁板綍鏂板缓鏃ュ織
     }
     @Override

--
Gitblit v1.9.3