Commit 940b5933ce06c768a38cd137f892eded0b6a7b12

Authored by guzijian
1 parent 75daf5b4

feat: 金高配置修改

Bsth-admin/src/main/java/com/ruoyi/BsthApplication.java
... ... @@ -31,7 +31,7 @@ public class BsthApplication {
31 31 // System.setProperty("spring.devtools.restart.enabled", "false");
32 32 ConfigurableApplicationContext app = SpringApplication.run(BsthApplication.class, args);
33 33 Environment env = app.getEnvironment();
34   - log.info("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
  34 + log.info("(♥◠‿◠)ノ゙ 一体机后台启动成功 ლ(´ڡ`ლ)゙ \n" +
35 35 " .-------. ____ __ \n" +
36 36 " | _ _ \\ \\ \\ / / \n" +
37 37 " | ( ' ) | \\ _. / ' \n" +
... ...
Bsth-admin/src/main/java/com/ruoyi/BsthServletInitializer.java
... ... @@ -23,22 +23,4 @@ public class BsthServletInitializer extends SpringBootServletInitializer
23 23 {
24 24 return application.sources(BsthApplication.class);
25 25 }
26   -
27   - // 测试方法
28   - public static void main(String[] args) {
29   - RestTemplate restTemplate = new RestTemplate();
30   - String url = "http://1.14.107.94:8100/driver/driver";
31   - HttpHeaders headers = new HttpHeaders();
32   - headers.set("Authorization", "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImNhOGRhOGJlLWQ0ZjItNDhjMy05ZWU1LWJkMDQzYzY3YzQ0MyJ9.79b8JM31faxhLnIqu6xGtrx1JK019NoN26AwNfPzptYSriHSTABdYp16kzKD538wo2HfXhYoviSqy4qZfoEV5Q");
33   - Map<String, String> requestBody = new HashMap<>();
34   - requestBody.put("jobCode", "asdfasd");
35   - requestBody.put("personnelName", "asdfasdf");
36   -
37   - HttpEntity<Map<String, String>> entity = new HttpEntity<>(requestBody, headers);
38   -
39   - ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.POST, entity, String.class);
40   -
41   - String responseBody = response.getBody();
42   - System.out.println(responseBody);
43   - }
44 26 }
... ...
Bsth-admin/src/main/java/com/ruoyi/common/cache/NowSchedulingCache.java
... ... @@ -29,7 +29,7 @@ public class NowSchedulingCache {
29 29 this.schedulingMapper = driverSchedulingMapper;
30 30 this.errorJobcodeService = errorJobcodeService;
31 31 log.info("项目启动加载中获取排班表-----");
32   - cacheNowDaySchedulingInit();
  32 +// cacheNowDaySchedulingInit();
33 33 }
34 34  
35 35 private void cacheNowDaySchedulingInit() {
... ...
Bsth-admin/src/main/java/com/ruoyi/driver/service/impl/DriverServiceImpl.java
... ... @@ -352,23 +352,13 @@ public class DriverServiceImpl implements IDriverService {
352 352 dto = schedulingService.queryScheduling(item.getJobCode(), now);
353 353 DriverResponseVo vo = handlerRecommendation(item, now, dto, schedulingFlag, alcoholFlag);
354 354 // 针对指定用户操作
355   - if (item.getJobCode().equals("722717") || item.getJobCode().equals("700001")) {
356   - if (!CollectionUtil.isEmpty(dto) && vo.getPlanAction().equals(SIGN_IN_STRING)) {
357   - vos.add(DriverResponseVo.createDriverResponseVo(null, item, SIGN_IN_STRING, needCheckAlcoholDevice, true, "测试", "测试", "测试"));
358   - } else if (!CollectionUtil.isEmpty(dto)) {
359   - vos.add(vo);
360   - } else {
361   - vos.add(DriverResponseVo.createDriverResponseVo(null, item, SIGN_IN_STRING, needCheckAlcoholDevice, true, "测试", "测试", "测试"));
362   - }
  355 + // 无排班
  356 + if (Objects.isNull(vo)) {
  357 + vos.add(DriverResponseVo.createDriverResponseVo(null, item, "签到", needCheckAlcoholDevice, false, "", "", ""));
363 358 } else {
364   - // 无排班
365   - if (Objects.isNull(vo)) {
366   - vos.add(DriverResponseVo.createDriverResponseVo(null, item, null, false, false, "", "", ""));
367   - } else {
368   - // 特定设备是无需酒精测试的
369   - vo.setCheckAlcohol(needCheckAlcoholDevice ? vo.getCheckAlcohol() : false);
370   - vos.add(vo);
371   - }
  359 + // 特定设备是无需酒精测试的
  360 + vo.setCheckAlcohol(needCheckAlcoholDevice);
  361 + vos.add(vo);
372 362 }
373 363 }
374 364 return vos;
... ... @@ -381,14 +371,14 @@ public class DriverServiceImpl implements IDriverService {
381 371 * @return
382 372 */
383 373 public static boolean doCheckDevice(String deviceId) {
384   - if (StringUtil.isEmpty(deviceId)) {
385   - return true;
386   - }
387   - int num = Integer.parseInt(deviceId);
388   - if (num < 101) {
389   - return true;
390   - }
391   - return false;
  374 +// if (StringUtil.isEmpty(deviceId)) {
  375 +// return true;
  376 +// }
  377 +// int num = Integer.parseInt(deviceId);
  378 +// if (num < 101) {
  379 +// return true;
  380 +// }
  381 + return true;
392 382 }
393 383  
394 384 private DriverResponseVo handlerRecommendation(Driver driver, Long now, List<DriverScheduling> dto, Boolean schedulingFlag, Boolean alcoholFlag) {
... ... @@ -511,6 +501,7 @@ public class DriverServiceImpl implements IDriverService {
511 501 }
512 502 driver.setImage(fileName);
513 503 driver.setUpdateTime(new Date());
  504 + driverMapper.insertDriver(driver);
514 505 driverMapper.updateSignStatusDriversByJobCodes(new ArrayList<>(Arrays.asList(driver)));
515 506 driverMapper.deleteDeviceIdAssociatedJobCode(new ArrayList<>(Arrays.asList(driver.getJobCode())));
516 507 log.info("进行人员数据更新完毕");
... ... @@ -577,14 +568,14 @@ public class DriverServiceImpl implements IDriverService {
577 568 private List<DriverSignInRecommendation> handleTimeOutPerson(List<DriverSignInRecommendation> nowTimerList) {
578 569 return nowTimerList.stream()
579 570 // 只需要签到
580   - .filter(item-> BC_TYPE_OUT.equals(item.getBcType()) && checkPosts(item))
  571 + .filter(item -> BC_TYPE_OUT.equals(item.getBcType()) && checkPosts(item))
581 572 // 筛选应签未签人员
582 573 .filter(item -> Objects.isNull(item.getSignTime()) || item.getTimestamps() - item.getSignTime() < 0)
583 574 .collect(Collectors.toList());
584 575 }
585 576  
586 577 private boolean checkPosts(DriverSignInRecommendation item) {
587   - switch (item.getPosts()){
  578 + switch (item.getPosts()) {
588 579 case "驾驶员":
589 580 case "售票员":
590 581 case "采集员":
... ...
Bsth-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceImpl.java
... ... @@ -195,7 +195,7 @@ public class SignInServiceImpl implements ISignInService {
195 195 }
196 196  
197 197 private AjaxResult handleAjaxResult(SignIn signIn, Driver driver, SignInResponseVo vo) {
198   - if (PERSONNEL_POSTS_DRIVER.equals(driver.getPosts()) && SIGN_IN_FAIL.equals(signIn.getStatus()) && signIn.getRemark().contains(ALCOHOL_SIGN_IN_ERROR)) {
  198 + if (SIGN_IN_FAIL.equals(signIn.getStatus()) && signIn.getRemark().contains(ALCOHOL_SIGN_IN_ERROR)) {
199 199 AjaxResult result = getAjaxResultByDriverSignInfo(signIn, vo);
200 200 if (!Objects.isNull(result)) {
201 201 return result;
... ... @@ -424,7 +424,7 @@ public class SignInServiceImpl implements ISignInService {
424 424 result = checkWorkDay(now, dto, globalIndex, signIn, driver.getPosts());
425 425  
426 426 // 酒精测试校验 确定 且员工工种是驾驶员
427   - if (ALCOHOL_FLAG_YES.equals(signIn.getAlcoholFlag()) && PERSONNEL_POSTS_DRIVER.equals(driver.getPosts())) {
  427 + if (ALCOHOL_FLAG_YES.equals(signIn.getAlcoholFlag()) ) {
428 428 if (new BigDecimal(20).compareTo(signIn.getAlcoholIntake()) <= 0) {
429 429 threadJobService.asyncSendEmail(dto, globalIndex.getIndex(), signIn, driver);
430 430 signIn.setRemark(signIn.getRemark() + ALCOHOL_SIGN_IN_ERROR + signIn.getAlcoholIntake().toString() + "mg/100ml。");
... ...
Bsth-admin/src/main/resources/application-druid-prd.yml
... ... @@ -133,7 +133,7 @@ ruoyi:
133 133 # 实例演示开关
134 134 demoEnabled: true
135 135 # 文件路径 示例( Windows配置E:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
136   - profile: E:/ruoyi/uploadPath
  136 + profile: D:/ruoyi/uploadPath
137 137 # 获取ip地址开关
138 138 addressEnabled: false
139 139 # 验证码类型 math 数字计算 char 字符验证
... ... @@ -202,3 +202,5 @@ api:
202 202 people:
203 203 url: https://api.dingtalk.com/v1.0/yida/forms/instances/search
204 204  
  205 +log:
  206 + path: D:/ruoyi/logs
205 207 \ No newline at end of file
... ...
Bsth-admin/src/main/resources/logback.xml
... ... @@ -3,7 +3,7 @@
3 3 <!-- 日志存放路径 -->
4 4 <!-- <property name="log.path" value="E:/ruoyi/logs" />-->
5 5 <!-- <property name="log.path" value="D:/ruoyi/logs" />-->
6   - <springProperty name="log.path" source="log.path" defaultValue="E:/ruoyi/logs" />
  6 + <springProperty name="log.path" source="log.path" defaultValue="D:/ruoyi/logs" />
7 7 />
8 8 <!-- <property name="log.path" value="/home/ruoyi/logs" />-->
9 9 <!-- 日志输出格式 -->
... ...