From 60618436b0d5e4ce7501b064285b6a4ff876201e Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期五, 31 五月 2024 16:43:15 +0800 Subject: [PATCH] 管理后台完成 --- ManagementNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderTransferController.java | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ManagementNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderTransferController.java b/ManagementNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderTransferController.java index cec1a7e..e476d70 100644 --- a/ManagementNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderTransferController.java +++ b/ManagementNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderTransferController.java @@ -14,10 +14,7 @@ import com.stylefeng.guns.modular.system.service.ITOrderPositionService; import com.stylefeng.guns.modular.system.service.ITOrderTransferService; import com.stylefeng.guns.modular.system.service.ITServerCarmodelService; -import com.stylefeng.guns.modular.system.util.HttpRequestUtil; -import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; -import com.stylefeng.guns.modular.system.util.PushURL; -import com.stylefeng.guns.modular.system.util.ResultUtil; +import com.stylefeng.guns.modular.system.util.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; @@ -29,6 +26,9 @@ import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; import java.util.*; /** @@ -85,9 +85,22 @@ * 跳转到修改接送机订单 */ @RequestMapping("/tOrderTransfer_orderDetail/{tOrderTransferId}") - public String tOrderTransferUpdate(@PathVariable Integer tOrderTransferId, Model model) { + public String tOrderTransferUpdate(@PathVariable Integer tOrderTransferId, Model model) throws ParseException { Map<String, Object> item = tOrderTransferService.getTransferOrderDetailById(tOrderTransferId); model.addAttribute("item",item); + if(Objects.nonNull(item.get("routeRecord"))){ + List<String> routeRecordList = Arrays.asList(item.get("routeRecord").toString().split(",")); + model.addAttribute("routeRecordList",routeRecordList); + } + if(Objects.nonNull(item.get("routeRecord")) && Objects.nonNull(item.get("recordTime"))){ + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + LocalDateTime recordTime = DateUtil.dateToLocalDateTime(format.parse(item.get("recordTime").toString())); + if(LocalDateTime.now().isBefore(recordTime.plusMonths(1))){ + model.addAttribute("recordState",1); + }else { + model.addAttribute("recordState",2); + } + } return PREFIX + "tOrderTransfer_orderDetail.html"; } -- Gitblit v1.7.1