Browse Source

现场问题修复

master
psh 11 months ago
parent
commit
f54b358bde
  1. 2
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/rest/InstructionController.java
  2. 1
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
  3. 1
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  4. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java
  5. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java
  6. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java
  7. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java
  8. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java
  9. 2
      lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml

2
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/rest/InstructionController.java

@ -38,7 +38,7 @@ public class InstructionController {
//@PreAuthorize("@el.check('instruction:list')") //@PreAuthorize("@el.check('instruction:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) { public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
if(ObjectUtil.isEmpty(whereJson.get("status"))) { if(ObjectUtil.isEmpty(whereJson.get("status"))) {
whereJson.put("status", "0"); whereJson.put("status", "1");
} }
return new ResponseEntity<>(instructionService.queryAll(whereJson, page), HttpStatus.OK); return new ResponseEntity<>(instructionService.queryAll(whereJson, page), HttpStatus.OK);
} }

1
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java

@ -239,6 +239,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
if (!StrUtil.isEmpty(create_time) && !StrUtil.isEmpty(end_time)) { if (!StrUtil.isEmpty(create_time) && !StrUtil.isEmpty(end_time)) {
wrapper.between(InstructionMybatis::getCreate_time,create_time,end_time); wrapper.between(InstructionMybatis::getCreate_time,create_time,end_time);
} }
wrapper.orderByDesc(InstructionMybatis::getCreate_time);
IPage<InstructionMybatis> insPage = instructionMapper.selectPage(queryPage,wrapper); IPage<InstructionMybatis> insPage = instructionMapper.selectPage(queryPage,wrapper);
final JSONObject json = (JSONObject) JSON.toJSON(ConvertUtil.convertPage(insPage, InstructionDto.class)); final JSONObject json = (JSONObject) JSON.toJSON(ConvertUtil.convertPage(insPage, InstructionDto.class));
return json; return json;

1
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

@ -416,6 +416,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
if (!StrUtil.isEmpty(create_time) && !StrUtil.isEmpty(end_time)) { if (!StrUtil.isEmpty(create_time) && !StrUtil.isEmpty(end_time)) {
wrapper.between(Task::getCreate_time,create_time,end_time); wrapper.between(Task::getCreate_time,create_time,end_time);
} }
wrapper.orderByDesc(Task::getCreate_time);
IPage<Task> taskPage = taskMapper.selectPage(queryPage,wrapper); IPage<Task> taskPage = taskMapper.selectPage(queryPage,wrapper);
final JSONObject json = (JSONObject) JSON.toJSON(ConvertUtil.convertPage(taskPage, TaskDto.class)); final JSONObject json = (JSONObject) JSON.toJSON(ConvertUtil.convertPage(taskPage, TaskDto.class));
JSONArray array = json.getJSONArray("content"); JSONArray array = json.getJSONArray("content");

6
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java

@ -35,6 +35,7 @@ import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper;
import org.nl.wms.util.PointUtils; import org.nl.wms.util.PointUtils;
import org.nl.wms.util.TaskUtils; import org.nl.wms.util.TaskUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -54,6 +55,7 @@ import java.util.concurrent.TimeUnit;
*/ */
@Slf4j @Slf4j
@Service @Service
@Lazy
public class AcsToWmsServiceImpl implements AcsToWmsService { public class AcsToWmsServiceImpl implements AcsToWmsService {
// 反射类方法的缓存 // 反射类方法的缓存
@ -150,9 +152,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
AbstractTask abstractTask = taskFactory.getTask(processingClass); AbstractTask abstractTask = taskFactory.getTask(processingClass);
// 更新任务 // 更新任务
try { try {
abstractTask.updateTaskStatus(taskId, status); abstractTask.updateTaskStatus(taskObj.getTask_id(), status);
} catch (Exception e) { } catch (Exception e) {
log.error("任务状态更新失败: {}", message); log.error("任务状态更新失败: {}{}", e,e.getMessage());
return BaseResponse.responseError(requestNo, "任务:[" + taskId + "]状态更新失败," + message); return BaseResponse.responseError(requestNo, "任务:[" + taskId + "]状态更新失败," + message);
} }
return BaseResponse.responseOk(requestNo, "任务状态反馈成功!"); return BaseResponse.responseOk(requestNo, "任务状态反馈成功!");

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java

@ -18,6 +18,7 @@ import org.nl.wms.sch.task.service.ISchBaseTaskService;
import org.nl.wms.sch.task_manage.GeneralDefinition; import org.nl.wms.sch.task_manage.GeneralDefinition;
import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum; import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
@ -27,6 +28,7 @@ import org.springframework.stereotype.Service;
*/ */
@Slf4j @Slf4j
@Service @Service
@Lazy
public class PdaServiceImpl implements PdaService { public class PdaServiceImpl implements PdaService {
@Autowired @Autowired
private PdaMapper pdaMapper; private PdaMapper pdaMapper;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java

@ -12,6 +12,7 @@ import org.nl.common.logging.annotation.Log;
import org.nl.wms.sch.task.service.ISchBaseTaskService; import org.nl.wms.sch.task.service.ISchBaseTaskService;
import org.nl.wms.sch.task.service.dao.SchBaseTask; import org.nl.wms.sch.task.service.dao.SchBaseTask;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -28,6 +29,7 @@ import java.util.Set;
@RestController @RestController
@Api(tags = "任务管理管理") @Api(tags = "任务管理管理")
@RequestMapping("/api/schBaseTask") @RequestMapping("/api/schBaseTask")
public class SchBaseTaskController { public class SchBaseTaskController {
@Autowired @Autowired

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java

@ -22,6 +22,7 @@ import org.nl.wms.sch.task_manage.AbstractTask;
import org.nl.wms.sch.task_manage.task.TaskFactory; import org.nl.wms.sch.task_manage.task.TaskFactory;
import org.nl.wms.sch.task_manage.task.core.TaskStatus; import org.nl.wms.sch.task_manage.task.core.TaskStatus;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays; import java.util.Arrays;
@ -37,6 +38,7 @@ import java.util.stream.Collectors;
**/ **/
@Slf4j @Slf4j
@Service @Service
@Lazy
public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBaseTask> implements ISchBaseTaskService { public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBaseTask> implements ISchBaseTaskService {
@Autowired @Autowired

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java

@ -224,7 +224,11 @@ public class MJXLTask extends AbstractTask {
param.put("device_code",device_code); param.put("device_code",device_code);
param.put("request_medthod_code","TBXBKJTask"); param.put("request_medthod_code","TBXBKJTask");
param.put("request_medthod_name","涂板线补空架"); param.put("request_medthod_name","涂板线补空架");
try {
acsToWmsService.acsApply(param); acsToWmsService.acsApply(param);
}catch (Exception e){
log.error("涂板线下料任务自动创建涂板线补空架任务失败{}",e.getMessage());
}
} }
if (status.equals(TaskStatus.CANCELED)) { // 取消 if (status.equals(TaskStatus.CANCELED)) { // 取消
// 终点解锁 // 终点解锁

2
lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml

@ -37,7 +37,7 @@ https://juejin.cn/post/6844903775631572999
<!--日志文件保留天数--> <!--日志文件保留天数-->
<maxHistory>15</maxHistory> <maxHistory>15</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来--> <!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>200MB</maxFileSize> <maxFileSize>20MB</maxFileSize>
<!--所有日志最多占多大容量--> <!--所有日志最多占多大容量-->
<totalSizeCap>20GB</totalSizeCap> <totalSizeCap>20GB</totalSizeCap>
</rollingPolicy> </rollingPolicy>

Loading…
Cancel
Save