固化室按照最新逻辑调整
This commit is contained in:
@@ -199,14 +199,25 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
case 3:
|
||||
//设备反馈故障
|
||||
try {
|
||||
DasDeviceFault dasDeviceFault = new DasDeviceFault();
|
||||
String now = DateUtil.now();
|
||||
dasDeviceFault.setDevice_code(device_code);
|
||||
dasDeviceFault.setRegion_code(pointService.getById(device_code).getRegion_code());
|
||||
dasDeviceFault.setData_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
dasDeviceFault.setFailure_time(now);
|
||||
dasDeviceFault.setFailure_info(state);
|
||||
cockpitMapper.insertDeviceFault(dasDeviceFault);
|
||||
SchBasePoint schBasePoint=pointService.getById(device_code);
|
||||
if(ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||
if ("0".equals(state)) {
|
||||
schBasePoint.setIs_used(true);
|
||||
pointService.update(schBasePoint);
|
||||
} else {
|
||||
DasDeviceFault dasDeviceFault = new DasDeviceFault();
|
||||
String now = DateUtil.now();
|
||||
dasDeviceFault.setDevice_code(device_code);
|
||||
dasDeviceFault.setRegion_code(pointService.getById(device_code).getRegion_code());
|
||||
dasDeviceFault.setData_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
dasDeviceFault.setFailure_time(now);
|
||||
dasDeviceFault.setFailure_info(state+"故障");
|
||||
cockpitMapper.insertDeviceFault(dasDeviceFault);
|
||||
schBasePoint.setIs_used(false);
|
||||
pointService.update(schBasePoint);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception exception) {
|
||||
throw new BadRequestException(exception.toString());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.sch.point.service.task;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@@ -43,7 +44,7 @@ public class SyncPoint {
|
||||
log.info("自动线程开始查询天眼点位状态");
|
||||
String url = "http://10.44.101.61:9001/api/getStatus?binNo=ALL";
|
||||
log.info("下发天眼查询点位状态请求:{}", url);
|
||||
HttpResponse result = HttpRequest.post(url)
|
||||
HttpResponse result = HttpRequest.get(url)
|
||||
.body(String.valueOf(new JSONObject()))//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute();
|
||||
@@ -70,11 +71,13 @@ public class SyncPoint {
|
||||
temp.getVehicle_code(),
|
||||
temp.getVehicle_type(),
|
||||
GroupBindMaterialStatusEnum.BOUND.getValue());
|
||||
groupInfo.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue());
|
||||
vehiclematerialgroupService.update(groupInfo);
|
||||
// 插入生产过程跟踪表
|
||||
PdmBdProductionProcessTracking processTracking = new PdmBdProductionProcessTracking();
|
||||
processTracking.setBuss_move_id(groupInfo.getBuss_move_id());
|
||||
if (ObjectUtil.isNotEmpty(groupInfo)) {
|
||||
groupInfo.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue());
|
||||
vehiclematerialgroupService.update(groupInfo);
|
||||
processTracking.setBuss_move_id(groupInfo.getBuss_move_id());
|
||||
}
|
||||
processTracking.setProcess_action("暂存区人工出库");
|
||||
processTracking.setProcess_location(temp.getPoint_code());
|
||||
processTracking.setRecord_time(DateUtil.now());
|
||||
|
||||
@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.system.service.notice.ISysNoticeService;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
|
||||
import org.nl.wms.pdm.track.service.IPdmBdProductionProcessTrackingService;
|
||||
import org.nl.wms.pdm.track.service.dao.PdmBdProductionProcessTracking;
|
||||
@@ -63,6 +64,8 @@ public class GHCQLTask extends AbstractTask {
|
||||
private ISchBaseVehiclematerialgroupService vehiclematerialgroupService;
|
||||
@Autowired
|
||||
private IPdmBdProductionProcessTrackingService processTrackingService;
|
||||
@Autowired
|
||||
private WmsToAcsService wmsToAcsService;
|
||||
|
||||
@Override
|
||||
protected void create() throws BadRequestException {
|
||||
@@ -101,11 +104,16 @@ public class GHCQLTask extends AbstractTask {
|
||||
SchBasePoint point = findStartPoint(startRegionStr, extGroupData);
|
||||
if (ObjectUtil.isEmpty(point)) {
|
||||
// 消息通知
|
||||
noticeService.createNotice("固化室没有所需物料,将该固化室改为无货状态!", TASK_CONFIG_CODE + task.getPoint_code2(),
|
||||
noticeService.createNotice("固化室没有所需物料,将该固化室改为允许进料状态!", TASK_CONFIG_CODE + task.getPoint_code2(),
|
||||
NoticeTypeEnum.WARN.getCode());
|
||||
SchBasePoint schBasePoint=pointService.getById(task.getPoint_code2().substring(0, task.getPoint_code2().length() - 1));
|
||||
schBasePoint.setPoint_status(PointStatusEnum.EMPTY_POINT.getCode());
|
||||
schBasePoint.setPoint_status(PointStatusEnum.MATERIAL_IN.getCode());
|
||||
pointService.update(schBasePoint);
|
||||
//通知acs极板已出完
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("device_code", schBasePoint);
|
||||
jsonObject.put("type", 3);
|
||||
wmsToAcsService.notifyAcs(jsonObject);
|
||||
return;
|
||||
}
|
||||
// 设置起点并修改创建成功状态
|
||||
|
||||
@@ -388,7 +388,6 @@ public class TBXMLTask extends AbstractTask {
|
||||
}
|
||||
|
||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||
// todo: 最后一个位置完成放货需要请求固化,将设备设置为固化状
|
||||
// 获取参数
|
||||
String endPoint = taskObj.getPoint_code2();
|
||||
SchBasePoint endPointObj = pointService.getById(endPoint);
|
||||
|
||||
Reference in New Issue
Block a user