修复bug
This commit is contained in:
parent
7e37f213b5
commit
966641df53
@ -37,9 +37,6 @@ public class RobotReactiveStatusApiImpl implements RobotReactiveStatusApi {
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Value("${zn.robot_error_level_time:30}")
|
||||
private Long robotErrorLevelTime;
|
||||
|
||||
@Resource
|
||||
private RobotWarnMsgService warnMsgService;
|
||||
|
||||
@ -127,8 +124,8 @@ public class RobotReactiveStatusApiImpl implements RobotReactiveStatusApi {
|
||||
msg = warnMsg.getWarnMsg();
|
||||
}
|
||||
}
|
||||
redisUtil.set(errorLevelKey, level, robotErrorLevelTime);
|
||||
redisUtil.set(errorMsgKey, errorMsg, robotErrorLevelTime);
|
||||
redisUtil.set(errorLevelKey, level);
|
||||
redisUtil.set(errorMsgKey, errorMsg);
|
||||
|
||||
warnMsgService.sendWarnMsgToWebsocket(msg);
|
||||
|
||||
|
@ -22,6 +22,7 @@ public class RobotTaskSaveReqVO {
|
||||
private List<RobotTaskDetailAddVO> taskDetailList;
|
||||
|
||||
@Schema(description = "物料信息")
|
||||
@Size(min = 0, max = 100, message = "物料信息输入的数据长度超过限制")
|
||||
private String skuInfo;
|
||||
|
||||
@Schema(description = "物料批次号")
|
||||
@ -34,6 +35,7 @@ public class RobotTaskSaveReqVO {
|
||||
private Long priority;
|
||||
|
||||
@Schema(description = "其他信息")
|
||||
@Size(min = 0, max = 100, message = "其他信息输入的数据长度超过限制")
|
||||
private String otherMsg;
|
||||
|
||||
@Schema(description = "循环(0:不循环、1:循环)")
|
||||
|
@ -33,6 +33,9 @@ public class UserOperationLogServiceImpl implements UserOperationLogService {
|
||||
@Override
|
||||
public Long createUserOperationLog(UserOperationLogSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
if (createReqVO.getOperateAction().length() > 95) {
|
||||
createReqVO.setOperateAction(createReqVO.getOperateAction().substring(0,95));
|
||||
}
|
||||
UserOperationLogDO userOperationLog = BeanUtils.toBean(createReqVO, UserOperationLogDO.class);
|
||||
userOperationLogMapper.insert(userOperationLog);
|
||||
// 返回
|
||||
|
@ -1052,6 +1052,10 @@ public class RobotTaskServiceImpl extends ServiceImpl<RobotTaskMapper, RobotTask
|
||||
log.error("此取货库位存在放货任务 :{}", locationDO.getLocationNo());
|
||||
throw new RuntimeException("此取货库位存在放货任务 " + locationDO.getLocationNo());
|
||||
}
|
||||
if (LocationUseStatusEnum.NO.getType().equals(locationDO.getLocationUseStatus())) {
|
||||
log.error("此取货库位没库存 :{}", locationDO.getLocationNo());
|
||||
throw new RuntimeException("此取货库位没库存 " + locationDO.getLocationNo());
|
||||
}
|
||||
takeMapItemIds.add(locationDO.getMapItemId());
|
||||
} else {
|
||||
WareHouseLocationDO wareHouseLocationDO =
|
||||
@ -1164,7 +1168,7 @@ public class RobotTaskServiceImpl extends ServiceImpl<RobotTaskMapper, RobotTask
|
||||
PageResult<RobotTaskDO> pageResult = null;
|
||||
PageResult<RobotTaskRespVO> dataPage = new PageResult<>();
|
||||
List<RobotTaskDO> list = new ArrayList<>();
|
||||
if (ObjectUtil.isEmpty(pageReqVO.getRobotNo())) {
|
||||
if (ObjectUtil.isEmpty(pageReqVO.getRobotNo()) && ObjectUtil.isEmpty(pageReqVO.getTaskStage())) {
|
||||
pageResult = taskMapper.selectPage(pageReqVO);
|
||||
dataPage.setTotal(pageResult.getTotal());
|
||||
list = pageResult.getList();
|
||||
@ -1176,8 +1180,24 @@ public class RobotTaskServiceImpl extends ServiceImpl<RobotTaskMapper, RobotTask
|
||||
}
|
||||
|
||||
List<RobotTaskRespVO> targetList = BeanUtil.copyToList(list, RobotTaskRespVO.class);
|
||||
for (RobotTaskRespVO robotTaskRespVO : targetList) {
|
||||
robotTaskRespVO.setDetails(taskDetailMapper.queryByTaskId(robotTaskRespVO.getId()));
|
||||
if (ObjectUtil.isEmpty(targetList)) {
|
||||
return dataPage;
|
||||
}
|
||||
|
||||
List<Long> takeIds = targetList.stream().map(RobotTaskRespVO::getId).collect(Collectors.toList());
|
||||
List<RobotTaskDetailDO> taskDetailDOS = taskDetailMapper.selectList(new LambdaQueryWrapperX<RobotTaskDetailDO>()
|
||||
.in(RobotTaskDetailDO::getRobotTaskId, takeIds));
|
||||
|
||||
Map<Long, List<RobotTaskDetailDO>> detailMap = taskDetailDOS.stream().collect(Collectors.groupingBy(RobotTaskDetailDO::getRobotTaskId));
|
||||
|
||||
for (RobotTaskRespVO v : targetList) {
|
||||
List<RobotTaskDetailDO> details = detailMap.get(v.getId());
|
||||
if (ObjectUtil.isNotEmpty(pageReqVO.getTaskStage())) {
|
||||
details = details.stream()
|
||||
.filter(s -> s.getTaskStage().equals(pageReqVO.getTaskStage()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
v.setDetails(details);
|
||||
}
|
||||
dataPage.setList(targetList);
|
||||
return dataPage;
|
||||
|
@ -137,6 +137,9 @@ public class RobotWarnMsgServiceImpl extends ServiceImpl<RobotWarnMsgMapper, Rob
|
||||
@Override
|
||||
public String allRead() {
|
||||
warnMsgMapper.updateAllRead();
|
||||
UserOperationLogSaveReqVO operationLog = UserOperationLogSaveReqVO.builder().operateAction("更新所有告警信息为已读")
|
||||
.nickName(SecurityFrameworkUtils.getLoginUserNickname()).build();
|
||||
userOperationLogService.createUserOperationLog(operationLog);
|
||||
return "更新成功";
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,6 @@ zn:
|
||||
robot_position_cache_time: 10 #机器人上报点位存储时间(秒)
|
||||
cycle_do_auto_move: true #存在循环的任务,是否开启自动移库. true:存在循环任务,开启自动移库; false:有循环任务不自动移库
|
||||
full_electricity: 100 #机器人充满电的电量
|
||||
robot_error_level_time: 30 #机器人异常存储时间(秒)
|
||||
task_need_single: true #机器人对同一线库/点位是不是只能有一台机器人做任务 (true:一个点位/线库,只有一台机器人)
|
||||
location_number_reduce: 100000000 #库位排序的差值(下发取货任务,将库位排序减去此值,然后取绝对值)
|
||||
robot_doing_action: # 机器人正在做的动作
|
||||
|
@ -278,7 +278,7 @@
|
||||
and t1.task_status = #{pageReqVO.taskStatus}
|
||||
</if>
|
||||
<if test="pageReqVO.taskStage != null">
|
||||
and t1.task_stage = #{pageReqVO.taskStage}
|
||||
and t2.task_stage = #{pageReqVO.taskStage}
|
||||
</if>
|
||||
<if test="pageReqVO.robotNo != null">
|
||||
and t2.robot_no like concat('%', #{pageReqVO.robotNo}, '%')
|
||||
|
Loading…
Reference in New Issue
Block a user