Merge remote-tracking branch 'origin/master_merge' into master_merge
This commit is contained in:
@@ -53,6 +53,13 @@ public class FeedingController {
|
||||
return new ResponseEntity<>(feedingService.handleConfirm(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/moveContainer")
|
||||
@Log("母卷转移")
|
||||
|
||||
public ResponseEntity<Object> moveContainer(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(feedingService.moveContainer(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/vehicleReturn")
|
||||
@Log("空轴送回")
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ public interface FeedingService {
|
||||
*/
|
||||
JSONObject handleConfirm(JSONObject whereJson);
|
||||
|
||||
JSONObject moveContainer(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 空轴送回
|
||||
*
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
||||
import org.nl.wms.pda.mps.service.FeedingService;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.sch.tasks.CallEmpReelTask;
|
||||
import org.nl.wms.sch.tasks.CoolCutTask;
|
||||
import org.nl.wms.sch.tasks.OutHotTask;
|
||||
import org.nl.wms.st.inbill.service.CheckOutBillService;
|
||||
@@ -305,7 +306,7 @@ public class FeedingServiceImpl implements FeedingService {
|
||||
}
|
||||
//创建AGV任务
|
||||
JSONObject jo = new JSONObject();
|
||||
if (StrUtil.equals("01", cut_jo.getString("empty_point_status"))) {
|
||||
if (StrUtil.equals("01", cut_jo.getString("empty_point_status")) || (StrUtil.isNotEmpty(cut_jo.getString("point_type")) && StrUtil.equals("1", cut_jo.getString("point_type")))) {
|
||||
jo.put("point_code1", cool_jo.getString("full_point_code"));
|
||||
jo.put("point_code2", cut_jo.getString("full_point_code"));
|
||||
jo.put("material_code", cool_jo.getString("container_name"));
|
||||
@@ -544,6 +545,42 @@ public class FeedingServiceImpl implements FeedingService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject moveContainer(JSONObject form) {
|
||||
String point_code = form.getString("point_code");
|
||||
String container_name = form.getString("container_name");
|
||||
JSONObject cool_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code + "'").uniqueResult(0);
|
||||
String reging_id = RegionTypeEnum.B1_HKZC.getId();
|
||||
JSONObject cache_map = new JSONObject();
|
||||
cache_map.put("flag", "4");
|
||||
cache_map.put("reging_id", reging_id);
|
||||
cache_map.put("point_location", cool_jo.getString("point_location"));
|
||||
//只找入箱点位(point_type : 4)
|
||||
cache_map.put("point_type", "4");
|
||||
|
||||
JSONObject point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(cache_map).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(point_code2_jo)) {
|
||||
// 找不到就找其他上下位置的
|
||||
cache_map.put("point_location", cool_jo.getString("point_location").equals("0") ? "1" : "0");
|
||||
point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(cache_map).process().uniqueResult(0);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(point_code2_jo)) {
|
||||
throw new BadRequestException("未查询到可用的点位类型为入箱的烘箱对接位!");
|
||||
}
|
||||
|
||||
// 起点和终点确定 生成任务
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1",point_code);
|
||||
param.put("point_code2", point_code2_jo.getString("point_code"));
|
||||
param.put("task_type", "010107");
|
||||
param.put("material_code", container_name);
|
||||
param.put("product_area", cool_jo.getString("product_area"));
|
||||
|
||||
CallEmpReelTask callEmpReelTask = SpringContextHolder.getBean(CallEmpReelTask.class);
|
||||
callEmpReelTask.createTask(param);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public JSONObject vehicleReturn(JSONObject form) {
|
||||
|
||||
@@ -244,7 +244,7 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
param.put("material_code", jsonRaw.getString("container_name"));
|
||||
param.put("product_area", jsonSb.getString("product_area"));
|
||||
|
||||
CallEmpReelTask callEmpReelTask = new CallEmpReelTask();
|
||||
CallEmpReelTask callEmpReelTask = SpringContextHolder.getBean(CallEmpReelTask.class);
|
||||
callEmpReelTask.createTask(param);
|
||||
} else {
|
||||
// 2.根据就近原则查对应空卷轴
|
||||
|
||||
@@ -181,11 +181,55 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
this.createTask(nextTaskParam);
|
||||
}
|
||||
} else {
|
||||
// 取空
|
||||
JSONObject jsonCoolIvt = ivtTab.query("empty_point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||
jsonCoolIvt.put("empty_point_status", "01");
|
||||
jsonCoolIvt.put("empty_vehicle_code", "");
|
||||
ivtTab.update(jsonCoolIvt);
|
||||
if (jsonTask.getString("task_type").equals("010107")) {
|
||||
JSONObject jsonIvt = ivtTab.query("full_point_code ='" + point_code1 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||
throw new BadRequestException("未找到可用点位:" + point_code1);
|
||||
}
|
||||
|
||||
// 更新冷却库存状态
|
||||
jsonIvt.put("full_point_status", "01");
|
||||
jsonIvt.put("full_vehicle_code", "");
|
||||
jsonIvt.put("container_name", "");
|
||||
ivtTab.update(jsonIvt);
|
||||
// 校验终点是否存在
|
||||
JSONObject jsonIvt2 = point_tab.query("point_code ='" + point_code2 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt2)) {
|
||||
throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
||||
}
|
||||
JSONObject cache_param = new JSONObject();
|
||||
cache_param.put("flag", "4");
|
||||
cache_param.put("point_location", jsonIvt.getString("point_location"));
|
||||
cache_param.put("product_area", jsonIvt.getString("product_area"));
|
||||
// 创建半条任务
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("task_id", IdUtil.getLongId());
|
||||
jo.put("task_code", IdUtil.getLongId());
|
||||
jo.put("task_type", "010206");
|
||||
jo.put("task_status", TaskStatusEnum.SURE_START.getCode());
|
||||
jo.put("point_code1", point_code2);
|
||||
jo.put("point_code2", "");
|
||||
jo.put("material_code", jsonTask.getString("material_code"));
|
||||
jo.put("product_area", jsonTask.getString("product_area"));
|
||||
jo.put("handle_class", InHotTask.class.getName());
|
||||
jo.put("remark", cache_param);
|
||||
jo.put("type", "3");
|
||||
jo.put("priority", "1");
|
||||
jo.put("sort_seq", "1");
|
||||
jo.put("create_time", DateUtil.now());
|
||||
jo.put("acs_task_type", "6");
|
||||
taskTab.insert(jo);
|
||||
// 更新点位库存状态
|
||||
jsonIvt2.put("point_status", "2");
|
||||
jsonIvt2.put("material_code", jsonTask.getString("material_code"));
|
||||
point_tab.update(jsonIvt2);
|
||||
}else {
|
||||
// 取空
|
||||
JSONObject jsonCoolIvt = ivtTab.query("empty_point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||
jsonCoolIvt.put("empty_point_status", "01");
|
||||
jsonCoolIvt.put("empty_vehicle_code", "");
|
||||
ivtTab.update(jsonCoolIvt);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -206,7 +250,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
// 校验终点是否存在
|
||||
JSONObject jsonIvt2 = point_tab.query("point_code ='" + point_code4 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt2)) {
|
||||
throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
||||
throw new BadRequestException("终点未找到可用点位:" + point_code4);
|
||||
}
|
||||
|
||||
/*//创建桁架任务将子卷搬运到桁架下的半成品缓存位
|
||||
|
||||
Reference in New Issue
Block a user