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 lombok.extern.slf4j.Slf4j;
import org.nl.common.logging.annotation.Log; import org.nl.common.logging.annotation.Log;
import org.nl.wms.pda.service.PdaService; 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.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated; 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")){ if(!param.getString("point_code").startsWith("TBX")){
throw new BadRequestException("非涂板线禁止叫料!"); throw new BadRequestException("非涂板线禁止叫料!");
} }
if (!param.getString("point_code").endsWith("01")){
throw new BadRequestException("只有下料位才允许下料!");
}
param.put("request_medthod_code","MJXLTask"); param.put("request_medthod_code","MJXLTask");
param.put("request_medthod_name","涂板线满架下料"); param.put("request_medthod_name","涂板线满架下料");
acsToWmsService.acsApply(param); 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 com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException; 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.ext.service.dto.to.BaseResponse;
import org.nl.wms.pdm.service.IPdmBdWorkorderService; import org.nl.wms.pdm.service.IPdmBdWorkorderService;
import org.nl.wms.pdm.service.dao.PdmBdWorkorder; import org.nl.wms.pdm.service.dao.PdmBdWorkorder;
@ -59,6 +60,8 @@ public class MJXLTask extends AbstractTask {
private ISchBaseVehiclematerialgroupService vehiclematerialgroupService; private ISchBaseVehiclematerialgroupService vehiclematerialgroupService;
@Autowired @Autowired
private PointMapper pointMapper; private PointMapper pointMapper;
@Autowired
private AcsToWmsService acsToWmsService;
@Override @Override
// @Transactional(rollbackFor = Exception.class) // @Transactional(rollbackFor = Exception.class)
@ -210,12 +213,16 @@ public class MJXLTask extends AbstractTask {
groupEntity.setIs_delete(false); groupEntity.setIs_delete(false);
groupEntity.setMove_way(startPoint); groupEntity.setMove_way(startPoint);
vehiclematerialgroupService.save(groupEntity); vehiclematerialgroupService.save(groupEntity);
// 任务完成 // 任务完成
taskObj.setTask_status(TaskStatus.FINISHED.getCode()); taskObj.setTask_status(TaskStatus.FINISHED.getCode());
taskObj.setGroup_id(groupEntity.getGroup_id()); taskObj.setGroup_id(groupEntity.getGroup_id());
taskObj.setRemark("任务完成"); 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)) { // 取消 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) { for (SchBaseTask task : tasks) {
// 找起点 // 找起点
SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>() 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); SchBasePoint point = findNextPoint(startPoint);
if (ObjectUtil.isEmpty(point)) { if (ObjectUtil.isEmpty(point)) {
task.setRemark("未找到所需点位!"); task.setRemark("未找到所需点位!");
@ -90,7 +90,7 @@ public class TBXBKJTask extends AbstractTask {
continue; continue;
} }
// 设置终点并修改创建成功状态 // 设置终点并修改创建成功状态
task.setPoint_code2(point.getPoint_code()); task.setPoint_code1(point.getPoint_code());
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());
task.setRemark(""); task.setRemark("");
taskService.update(task); taskService.update(task);
@ -120,7 +120,7 @@ public class TBXBKJTask extends AbstractTask {
//TBX2找B区 //TBX2找B区
regionCode = "HCQ5"; regionCode = "HCQ5";
} }
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,null); List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,"1");
for (SchBasePoint schBasePoint : schBasePointList) { for (SchBasePoint schBasePoint : schBasePointList) {
if (schBasePoint.getVehicle_qty() > 0) { if (schBasePoint.getVehicle_qty() > 0) {
log.info("涂板线补空架找到当前符合条件的点位{}",schBasePoint.getPoint_code()); log.info("涂板线补空架找到当前符合条件的点位{}",schBasePoint.getPoint_code());

Loading…
Cancel
Save