fix 指令多次生成和用户管理功能
This commit is contained in:
@@ -26,6 +26,7 @@ import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.start.auto.run.NDCSocketConnectionAutoRun;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -36,10 +37,12 @@ import java.util.Map;
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class NDCAgvServiceImpl implements NDCAgvService {
|
||||
|
||||
private final DeviceAppService deviceAppService;
|
||||
private final ParamService acsConfigService;
|
||||
private final AcsToWmsService acsToWmsService;
|
||||
@Autowired
|
||||
DeviceAppService deviceAppService;
|
||||
@Autowired
|
||||
ParamService acsConfigService;
|
||||
@Autowired
|
||||
AcsToWmsService acsToWmsService;
|
||||
|
||||
private final DeviceExecuteLogService logServer;
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@ public class HeartbeatConfig {
|
||||
/**
|
||||
* 最大心跳时常
|
||||
*/
|
||||
public static Integer max_alive_time_millions = 1000 * 30;
|
||||
public static Integer max_alive_time_millions = 1000;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.nl.acs.opc;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import eu.bitwalker.useragentutils.DeviceType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -4,6 +4,7 @@ package org.nl.acs.order.rest;
|
||||
import org.nl.acs.order.service.ProduceshiftorderService;
|
||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -26,8 +27,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@RequestMapping("/api/produceshiftorder")
|
||||
@Slf4j
|
||||
public class ProduceshiftorderController {
|
||||
|
||||
private final ProduceshiftorderService produceshiftorderService;
|
||||
@Autowired
|
||||
ProduceshiftorderService produceshiftorderService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询工单信息")
|
||||
|
||||
@@ -83,6 +83,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
private DeviceAppService deviceAppService;
|
||||
@Autowired
|
||||
private RouteLineService routelineserver;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private AcsToWmsService acstowmsService;
|
||||
@Autowired
|
||||
@@ -155,7 +156,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAllByCache(Map whereJson, Pageable page) {
|
||||
this.reload();
|
||||
// this.reload();
|
||||
String task_code = (String) whereJson.get("task_code");
|
||||
String vehicle_code = (String) whereJson.get("vehicle_code");
|
||||
String material_type = (String) whereJson.get("material_type");
|
||||
|
||||
@@ -3,7 +3,6 @@ package org.nl.modules.logicflow.service.impl;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -331,6 +331,7 @@ public class AutoCreateInst {
|
||||
try {
|
||||
instructionService.create(instdto);
|
||||
} catch (Exception e) {
|
||||
log.error("agv创建指令异常", e);
|
||||
acsTask.setRemark(e.getMessage());
|
||||
taskserver.updateByCodeFromCache(acsTask);
|
||||
continue;
|
||||
|
||||
@@ -109,7 +109,7 @@ public class UserController {
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody User resources){
|
||||
checkLevel(resources);
|
||||
// 默认密码 123456
|
||||
resources.setPassword(SaSecureUtil.md5BySalt("123456", "salt"));
|
||||
resources.setPassword(SaSecureUtil.md5BySalt(resources.getPassword(), "salt"));
|
||||
userService.create(resources);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.nl.modules.system.service.impl;
|
||||
|
||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.modules.common.config.FileProperties;
|
||||
@@ -135,6 +136,7 @@ public class UserServiceImpl implements UserService {
|
||||
clone.setPhone(resources.getPhone());
|
||||
clone.setNickName(resources.getNickName());
|
||||
clone.setGender(resources.getGender());
|
||||
clone.setPassword(SaSecureUtil.md5BySalt(resources.getPassword(), "salt"));
|
||||
|
||||
userRepository.save(clone);
|
||||
// 清除缓存
|
||||
@@ -169,7 +171,7 @@ public class UserServiceImpl implements UserService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Cacheable(key = "'username:' + #p0")
|
||||
// @Cacheable(key = "'username:' + #p0")
|
||||
public UserDto findByName(String userName) {
|
||||
User user = userRepository.findByUsername(userName);
|
||||
if (user == null) {
|
||||
|
||||
@@ -68,7 +68,8 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
ParamService paramService;
|
||||
@Autowired
|
||||
AutoRunService autoRunService;
|
||||
|
||||
@Autowired
|
||||
AcsToWmsService acsToWmsService;
|
||||
|
||||
public NDCSocketConnectionAutoRun() {
|
||||
this.recordTime = new Date((new Date()).getTime() - (long) this.recordTimeOut);
|
||||
@@ -86,10 +87,10 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
System.out.println("1楼NDCAgv链接开始");
|
||||
ParamService ParamService = SpringContextHolder.getBean(ParamServiceImpl.class);
|
||||
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class);
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
|
||||
// AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class);
|
||||
NDCAgvService NDCAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class);
|
||||
DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class);
|
||||
// DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class);
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
|
||||
ip = paramService.findByCode(org.nl.acs.AcsConfig.AGVURL).getValue();
|
||||
port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT).getValue());
|
||||
|
||||
Reference in New Issue
Block a user