From 53443db90d66094124dbbeebbcf763032a2333d0 Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期五, 23 五月 2025 18:27:37 +0800 Subject: [PATCH] fix: 修复订单详情知情书的显示 --- ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 20 ++++++++++++++++++++ ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml | 2 +- ruoyi-ui/src/views/system/order/detail.vue | 2 +- ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml | 1 + ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java | 20 +++++++------------- ruoyi-admin/src/main/resources/application.yml | 2 +- 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java index ce9308b..4205f96 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java @@ -17,6 +17,8 @@ import com.ruoyi.system.service.IDispatchOrdService; import com.ruoyi.system.service.IPayInfoService; import com.ruoyi.system.service.ITbOrdersService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; @@ -47,6 +49,8 @@ @RestController @RequestMapping("/system/order") public class ServiceOrderController extends BaseController { + + private static final Logger log = LoggerFactory.getLogger(ServiceOrderController.class); @Autowired private IServiceOrderService serviceOrderService; @@ -281,19 +285,9 @@ otherInfo.put("serviceOrdVisit", Objects.toString(mingServiceOrder.getServiceOrdVisit(), "-")); //鐭ユ儏鍚屾剰涔� - List<String> imageUrls = new ArrayList<>();//娴嬭瘯浣跨敤 - - if(serviceOrdId==88801) - { - //娴嬭瘯鏁版嵁 - imageUrls.add("https://sys.966120.com.cn/upload/202505/3016127678_3VhEv_VVql2K6eM9tS9uXgKv8fm7vaKtrSFCiP0SraTgz2qe1isgvIuUrqSNv-XgEvdC5kFUxeyrn_wz8Mfc2Sg.jpg"); - imageUrls.add("https://sys.966120.com.cn/upload/202505/3016127678_3cDOPpqc_fzEJ-dHz8lq5aIx3tsnmEtossC6F5VCi2vj6sBwkuzOx4g1RcsWnQ3XNua7COADksYI1rHnbizccOw.jpg"); - otherInfo.put("imageUrls", imageUrls); - } - else{ - imageUrls = dispatchOrdService.selectImageUrlsByDOrdIDDt(orderDetail.getServiceOrdID()); //姝e紡浣跨敤 - otherInfo.put("imageUrls", imageUrls); - } + List<String> imageUrls = dispatchOrdService.selectImageUrlsByDOrdIDDt(orderDetail.getServiceOrdID()); //姝e紡浣跨敤 + otherInfo.put("imageUrls", imageUrls); + log.info("銆愮洃娴嬨�戠煡鎯呭悓鎰忎功:{}", imageUrls); //鍙戠エ鑾峰彇 Map<String, Object> invoiceInfo = new HashMap<>(); diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index ae08b40..0128223 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -56,7 +56,7 @@ basename: i18n/messages profiles: # 鐜 dev|test|prod - active: dev + active: prod # 鏂囦欢涓婁紶 servlet: multipart: diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java index 5f9c32e..866ba08 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java @@ -10,6 +10,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.ruoyi.common.utils.StringUtils; + +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.HashMap; @@ -207,6 +211,22 @@ map.put("driverMobile",driverMobiles.toString()); map.put("driverName", driverNames.toString()); + //鏍煎紡鍖栨洿鏂版椂闂� + try { + + // 2. 瀹氫箟鐩爣鏍煎紡锛�24灏忔椂鍒� "HH"锛� + DateTimeFormatter targetFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + String formattedTime = orderStatus.getUpdateTime().format(targetFormat); + map.put("updateTime", formattedTime); + } + catch (Exception ex) + { + log.error("鏃堕棿鏍煎紡杞寲鍑洪敊"); + } + + + + log.info("銆愮洃娴嬨�慬" + tbOrders.getOrderID() + "]杞︾墝鍙凤細" + carLicenseStr); //鎵撳嵃map log.info("銆愮洃娴嬨�慬" + tbOrders.getOrderID() + "]鍥炶皟璇锋眰鍙傛暟锛�" + map); diff --git a/ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml b/ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml index db76369..b403bfa 100644 --- a/ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml @@ -78,7 +78,7 @@ <select id="selectImageUrlsByDOrdIDDt" parameterType="String" resultType="String"> select ImageUrl from ImageData - where DOrdIDDt = #{dOrdIDDt} + where SOrdIDDt = #{dOrdIDDt} and ImageDel = 0 and ImageType in (1,2) order by UpImageTime desc diff --git a/ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml index 5301a16..c59df7d 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml @@ -250,6 +250,7 @@ <select id="selectTbOrdersByServiceOrdID" parameterType="String" resultMap="TbOrdersResult"> <include refid="selectTbOrdersVo"/> where ServiceOrdID = #{ServiceOrdID} + LIMIT 1 </select> </mapper> \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/order/detail.vue b/ruoyi-ui/src/views/system/order/detail.vue index b100207..886735a 100644 --- a/ruoyi-ui/src/views/system/order/detail.vue +++ b/ruoyi-ui/src/views/system/order/detail.vue @@ -127,7 +127,7 @@ <el-image v-for="image in otherInfo.imageUrls" :key="image" - :src="image" + :src="`https://sys.966120.com.cn${image}`" :preview-src-list="otherInfo.imageUrls" class="preview-image" /> -- Gitblit v1.9.1