no message
This commit is contained in:
@@ -13,6 +13,7 @@ import org.checkerframework.checker.units.qual.K;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.utils.SecurityUtils;
|
||||
import org.nl.utils.SpringContextHolder;
|
||||
import org.nl.wms.WorkProcedureEnum;
|
||||
import org.nl.wms.common.KilnUtil;
|
||||
import org.nl.wms.common.PointUpdateUtil;
|
||||
@@ -22,7 +23,9 @@ import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||
import org.nl.wms.sch.manage.AreaEnum;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.sch.manage.buss.*;
|
||||
import org.nl.wms.sch.service.PointService;
|
||||
import org.nl.wms.sch.service.TaskService;
|
||||
import org.nl.wms.sch.service.dto.PointDto;
|
||||
import org.nl.wms.sch.service.dto.TaskDto;
|
||||
import org.nl.wms.sch.task.AcsTaskDto;
|
||||
import org.nl.wql.WQL;
|
||||
@@ -72,7 +75,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
case "1":
|
||||
jsonObject.put("start_point_code", device_code);
|
||||
jsonObject.put("create_mode", "01");
|
||||
jsonObject.put("group_id",group_id);
|
||||
jsonObject.put("group_id", group_id);
|
||||
|
||||
if (StrUtil.isEmpty(is_full)) {
|
||||
throw new BadRequestException("托盘是否满托不能为空!");
|
||||
@@ -182,7 +185,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
//需要更新覆膜机的托盘类型
|
||||
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", "05").addParam("flag", "4").process().getResultJSONArray(0);
|
||||
// PointUpdateUtil.updatePoint(pointarr);
|
||||
// PointUpdateUtil.updatePoint(pointarr);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(produceInfoByCode)) {
|
||||
throw new BadRequestException("未找到点位为'" + device_code + "'对应机械手的生产工单!");
|
||||
@@ -239,7 +242,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> manipulatorApply(Map jsonObject) {
|
||||
//如果是码垛机械手下料的地方不需要组盘,等到扫码器扫到的时候再组盘
|
||||
String device_code = (String) jsonObject.get("device_code");
|
||||
if (StrUtil.isEmpty(device_code)) {
|
||||
throw new BadRequestException("设备点位不能为空!");
|
||||
@@ -257,7 +259,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
JSONObject groubObj = new JSONObject();
|
||||
String group_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||
groubObj.put("group_id", group_id);
|
||||
groubObj.put("vehicle_code", vehicle_code);
|
||||
|
||||
groubObj.put("material_id", material_id);
|
||||
groubObj.put("material_code", materialObj.getString("material_code"));
|
||||
groubObj.put("material_name", materialObj.getString("material_name"));
|
||||
@@ -330,6 +332,17 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
is_autopackage = "0";
|
||||
}
|
||||
groubObj.put("is_autopackage", is_autopackage);
|
||||
//假如是分拣机械手,并且托盘为空,则托盘从点位上取
|
||||
if ((StrUtil.equals(device_code, "FJJXSXLW201") ||
|
||||
StrUtil.equals(device_code, "FJJXSXLW202") ||
|
||||
StrUtil.equals(device_code, "FJJXSXLW301") ||
|
||||
StrUtil.equals(device_code, "FJJXSXLW302")) && StrUtil.isEmpty(vehicle_code)
|
||||
) {
|
||||
PointService pointService = SpringContextHolder.getBean(PointService.class);
|
||||
PointDto startPoint = pointService.findByCode(device_code);
|
||||
vehicle_code = startPoint.getVehicle_code();
|
||||
}
|
||||
groubObj.put("vehicle_code", vehicle_code);
|
||||
WQLObject.getWQLObject("st_buss_vehiclegroup").insert(groubObj);
|
||||
jsonObject.put("type", "1");
|
||||
jsonObject.put("group_id", group_id);
|
||||
@@ -362,7 +375,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
String task_id = taskTable.query("task_code='" + task_code + "'").uniqueResult(0).getString("task_id");
|
||||
//将之前的托盘信息删除
|
||||
groupTable.delete("vehicle_code='"+vehicle_code+"' and task_id <>'"+task_id+"'");
|
||||
groupTable.delete("vehicle_code='" + vehicle_code + "' and task_id <>'" + task_id + "'");
|
||||
JSONObject groupObj = groupTable.query("task_id='" + task_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(groupObj)) {
|
||||
throw new BadRequestException("未找到指令为'" + task_id + "'的组盘信息!");
|
||||
|
||||
@@ -328,7 +328,7 @@ public class SendMaterialTask extends AbstractAcsTask {
|
||||
taskObj.put("is_delete", "0");
|
||||
taskTable.insert(taskObj);
|
||||
|
||||
// 如果是压制下料需要更新组盘信息,将task_id 更新
|
||||
// 如果是压料制下需要更新组盘信息,将task_id 更新
|
||||
JSONObject workInfo = WQL.getWO("QSTRUCT_RULE").addParam("flag", "1").addParam("code", start_point_code)
|
||||
.process().uniqueResult(0);
|
||||
if (StrUtil.equals(WorkProcedureEnum.YZGX.getCode(), workInfo.getString("workprocedure_code"))) {
|
||||
|
||||
@@ -172,7 +172,7 @@ public class TaskServiceImpl implements TaskService {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param map
|
||||
*/
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user