From 3397162d64b0092e310f24d17b267127264463ac Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期五, 15 八月 2025 16:23:13 +0800 Subject: [PATCH] update --- ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TAbnormalOrderCarController.java | 184 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 177 insertions(+), 7 deletions(-) diff --git a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TAbnormalOrderCarController.java b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TAbnormalOrderCarController.java index 5b32716..966f894 100644 --- a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TAbnormalOrderCarController.java +++ b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TAbnormalOrderCarController.java @@ -80,6 +80,10 @@ @Autowired private TAbnormalPayOrderService tAbnormalPayOrderService; + + + @Autowired + private ITSystemNoticeService systemNoticeService; /** @@ -113,12 +117,13 @@ Object o2 = item.get("responsibilityType"); if(o2!=null){ if(Integer.valueOf(o2.toString())>2){ - TAbnormalPayOrder tAbnormalPayOrder = tAbnormalPayOrderService.selectOne(new EntityWrapper<TAbnormalPayOrder>().eq("type", 1).eq("orderNum", item.get("orderNum"))); + TAbnormalPayOrder tAbnormalPayOrder = tAbnormalPayOrderService.selectOne(new EntityWrapper<TAbnormalPayOrder>().eq("type", 1).eq("orderNum",tOrderPrivateCarId)); model.addAttribute("money",tAbnormalPayOrder.getPayMoney()); } } model.addAttribute("item",item); model.addAttribute("type",1); + model.addAttribute("show",0); List<TOrderPrivateCar> tOrderPrivateCars = tOrderPrivateCarService.selectList(new EntityWrapper<TOrderPrivateCar>().eq("pid", tOrderPrivateCarId).eq("isDelete", 1)); List<Map<String, Object>> maps = new ArrayList<>(); @@ -140,6 +145,85 @@ } Object o2 = item.get("responsibilityType"); model.addAttribute("money",0); + model.addAttribute("show",0); + if(o2!=null){ + if(Integer.valueOf(o2.toString())>2){ + TAbnormalPayOrder tAbnormalPayOrder = tAbnormalPayOrderService.selectOne(new EntityWrapper<TAbnormalPayOrder>().eq("type", 2).eq("orderNum",tOrderPrivateCarId)); + model.addAttribute("money",tAbnormalPayOrder.getPayMoney()); + } + } + model.addAttribute("type",2); + model.addAttribute("item",item); + }else if(type==3){ + Map<String, Object> item = tOrderTaxiService.getTaxiOrderDetailById(tOrderPrivateCarId); + Object o1 = item.get("abnormalImg"); + if(o1!=null){ + String[] split = o1.toString().split(","); + model.addAttribute("abnormalImg",split); + }else { + model.addAttribute("abnormalImg",new String[]{}); + } + model.addAttribute("money",0); + model.addAttribute("show",0); + Object o2 = item.get("responsibilityType"); + if(o2!=null){ + if(Integer.valueOf(o2.toString())>2){ + TAbnormalPayOrder tAbnormalPayOrder = tAbnormalPayOrderService.selectOne(new EntityWrapper<TAbnormalPayOrder>().eq("type", 3).eq("orderNum",tOrderPrivateCarId)); + model.addAttribute("money",tAbnormalPayOrder.getPayMoney()); + } + } + model.addAttribute("type",3); + model.addAttribute("item",item); + } + + return PREFIX + "tAbnormalOrder_orderDetail.html"; + } + @RequestMapping("/tOrderPrivateCar_orderDetail1") + public String tOrderPrivateCarUpdate1(Integer tOrderPrivateCarId,Integer type, Model model) { + if(type==1){ + Map<String, Object> item = tOrderPrivateCarService.getPrivateCarOrderDetailById(tOrderPrivateCarId); + + Object o1 = item.get("abnormalImg"); + if(o1!=null){ + String[] split = o1.toString().split(","); + model.addAttribute("abnormalImg",split); + }else { + model.addAttribute("abnormalImg",new String[]{}); + } + // money是修改后的金额 + model.addAttribute("money",0); + Object o2 = item.get("responsibilityType"); + if(o2!=null){ + if(Integer.valueOf(o2.toString())>2){ + TAbnormalPayOrder tAbnormalPayOrder = tAbnormalPayOrderService.selectOne(new EntityWrapper<TAbnormalPayOrder>().eq("type", 1).eq("orderNum", item.get("orderNum"))); + model.addAttribute("money",tAbnormalPayOrder.getPayMoney()); + } + } + model.addAttribute("item",item); + model.addAttribute("type",1); + model.addAttribute("show",1); + + List<TOrderPrivateCar> tOrderPrivateCars = tOrderPrivateCarService.selectList(new EntityWrapper<TOrderPrivateCar>().eq("pid", tOrderPrivateCarId).eq("isDelete", 1)); + List<Map<String, Object>> maps = new ArrayList<>(); + for (TOrderPrivateCar tOrderPrivateCar : tOrderPrivateCars) { + item = tOrderPrivateCarService.getPrivateCarOrderDetailById(tOrderPrivateCar.getId()); + String phone = item.get("userPhone").toString(); + item.put("userPhone1", phone.substring(phone.length() - 4)); + maps.add(item); + } + model.addAttribute("maps",maps); + }else if(type==2){ + Map<String, Object> item = tOrderCrossCityService.getCrossCityOrderDetailById(tOrderPrivateCarId); + Object o1 = item.get("abnormalImg"); + if(o1!=null){ + String[] split = o1.toString().split(","); + model.addAttribute("abnormalImg",split); + }else { + model.addAttribute("abnormalImg",new String[]{}); + } + Object o2 = item.get("responsibilityType"); + model.addAttribute("money",0); + model.addAttribute("show",1); if(o2!=null){ if(Integer.valueOf(o2.toString())>2){ TAbnormalPayOrder tAbnormalPayOrder = tAbnormalPayOrderService.selectOne(new EntityWrapper<TAbnormalPayOrder>().eq("type", 2).eq("orderNum", item.get("orderNum"))); @@ -158,6 +242,7 @@ model.addAttribute("abnormalImg",new String[]{}); } model.addAttribute("money",0); + model.addAttribute("show",1); Object o2 = item.get("responsibilityType"); if(o2!=null){ if(Integer.valueOf(o2.toString())>2){ @@ -210,6 +295,9 @@ } abnormal = 2; Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); + if(type==null){ + type=1; + } // 快车 if(type==1){ page.setRecords(tOrderPrivateCarService.getPrivateCarOrderList(page, beginTime, endTime, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), @@ -589,39 +677,121 @@ @RequestMapping(value = "/save") @ResponseBody public Object save(Integer responsibilityTypeVal,String remark,String money,Integer type,String orderNum) { + Integer userId =null; if(type==1){ - TOrderPrivateCar tOrderPrivateCar = tOrderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>().eq("orderNum",orderNum)); + TOrderPrivateCar tOrderPrivateCar = tOrderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>().eq("id",orderNum)); + userId = tOrderPrivateCar.getUserId(); tOrderPrivateCar.setResponsibilityType(responsibilityTypeVal); tOrderPrivateCar.setAbnormalStatus(2); if(responsibilityTypeVal>3){ - tOrderPrivateCar.setResponsibilityMoney(new BigDecimal(money)); + tOrderPrivateCar.setResponsibilityMoney(tOrderPrivateCar.getPayMoney()); + tOrderPrivateCar.setOrderMoney(new BigDecimal(money)); + } + if(responsibilityTypeVal>2){ + // 追偿订单记录表 + TAbnormalPayOrder tAbnormalPayOrder = new TAbnormalPayOrder(); + tAbnormalPayOrder.setOrderNum(orderNum); + tAbnormalPayOrder.setOrderNo(tOrderPrivateCar.getOrderNum()); + tAbnormalPayOrder.setType(1); + tAbnormalPayOrder.setUserId(tOrderPrivateCar.getUserId()); + tAbnormalPayOrder.setPayStatus(1); + tAbnormalPayOrder.setPayTime(new Date()); + if(responsibilityTypeVal==3){ + tAbnormalPayOrder.setPayMoney(tOrderPrivateCar.getPayMoney()); + }else { + tAbnormalPayOrder.setPayMoney(new BigDecimal( money)); + } + tAbnormalPayOrder.setCompanyId(tOrderPrivateCar.getCompanyId()); + tAbnormalPayOrderService.insert(tAbnormalPayOrder); + } + + if(responsibilityTypeVal<3){ + tOrderPrivateCar.setState(9); } tOrderPrivateCar.setAbnormalRemark(remark); tOrderPrivateCarService.updateById(tOrderPrivateCar); } if(type==2){ - TOrderCrossCity tOrderCrossCity = tOrderCrossCityService.selectOne(new EntityWrapper<TOrderCrossCity>().eq("orderNum", orderNum)); + TOrderCrossCity tOrderCrossCity = tOrderCrossCityService.selectOne(new EntityWrapper<TOrderCrossCity>().eq("id", orderNum)); + userId = tOrderCrossCity.getUserId(); tOrderCrossCity.setResponsibilityType(responsibilityTypeVal); tOrderCrossCity.setAbnormalStatus(2); if(responsibilityTypeVal>3) { - tOrderCrossCity.setResponsibilityMoney(new BigDecimal(money)); + tOrderCrossCity.setResponsibilityMoney(tOrderCrossCity.getPayMoney()); + tOrderCrossCity.setOrderMoney(new BigDecimal(money)); + } + if(responsibilityTypeVal>2){ + // 追偿订单记录表 + TAbnormalPayOrder tAbnormalPayOrder = new TAbnormalPayOrder(); + tAbnormalPayOrder.setOrderNum(orderNum); + + tAbnormalPayOrder.setOrderNo(tOrderCrossCity.getOrderNum()); + tAbnormalPayOrder.setType(2); + tAbnormalPayOrder.setUserId(tOrderCrossCity.getUserId()); + tAbnormalPayOrder.setPayStatus(1); + tAbnormalPayOrder.setPayTime(new Date()); + if(responsibilityTypeVal==3){ + tAbnormalPayOrder.setPayMoney(tOrderCrossCity.getPayMoney()); + }else { + tAbnormalPayOrder.setPayMoney(new BigDecimal(money)); + } + tAbnormalPayOrder.setCompanyId(tOrderCrossCity.getCompanyId()); + tAbnormalPayOrderService.insert(tAbnormalPayOrder); + } + if(responsibilityTypeVal<3){ + tOrderCrossCity.setState(9); } tOrderCrossCity.setAbnormalRemark(remark); tOrderCrossCityService.updateById(tOrderCrossCity); } if(type==3){ - TOrderTaxi tOrderTaxi = tOrderTaxiService.selectOne(new EntityWrapper<TOrderTaxi>().eq("orderNum", orderNum)); + TOrderTaxi tOrderTaxi = tOrderTaxiService.selectOne(new EntityWrapper<TOrderTaxi>().eq("id", orderNum)); + userId = tOrderTaxi.getUserId(); tOrderTaxi.setResponsibilityType(responsibilityTypeVal); tOrderTaxi.setAbnormalStatus(2); if(responsibilityTypeVal>3) { - tOrderTaxi.setResponsibilityMoney(new BigDecimal(money)); + tOrderTaxi.setResponsibilityMoney(tOrderTaxi.getPayMoney()); + tOrderTaxi.setOrderMoney(new BigDecimal(money)); + } + if(responsibilityTypeVal>2){ + // 追偿订单记录表 + TAbnormalPayOrder tAbnormalPayOrder = new TAbnormalPayOrder(); + tAbnormalPayOrder.setOrderNum(orderNum); + tAbnormalPayOrder.setOrderNo(tOrderTaxi.getOrderNum()); + tAbnormalPayOrder.setType(3); + tAbnormalPayOrder.setUserId(tOrderTaxi.getUserId()); + tAbnormalPayOrder.setPayStatus(1); + tAbnormalPayOrder.setPayTime(new Date()); + if(responsibilityTypeVal==3){ + tAbnormalPayOrder.setPayMoney(tOrderTaxi.getPayMoney()); + }else { + tAbnormalPayOrder.setPayMoney(new BigDecimal( money)); + } + + tAbnormalPayOrder.setCompanyId(tOrderTaxi.getCompanyId()); + tAbnormalPayOrderService.insert(tAbnormalPayOrder); + } + if(responsibilityTypeVal<3){ + tOrderTaxi.setState(9); } tOrderTaxi.setAbnormalRemark(remark); tOrderTaxiService.updateById(tOrderTaxi); } + + + TSystemNotice tSystemNotice = new TSystemNotice(); + tSystemNotice.setType(2); + tSystemNotice.setNoticeType(1); + tSystemNotice.setUserType(1); + tSystemNotice.setUserId(userId); + tSystemNotice.setContent("您提交的申诉平台已处理"); + tSystemNotice.setRead(1); + tSystemNotice.setInsertTime(new Date()); + systemNoticeService.insert(tSystemNotice); return SUCCESS_TIP; + } -- Gitblit v1.7.1