From 5dacdee9b54c78372b68140e2b068d03a620eab9 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 02 七月 2025 19:00:52 +0800 Subject: [PATCH] 修改bug --- ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSysReformistController.java | 512 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 259 insertions(+), 253 deletions(-) diff --git a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSysReformistController.java b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSysReformistController.java index b713127..c9d299d 100644 --- a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSysReformistController.java +++ b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSysReformistController.java @@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import javax.annotation.Resource; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; @@ -79,6 +80,13 @@ @Autowired private ITElectricRecordService recordService; + @Autowired + ITSystemPriceService priceService; + @Autowired + private ITServerCarmodelService serverCarmodelService; + @Resource + private ShiroExtUtil shiroExtUtil; + @RequestMapping ("/check-change/{id}") @ResponseBody public ResultUtil Change(@PathVariable Integer id,String priceType,String isCheck ) { @@ -104,27 +112,25 @@ } } } - String join = String.join(",", split); - carModel.setIsCheck(join); - serverCarmodelService.updateById(carModel); - System.err.println("================="+id+"===="+priceType); - return new ResultUtil(null,0,"保存成功"); + String join = String.join(",", split); + carModel.setIsCheck(join); + serverCarmodelService.updateById(carModel); + System.err.println("=================" + id + "====" + priceType); + return new ResultUtil(null, 0, "保存成功"); } - @Autowired - private ITServerCarmodelService serverCarmodelService; - @Autowired ITSystemPriceService priceService; - @RequestMapping("/checklist") - @ResponseBody - public Object checklist(Model model) { - Integer id = ShiroExtUtil.getUser().getId(); + + @RequestMapping("/checklist") + @ResponseBody + public Object checklist(Model model) { + Integer id = shiroExtUtil.getUser().getId(); // List<TSystemPrice> tSystemPrices = priceService.selectList(new EntityWrapper<TSystemPrice>().eq("companyId", id).eq("type", 1).eq("state", 1)); // List<Integer> ids = new ArrayList<>(); // for (TSystemPrice tSystemPrice : tSystemPrices) { // ids.add(tSystemPrice.getServerCarModelId()); // } - - - List<TServerCarmodel> tCarModels = serverCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("state",1).eq("type",1)); + + + List<TServerCarmodel> tCarModels = serverCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("state",1).eq("type",1)); TServerCarmodel type = serverCarmodelService.selectOne(new EntityWrapper<TServerCarmodel>().eq("type", 4)); List<TServerCarmodel> returnList = new ArrayList<>(); for (TServerCarmodel tCarModel : tCarModels) { @@ -162,73 +168,73 @@ @RequestMapping("") public String index(Model model) { //改派设置 - TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); + TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", shiroExtUtil.getUser().getObjectId())); model.addAttribute("reformist",reformist); //积分设置 - TSysIntegral integral = tSysIntegralService.selectOne(new EntityWrapper<TSysIntegral>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); + TSysIntegral integral = tSysIntegralService.selectOne(new EntityWrapper<TSysIntegral>().eq("companyId", shiroExtUtil.getUser().getObjectId())); model.addAttribute("integral",integral); //人脸识别 - TSysFaceDistinguish faceDistinguish = tSysFaceDistinguishService.selectOne(new EntityWrapper<TSysFaceDistinguish>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); + TSysFaceDistinguish faceDistinguish = tSysFaceDistinguishService.selectOne(new EntityWrapper<TSysFaceDistinguish>().eq("companyId", shiroExtUtil.getUser().getObjectId())); model.addAttribute("faceDistinguish",faceDistinguish); //快车推单(第一轮) - TSysPushOrder zcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 1)); + TSysPushOrder zcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 1)); model.addAttribute("zcOne",zcOne); //快车推单(第二轮) - TSysPushOrder zcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 2)); + TSysPushOrder zcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 2)); model.addAttribute("zcTwo",zcTwo); //快车推单(第三轮) - TSysPushOrder zcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 3)); + TSysPushOrder zcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 3)); model.addAttribute("zcThree",zcThree); //出租车推单(第一轮) - TSysPushOrder czcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 1)); + TSysPushOrder czcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 1)); model.addAttribute("czcOne",czcOne); //出租车推单(第二轮) - TSysPushOrder czcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 2)); + TSysPushOrder czcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 2)); model.addAttribute("czcTwo",czcTwo); //出租车推单(第三轮) - TSysPushOrder czcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 3)); + TSysPushOrder czcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 3)); model.addAttribute("czcThree",czcThree); //普通取消设置(快车) - TSysCancleOrder ptCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); + TSysCancleOrder ptCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); model.addAttribute("ptCancel1",ptCancel1); //普通取消设置(出租车) - TSysCancleOrder ptCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); + TSysCancleOrder ptCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); model.addAttribute("ptCancel2",ptCancel2); //普通取消设置(跨城出行) - TSysCancleOrder ptCancel3 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); + TSysCancleOrder ptCancel3 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); model.addAttribute("ptCancel3",ptCancel3); //预约取消设置(快车) - TSysCancleOrder yyCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 1)); + TSysCancleOrder yyCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 1)); model.addAttribute("yyCancel1",yyCancel1); //预约取消设置(出租车) - TSysCancleOrder yyCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 2)); + TSysCancleOrder yyCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 2)); model.addAttribute("yyCancel2",yyCancel2); //拼车设置 - SpellOrderRule spellOrderRule = spellOrderRuleService.selectOne(new EntityWrapper<SpellOrderRule>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); + SpellOrderRule spellOrderRule = spellOrderRuleService.selectOne(new EntityWrapper<SpellOrderRule>().eq("companyId", shiroExtUtil.getUser().getObjectId())); model.addAttribute("spellOrderRule", null == spellOrderRule ? "" : JSONObject.parseObject(spellOrderRule.getContent())); //报警电话 - TPhone phone1 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1)); + TPhone phone1 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1)); model.addAttribute("phone1",phone1); //客服电话 - TPhone phone2 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2)); + TPhone phone2 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2)); model.addAttribute("phone2",phone2); //客服电话 - TPhone phone3 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 3)); + TPhone phone3 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 3)); model.addAttribute("phone3",phone3); //95128电召电话 - TPhone phone4 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 4)); + TPhone phone4 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 4)); model.addAttribute("phone4",phone4); //招聘电话 - TPhone phone5 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 5)); + TPhone phone5 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 5)); model.addAttribute("phone5",phone5); //节假日服务费 - BigDecimal holidayFee = companyService.selectById(ShiroExtUtil.getUser().getObjectId()).getHolidayFee(); + BigDecimal holidayFee = companyService.selectById(shiroExtUtil.getUser().getObjectId()).getHolidayFee(); model.addAttribute("holidayFee",holidayFee); //超时扣款 TSysTimeoutMoney tSysTimeoutMoney = timeoutMoneyService.selectOne(null); @@ -272,7 +278,7 @@ } } model.addAttribute("showModulars", map); - TDriverPayDays tDriverPayDays = driverPayDaysService.selectOne(new EntityWrapper<TDriverPayDays>().eq("company_id", ShiroExtUtil.getUser().getObjectId())); + TDriverPayDays tDriverPayDays = driverPayDaysService.selectOne(new EntityWrapper<TDriverPayDays>().eq("company_id", shiroExtUtil.getUser().getObjectId())); if(tDriverPayDays!=null){ model.addAttribute("driverDay", tDriverPayDays.getDay()); }else { @@ -314,381 +320,381 @@ Integer dck1, Integer dck2,Integer driverDays) { //改派设置 if("reassigningSet".equals(type)){ - TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); + TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", shiroExtUtil.getUser().getObjectId())); if (SinataUtil.isNotEmpty(reformist)){ reformist.setMoney(one); reformist.setIsSpecialCar(isSpecialCar); reformist.setIsTaxiCar(isTaxiCar); tSysReformistService.updateById(reformist); - }else{ - reformist = new TSysReformist(); - reformist.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - reformist.setMoney(one); - reformist.setIsSpecialCar(isSpecialCar); - reformist.setIsTaxiCar(isTaxiCar); - tSysReformistService.insert(reformist); + }else { + reformist = new TSysReformist(); + reformist.setCompanyId(shiroExtUtil.getUser().getObjectId()); + reformist.setMoney(one); + reformist.setIsSpecialCar(isSpecialCar); + reformist.setIsTaxiCar(isTaxiCar); + tSysReformistService.insert(reformist); } } if("driverPayDays".equals(type)){ - TDriverPayDays tDriverPayDays = driverPayDaysService.selectOne(new EntityWrapper<TDriverPayDays>().eq("company_id", ShiroExtUtil.getUser().getObjectId())); + TDriverPayDays tDriverPayDays = driverPayDaysService.selectOne(new EntityWrapper<TDriverPayDays>().eq("company_id", shiroExtUtil.getUser().getObjectId())); if (SinataUtil.isNotEmpty(tDriverPayDays)){ tDriverPayDays.setDay(driverDays); tDriverPayDays.setUpdateTime(new Date()); driverPayDaysService.updateById(tDriverPayDays); - }else{ - tDriverPayDays = new TDriverPayDays(); - tDriverPayDays.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - tDriverPayDays.setUpdateTime(new Date()); - tDriverPayDays.setDay(driverDays); - driverPayDaysService.insert(tDriverPayDays); + }else { + tDriverPayDays = new TDriverPayDays(); + tDriverPayDays.setCompanyId(shiroExtUtil.getUser().getObjectId()); + tDriverPayDays.setUpdateTime(new Date()); + tDriverPayDays.setDay(driverDays); + driverPayDaysService.insert(tDriverPayDays); } } //积分设置 if("integralSet".equals(type)){ - TSysIntegral integral = tSysIntegralService.selectOne(new EntityWrapper<TSysIntegral>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); + TSysIntegral integral = tSysIntegralService.selectOne(new EntityWrapper<TSysIntegral>().eq("companyId", shiroExtUtil.getUser().getObjectId())); if (SinataUtil.isNotEmpty(integral)){ integral.setIntegral(two); tSysIntegralService.updateById(integral); - }else{ - integral = new TSysIntegral(); - integral.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - integral.setIntegral(two); - tSysIntegralService.insert(integral); + }else { + integral = new TSysIntegral(); + integral.setCompanyId(shiroExtUtil.getUser().getObjectId()); + integral.setIntegral(two); + tSysIntegralService.insert(integral); } } //人脸识别 if("faceRecognitionSettings".equals(type)){ - TSysFaceDistinguish faceDistinguish = tSysFaceDistinguishService.selectOne(new EntityWrapper<TSysFaceDistinguish>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); + TSysFaceDistinguish faceDistinguish = tSysFaceDistinguishService.selectOne(new EntityWrapper<TSysFaceDistinguish>().eq("companyId", shiroExtUtil.getUser().getObjectId())); if (SinataUtil.isNotEmpty(faceDistinguish)){ faceDistinguish.setIsOpen(three); faceDistinguish.setMinuteNum(openValue); tSysFaceDistinguishService.updateById(faceDistinguish); - }else{ - faceDistinguish = new TSysFaceDistinguish(); - faceDistinguish.setIsOpen(three); - faceDistinguish.setMinuteNum(openValue); - faceDistinguish.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - tSysFaceDistinguishService.insert(faceDistinguish); + }else { + faceDistinguish = new TSysFaceDistinguish(); + faceDistinguish.setIsOpen(three); + faceDistinguish.setMinuteNum(openValue); + faceDistinguish.setCompanyId(shiroExtUtil.getUser().getObjectId()); + tSysFaceDistinguishService.insert(faceDistinguish); } } //推单设置 if("pushOrderSettings".equals(type)){ //快车推单(第一轮) - TSysPushOrder zcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 1)); + TSysPushOrder zcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 1)); if (SinataUtil.isNotEmpty(zcOne)){ zcOne.setPushDistance(zc1); zcOne.setPushTime(zc2); zcOne.setDriverProportion(zc3); tSysPushOrderService.updateById(zcOne); - }else{ - zcOne = new TSysPushOrder(); - zcOne.setPushDistance(zc1); - zcOne.setPushTime(zc2); - zcOne.setDriverProportion(zc3); - zcOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - zcOne.setPushType(1); - zcOne.setType(1); - tSysPushOrderService.insert(zcOne); + }else { + zcOne = new TSysPushOrder(); + zcOne.setPushDistance(zc1); + zcOne.setPushTime(zc2); + zcOne.setDriverProportion(zc3); + zcOne.setCompanyId(shiroExtUtil.getUser().getObjectId()); + zcOne.setPushType(1); + zcOne.setType(1); + tSysPushOrderService.insert(zcOne); } //快车推单(第二轮) - TSysPushOrder zcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 2)); + TSysPushOrder zcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 2)); if (SinataUtil.isNotEmpty(zcTwo)){ zcTwo.setPushDistance(zc4); zcTwo.setPushTime(zc5); zcTwo.setDriverProportion(zc6); tSysPushOrderService.updateById(zcTwo); - }else{ - zcTwo = new TSysPushOrder(); - zcTwo.setPushDistance(zc4); - zcTwo.setPushTime(zc5); - zcTwo.setDriverProportion(zc6); - zcTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - zcTwo.setPushType(1); - zcTwo.setType(2); - tSysPushOrderService.insert(zcTwo); + }else { + zcTwo = new TSysPushOrder(); + zcTwo.setPushDistance(zc4); + zcTwo.setPushTime(zc5); + zcTwo.setDriverProportion(zc6); + zcTwo.setCompanyId(shiroExtUtil.getUser().getObjectId()); + zcTwo.setPushType(1); + zcTwo.setType(2); + tSysPushOrderService.insert(zcTwo); } //快车推单(第三轮) - TSysPushOrder zcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 3)); + TSysPushOrder zcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 1).eq("type", 3)); if (SinataUtil.isNotEmpty(zcThree)){ zcThree.setPushDistance(zc7); zcThree.setPushTime(zc8); zcThree.setDriverProportion(zc9); tSysPushOrderService.updateById(zcThree); - }else{ - zcThree = new TSysPushOrder(); - zcThree.setPushDistance(zc7); - zcThree.setPushTime(zc8); - zcThree.setDriverProportion(zc9); - zcThree.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - zcThree.setPushType(1); - zcThree.setType(3); - tSysPushOrderService.insert(zcThree); + }else { + zcThree = new TSysPushOrder(); + zcThree.setPushDistance(zc7); + zcThree.setPushTime(zc8); + zcThree.setDriverProportion(zc9); + zcThree.setCompanyId(shiroExtUtil.getUser().getObjectId()); + zcThree.setPushType(1); + zcThree.setType(3); + tSysPushOrderService.insert(zcThree); } //出租车推单(第一轮) - TSysPushOrder czcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 1)); + TSysPushOrder czcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 1)); if (SinataUtil.isNotEmpty(czcOne)){ czcOne.setPushDistance(czc1); czcOne.setPushTime(czc2); czcOne.setDriverProportion(czc3); tSysPushOrderService.updateById(czcOne); - }else{ - czcOne = new TSysPushOrder(); - czcOne.setPushDistance(czc1); - czcOne.setPushTime(czc2); - czcOne.setDriverProportion(czc3); - czcOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - czcOne.setPushType(2); - czcOne.setType(1); - tSysPushOrderService.insert(czcOne); + }else { + czcOne = new TSysPushOrder(); + czcOne.setPushDistance(czc1); + czcOne.setPushTime(czc2); + czcOne.setDriverProportion(czc3); + czcOne.setCompanyId(shiroExtUtil.getUser().getObjectId()); + czcOne.setPushType(2); + czcOne.setType(1); + tSysPushOrderService.insert(czcOne); } //出租车推单(第二轮) - TSysPushOrder czcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 2)); + TSysPushOrder czcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 2)); if (SinataUtil.isNotEmpty(czcTwo)){ czcTwo.setPushDistance(czc4); czcTwo.setPushTime(czc5); czcTwo.setDriverProportion(czc6); tSysPushOrderService.updateById(czcTwo); - }else{ - czcTwo = new TSysPushOrder(); - czcTwo.setPushDistance(czc4); - czcTwo.setPushTime(czc5); - czcTwo.setDriverProportion(czc6); - czcTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - czcTwo.setPushType(2); - czcTwo.setType(2); - tSysPushOrderService.insert(czcTwo); + }else { + czcTwo = new TSysPushOrder(); + czcTwo.setPushDistance(czc4); + czcTwo.setPushTime(czc5); + czcTwo.setDriverProportion(czc6); + czcTwo.setCompanyId(shiroExtUtil.getUser().getObjectId()); + czcTwo.setPushType(2); + czcTwo.setType(2); + tSysPushOrderService.insert(czcTwo); } //出租车推单(第三轮) - TSysPushOrder czcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 3)); + TSysPushOrder czcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("pushType", 2).eq("type", 3)); if (SinataUtil.isNotEmpty(czcThree)){ czcThree.setPushDistance(czc7); czcThree.setPushTime(czc8); czcThree.setDriverProportion(czc9); tSysPushOrderService.updateById(czcThree); - }else{ - czcThree = new TSysPushOrder(); - czcThree.setPushDistance(czc7); - czcThree.setPushTime(czc8); - czcThree.setDriverProportion(czc9); - czcThree.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - czcThree.setPushType(2); - czcThree.setType(3); - tSysPushOrderService.insert(czcThree); + }else { + czcThree = new TSysPushOrder(); + czcThree.setPushDistance(czc7); + czcThree.setPushTime(czc8); + czcThree.setDriverProportion(czc9); + czcThree.setCompanyId(shiroExtUtil.getUser().getObjectId()); + czcThree.setPushType(2); + czcThree.setType(3); + tSysPushOrderService.insert(czcThree); } } //取消设置 if("cancelOrderSettings".equals(type)){ //普通取消设置(快车) - TSysCancleOrder ptCancelOne = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); + TSysCancleOrder ptCancelOne = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); if (SinataUtil.isNotEmpty(ptCancelOne)){ ptCancelOne.setMinuteNum(ptCancel1); ptCancelOne.setMoney(ptCancel2); tSysCancleOrderService.updateById(ptCancelOne); - }else{ - ptCancelOne = new TSysCancleOrder(); - ptCancelOne.setMinuteNum(ptCancel1); - ptCancelOne.setMoney(ptCancel2); - ptCancelOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - ptCancelOne.setType(1); - ptCancelOne.setOrderType(1); - tSysCancleOrderService.insert(ptCancelOne); + }else { + ptCancelOne = new TSysCancleOrder(); + ptCancelOne.setMinuteNum(ptCancel1); + ptCancelOne.setMoney(ptCancel2); + ptCancelOne.setCompanyId(shiroExtUtil.getUser().getObjectId()); + ptCancelOne.setType(1); + ptCancelOne.setOrderType(1); + tSysCancleOrderService.insert(ptCancelOne); } //普通取消设置(出租车) - TSysCancleOrder ptCancelTwo = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); + TSysCancleOrder ptCancelTwo = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); if (SinataUtil.isNotEmpty(ptCancelTwo)){ ptCancelTwo.setMinuteNum(ptCancel3); ptCancelTwo.setMoney(ptCancel4); tSysCancleOrderService.updateById(ptCancelTwo); - }else{ - ptCancelTwo = new TSysCancleOrder(); - ptCancelTwo.setMinuteNum(ptCancel3); - ptCancelTwo.setMoney(ptCancel4); - ptCancelTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - ptCancelTwo.setType(1); - ptCancelTwo.setOrderType(2); - tSysCancleOrderService.insert(ptCancelTwo); + }else { + ptCancelTwo = new TSysCancleOrder(); + ptCancelTwo.setMinuteNum(ptCancel3); + ptCancelTwo.setMoney(ptCancel4); + ptCancelTwo.setCompanyId(shiroExtUtil.getUser().getObjectId()); + ptCancelTwo.setType(1); + ptCancelTwo.setOrderType(2); + tSysCancleOrderService.insert(ptCancelTwo); } //普通取消设置(跨城出行) - TSysCancleOrder ptCancelThree = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); + TSysCancleOrder ptCancelThree = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); if (SinataUtil.isNotEmpty(ptCancelThree)){ ptCancelThree.setMinuteNum(ptCancel5); ptCancelThree.setMoney(ptCancel6); tSysCancleOrderService.updateById(ptCancelThree); - }else{ - ptCancelThree = new TSysCancleOrder(); - ptCancelThree.setMinuteNum(ptCancel5); - ptCancelThree.setMoney(ptCancel6); - ptCancelThree.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - ptCancelThree.setType(1); - ptCancelThree.setOrderType(3); - tSysCancleOrderService.insert(ptCancelThree); + }else { + ptCancelThree = new TSysCancleOrder(); + ptCancelThree.setMinuteNum(ptCancel5); + ptCancelThree.setMoney(ptCancel6); + ptCancelThree.setCompanyId(shiroExtUtil.getUser().getObjectId()); + ptCancelThree.setType(1); + ptCancelThree.setOrderType(3); + tSysCancleOrderService.insert(ptCancelThree); } } //预约取消设置 if("cancelTheReservationOrderSetting".equals(type)){ //预约取消设置(快车) - TSysCancleOrder yyCancelOne = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 1)); + TSysCancleOrder yyCancelOne = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 1)); if (SinataUtil.isNotEmpty(yyCancelOne)){ yyCancelOne.setMinuteNum(yyCancel1); yyCancelOne.setMoney(yyCancel2); tSysCancleOrderService.updateById(yyCancelOne); - }else{ - yyCancelOne = new TSysCancleOrder(); - yyCancelOne.setMinuteNum(yyCancel1); - yyCancelOne.setMoney(yyCancel2); - yyCancelOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - yyCancelOne.setType(2); - yyCancelOne.setOrderType(1); - tSysCancleOrderService.insert(yyCancelOne); + }else { + yyCancelOne = new TSysCancleOrder(); + yyCancelOne.setMinuteNum(yyCancel1); + yyCancelOne.setMoney(yyCancel2); + yyCancelOne.setCompanyId(shiroExtUtil.getUser().getObjectId()); + yyCancelOne.setType(2); + yyCancelOne.setOrderType(1); + tSysCancleOrderService.insert(yyCancelOne); } //预约取消设置(出租车) - TSysCancleOrder yyCancelTwo = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 2)); + TSysCancleOrder yyCancelTwo = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2).eq("orderType", 2)); if (SinataUtil.isNotEmpty(yyCancelTwo)){ yyCancelTwo.setMinuteNum(yyCancel3); yyCancelTwo.setMoney(yyCancel4); tSysCancleOrderService.updateById(yyCancelTwo); - }else{ - yyCancelTwo = new TSysCancleOrder(); - yyCancelTwo.setMinuteNum(yyCancel3); - yyCancelTwo.setMoney(yyCancel4); - yyCancelTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - yyCancelTwo.setType(2); - yyCancelTwo.setOrderType(2); - tSysCancleOrderService.insert(yyCancelTwo); + }else { + yyCancelTwo = new TSysCancleOrder(); + yyCancelTwo.setMinuteNum(yyCancel3); + yyCancelTwo.setMoney(yyCancel4); + yyCancelTwo.setCompanyId(shiroExtUtil.getUser().getObjectId()); + yyCancelTwo.setType(2); + yyCancelTwo.setOrderType(2); + tSysCancleOrderService.insert(yyCancelTwo); } } //拼单派单 - if("spellOrderSetting".equals(type)){ - SpellOrderRule spellOrderRule = spellOrderRuleService.selectOne(new EntityWrapper<SpellOrderRule>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); - JSONObject jsonObject = new JSONObject(); - jsonObject.put("num1", pdpd1); - jsonObject.put("num2", pdpd2); - jsonObject.put("num3", pdpd3); - jsonObject.put("num4", pdpd4); - jsonObject.put("num5", pdpd5); - jsonObject.put("num6", pdpd6); - if(SinataUtil.isNotEmpty(spellOrderRule)){ - spellOrderRule.setContent(jsonObject.toJSONString()); - spellOrderRuleService.updateById(spellOrderRule); - }else{ - spellOrderRule = new SpellOrderRule(); - spellOrderRule.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - spellOrderRule.setContent(jsonObject.toJSONString()); - spellOrderRuleService.insert(spellOrderRule); - } + if("spellOrderSetting".equals(type)) { + SpellOrderRule spellOrderRule = spellOrderRuleService.selectOne(new EntityWrapper<SpellOrderRule>().eq("companyId", shiroExtUtil.getUser().getObjectId())); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("num1", pdpd1); + jsonObject.put("num2", pdpd2); + jsonObject.put("num3", pdpd3); + jsonObject.put("num4", pdpd4); + jsonObject.put("num5", pdpd5); + jsonObject.put("num6", pdpd6); + if (SinataUtil.isNotEmpty(spellOrderRule)) { + spellOrderRule.setContent(jsonObject.toJSONString()); + spellOrderRuleService.updateById(spellOrderRule); + } else { + spellOrderRule = new SpellOrderRule(); + spellOrderRule.setCompanyId(shiroExtUtil.getUser().getObjectId()); + spellOrderRule.setContent(jsonObject.toJSONString()); + spellOrderRuleService.insert(spellOrderRule); + } } //电话设置 if("phoneSettings".equals(type)){ //报警电话 - TPhone phoneOne = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1)); + TPhone phoneOne = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 1)); if (SinataUtil.isNotEmpty(phoneOne)){ phoneOne.setPhone(phone1); tPhoneService.updateById(phoneOne); - }else{ - phoneOne = new TPhone(); - phoneOne.setPhone(phone1); - phoneOne.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - phoneOne.setType(1); - if (ShiroExtUtil.getUser().getRoleType() == 1) { - phoneOne.setPlatform(1); - } else { - phoneOne.setPlatform(2); - } - tPhoneService.insert(phoneOne); + }else { + phoneOne = new TPhone(); + phoneOne.setPhone(phone1); + phoneOne.setCompanyId(shiroExtUtil.getUser().getObjectId()); + phoneOne.setType(1); + if (shiroExtUtil.getUser().getRoleType() == 1) { + phoneOne.setPlatform(1); + } else { + phoneOne.setPlatform(2); + } + tPhoneService.insert(phoneOne); } //客服电话 - TPhone phoneTwo = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 2)); + TPhone phoneTwo = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 2)); if (SinataUtil.isNotEmpty(phoneTwo)){ phoneTwo.setPhone(phone2); tPhoneService.updateById(phoneTwo); - }else{ - phoneTwo = new TPhone(); - phoneTwo.setPhone(phone2); - phoneTwo.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - phoneTwo.setType(2); - if (ShiroExtUtil.getUser().getRoleType() == 1) { - phoneTwo.setPlatform(1); - } else { - phoneTwo.setPlatform(2); - } - tPhoneService.insert(phoneTwo); + }else { + phoneTwo = new TPhone(); + phoneTwo.setPhone(phone2); + phoneTwo.setCompanyId(shiroExtUtil.getUser().getObjectId()); + phoneTwo.setType(2); + if (shiroExtUtil.getUser().getRoleType() == 1) { + phoneTwo.setPlatform(1); + } else { + phoneTwo.setPlatform(2); + } + tPhoneService.insert(phoneTwo); } //客服电话 - TPhone phone = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 3)); + TPhone phone = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 3)); if (SinataUtil.isNotEmpty(phone)){ phone.setPhone(phone3); tPhoneService.updateById(phone); - }else{ - phone = new TPhone(); - phone.setPhone(phone3); - phone.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - phone.setType(3); - if (ShiroExtUtil.getUser().getRoleType() == 1) { - phone.setPlatform(1); - } else { - phone.setPlatform(2); - } - tPhoneService.insert(phone); + }else { + phone = new TPhone(); + phone.setPhone(phone3); + phone.setCompanyId(shiroExtUtil.getUser().getObjectId()); + phone.setType(3); + if (shiroExtUtil.getUser().getRoleType() == 1) { + phone.setPlatform(1); + } else { + phone.setPlatform(2); + } + tPhoneService.insert(phone); } //招聘电话 - TPhone phoneFive = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 5)); + TPhone phoneFive = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 5)); if (SinataUtil.isNotEmpty(phoneFive)){ phoneFive.setPhone(phone5); tPhoneService.updateById(phoneFive); - }else{ - phoneFive = new TPhone(); - phoneFive.setPhone(phone5); - phoneFive.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - phoneFive.setType(5); - if (ShiroExtUtil.getUser().getRoleType() == 1) { - phoneFive.setPlatform(1); - } else { - phoneFive.setPlatform(2); - } - tPhoneService.insert(phoneFive); + }else { + phoneFive = new TPhone(); + phoneFive.setPhone(phone5); + phoneFive.setCompanyId(shiroExtUtil.getUser().getObjectId()); + phoneFive.setType(5); + if (shiroExtUtil.getUser().getRoleType() == 1) { + phoneFive.setPlatform(1); + } else { + phoneFive.setPlatform(2); + } + tPhoneService.insert(phoneFive); } } //95128 if("95128TheOnCall".equals(type)){ //95128电召电话 - TPhone phoneFour = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 4)); + TPhone phoneFour = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", shiroExtUtil.getUser().getObjectId()).eq("type", 4)); if (SinataUtil.isNotEmpty(phoneFour)){ phoneFour.setPhone(phone4); tPhoneService.updateById(phoneFour); - }else{ - phoneFour = new TPhone(); - phoneFour.setPhone(phone4); - phoneFour.setCompanyId(ShiroExtUtil.getUser().getObjectId()); - phoneFour.setType(4); - if (ShiroExtUtil.getUser().getRoleType() == 1) { - phoneFour.setPlatform(1); - } else { - phoneFour.setPlatform(2); - } - tPhoneService.insert(phoneFour); + }else { + phoneFour = new TPhone(); + phoneFour.setPhone(phone4); + phoneFour.setCompanyId(shiroExtUtil.getUser().getObjectId()); + phoneFour.setType(4); + if (shiroExtUtil.getUser().getRoleType() == 1) { + phoneFour.setPlatform(1); + } else { + phoneFour.setPlatform(2); + } + tPhoneService.insert(phoneFour); } } /// 节假日服务费 - if("holidayServiceFeeSetting".equals(type)){ - Integer companyId = ShiroExtUtil.getUser().getObjectId(); - TCompany company = companyService.selectById(companyId); - company.setHolidayFee(holidayFee); - companyService.updateById(company); + if("holidayServiceFeeSetting".equals(type)) { + Integer companyId = shiroExtUtil.getUser().getObjectId(); + TCompany company = companyService.selectById(companyId); + company.setHolidayFee(holidayFee); + companyService.updateById(company); } -- Gitblit v1.7.1