Sfoglia il codice sorgente

fix: 服务单元 资源保障 工时排序

caozixuan 1 anno fa
parent
commit
6a3ba62457

+ 7 - 1
sop-business/src/main/java/com/qmth/sop/business/bean/result/TBDeviceDeliveryResult.java

@@ -2,6 +2,9 @@ package com.qmth.sop.business.bean.result;
 
 import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.HeadFontStyle;
+import com.alibaba.excel.annotation.write.style.HeadStyle;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.sop.common.enums.DeviceDeliveryStatusEnum;
@@ -13,10 +16,13 @@ import java.io.Serializable;
 import java.util.Objects;
 
 /**
- * @Description: 设备发货管理result
+ * @Description: 设备发货管理result(带导出)
  * @Author: wangliang
  * @Date: 2023/11/30
  */
+@ColumnWidth(value = 30)
+@HeadStyle(fillForegroundColor = 11)
+@HeadFontStyle(color = 1)
 public class TBDeviceDeliveryResult implements Serializable {
 
     @ApiModelProperty("id")

+ 1 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDeviceDeliveryServiceImpl.java

@@ -161,7 +161,7 @@ public class TBDeviceDeliveryServiceImpl extends ServiceImpl<TBDeviceDeliveryMap
 
                 TBDeviceDelivery tbDeviceDelivery = new TBDeviceDelivery();
                 if (crmNo != null && crmNo.length() > 0) {
-                    if (crmNoList.contains(crmNo)){
+                    if (!crmNoList.contains(crmNo)){
                         throw ExceptionResultEnum.ERROR.exception("派单号不存在");
                     }
 

+ 3 - 3
sop-business/src/main/resources/mapper/TBCrmMapper.xml

@@ -56,7 +56,7 @@
                 </if>
             </if>
         </where>
-        ORDER BY serviceUnitName,tbc.create_time DESC
+        ORDER BY tbc.update_time DESC
     </select>
 
     <select id="findServiceScopeList" resultType="com.qmth.sop.business.bean.result.CrmServiceResult">
@@ -112,7 +112,7 @@
                 </if>
             </if>
         </where>
-        ORDER BY serviceUnitName,tbc.create_time DESC
+        ORDER BY tbc.update_time DESC
     </select>
 
     <select id="findUnbindOrderPage" resultType="com.qmth.sop.business.bean.result.CrmServiceResult">
@@ -164,7 +164,7 @@
                 AND #{endTime} >= tbc.begin_time
             </if>
         </where>
-        ORDER BY tbc.create_time DESC
+        ORDER BY tbc.update_time DESC
     </select>
 
     <select id="findOrderListByServiceIds" resultType="com.qmth.sop.business.bean.result.CrmServiceResult">

+ 2 - 0
sop-business/src/main/resources/mapper/TBDeviceDeliveryMapper.xml

@@ -75,6 +75,7 @@
                 AND tbdd.receive_time <![CDATA[ <= ]]> #{receiveEndTime}
             </if>
         </where>
+        ORDER BY tbdd.update_time DESC
     </select>
 
     <select id="list" resultType="com.qmth.sop.business.bean.result.TBDeviceDeliveryResult">
@@ -150,5 +151,6 @@
                 AND tbdd.receive_time <![CDATA[ <= ]]> #{receiveEndTime}
             </if>
         </where>
+        ORDER BY tbdd.update_time DESC
     </select>
 </mapper>

+ 1 - 0
sop-business/src/main/resources/mapper/TBDeviceInOutMapper.xml

@@ -120,6 +120,7 @@
             tbdio.address_arr AS addressArrTemp,
             tbdio.serial_no AS serialNo,
             tbdio.base_photo_path AS basePhotoPath,
+            tbdio.device_serial_no AS deviceSerialNo,
             ss.id AS supplierId,
             ss.name AS supplierName,
             sd.scan_count AS scanCount

+ 6 - 0
sop-business/src/main/resources/mapper/TBDingSubmitMapper.xml

@@ -39,6 +39,8 @@
                  tbs.service_lead_id AS serviceUnitLeaderId,
                  tbc.lead_id AS regionManagerId,
                  tbc.region_coordinator_id AS coordinatorId,
+                 tbs.update_time AS serviceUpdateTime,
+                 tbc.update_time AS crmUpdateTime,
                  IF(tffa.status IN ('CANCEL','END','FINISH'),
                      TIMESTAMPDIFF(DAY, FROM_UNIXTIME(SUBSTRING(tffa.create_time, 1, 10), '%Y-%m-%d'), FROM_UNIXTIME(SUBSTRING(tffa.update_time, 1, 10), '%Y-%m-%d')),
                      TIMESTAMPDIFF(DAY, FROM_UNIXTIME(SUBSTRING(tffa.create_time, 1, 10), '%Y-%m-%d'), NOW()))
@@ -151,6 +153,7 @@
                 </choose>
             </if>
         </where>
+        ORDER BY main.serviceUpdateTime DESC,main.crmUpdateTime DESC
     </select>
 
     <select id="findDingSubmitList" resultType="com.qmth.sop.business.bean.result.DingSubmitResult">
@@ -190,6 +193,8 @@
                  tbs.service_lead_id AS serviceUnitLeaderId,
                  tbc.lead_id AS regionManagerId,
                  tbc.region_coordinator_id AS coordinatorId,
+                 tbs.update_time AS serviceUpdateTime,
+                 tbc.update_time AS crmUpdateTime,
                  IF(tffa.status IN ('CANCEL','END','FINISH'),
                  TIMESTAMPDIFF(DAY, FROM_UNIXTIME(SUBSTRING(tffa.create_time, 1, 10), '%Y-%m-%d'), FROM_UNIXTIME(SUBSTRING(tffa.update_time, 1, 10), '%Y-%m-%d')),
                  TIMESTAMPDIFF(DAY, FROM_UNIXTIME(SUBSTRING(tffa.create_time, 1, 10), '%Y-%m-%d'), NOW()))
@@ -305,5 +310,6 @@
                 </choose>
             </if>
         </where>
+        ORDER BY main.serviceUpdateTime DESC,main.crmUpdateTime DESC
     </select>
 </mapper>

+ 1 - 0
sop-business/src/main/resources/mapper/TBServiceMapper.xml

@@ -96,5 +96,6 @@
                 </choose>
             </if>
         </where>
+        ORDER BY tbs.update_time DESC
     </select>
 </mapper>

+ 1 - 1
sop-business/src/main/resources/mapper/TBServiceRegionMapper.xml

@@ -48,6 +48,6 @@
                 </if>
             </if>
         </where>
-        ORDER BY tbsr.create_time DESC
+        ORDER BY tbsr.update_time DESC
     </select>
 </mapper>

+ 1 - 0
sop-business/src/main/resources/mapper/TBUserArchivesAllocationMapper.xml

@@ -236,6 +236,7 @@
                 </choose>
             </if>
         </where>
+        ORDER BY result.serviceUnitId DESC, result.crmId DESC
     </select>
     <select id="findAllocationByCrmNo"
             resultType="com.qmth.sop.business.bean.result.CrmArchivesAllocationResult">

+ 1 - 0
sop-business/src/main/resources/mapper/TBUserArchivesMapper.xml

@@ -155,6 +155,7 @@
                 AND sr.type = #{roleType})
             </if>
         </where>
+        ORDER BY tbua.update_time DESC,tbua.code DESC
     </select>
     <select id="findUserArchivesById" resultType="com.qmth.sop.business.bean.result.UserArchivesResult">
         SELECT