Commit 5d7106c9be4f5cc189ef6f8f85f6c242893c3dfe

Authored by guzijian
1 parent 1a103797

fix: 修改获取人员任务,切换获取人员信息接口。

Bsth-admin/pom.xml
@@ -16,6 +16,44 @@ @@ -16,6 +16,44 @@
16 </description> 16 </description>
17 17
18 <dependencies> 18 <dependencies>
  19 + <dependency>
  20 + <groupId>wsdl4j</groupId>
  21 + <artifactId>wsdl4j</artifactId>
  22 + <version>1.5.2</version>
  23 + </dependency>
  24 + <dependency>
  25 + <groupId>commons-logging</groupId>
  26 + <artifactId>commons-logging</artifactId>
  27 + <version>1.2</version>
  28 + </dependency>
  29 +
  30 + <dependency>
  31 + <groupId>commons-discovery</groupId>
  32 + <artifactId>commons-discovery</artifactId>
  33 + <version>0.5</version>
  34 + </dependency>
  35 + <!-- rpc -->
  36 + <dependency>
  37 + <groupId>javax.xml.rpc</groupId>
  38 + <artifactId>javax.xml.rpc-api</artifactId>
  39 + <version>1.1.1</version>
  40 + </dependency>
  41 + <!-- Apache Axis -->
  42 + <dependency>
  43 + <groupId>org.apache.axis</groupId>
  44 + <artifactId>axis</artifactId>
  45 + <version>1.4</version>
  46 + </dependency>
  47 + <dependency>
  48 + <groupId>junit</groupId>
  49 + <artifactId>junit</artifactId>
  50 + <scope>test</scope>
  51 + </dependency>
  52 + <!-- webServices-->
  53 + <dependency>
  54 + <groupId>org.springframework.boot</groupId>
  55 + <artifactId>spring-boot-starter-web-services</artifactId>
  56 + </dependency>
19 <!-- 邮箱starter依赖--> 57 <!-- 邮箱starter依赖-->
20 <dependency> 58 <dependency>
21 <groupId>org.springframework.boot</groupId> 59 <groupId>org.springframework.boot</groupId>
@@ -85,6 +123,21 @@ @@ -85,6 +123,21 @@
85 <artifactId>httpclient</artifactId> 123 <artifactId>httpclient</artifactId>
86 <version>4.5.13</version> 124 <version>4.5.13</version>
87 </dependency> 125 </dependency>
  126 + <dependency>
  127 + <groupId>org.springframework.boot</groupId>
  128 + <artifactId>spring-boot-test</artifactId>
  129 + <scope>test</scope>
  130 + </dependency>
  131 + <dependency>
  132 + <groupId>org.springframework</groupId>
  133 + <artifactId>spring-test</artifactId>
  134 + <scope>test</scope>
  135 + </dependency>
  136 + <dependency>
  137 + <groupId>dom4j</groupId>
  138 + <artifactId>dom4j</artifactId>
  139 + <version>1.1</version>
  140 + </dependency>
88 141
89 </dependencies> 142 </dependencies>
90 143
Bsth-admin/src/main/java/com/ruoyi/driver/controller/DriverController.java
@@ -220,10 +220,4 @@ public class DriverController extends BaseController { @@ -220,10 +220,4 @@ public class DriverController extends BaseController {
220 return driverService.faceRegistrationFeedback(vo.getDeviceId(), vo.getJobCodes()); 220 return driverService.faceRegistrationFeedback(vo.getDeviceId(), vo.getJobCodes());
221 } 221 }
222 222
223 -// @GetMapping("/questionFeedback")  
224 -//// @ApiOperation("人脸识别反馈")  
225 -// public Result<?> questionFeedback() {  
226 -//  
227 -// return null;  
228 -// }  
229 } 223 }
Bsth-admin/src/main/java/com/ruoyi/job/DriverJob.java
@@ -3,18 +3,17 @@ package com.ruoyi.job; @@ -3,18 +3,17 @@ package com.ruoyi.job;
3 import cn.hutool.core.collection.CollectionUtil; 3 import cn.hutool.core.collection.CollectionUtil;
4 import cn.hutool.http.HttpUtil; 4 import cn.hutool.http.HttpUtil;
5 import com.alibaba.fastjson2.JSON; 5 import com.alibaba.fastjson2.JSON;
6 -import com.alibaba.fastjson2.JSONArray;  
7 import com.ruoyi.common.cache.NowSchedulingCache; 6 import com.ruoyi.common.cache.NowSchedulingCache;
8 import com.ruoyi.common.cache.SchedulingCache; 7 import com.ruoyi.common.cache.SchedulingCache;
9 import com.ruoyi.common.core.redis.RedisCache; 8 import com.ruoyi.common.core.redis.RedisCache;
10 import com.ruoyi.common.utils.StringUtils; 9 import com.ruoyi.common.utils.StringUtils;
  10 +import com.ruoyi.domain.TJkEmployeeinfo;
11 import com.ruoyi.driver.domain.Driver; 11 import com.ruoyi.driver.domain.Driver;
12 import com.ruoyi.driver.service.IDriverService; 12 import com.ruoyi.driver.service.IDriverService;
13 import com.ruoyi.equipment.domain.Equipment; 13 import com.ruoyi.equipment.domain.Equipment;
14 import com.ruoyi.equipment.mapper.EquipmentMapper; 14 import com.ruoyi.equipment.mapper.EquipmentMapper;
15 import com.ruoyi.expand.domain.DriverSchedulingExpand; 15 import com.ruoyi.expand.domain.DriverSchedulingExpand;
16 import com.ruoyi.expand.mapper.DriverSchedulingExpandMapper; 16 import com.ruoyi.expand.mapper.DriverSchedulingExpandMapper;
17 -import com.ruoyi.pojo.request.PersonnelRequestVo;  
18 import com.ruoyi.pojo.request.TokenRequestVo; 17 import com.ruoyi.pojo.request.TokenRequestVo;
19 import com.ruoyi.pojo.response.ResponseSchedulingDto; 18 import com.ruoyi.pojo.response.ResponseSchedulingDto;
20 import com.ruoyi.pojo.response.personnel.*; 19 import com.ruoyi.pojo.response.personnel.*;
@@ -22,6 +21,7 @@ import com.ruoyi.pojo.vo.ExpandResponseVo; @@ -22,6 +21,7 @@ import com.ruoyi.pojo.vo.ExpandResponseVo;
22 import com.ruoyi.service.RuleNumSettingService; 21 import com.ruoyi.service.RuleNumSettingService;
23 import com.ruoyi.service.ThreadJobService; 22 import com.ruoyi.service.ThreadJobService;
24 import com.ruoyi.utils.ConstDateUtil; 23 import com.ruoyi.utils.ConstDateUtil;
  24 +import com.ruoyi.utils.GetEmployeeInfoMain;
25 import com.ruoyi.utils.ListUtils; 25 import com.ruoyi.utils.ListUtils;
26 import lombok.extern.slf4j.Slf4j; 26 import lombok.extern.slf4j.Slf4j;
27 import org.springframework.beans.BeanUtils; 27 import org.springframework.beans.BeanUtils;
@@ -136,11 +136,10 @@ public class DriverJob implements InitializingBean { @@ -136,11 +136,10 @@ public class DriverJob implements InitializingBean {
136 // String getDriverInfoUrl = String.format(GET_DRIVER_INFO_URL, params); 136 // String getDriverInfoUrl = String.format(GET_DRIVER_INFO_URL, params);
137 //获取token 137 //获取token
138 log.info("开始获取人事接口token"); 138 log.info("开始获取人事接口token");
139 - TokenResponseVo tokenVo = getToken(TOKEN_URL);  
140 log.info("获取人事接口token完毕"); 139 log.info("获取人事接口token完毕");
141 // 获取驾驶员信息 140 // 获取驾驶员信息
142 log.info("开始获取驾驶员信息"); 141 log.info("开始获取驾驶员信息");
143 - getDrivers(tokenVo.getAccessToken()); 142 + handleDriverList();
144 log.info("获取驾驶员信息结束"); 143 log.info("获取驾驶员信息结束");
145 144
146 } catch (Exception e) { 145 } catch (Exception e) {
@@ -149,10 +148,10 @@ public class DriverJob implements InitializingBean { @@ -149,10 +148,10 @@ public class DriverJob implements InitializingBean {
149 log.info("执行结束"); 148 log.info("执行结束");
150 } 149 }
151 150
152 - private static void saveDrivers(List<Driver> drivers, String accessToken) { 151 + private static void saveDrivers(List<Driver> drivers) {
153 // 多线程插入数据 152 // 多线程插入数据
154 log.info("开始插入"); 153 log.info("开始插入");
155 - THREAD_JOB_SERVICE.asyncUploadDriverWithUpdateImageUrl(drivers, accessToken); 154 + THREAD_JOB_SERVICE.asyncUploadDriverWithUpdateImageUrl(drivers);
156 // String downloadImage = getDownloadImage(url, accessToken, ""); 155 // String downloadImage = getDownloadImage(url, accessToken, "");
157 156
158 } 157 }
@@ -398,24 +397,18 @@ public class DriverJob implements InitializingBean { @@ -398,24 +397,18 @@ public class DriverJob implements InitializingBean {
398 } 397 }
399 398
400 399
401 - public static void getDrivers(String accessToken) throws Exception { 400 + public static void handleDriverList() throws Exception {
402 // Map<String, String> configMap = getStringStringMap(timestamp); 401 // Map<String, String> configMap = getStringStringMap(timestamp);
403 // String sign = getSHA1(configMap); 402 // String sign = getSHA1(configMap);
404 Date date = new Date(); 403 Date date = new Date();
405 - int pageSize = 100;  
406 - PersonnelResultResponseVo vo = getPersonInfo(accessToken, pageSize, 1);  
407 - int countPage = vo.getTotalCount() / pageSize;  
408 - countPage = vo.getTotalCount() % pageSize == 0 ? countPage : countPage + 1; 404 + List<TJkEmployeeinfo> vo = getPersonInfo();
409 List<Driver> drivers = getDrivers(date, vo); 405 List<Driver> drivers = getDrivers(date, vo);
410 - for (int i = 2; i <= countPage; i++) {  
411 - drivers.addAll(getDrivers(date, getPersonInfo(accessToken, 100, i)));  
412 - }  
413 - List<String> jobList = drivers.stream().map(driver -> driver.getJobCode()).collect(Collectors.toList()); 406 + List<String> jobList = drivers.stream().map(Driver::getJobCode).collect(Collectors.toList());
414 handleNotEmptyJob(jobList); 407 handleNotEmptyJob(jobList);
415 // updateDrivers(drivers); 408 // updateDrivers(drivers);
416 List<List<Driver>> splitList = ListUtils.splitList(drivers, 200); 409 List<List<Driver>> splitList = ListUtils.splitList(drivers, 200);
417 for (List<Driver> driverList : splitList) { 410 for (List<Driver> driverList : splitList) {
418 - saveDrivers(driverList, accessToken); 411 + saveDrivers(driverList);
419 } 412 }
420 // for (int i = 1; i <= countPage; ) { 413 // for (int i = 1; i <= countPage; ) {
421 // if (++i <= countPage) { 414 // if (++i <= countPage) {
@@ -437,47 +430,24 @@ public class DriverJob implements InitializingBean { @@ -437,47 +430,24 @@ public class DriverJob implements InitializingBean {
437 log.info("更新人脸注册状态完毕"); 430 log.info("更新人脸注册状态完毕");
438 } 431 }
439 432
440 - private static List<Driver> getDrivers(Date date, PersonnelResultResponseVo vo) {  
441 - List<Driver> drivers = vo.getData().stream().map(item -> {  
442 - Driver driver = new Driver();  
443 - FormData formData = item.getFormData();  
444 - driver.setUpdateTime(date);  
445 - driver.setJobCode(formData.getTextField_lk9mk222());  
446 - driver.setPersonnelName(formData.getTextField_lk9mk224());  
447 - driver.setPosts(formData.getTextField_lk9mk226());  
448 - // 解析JSON字符串  
449 - List<ImageField_lk9mk228> lists = JSONArray.parseArray(formData.getImageField_lk9mk228(), ImageField_lk9mk228.class);  
450 - driver.setImage(lists.get(0).getPreviewUrl());  
451 - driver.setLineName(formData.getTextField_lkmgdvnu());  
452 - driver.setFleetName(formData.getTextField_lkmgdvnv());  
453 - return driver;  
454 - }).collect(Collectors.toList()); 433 + private static List<Driver> getDrivers(Date date, List<TJkEmployeeinfo> vo) {
  434 + List<Driver> drivers = vo.stream()
  435 + .filter(item -> "在职".equals(item.getStatus()))
  436 + .map(item -> {
  437 + Driver driver = new Driver();
  438 + driver.setJobCode(item.getCode());
  439 + driver.setPersonnelName(item.getEmployeename());
  440 + driver.setFleetName(item.getDepartmentname());
  441 + driver.setPosts(item.getPositname());
  442 + driver.setUpdateTime(date);
  443 + driver.setCard(item.getStatus());
  444 + return driver;
  445 + }).collect(Collectors.toList());
455 return drivers; 446 return drivers;
456 } 447 }
457 448
458 - private static PersonnelResultResponseVo getPersonInfo(String accessToken, Integer pageSize, Integer currentPage) {  
459 - RestTemplate restTemplate = new RestTemplate();  
460 - String url = "https://api.dingtalk.com/v1.0/yida/forms/instances/search";  
461 - PersonnelRequestVo vo = new PersonnelRequestVo();  
462 - vo.setAppType("APP_HV8J7X8PFRXLJJW8JTZK");  
463 - vo.setFormUuid("FORM-D2B665D1LQMCRRGS9WE6F54QTVYF25BXHM9KL4");  
464 - vo.setUserId("InterfaceManagement");  
465 - vo.setSystemToken("16A66291CHE9K5DPE1IDO9E63FOE2VWA09QFLV");  
466 - vo.setCurrentPage(currentPage);  
467 - vo.setPageSize(pageSize);  
468 - // 工号组件  
469 -// vo.setSearchFieldJson(" size = 4");  
470 - // 设置请求头  
471 - HttpHeaders headers = new HttpHeaders();  
472 - headers.setContentType(MediaType.APPLICATION_JSON);  
473 - headers.set("x-acs-dingtalk-access-token", accessToken);  
474 - // 创建HttpEntity对象  
475 - HttpEntity<String> requestEntity = new HttpEntity<>(JSON.toJSONString(vo), headers);  
476 -  
477 - // 发送POST请求  
478 - ResponseEntity<PersonnelResultResponseVo> result = restTemplate.postForEntity(url, requestEntity, PersonnelResultResponseVo.class);  
479 - PersonnelResultResponseVo body = result.getBody();  
480 - return body; 449 + private static List<TJkEmployeeinfo> getPersonInfo() {
  450 + return GetEmployeeInfoMain.getemployeeInfo();
481 } 451 }
482 452
483 public static TokenResponseVo getToken(String url) { 453 public static TokenResponseVo getToken(String url) {
Bsth-admin/src/main/java/com/ruoyi/pojo/request/GetEmployeeRequest.java 0 → 100644
  1 +package com.ruoyi.pojo.request;
  2 +
  3 +import lombok.Data;
  4 +
  5 +@Data
  6 +public class GetEmployeeRequest {
  7 + private String unintCode;
  8 + private String IDCard;
  9 +}
Bsth-admin/src/main/java/com/ruoyi/service/ThreadJobService.java
@@ -219,21 +219,12 @@ public class ThreadJobService { @@ -219,21 +219,12 @@ public class ThreadJobService {
219 } 219 }
220 220
221 @Async 221 @Async
222 - public void asyncUploadDriverWithUpdateImageUrl(List<Driver> drivers, String token) {  
223 - // 插入数据  
224 - for (Driver driver : drivers) {  
225 - // 开启事务  
226 - TransactionStatus transaction = transactionManager.getTransaction(new DefaultTransactionDefinition());  
227 - try {  
228 - // 插入数据  
229 - insertDriverInfo(token, driver);  
230 - // 提交事务  
231 - transactionManager.commit(transaction);  
232 - } catch (Exception e) {  
233 - // 回滚事务  
234 - transactionManager.rollback(transaction);  
235 - log.error("保存数据是出现了异常:{}", e.getMessage());  
236 - } 222 + public void asyncUploadDriverWithUpdateImageUrl(List<Driver> drivers) {
  223 + try {
  224 + // 插入数据
  225 + driverMapper.saveDrivers(drivers);
  226 + } catch (Exception e) {
  227 + log.error("保存数据是出现了异常:{}", e.getMessage());
237 } 228 }
238 } 229 }
239 230
@@ -403,7 +394,7 @@ public class ThreadJobService { @@ -403,7 +394,7 @@ public class ThreadJobService {
403 // 处理非司售人员的排班明细 394 // 处理非司售人员的排班明细
404 bcList.addAll(handleOtherPostsScheduling()); 395 bcList.addAll(handleOtherPostsScheduling());
405 // 金高只需要签到 396 // 金高只需要签到
406 - bcList = bcList.stream().filter(item->BC_TYPE_OUT.equals(item.getBcType())).collect(Collectors.toList()); 397 + bcList = bcList.stream().filter(item -> BC_TYPE_OUT.equals(item.getBcType())).collect(Collectors.toList());
407 // 插入排班 398 // 插入排班
408 schedulingMapper.insertRoster(bcList); 399 schedulingMapper.insertRoster(bcList);
409 // 异常数据过多,不通过自增获取id再次查询获取 400 // 异常数据过多,不通过自增获取id再次查询获取
Bsth-admin/src/main/java/com/ruoyi/utils/ConstDateUtil.java
@@ -23,6 +23,14 @@ public class ConstDateUtil { @@ -23,6 +23,14 @@ public class ConstDateUtil {
23 throw new RuntimeException(e); 23 throw new RuntimeException(e);
24 } 24 }
25 } 25 }
  26 + public static Date parseDate(String date,String pattern){
  27 + SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
  28 + try {
  29 + return simpleDateFormat.parse(date);
  30 + } catch (ParseException e) {
  31 + throw new RuntimeException(e);
  32 + }
  33 + }
26 34
27 public static String formatDate(String pattern,Date date){ 35 public static String formatDate(String pattern,Date date){
28 SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern); 36 SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
Bsth-admin/src/main/java/com/ruoyi/utils/GetEmployeeInfoMain.java 0 → 100644
  1 +package com.ruoyi.utils;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.Iterator;
  5 +import java.util.List;
  6 +
  7 +import javax.xml.namespace.QName;
  8 +
  9 +import com.ruoyi.domain.TJkEmployeeinfo;
  10 +import org.apache.axis.client.Call;
  11 +import org.apache.axis.client.Service;
  12 +import org.apache.commons.logging.Log;
  13 +import org.apache.commons.logging.LogFactory;
  14 +import org.dom4j.Document;
  15 +import org.dom4j.DocumentHelper;
  16 +import org.dom4j.Element;
  17 +
  18 +/**
  19 + * 获取金蝶人员表数据
  20 + *
  21 + * @author Administrator
  22 + *
  23 + */
  24 +public class GetEmployeeInfoMain {
  25 + Log logger = LogFactory.getLog(GetEmployeeInfoMain.class);
  26 +
  27 + public static List<TJkEmployeeinfo> getemployeeInfo() {
  28 + List<TJkEmployeeinfo> list = new ArrayList<TJkEmployeeinfo>();
  29 + // 提供接口的地址
  30 + String url = "http://58.247.254.22:31/PJDataInterface/PJDataService.asmx";
  31 + // 域名,这是在server定义的--不知道的可以问接口提供方,他们一并提供这个
  32 + String soapaction = "http://www.pd-transport.com/";
  33 +
  34 + String unintCode = "KD01.0111";
  35 + String iDCard = "";
  36 +
  37 + Service service = new Service();
  38 + try {
  39 + Call call = (Call) service.createCall();
  40 + call.setTargetEndpointAddress(url);
  41 + call.setOperationName(new QName(soapaction, "GetEmployee")); // 设置要调用哪个方法
  42 + call.addParameter(new QName(soapaction, "UnintCode"), // 设置要传递的参数--要和接口方提供的参数名一致
  43 + org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
  44 + call.addParameter(new QName(soapaction, "IDCard"), // 设置要传递的参数
  45 + org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
  46 + call.setReturnType(new QName(soapaction, "GetEmployee"), String.class); // 要返回的数据类型(自定义类型,我这边接口提供方给我返回的是json字符串,所以我用string类型接收。这个地方一定要设置好,不然各种报错很崩溃)
  47 +
  48 + call.setUseSOAPAction(true);
  49 + call.setSOAPActionURI(soapaction + "GetEmployee");
  50 +// 调用方法并传递参数-传递的参数和设置的参数要对应,顺序不能搞错了
  51 + String strResult = (String) call.invoke(new Object[] { unintCode, iDCard });
  52 + Document doc = null;
  53 + doc = DocumentHelper.parseText(strResult);// 获取根节点
  54 + Element rootElt = doc.getRootElement();
  55 + Iterator iter = (Iterator) rootElt.elementIterator("Emp");
  56 + while (iter.hasNext()) {
  57 + TJkEmployeeinfo emp = new TJkEmployeeinfo();
  58 + Element recordEle = (Element) iter.next();
  59 + String emp_id = recordEle.elementTextTrim("EM_ID");
  60 + String companyName = recordEle.elementTextTrim("CompanyName");
  61 + String departmentName = recordEle.elementTextTrim("DepartmentName");
  62 + String positName = recordEle.elementTextTrim("PositName");
  63 + String code = recordEle.elementTextTrim("Code");
  64 + String employeeName = recordEle.elementTextTrim("EmployeeName");
  65 + String age = recordEle.elementTextTrim("Age");
  66 + String status = recordEle.elementTextTrim("Status");
  67 + String unitFullName = recordEle.elementTextTrim("UnitFullName");
  68 + String inPositType = recordEle.elementTextTrim("InPositType");
  69 + String iDCardID = recordEle.elementTextTrim("IDCardID");
  70 + String sexType = recordEle.elementTextTrim("SexType");
  71 + String nationName = recordEle.elementTextTrim("NationName");
  72 + String nativePlace = recordEle.elementTextTrim("NativePlace");
  73 + String birthday = recordEle.elementTextTrim("Birthday");
  74 + String politicsStatus = recordEle.elementTextTrim("PoliticsStatus");
  75 + String marridStatus = recordEle.elementTextTrim("MarridStatus");
  76 + String startWordTime = recordEle.elementTextTrim("StartWordTime");
  77 + String telphone = recordEle.elementTextTrim("Telphone");
  78 + String mobile = recordEle.elementTextTrim("Mobile");
  79 + String hRMS_USERFIELD_3 = recordEle.elementTextTrim("HRMS_USERFIELD_3");
  80 + String hRMS_USERFIELD_47 = recordEle.elementTextTrim("HRMS_USERFIELD_47");
  81 + String hRMS_USERFIELD_40 = recordEle.elementTextTrim("HRMS_USERFIELD_40");
  82 + String hRMS_USERFIELD_45 = recordEle.elementTextTrim("HRMS_USERFIELD_45");
  83 + String hRMS_USERFIELD_41 = recordEle.elementTextTrim("HRMS_USERFIELD_41");
  84 + String fname = recordEle.elementTextTrim("Fname");
  85 + String enterDeptDate = recordEle.elementTextTrim("EnterDeptDate");
  86 + String enterGroupDate = recordEle.elementTextTrim("EnterGroupDate");
  87 + String inpositionDate = recordEle.elementTextTrim("InpositionDate");
  88 + String emptypecls = recordEle.elementTextTrim("Emptypecls");
  89 + String enterDate = recordEle.elementTextTrim("EnterDate");
  90 + String contractDate = recordEle.elementTextTrim("ContractDate");
  91 + if (emp_id != null && !emp_id.equals("") && !emp_id.equals("null"))
  92 + emp.setEmId(emp_id);
  93 + if (companyName != null && !companyName.equals("") && !companyName.equals("null"))
  94 + emp.setCompanyname(companyName);
  95 + if (departmentName != null && !departmentName.equals("") && !departmentName.equals("null"))
  96 + emp.setDepartmentname(departmentName);
  97 + if (positName != null && !positName.equals("") && !positName.equals("null"))
  98 + emp.setPositname(positName);
  99 + if (code != null && !code.equals("") && !code.equals("null"))
  100 + emp.setCode(code.replace("04-", ""));
  101 + if (employeeName != null && !employeeName.equals("") && !employeeName.equals("null"))
  102 + emp.setEmployeename(employeeName);
  103 + if (age != null && !age.equals("") && !age.equals("null"))
  104 + emp.setAge(Integer.parseInt(age));
  105 + if (status != null && !status.equals("") && !status.equals("null"))
  106 + emp.setStatus(status);
  107 + if (unitFullName != null && !unitFullName.equals("") && !unitFullName.equals("null"))
  108 + emp.setUnitfullname(unitFullName);
  109 + if (inPositType != null && !inPositType.equals("") && !inPositType.equals("null"))
  110 + emp.setInposittype(inPositType);
  111 + if (iDCardID != null && !iDCardID.equals("") && !iDCardID.equals("null"))
  112 + emp.setIdcardid(iDCardID.toUpperCase());
  113 + if (sexType != null && !sexType.equals("") && !sexType.equals("null"))
  114 + emp.setSextype(sexType);
  115 + if (nationName != null && !nationName.equals("") && !nationName.equals("null"))
  116 + emp.setNationname(nationName);
  117 + if (nativePlace != null && !nativePlace.equals("") && !nativePlace.equals("null"))
  118 + emp.setNativeplace(nativePlace);
  119 + if (birthday != null && !birthday.equals("") && !birthday.equals("null"))
  120 + emp.setBirthday(ConstDateUtil.parseDate(birthday,"yyyy-MM-dd"));
  121 + if (politicsStatus != null && !politicsStatus.equals("") && !politicsStatus.equals("null"))
  122 + emp.setPoliticsstatus(politicsStatus);
  123 + if (marridStatus != null && !marridStatus.equals("") && !marridStatus.equals("null"))
  124 + emp.setMarridstatus(marridStatus);
  125 + if (startWordTime != null && !startWordTime.equals("") && !startWordTime.equals("null"))
  126 + emp.setStartwordtime(ConstDateUtil.parseDate(startWordTime,"yyyy-MM-dd"));
  127 + if (telphone != null && !telphone.equals("") && !telphone.equals("null"))
  128 + emp.setTelphone(telphone);
  129 + if (mobile != null && !mobile.equals("") && !mobile.equals("null"))
  130 + emp.setMobile(mobile);
  131 + if (hRMS_USERFIELD_3 != null && !hRMS_USERFIELD_3.equals("") && !hRMS_USERFIELD_3.equals("null"))
  132 + emp.setHrmsUserfield3(hRMS_USERFIELD_3);
  133 + if (hRMS_USERFIELD_47 != null && !hRMS_USERFIELD_47.equals("") && !hRMS_USERFIELD_47.equals("null"))
  134 + emp.setHrmsUserfield47(hRMS_USERFIELD_47);
  135 + if (hRMS_USERFIELD_40 != null && !hRMS_USERFIELD_40.equals("") && !hRMS_USERFIELD_40.equals("null"))
  136 + emp.setHrmsUserfield40(hRMS_USERFIELD_40);
  137 + if (hRMS_USERFIELD_45 != null && !hRMS_USERFIELD_45.equals("") && !hRMS_USERFIELD_45.equals("null"))
  138 + emp.setHrmsUserfield45(hRMS_USERFIELD_45);
  139 + if (hRMS_USERFIELD_41 != null && !hRMS_USERFIELD_41.equals("") && !hRMS_USERFIELD_41.equals("null"))
  140 + emp.setHrmsUserfield41(hRMS_USERFIELD_41);
  141 + if (fname != null && !fname.equals("") && !fname.equals("null"))
  142 + emp.setFname(fname);
  143 + if (enterDeptDate != null && !enterDeptDate.equals("") && !enterDeptDate.equals("null"))
  144 + emp.setEnterdeptdate(ConstDateUtil.parseDate(enterDeptDate,"yyyy-MM-dd"));
  145 + if (enterGroupDate != null && !enterGroupDate.equals("") && !enterGroupDate.equals("null"))
  146 + emp.setEntergroupdate(ConstDateUtil.parseDate(enterGroupDate,"yyyy-MM-dd"));
  147 + if (inpositionDate != null && !inpositionDate.equals("") && !inpositionDate.equals("null"))
  148 + emp.setInpositiondate(ConstDateUtil.parseDate(inpositionDate,"yyyy-MM-dd"));
  149 + if (emptypecls != null && !emptypecls.equals("") && !emptypecls.equals("null"))
  150 + emp.setEmptypecls(emptypecls);
  151 + if (enterDate != null && !enterDate.equals("") && !enterDate.equals("null"))
  152 + emp.setEnterdate(ConstDateUtil.parseDate(enterDate,"yyyy-MM-dd"));
  153 + if (contractDate != null && !contractDate.equals("") && !contractDate.equals("null"))
  154 + emp.setContractdate(ConstDateUtil.parseDate(contractDate,"yyyy-MM-dd"));
  155 + list.add(emp);
  156 + }
  157 + } catch (Exception ex) {
  158 + ex.printStackTrace();
  159 + }
  160 + return list;
  161 + }
  162 +
  163 +}
Bsth-admin/src/main/resources/mapper/driver_scheduling/DriverSchedulingMapper.xml
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
57 57
58 <select id="queryToDay" resultType="com.ruoyi.domain.DriverScheduling" resultMap="Scheduling"> 58 <select id="queryToDay" resultType="com.ruoyi.domain.DriverScheduling" resultMap="Scheduling">
59 select scheduling.*,driver.fleet_name fleetName from 59 select scheduling.*,driver.fleet_name fleetName from
60 - scheduling join driver on driver.job_code = scheduling.job_code 60 + scheduling left join driver on driver.job_code = scheduling.job_code
61 where schedule_date = #{date} 61 where schedule_date = #{date}
62 <if test="jobCode !=null and jobCode != ''"> 62 <if test="jobCode !=null and jobCode != ''">
63 and driver.job_code = #{jobCode} 63 and driver.job_code = #{jobCode}
Bsth-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter @@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
111 // 过滤请求 111 // 过滤请求
112 .authorizeRequests() 112 .authorizeRequests()
113 // 对于登录login 注册register 验证码captchaImage 允许匿名访问 113 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
114 - .antMatchers("/system/dict/data/**","/app/version/check/**","/app/checkDeviceHeart","/app/download","/driver/**","/in/**","/eexception/**","/equipment/**","/report/**","/login", "/register", "/captchaImage").permitAll() 114 + .antMatchers("/ceshi/**","/system/dict/data/**","/app/version/check/**","/app/checkDeviceHeart","/app/download","/driver/**","/in/**","/eexception/**","/equipment/**","/report/**","/login", "/register", "/captchaImage").permitAll()
115 // 静态资源,可匿名访问 115 // 静态资源,可匿名访问
116 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() 116 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
117 .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() 117 .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()