yaozhixue 1 년 전
부모
커밋
c06ed63e59

+ 19 - 6
src/main/java/com/zfire/jiasm/syncdata/service/impl/AddInstallBusinessImpl.java

@@ -1373,13 +1373,13 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
         log.info("云售后表数据时间 {}",sdf.format(item.getLastModifiedDate()));
 
         // 本地订单已关闭 且总部的最后修改时间在本地数据修改时间之前 不可修改
-        if (old.getOrderStatus().equals(GDOrderStatusEnum.INSTALL_STATUS_G10.getCode()) &&
+        /*if (old.getOrderStatus().equals(GDOrderStatusEnum.INSTALL_STATUS_G10.getCode()) &&
                 (old.getUpdateTime()==null || item.getLastModifiedDate().compareTo(old.getUpdateTime())<0)){
             synItfTblAzAssignLcLsDownload(item.getSynReqId(), 99, "本地工单已关闭或作废忽略更新");
             // 这里只是不修改订单主表,其他数据表接着执行
             return old;
         }
-
+*/
         // 1.安装工单主表基础信息更新 需进行最后修改时间比较
         /*if (old.getUpdateTime()==null || item.getLastModifiedDate().compareTo(old.getUpdateTime())>0){
             log.info("修改工单主表基础信息");
@@ -1390,7 +1390,7 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
 
 
         // 2:网点信息修改 已待服务人员处理,不允更新网点   6,7,10
-        if (old.getOrderStatus().equals(GDOrderStatusEnum.INSTALL_STATUS_G6.getCode()) ||
+        /*if (old.getOrderStatus().equals(GDOrderStatusEnum.INSTALL_STATUS_G6.getCode()) ||
                 old.getOrderStatus().equals(GDOrderStatusEnum.INSTALL_STATUS_G10.getCode()) ||
                 old.getOrderStatus().equals(GDOrderStatusEnum.INSTALL_STATUS_G7.getCode())){
             // 售后网点
@@ -1399,7 +1399,14 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
             // 安装
             old.setWebsitId(lclsNew.getWebsitId());
             old.setWebsitName(lclsNew.getWebsitName());
-        }
+        }*/
+
+        // 售后网点
+        old.setReceWebsitId(lclsNew.getReceWebsitId());
+        old.setReceWebsitName(lclsNew.getReceWebsitName());
+        // 安装
+        old.setWebsitId(lclsNew.getWebsitId());
+        old.setWebsitName(lclsNew.getWebsitName());
 
         /*// 3:已预约不可更改预约时间 未预约总部为准
         OrderReAppointment ora = orderReAppointmentService.lambdaQuery()
@@ -1419,14 +1426,20 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
         // upYyazsj(old, item, lclsNew);
 
         // 4:工单状态
-        Boolean allowUpdate = getAllowUpdate(old, lclsNew);
+        /*Boolean allowUpdate = getAllowUpdate(old, lclsNew);
         if (allowUpdate && (old.getUpdateTime()==null || item.getLastModifiedDate().compareTo(old.getUpdateTime())>0)){
             old.setOrderStatus(lclsNew.getOrderStatus());
             old.setOrderStatusTime(lclsNew.getOrderStatusTime());
             old.setLastOrderStatus(lclsNew.getLastOrderStatus());
             old.setDispatchStatus(lclsNew.getDispatchStatus());
             old.setDispatchTime(lclsNew.getDispatchTime());
-        }
+        }*/
+
+        old.setOrderStatus(lclsNew.getOrderStatus());
+        old.setOrderStatusTime(lclsNew.getOrderStatusTime());
+        old.setLastOrderStatus(lclsNew.getLastOrderStatus());
+        old.setDispatchStatus(lclsNew.getDispatchStatus());
+        old.setDispatchTime(lclsNew.getDispatchTime());
 
         // 5.预派工标志更新 -IsReservation
         if (old.getIsReservation().equals(1) &&

+ 16 - 6
src/main/java/com/zfire/jiasm/syncdata/service/impl/AddRepairBusinessServiceImpl.java

@@ -668,9 +668,12 @@ public class AddRepairBusinessServiceImpl implements AddRepairBusinessService {
             return;
         }
         // 1:基础表数据同步 总部的修改时间必须晚于本地系统时间才可以修改
-        if (oldOrder.getUpdateTime() ==null || item.getLastModifiedDate().compareTo(oldOrder.getUpdateTime())>0){
+        /*if (oldOrder.getUpdateTime() ==null || item.getLastModifiedDate().compareTo(oldOrder.getUpdateTime())>0){
             upOrderBaseApi(brand, item, oldOrder);
-        }
+        }*/
+
+        upOrderBaseApi(brand, item, oldOrder);
+
         //2:网点信息更新
         updateWebsitApi(item, oldOrder);
 
@@ -862,7 +865,7 @@ public class AddRepairBusinessServiceImpl implements AddRepairBusinessService {
 
     private void upOrderStatusApi(Brand brand, ItfTblAssignDownload item, OrderBase oldOrder) {
         // 查看是否可更新
-        Boolean allowUpdate = getaBoolean(item, oldOrder);
+        /*Boolean allowUpdate = getaBoolean(item, oldOrder);
         if (allowUpdate){
             // 这里差 派工状态
             OrderPar orderPar = new OrderPar();
@@ -870,7 +873,13 @@ public class AddRepairBusinessServiceImpl implements AddRepairBusinessService {
             orderPar.setBrandId(brand.getBrandId());
             OrderBase order = repairDownloadMapper.getOrderBaseStatus(orderPar);
             MyBeanUtils.copyProperties(order,oldOrder);
-        }
+        }*/
+
+        OrderPar orderPar = new OrderPar();
+        orderPar.setSynReqId(item.getSynReqId());
+        orderPar.setBrandId(brand.getBrandId());
+        OrderBase order = repairDownloadMapper.getOrderBaseStatus(orderPar);
+        MyBeanUtils.copyProperties(order,oldOrder);
     }
 
     @NotNull
@@ -938,12 +947,13 @@ public class AddRepairBusinessServiceImpl implements AddRepairBusinessService {
 
     private void updateWebsitApi(ItfTblAssignDownload item, OrderBase oldOrder) {
         // 看网点更新的条件
-        Boolean flag = getUpBoolean(item, oldOrder);
+        /*Boolean flag = getUpBoolean(item, oldOrder);
         // 更新网点信息
         if (flag){
             // 字段赋值
             getOrderBase(item, oldOrder);
-        }
+        }*/
+        getOrderBase(item, oldOrder);
     }
 
     @NotNull