From 4918c9ad2c5807dd5b5dc3b2cc0a9a74031d4278 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 17 七月 2025 10:20:37 +0800 Subject: [PATCH] 修改三方对接逻辑和环境参数配置 --- DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java | 42 +++++++----------------------------------- 1 files changed, 7 insertions(+), 35 deletions(-) diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java index 8941aea..cbb0ed1 100644 --- a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java +++ b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java @@ -12,12 +12,10 @@ import com.stylefeng.guns.modular.system.model.*; import com.stylefeng.guns.modular.system.service.*; import com.stylefeng.guns.modular.system.util.*; -import com.stylefeng.guns.modular.system.util.qianyuntong.EmployeeUtil; import com.stylefeng.guns.modular.system.util.qianyuntong.SMSUtil; -import com.stylefeng.guns.modular.system.util.qianyuntong.model.EditStaffNodeRequest; -import com.stylefeng.guns.modular.system.util.qianyuntong.model.GetStaffNodeRequest; +import com.stylefeng.guns.modular.system.util.qianyuntong.UserUtil; +import com.stylefeng.guns.modular.system.util.qianyuntong.model.QYTUserInfo; import com.stylefeng.guns.modular.system.util.qianyuntong.model.SendSmsRequest; -import com.stylefeng.guns.modular.system.util.qianyuntong.model.StaffNodeInfo; import com.stylefeng.guns.modular.system.warpper.ActivityWarpper; import com.stylefeng.guns.modular.system.warpper.BaseWarpper; import com.stylefeng.guns.modular.system.warpper.LoginWarpper; @@ -475,12 +473,8 @@ } Company company = companyMapper.selectById(driver.getCompanyId()); //查询中台员工数据 - GetStaffNodeRequest request = new GetStaffNodeRequest(); - request.setEmpId(driver.getEmpId()); - request.setEntercode(company.getEnterCode()); - request.setMobile(company.getPrincipalPhone()); - StaffNodeInfo staffNode = EmployeeUtil.getStaffNode(request); - if (null == staffNode || staffNode.getIsValid().equals("0")) { + List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(driver.getPhone(), company.getEnterCode()); + if (null == userInfoByPhone || userInfoByPhone.size() == 0) { return ResultUtil.error("账号未注册"); } @@ -791,31 +785,9 @@ } Driver driver1 = this.selectById(uid); Company company = companyMapper.selectById(driver1.getCompanyId()); - GetStaffNodeRequest request = new GetStaffNodeRequest(); - request.setEmpId(driver1.getEmpId()); - request.setEntercode(driver1.getEntercode()); - request.setMobile(driver1.getPhone()); - StaffNodeInfo staffNode = EmployeeUtil.getStaffNode(request); - if ("0".equals(staffNode.getIsValid())) { - return ResultUtil.error("无效的司机账号"); - } - EditStaffNodeRequest editStaffNodeRequest = new EditStaffNodeRequest(); - editStaffNodeRequest.setEmpId(staffNode.getEmpId()); - editStaffNodeRequest.setMobile(company.getPrincipalPhone()); - editStaffNodeRequest.setEntercode(company.getEnterCode()); - editStaffNodeRequest.setEnterId(staffNode.getEnterId()); - editStaffNodeRequest.setEmpName(staffNode.getEmpName()); - editStaffNodeRequest.setEmpNickname(staffNode.getEmpNickname()); - editStaffNodeRequest.setLoginNo(staffNode.getLoginNo()); - editStaffNodeRequest.setMphone(phone); - editStaffNodeRequest.setEmail(staffNode.getEmail()); - editStaffNodeRequest.setDeptId(staffNode.getDeptId()); - editStaffNodeRequest.setPositionId(1); - editStaffNodeRequest.setSuperLevel(0); - editStaffNodeRequest.setHideMobile(0); - Boolean editStaffNode = EmployeeUtil.editStaffNode(editStaffNodeRequest); - if (!editStaffNode) { - return ResultUtil.error("修改手机号码失败"); + List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(driver1.getPhone(), company.getEnterCode()); + if (null == userInfoByPhone || userInfoByPhone.size() == 0) { + return ResultUtil.error("账号未注册"); } driver1.setAccount(phone); -- Gitblit v1.7.1