| | |
| | | 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; |
| | |
| | | } |
| | | 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("账号未注册"); |
| | | } |
| | | |
| | |
| | | } |
| | | 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); |