From cf71570fb38ad1983cd40e65fb09e259e509d2a3 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 06 五月 2024 09:36:45 +0800
Subject: [PATCH] 修改bug
---
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java | 342 +++++++++++++++++++++++++++++---------------------------
1 files changed, 179 insertions(+), 163 deletions(-)
diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
index 0f79c76..566845d 100644
--- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
+++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
@@ -11,18 +11,20 @@
import com.stylefeng.guns.core.log.LogObjectHolder;
import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.core.util.*;
+import com.stylefeng.guns.core.util.DateUtil;
+import com.stylefeng.guns.core.util.WoUtil;
import com.stylefeng.guns.modular.system.dao.DriverPunishMapper;
import com.stylefeng.guns.modular.system.dao.DriverTrainMapper;
import com.stylefeng.guns.modular.system.model.*;
import com.stylefeng.guns.modular.system.service.*;
-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.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
@@ -34,6 +36,7 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import java.io.File;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -66,9 +69,6 @@
private ITLineService itLineService;
@Autowired
- private PushMinistryOfTransportUtil pushMinistryOfTransportUtil;
-
- @Autowired
private ITDriverTeamService itDriverTeamService;
@Resource
@@ -77,8 +77,8 @@
@Resource
private DriverPunishMapper driverPunishMapper;
- @Value("${pushMinistryOfTransport}")
- private boolean pushMinistryOfTransport;
+ @Value("${spring.mail.template-path}")
+ private String templatePath;
@@ -300,52 +300,14 @@
}
List<DriverTrain> driverTrains = driverTrainMapper.queryAllTrain(driverId);
for(DriverTrain driverTrain : driverTrains){
- boolean b = true;
for(String s : split){
String[] s1 = s.split("_");
if(ToolUtil.isNotEmpty(s1[0]) && driverTrain.getId() == Integer.valueOf(s1[0])){
- b = false;
break;
}
}
- if(b){
- driverTrainMapper.deleteById(driverTrain.getId());
- new Thread(new Runnable() {
- @Override
- public void run() {
- if(pushMinistryOfTransport){//上传数据
- pushMinistryOfTransportUtil.baseInfoDriverEducate(driverTrain.getId(), 3);
- }
- }
- }).start();
- }
}
- if(update.size() > 0){
- for(DriverTrain driverTrain : update){
- driverTrainMapper.updateById(driverTrain);
- new Thread(new Runnable() {
- @Override
- public void run() {
- if(pushMinistryOfTransport){//上传数据
- pushMinistryOfTransportUtil.baseInfoDriverEducate(driverTrain.getId(), 2);
- }
- }
- }).start();
- }
- }
- if(add.size() > 0){
- for(DriverTrain driverTrain : add){
- driverTrainMapper.insert(driverTrain);
- new Thread(new Runnable() {
- @Override
- public void run() {
- if(pushMinistryOfTransport){//上传数据
- pushMinistryOfTransportUtil.baseInfoDriverEducate(driverTrain.getId(), 1);
- }
- }
- }).start();
- }
- }
+
}catch (Exception e){
e.printStackTrace();
@@ -432,19 +394,6 @@
if(update.size() > 0){
for(DriverPunish driverTrain : update){
driverPunishMapper.updateById(driverTrain);
- }
- }
- if(add.size() > 0){
- for(DriverPunish driverTrain : add){
- driverPunishMapper.insert(driverTrain);
- new Thread(new Runnable() {
- @Override
- public void run() {
- if(pushMinistryOfTransport){//上传数据
- pushMinistryOfTransportUtil.ratedDriverPunish(driverTrain.getId());
- }
- }
- }).start();
}
}
@@ -593,17 +542,6 @@
type = 5;
tDriver.setAuthState(2);
- new Thread(new Runnable() {
- @Override
- public void run() {
- if(pushMinistryOfTransport){//上传数据
- pushMinistryOfTransportUtil.baseInfoCompanyStat();
- pushMinistryOfTransportUtil.baseInfoDriver(id);
- pushMinistryOfTransportUtil.baseInfoDriverApp(id);
- }
- }
- }).start();
-
if(tDriver.getUid()!=null && tDriver.getuType()!=null && tDriver.getuType() == 2){
TDriver driver = tDriverService.selectById(tDriver.getUid());
@@ -651,11 +589,39 @@
tDriver.setAuthState(4);
}
- Map<String,String> map = new HashMap<>();
- map.put("uid", String.valueOf(tDriver.getId()));
- map.put("type", String.valueOf(type));
- String result = HttpRequestUtil.postRequest(PushURL.driver_auth_url, map);
- System.out.println("司机注册审核发送短信 :【driverId="+tDriver.getId().toString()+"】,调用接口:"+result);
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ String path = templatePath + "driver/index.html";
+ Document document = Jsoup.parse(new File(path), "UTF-8");
+ document.getElementById("chinese").remove();
+ document.getElementById("french").remove();
+ document.getElementById("invite1").remove();
+ document.getElementById("user1").remove();
+ document.getElementById("settle1").remove();
+ document.getElementById("pass1").remove();
+ document.getElementById("email1").remove();
+ document.getElementById("bill1").remove();
+ document.getElementById("reward1").remove();
+ document.getElementById("rewardToday1").remove();
+ document.getElementById("carAudit1").remove();
+
+ document.getElementsByTag("title").get(0).text(1 == authState ? "Driver is verified and qualified" : "Driver is not verified and qualified");
+ Element driver_audit1_user = document.getElementById("driver_audit1_user");
+ driver_audit1_user.text("Hello " + tDriver.getFirstName() + " " + tDriver.getLastName() + ",");
+ Element driver_audit1_content = document.getElementById("driver_audit1_content");
+ if(1 == authState){
+ driver_audit1_content.text("You application has been approved.");
+ }else{
+ driver_audit1_content.text("I'm sorry, your application was rejected. Reason for rejection: Incomplete filling in personal information.");
+ }
+ EmailUtil.send(tDriver.getEmail(), 1 == authState ? "Driver is verified and qualified" : "Driver is not verified and qualified", document.html());
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ }
+ }).start();
tDriverService.updateById(tDriver);
}
@@ -733,6 +699,21 @@
tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#"));
+ String phone = tDriver.getPhone();
+ String substring = phone.substring(0, 1);
+ if("0".equals(substring)){
+ phone = "233" + phone.substring(1);
+ }
+ if(phone.indexOf("233") < 0){
+ phone = "233" + phone;
+ }
+ tDriver.setPhone(phone);
+ tDriver.setAccount(phone);
+ tDriver.setBalance(new BigDecimal(0));
+// tDriver.setCommission(new BigDecimal(0));
+// tDriver.setCouponBalance(new BigDecimal(0));
+// tDriver.setBackgroundBalance(new BigDecimal(0));
+
tDriverService.insert(tDriver);
//添加经营业务
@@ -785,6 +766,9 @@
tDriverService.updateById(driver);
return SUCCESS_TIP;
}
+
+ @Autowired
+ private RedisUtil redisUtil;
/**
* 操作司机状态
*/
@@ -795,26 +779,12 @@
TDriver tDriver = tDriverService.selectById(driverId);
if (1 == optType){ //解冻
tDriver.setAuthState(2);
- new Thread(new Runnable() {
- @Override
- public void run() {
- if(pushMinistryOfTransport){//上传数据
- pushMinistryOfTransportUtil.baseInfoCompanyStat();
- pushMinistryOfTransportUtil.baseInfoDriver(driverId);
- }
- }
- }).start();
}else if (2 == optType){ //冻结
+ String token = redisUtil.getValue("DRIVER_" + tDriver.getPhone());
+ redisUtil.remove(token);//删除个人信息数据
+ redisUtil.remove("DRIVER_" + tDriver.getPhone());//删除后台冻结相关缓存
+ redisUtil.remove("DRIVER_" + driverId);//清除存储的token
tDriver.setAuthState(3);
- new Thread(new Runnable() {
- @Override
- public void run() {
- if(pushMinistryOfTransport){//上传数据
- pushMinistryOfTransportUtil.baseInfoCompanyStat();
- pushMinistryOfTransportUtil.baseInfoDriver(driverId);
- }
- }
- }).start();
}
tDriver.setRemark(remark);
tDriverService.updateById(tDriver);
@@ -874,6 +844,16 @@
tDriver.setPassword(obj.getPassword());
}
+ String phone = tDriver.getPhone();
+ String substring = phone.substring(0, 1);
+ if("0".equals(substring)){
+ phone = "233" + phone.substring(1);
+ }
+ if(phone.indexOf("233") < 0){
+ phone = "233" + phone;
+ }
+ tDriver.setPhone(phone);
+ tDriver.setAccount(phone);
tDriverService.updateById(tDriver);
//删除业务
@@ -897,16 +877,6 @@
}
}
}
-
- new Thread(new Runnable() {
- @Override
- public void run() {
- if(pushMinistryOfTransport){//上传数据
- pushMinistryOfTransportUtil.baseInfoDriver(tDriver.getId());
- }
- }
- }).start();
-
return SUCCESS_TIP;
}
@@ -927,7 +897,8 @@
if (ShiroKit.getUser().getRoleType() == 1){
title = "平台导入司机模板";
- shellList.add("司机名称");
+ shellList.add("司机姓");
+ shellList.add("司机名");
shellList.add("所属机构[平台司机/加盟司机]");
shellList.add("所属分公司[提示:加盟司机选填]");
shellList.add("所属加盟商[提示:加盟司机选填]");
@@ -949,7 +920,8 @@
}else if (ShiroKit.getUser().getRoleType() == 2){
title = "分公司导入司机模板";
- shellList.add("司机名称");
+ shellList.add("司机姓");
+ shellList.add("司机名");
shellList.add("所属加盟商[选填]");
shellList.add("性别[男/女]");
shellList.add("驾驶证号码");
@@ -969,7 +941,8 @@
}else if (ShiroKit.getUser().getRoleType() == 3){
title = "加盟商导入司机模板";
- shellList.add("司机名称");
+ shellList.add("司机姓");
+ shellList.add("司机名");
shellList.add("性别[男/女]");
shellList.add("驾驶证号码");
shellList.add("驾龄");
@@ -1019,115 +992,128 @@
zero = String.valueOf(cell0.getStringCellValue()).trim();
}
- Cell cell1 = row.getCell(1); //所属机构[平台司机/加盟司机]
+ Cell cell01 = row.getCell(1); //司机名称
+ String zero1 = null;
+ if (SinataUtil.isNotEmpty(cell01)){
+ zero1 = String.valueOf(cell01.getStringCellValue()).trim();
+ }
+
+ Cell cell1 = row.getCell(2); //所属机构[平台司机/加盟司机]
String one = null;
if (SinataUtil.isNotEmpty(cell1)){
one = String.valueOf(cell1.getStringCellValue()).trim();
}
- Cell cell2 = row.getCell(2); //所属分公司[提示:加盟司机选填]
+ Cell cell2 = row.getCell(3); //所属分公司[提示:加盟司机选填]
String two = null;
if (SinataUtil.isNotEmpty(cell2)){
two = String.valueOf(cell2.getStringCellValue()).trim();
}
- Cell cell3 = row.getCell(3); //所属加盟商[提示:加盟司机选填]
+ Cell cell3 = row.getCell(4); //所属加盟商[提示:加盟司机选填]
String three = null;
if (SinataUtil.isNotEmpty(cell3)){
three = String.valueOf(cell3.getStringCellValue()).trim();
}
- Cell cell4 = row.getCell(4); //性别[男/女]
+ Cell cell4 = row.getCell(5); //性别[男/女]
String four = null;
if (SinataUtil.isNotEmpty(cell4)){
four = String.valueOf(cell4.getStringCellValue()).trim();
}
- Cell cell5 = row.getCell(5); //驾驶证号码
+ Cell cell5 = row.getCell(6); //驾驶证号码
String five = null;
if (SinataUtil.isNotEmpty(cell5)){
five = String.valueOf(cell5.getStringCellValue()).trim();
}
- Cell cell6 = row.getCell(6); //驾龄
+ Cell cell6 = row.getCell(7); //驾龄
String six = null;
if (SinataUtil.isNotEmpty(cell6)){
six = String.valueOf(cell6.getStringCellValue()).trim();
}
- Cell cell7 = row.getCell(7); //身份证号
+ Cell cell7 = row.getCell(8); //身份证号
String seven = null;
if (SinataUtil.isNotEmpty(cell7)){
seven = String.valueOf(cell7.getStringCellValue()).trim();
}
- Cell cell8 = row.getCell(8); //居住地址
+ Cell cell8 = row.getCell(9); //居住地址
String eight = null;
if (SinataUtil.isNotEmpty(cell8)){
eight = String.valueOf(cell8.getStringCellValue()).trim();
}
- Cell cell9 = row.getCell(9); //出租车资格证号
+ Cell cell9 = row.getCell(10); //出租车资格证号
String nine = null;
if (SinataUtil.isNotEmpty(cell9)){
nine = String.valueOf(cell9.getStringCellValue()).trim();
}
- Cell cell10 = row.getCell(10); //工号[选填]
+ Cell cell10 = row.getCell(11); //工号[选填]
String ten = null;
if (SinataUtil.isNotEmpty(cell10)){
ten = String.valueOf(cell10.getStringCellValue()).trim();
}
- Cell cell11 = row.getCell(11); //经营业务:专车[是/否]
+ Cell cell11 = row.getCell(12); //经营业务:专车[是/否]
String eleven = null;
if (SinataUtil.isNotEmpty(cell11)){
eleven = String.valueOf(cell11.getStringCellValue()).trim();
}
- Cell cell12 = row.getCell(12); //经营业务:专车[是/否]
+ Cell cell12 = row.getCell(13); //经营业务:专车[是/否]
String twelve = null;
if (SinataUtil.isNotEmpty(cell12)){
twelve = String.valueOf(cell12.getStringCellValue()).trim();
}
- Cell cell13 = row.getCell(13); //经营业务:跨城出行[是/否]
+ Cell cell13 = row.getCell(14); //经营业务:跨城出行[是/否]
String thirteen = null;
if (SinataUtil.isNotEmpty(cell13)){
thirteen = String.valueOf(cell13.getStringCellValue()).trim();
}
- Cell cell14 = row.getCell(14); //经营业务:小件同城物流[是/否]
+ Cell cell14 = row.getCell(15); //经营业务:小件同城物流[是/否]
String fourteen = null;
if (SinataUtil.isNotEmpty(cell14)){
fourteen = String.valueOf(cell14.getStringCellValue()).trim();
}
- Cell cell15 = row.getCell(15); //经营业务:小件跨城物流[是/否]
+ Cell cell15 = row.getCell(16); //经营业务:小件跨城物流[是/否]
String fifteen = null;
if (SinataUtil.isNotEmpty(cell15)){
fifteen = String.valueOf(cell15.getStringCellValue()).trim();
}
- Cell cell16 = row.getCell(16); //经营业务:包车[是/否]
+ Cell cell16 = row.getCell(17); //经营业务:包车[是/否]
String sixteen = null;
if (SinataUtil.isNotEmpty(cell16)){
sixteen = String.valueOf(cell16.getStringCellValue()).trim();
}
- Cell cell17 = row.getCell(17); //登录账号[手机号]
+ Cell cell17 = row.getCell(18); //登录账号[手机号]
String seventeen = null;
if (SinataUtil.isNotEmpty(cell17)){
seventeen = String.valueOf(cell17.getStringCellValue()).trim();
+ String substring = seventeen.substring(0, 1);
+ if("0".equals(substring)){
+ seventeen = "233" + seventeen.substring(1);
+ }
+ if(seventeen.indexOf("233") < 0){
+ seventeen = "233" + seventeen;
+ }
}
- Cell cell18 = row.getCell(18); //登录密码[密码长度为6-18]
+ Cell cell18 = row.getCell(19); //登录密码[密码长度为6-18]
String eighteen = null;
if (SinataUtil.isNotEmpty(cell18)){
eighteen = String.valueOf(cell18.getStringCellValue()).trim();
}
- if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(one) || SinataUtil.isEmpty(four)
+ if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(zero1) || SinataUtil.isEmpty(one) || SinataUtil.isEmpty(four)
|| SinataUtil.isEmpty(five) || SinataUtil.isEmpty(six) || SinataUtil.isEmpty(nine)
|| SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen)
|| SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen) || SinataUtil.isEmpty(sixteen)
@@ -1210,7 +1196,8 @@
driver.setJobNumber(ten);
driver.setPhone(seventeen);
driver.setPassword(ShiroKit.md5(eighteen, "SA;d5#"));
- driver.setName(zero);
+ driver.setLastName(zero);
+ driver.setFirstName(zero1);
if ("男".equals(four)){
driver.setSex(1);
}else if ("女".equals(four)){
@@ -1296,102 +1283,116 @@
zero = String.valueOf(cell0.getStringCellValue()).trim();
}
- Cell cell1 = row.getCell(1); //所属加盟商[选填]
+ Cell cell01 = row.getCell(1); //司机名称
+ String zero1 = null;
+ if (SinataUtil.isNotEmpty(cell01)){
+ zero1 = String.valueOf(cell01.getStringCellValue()).trim();
+ }
+
+ Cell cell1 = row.getCell(2); //所属加盟商[选填]
String one = null;
if (SinataUtil.isNotEmpty(cell1)){
one = String.valueOf(cell1.getStringCellValue()).trim();
}
- Cell cell2 = row.getCell(2); //性别[男/女]
+ Cell cell2 = row.getCell(3); //性别[男/女]
String two = null;
if (SinataUtil.isNotEmpty(cell2)){
two = String.valueOf(cell2.getStringCellValue()).trim();
}
- Cell cell3 = row.getCell(3); //驾驶证号码
+ Cell cell3 = row.getCell(4); //驾驶证号码
String three = null;
if (SinataUtil.isNotEmpty(cell3)){
three = String.valueOf(cell3.getStringCellValue()).trim();
}
- Cell cell4 = row.getCell(4); //驾龄
+ Cell cell4 = row.getCell(5); //驾龄
String four = null;
if (SinataUtil.isNotEmpty(cell4)){
four = String.valueOf(cell4.getStringCellValue()).trim();
}
- Cell cell5 = row.getCell(5); //身份证号
+ Cell cell5 = row.getCell(6); //身份证号
String five = null;
if (SinataUtil.isNotEmpty(cell5)){
five = String.valueOf(cell5.getStringCellValue()).trim();
}
- Cell cell6 = row.getCell(6); //居住地址
+ Cell cell6 = row.getCell(7); //居住地址
String six = null;
if (SinataUtil.isNotEmpty(cell6)){
six = String.valueOf(cell6.getStringCellValue()).trim();
}
- Cell cell7 = row.getCell(7); //出租车资格证号
+ Cell cell7 = row.getCell(8); //出租车资格证号
String seven = null;
if (SinataUtil.isNotEmpty(cell7)){
seven = String.valueOf(cell7.getStringCellValue()).trim();
}
- Cell cell8 = row.getCell(8); //工号[选填]
+ Cell cell8 = row.getCell(9); //工号[选填]
String eight = null;
if (SinataUtil.isNotEmpty(cell8)){
eight = String.valueOf(cell8.getStringCellValue()).trim();
}
- Cell cell9 = row.getCell(9); //经营业务:专车[是/否]
+ Cell cell9 = row.getCell(10); //经营业务:专车[是/否]
String nine = null;
if (SinataUtil.isNotEmpty(cell9)){
nine = String.valueOf(cell9.getStringCellValue()).trim();
}
- Cell cell10 = row.getCell(10); //经营业务:出租车[是/否]
+ Cell cell10 = row.getCell(11); //经营业务:出租车[是/否]
String ten = null;
if (SinataUtil.isNotEmpty(cell10)){
ten = String.valueOf(cell10.getStringCellValue()).trim();
}
- Cell cell11 = row.getCell(11); //经营业务:跨城出行[是/否]
+ Cell cell11 = row.getCell(12); //经营业务:跨城出行[是/否]
String eleven = null;
if (SinataUtil.isNotEmpty(cell11)){
eleven = String.valueOf(cell11.getStringCellValue()).trim();
}
- Cell cell12 = row.getCell(12); //经营业务:小件同城物流[是/否]
+ Cell cell12 = row.getCell(13); //经营业务:小件同城物流[是/否]
String twelve = null;
if (SinataUtil.isNotEmpty(cell12)){
twelve = String.valueOf(cell12.getStringCellValue()).trim();
}
- Cell cell13 = row.getCell(13); //经营业务:小件跨城物流[是/否]
+ Cell cell13 = row.getCell(14); //经营业务:小件跨城物流[是/否]
String thirteen = null;
if (SinataUtil.isNotEmpty(cell13)){
thirteen = String.valueOf(cell13.getStringCellValue()).trim();
}
- Cell cell14 = row.getCell(14); //经营业务:包车[是/否]
+ Cell cell14 = row.getCell(15); //经营业务:包车[是/否]
String fourteen = null;
if (SinataUtil.isNotEmpty(cell14)){
fourteen = String.valueOf(cell14.getStringCellValue()).trim();
}
- Cell cell15 = row.getCell(15); //登录账号[手机号]
+ Cell cell15 = row.getCell(16); //登录账号[手机号]
String fifteen = null;
if (SinataUtil.isNotEmpty(cell15)){
fifteen = String.valueOf(cell15.getStringCellValue()).trim();
+
+ String substring = fifteen.substring(0, 1);
+ if("0".equals(substring)){
+ fifteen = "233" + fifteen.substring(1);
+ }
+ if(fifteen.indexOf("233") < 0){
+ fifteen = "233" + fifteen;
+ }
}
- Cell cell16 = row.getCell(16); //登录密码[密码长度为6-18]
+ Cell cell16 = row.getCell(17); //登录密码[密码长度为6-18]
String sixteen = null;
if (SinataUtil.isNotEmpty(cell16)){
sixteen = String.valueOf(cell16.getStringCellValue()).trim();
}
- if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(two) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four)
+ if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(zero1) || SinataUtil.isEmpty(two) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four)
|| SinataUtil.isEmpty(five) || SinataUtil.isEmpty(seven)
|| SinataUtil.isEmpty(nine) || SinataUtil.isEmpty(ten)
|| SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen)
@@ -1459,7 +1460,8 @@
driver.setJobNumber(eight);
driver.setPhone(fifteen);
driver.setPassword(ShiroKit.md5(sixteen, "SA;d5#"));
- driver.setName(zero);
+ driver.setLastName(zero);
+ driver.setFirstName(zero1);
if ("男".equals(two)){
driver.setSex(1);
}else if ("女".equals(two)){
@@ -1541,96 +1543,109 @@
zero = String.valueOf(cell0.getStringCellValue()).trim();
}
- Cell cell2 = row.getCell(1); //性别[男/女]
+ Cell cell01 = row.getCell(1); //司机名称
+ String zero1 = null;
+ if (SinataUtil.isNotEmpty(cell01)){
+ zero1 = String.valueOf(cell01.getStringCellValue()).trim();
+ }
+
+ Cell cell2 = row.getCell(2); //性别[男/女]
String one = null;
if (SinataUtil.isNotEmpty(cell2)){
one = String.valueOf(cell2.getStringCellValue()).trim();
}
- Cell cell3 = row.getCell(2); //驾驶证号码
+ Cell cell3 = row.getCell(3); //驾驶证号码
String two = null;
if (SinataUtil.isNotEmpty(cell3)){
two = String.valueOf(cell3.getStringCellValue()).trim();
}
- Cell cell4 = row.getCell(3); //驾龄
+ Cell cell4 = row.getCell(4); //驾龄
String three = null;
if (SinataUtil.isNotEmpty(cell4)){
three = String.valueOf(cell4.getStringCellValue()).trim();
}
- Cell cell5 = row.getCell(4); //身份证号
+ Cell cell5 = row.getCell(5); //身份证号
String four = null;
if (SinataUtil.isNotEmpty(cell5)){
four = String.valueOf(cell5.getStringCellValue()).trim();
}
- Cell cell6 = row.getCell(5); //居住地址
+ Cell cell6 = row.getCell(6); //居住地址
String five = null;
if (SinataUtil.isNotEmpty(cell6)){
five = String.valueOf(cell6.getStringCellValue()).trim();
}
- Cell cell7 = row.getCell(6); //出租车资格证号
+ Cell cell7 = row.getCell(7); //出租车资格证号
String six = null;
if (SinataUtil.isNotEmpty(cell7)){
six = String.valueOf(cell7.getStringCellValue()).trim();
}
- Cell cell8 = row.getCell(7); //工号[选填]
+ Cell cell8 = row.getCell(8); //工号[选填]
String seven = null;
if (SinataUtil.isNotEmpty(cell8)){
seven = String.valueOf(cell8.getStringCellValue()).trim();
}
- Cell cell9 = row.getCell(8); //经营业务:专车[是/否]
+ Cell cell9 = row.getCell(9); //经营业务:专车[是/否]
String eight = null;
if (SinataUtil.isNotEmpty(cell9)){
eight = String.valueOf(cell9.getStringCellValue()).trim();
}
- Cell cell10 = row.getCell(9); //经营业务:出租车[是/否]
+ Cell cell10 = row.getCell(10); //经营业务:出租车[是/否]
String nine = null;
if (SinataUtil.isNotEmpty(cell10)){
nine = String.valueOf(cell10.getStringCellValue()).trim();
}
- Cell cell11 = row.getCell(10); //经营业务:跨城出行[是/否]
+ Cell cell11 = row.getCell(11); //经营业务:跨城出行[是/否]
String ten = null;
if (SinataUtil.isNotEmpty(cell11)){
ten = String.valueOf(cell11.getStringCellValue()).trim();
}
- Cell cell12 = row.getCell(11); //经营业务:小件同城物流[是/否]
+ Cell cell12 = row.getCell(12); //经营业务:小件同城物流[是/否]
String eleven = null;
if (SinataUtil.isNotEmpty(cell12)){
eleven = String.valueOf(cell12.getStringCellValue()).trim();
}
- Cell cell13 = row.getCell(12); //经营业务:小件跨城物流[是/否]
+ Cell cell13 = row.getCell(13); //经营业务:小件跨城物流[是/否]
String twelve = null;
if (SinataUtil.isNotEmpty(cell13)){
twelve = String.valueOf(cell13.getStringCellValue()).trim();
}
- Cell cell14 = row.getCell(13); //经营业务:包车[是/否]
+ Cell cell14 = row.getCell(14); //经营业务:包车[是/否]
String thirteen = null;
if (SinataUtil.isNotEmpty(cell14)){
thirteen = String.valueOf(cell14.getStringCellValue()).trim();
}
- Cell cell15 = row.getCell(14); //登录账号[手机号]
+ Cell cell15 = row.getCell(15); //登录账号[手机号]
String fourteen = null;
if (SinataUtil.isNotEmpty(cell15)){
fourteen = String.valueOf(cell15.getStringCellValue()).trim();
+ String substring = fourteen.substring(0, 1);
+ if("0".equals(substring)){
+ fourteen = "233" + fourteen.substring(1);
+ }
+ if(fourteen.indexOf("233") < 0){
+ fourteen = "233" + fourteen;
+ }
}
- Cell cell16 = row.getCell(15); //登录密码[密码长度为6-18]
+ Cell cell16 = row.getCell(16); //登录密码[密码长度为6-18]
String fifteen = null;
if (SinataUtil.isNotEmpty(cell16)){
fifteen = String.valueOf(cell16.getStringCellValue()).trim();
}
- if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(one) || SinataUtil.isEmpty(two) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four)
+ if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(zero1) || SinataUtil.isEmpty(one) || SinataUtil.isEmpty(two) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four)
|| SinataUtil.isEmpty(six) || SinataUtil.isEmpty(eight)
|| SinataUtil.isEmpty(nine) || SinataUtil.isEmpty(ten)
|| SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen)
@@ -1699,7 +1714,8 @@
driver.setJobNumber(seven);
driver.setPhone(fourteen);
driver.setPassword(ShiroKit.md5(fifteen, "SA;d5#"));
- driver.setName(zero);
+ driver.setLastName(zero);
+ driver.setFirstName(zero1);
if ("男".equals(one)){
driver.setSex(1);
}else if ("女".equals(one)){
--
Gitblit v1.7.1