psh 12 months ago
parent
commit
e587acb651
  1. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java
  2. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java
  3. 11
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java
  4. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java

@ -7,6 +7,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.logging.annotation.Log;
import org.nl.wms.pda.service.PdaService;
import org.nl.wms.pda.service.dao.vo.PdaResponseVo;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;

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

@ -47,6 +47,9 @@ public class PdaServiceImpl implements PdaService {
if(!param.getString("point_code").startsWith("TBX")){
throw new BadRequestException("非涂板线禁止叫料!");
}
if (!param.getString("point_code").endsWith("01")){
throw new BadRequestException("只有下料位才允许下料!");
}
param.put("request_medthod_code","MJXLTask");
param.put("request_medthod_name","涂板线满架下料");
acsToWmsService.acsApply(param);

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

@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException;
import org.nl.wms.ext.service.AcsToWmsService;
import org.nl.wms.ext.service.dto.to.BaseResponse;
import org.nl.wms.pdm.service.IPdmBdWorkorderService;
import org.nl.wms.pdm.service.dao.PdmBdWorkorder;
@ -59,6 +60,8 @@ public class MJXLTask extends AbstractTask {
private ISchBaseVehiclematerialgroupService vehiclematerialgroupService;
@Autowired
private PointMapper pointMapper;
@Autowired
private AcsToWmsService acsToWmsService;
@Override
// @Transactional(rollbackFor = Exception.class)
@ -210,12 +213,16 @@ public class MJXLTask extends AbstractTask {
groupEntity.setIs_delete(false);
groupEntity.setMove_way(startPoint);
vehiclematerialgroupService.save(groupEntity);
// 任务完成
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
taskObj.setGroup_id(groupEntity.getGroup_id());
taskObj.setRemark("任务完成");
JSONObject param=new JSONObject();
String device_code=startPoint.substring(0,startPoint.length()-1)+"2";
param.put("device_code",device_code);
param.put("request_medthod_code","TBXBKJTask");
param.put("request_medthod_name","涂板线补空架");
acsToWmsService.acsApply(param);
}
if (status.equals(TaskStatus.CANCELED)) { // 取消
// 终点解锁

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

@ -80,7 +80,7 @@ public class TBXBKJTask extends AbstractTask {
for (SchBaseTask task : tasks) {
// 找起点
SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getPoint_code, task.getPoint_code1()));
.eq(SchBasePoint::getPoint_code, task.getPoint_code2()));
SchBasePoint point = findNextPoint(startPoint);
if (ObjectUtil.isEmpty(point)) {
task.setRemark("未找到所需点位!");
@ -90,7 +90,7 @@ public class TBXBKJTask extends AbstractTask {
continue;
}
// 设置终点并修改创建成功状态
task.setPoint_code2(point.getPoint_code());
task.setPoint_code1(point.getPoint_code());
task.setTask_status(TaskStatus.CREATED.getCode());
task.setRemark("");
taskService.update(task);
@ -120,7 +120,7 @@ public class TBXBKJTask extends AbstractTask {
//TBX2找B区
regionCode = "HCQ5";
}
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,null);
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,"1");
for (SchBasePoint schBasePoint : schBasePointList) {
if (schBasePoint.getVehicle_qty() > 0) {
log.info("涂板线补空架找到当前符合条件的点位{}",schBasePoint.getPoint_code());

Loading…
Cancel
Save