Browse Source

fix: 手持货架清空问题,组盘位置改为分情况不同位置

master
李永德 1 year ago
parent
commit
4fd372c46c
  1. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java
  2. 25
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  3. 8
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java
  4. 8
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java
  5. 30
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/dtk/CTQKTask.java
  6. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/dtk/DTSKTask.java
  7. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/dtk/mapper/DTKMapper.java
  8. 28
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java
  9. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQZRKTask.java
  10. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJRKTask.java
  11. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJSKTask.java
  12. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJSLTask.java
  13. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java
  14. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/CYZCTask.java
  15. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZSLTask.java

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java

@ -41,6 +41,6 @@ public class LogMessageConstant {
/** 背景颜色:黄色 */ /** 背景颜色:黄色 */
public final static String BACKGROUND_YELLOW = "\u001B[43m"; public final static String BACKGROUND_YELLOW = "\u001B[43m";
/** 索引路径 */ /** 索引路径 */
public final static String INDEX_DIR = "E:\\lucene\\index"; public final static String INDEX_DIR = "D:\\lucene\\index";
} }

25
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -595,23 +595,20 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} }
// 泥料 // 泥料
// todo: 暂时写死 // todo: 暂时写死
// String rawMaterialCode = productionTask.getRaw_material_code(); String rawMaterialCode = productionTask.getRaw_material_code();
String rawMaterialCode = one.getRedundance_material_code(); // String rawMaterialCode = one.getRedundance_material_code();
if (!rawMaterialCode.equals(one.getRedundance_material_code())) { if (!rawMaterialCode.equals(one.getRedundance_material_code())) {
throw new BadRequestException("物料不一样!"); throw new BadRequestException("物料不一样!");
} }
if (ObjectUtil.isNotEmpty(basePoint)) {
// 记录当前位置
one.setPoint_code(basePoint.getPoint_code()); // 当前位置
one.setPoint_name(basePoint.getPoint_name());
one.setMove_way(one.getMove_way() + " -> " + basePoint.getPoint_code());
}
// 判断是否静置完成 // 判断是否静置完成
if (CommonUtils.isStandingFinish(one.getInstorage_time(), one.getStanding_time())) { if (CommonUtils.isStandingFinish(one.getInstorage_time(), one.getStanding_time())) {
if (ObjectUtil.isNotEmpty(basePoint)) {
// 记录当前位置
one.setPoint_code(basePoint.getPoint_code()); // 当前位置
one.setPoint_name(basePoint.getPoint_name());
one.setMove_way(one.getMove_way() + " -> " + basePoint.getPoint_code());
}
one.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue()); one.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue());
TaskUtils.setGroupUpdateByAcs(one);
vehiclematerialgroupService.updateById(one);
// 记录泥料 // 记录泥料
MesMudConsumptionDto mesMudConsumptionDto = new MesMudConsumptionDto(); MesMudConsumptionDto mesMudConsumptionDto = new MesMudConsumptionDto();
mesMudConsumptionDto.setMSGID(IdUtil.getSnowflake(1, 1).nextIdStr()); mesMudConsumptionDto.setMSGID(IdUtil.getSnowflake(1, 1).nextIdStr());
@ -641,14 +638,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
taskResponse.setIs_standing_finish(GeneralDefinition.YES); taskResponse.setIs_standing_finish(GeneralDefinition.YES);
taskResponse.setMessage("静置完成"); taskResponse.setMessage("静置完成");
taskResponse.setWeight(one.getMaterial_weight().toString()); taskResponse.setWeight(one.getMaterial_weight().toString());
return taskResponse;
} else { } else {
taskResponse.setIs_standing_finish(GeneralDefinition.NO); taskResponse.setIs_standing_finish(GeneralDefinition.NO);
// taskResponse.setMessage("静置未完成,预计静置完成时间:");
taskResponse.setMessage(CommonUtils.remainStandingFinishTime(one.getInstorage_time(), taskResponse.setMessage(CommonUtils.remainStandingFinishTime(one.getInstorage_time(),
one.getStanding_time())); one.getStanding_time()));
return taskResponse;
} }
TaskUtils.setGroupUpdateByAcs(one);
vehiclematerialgroupService.updateById(one);
return taskResponse;
} }
/** /**

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

@ -364,9 +364,11 @@ public class PdaServiceImpl implements PdaService {
if (ObjectUtil.isNotEmpty(basePoint.getVehicle_code())) { if (ObjectUtil.isNotEmpty(basePoint.getVehicle_code())) {
SchBaseVehiclematerialgroup groupInfo = vehiclematerialgroupService.getGroupInfo(basePoint.getVehicle_code(), SchBaseVehiclematerialgroup groupInfo = vehiclematerialgroupService.getGroupInfo(basePoint.getVehicle_code(),
GeneralDefinition.STEEL_TRAY, GroupBindMaterialStatusEnum.BOUND.getValue()); GeneralDefinition.STEEL_TRAY, GroupBindMaterialStatusEnum.BOUND.getValue());
TaskUtils.setGroupUpdateByPC(groupInfo); if (ObjectUtil.isNotEmpty(groupInfo)) {
groupInfo.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue()); TaskUtils.setGroupUpdateByPC(groupInfo);
vehiclematerialgroupService.updateById(groupInfo); groupInfo.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue());
vehiclematerialgroupService.updateById(groupInfo);
}
} }
// 空位 // 空位
PointUtils.clearPoint(basePoint); PointUtils.clearPoint(basePoint);

8
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java

@ -294,14 +294,14 @@ public abstract class AbstractTask {
task.setWorkshop_code(taskConfig.getWorkshop_code()); // 车间编码 task.setWorkshop_code(taskConfig.getWorkshop_code()); // 车间编码
// 设置起/终点 // 设置起/终点
this.setTaskPoint(taskConfig, task, apply_point_code); this.setTaskPoint(taskConfig, task, apply_point_code);
// 设置组盘 - 需要的话由子类自行实现
task.setGroup_id(this.setGroupPlate(param));
task.setRequest_param(JSONObject.toJSONString(param)); task.setRequest_param(JSONObject.toJSONString(param));
TaskUtils.setCreateByAcsOrPda(task, param); // 设置创建人信息 TaskUtils.setCreateByAcsOrPda(task, param); // 设置创建人信息
// 3、判断是否直接找点下发 // 3、判断是否直接找点下发
if (taskConfig.getIs_immediate_create()) { if (taskConfig.getIs_immediate_create()) { // 立即创建吧组盘放到具体位置,免得重复创建
this.createCompletion(task); this.createCompletion(task);
} else { } else { // 不需要立即创建,需要立马组盘
// 设置组盘 - 需要的话由子类自行实现
task.setGroup_id(this.setGroupPlate(param));
taskService.save(task); // 创建一条单点任务。 taskService.save(task); // 创建一条单点任务。
this.create(); this.create();
} }

30
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/dtk/CTQKTask.java

@ -58,14 +58,16 @@ public class CTQKTask extends AbstractTask {
.eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE)); .eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE));
for (SchBaseTask task : tasks) { for (SchBaseTask task : tasks) {
TaskUtils.setUpdateByAcs(task); // 修改修改者 TaskUtils.setUpdateByAcs(task); // 修改修改者
List<String> startRegionStr = Arrays.stream(taskConfig.getStart_region_str().split(",")).collect(Collectors.toList()); List<String> startRegionStr = Arrays.stream(taskConfig.getStart_region_str().split(","))
.collect(Collectors.toList());
// 找起点 // 找起点
SchBasePoint point = findStartPoint(startRegionStr); SchBasePoint point = findStartPoint(startRegionStr);
if (ObjectUtil.isEmpty(point)) { if (ObjectUtil.isEmpty(point)) {
task.setRemark("暂无托盘!"); task.setRemark("暂无托盘!");
taskService.updateById(task); taskService.updateById(task);
// 消息通知 // 消息通知
noticeService.createNotice(task.getRemark(), TASK_CONFIG_CODE + task.getTask_code(), NoticeTypeEnum.WARN.getCode()); noticeService.createNotice(task.getRemark(), TASK_CONFIG_CODE + task.getPoint_code2(),
NoticeTypeEnum.WARN.getCode());
continue; continue;
} }
// 设置终点并修改创建成功状态 // 设置终点并修改创建成功状态
@ -74,14 +76,11 @@ public class CTQKTask extends AbstractTask {
task.setVehicle_qty(point.getVehicle_qty()); task.setVehicle_qty(point.getVehicle_qty());
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());
taskService.updateById(task); taskService.updateById(task);
// 点位信息更新
point.setIng_task_code(task.getTask_code()); point.setIng_task_code(task.getTask_code());
pointService.update(point); pointService.update(point);
PointUtils.setUpdateByAcs(point); PointUtils.setUpdateByAcs(point);
pointService.updateById(point); pointService.updateById(point);
//下发
//this.renotifyAcs(task);
} }
} }
@ -91,8 +90,9 @@ public class CTQKTask extends AbstractTask {
// 配置信息 // 配置信息
SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper<SchBaseTaskconfig>() SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper<SchBaseTaskconfig>()
.eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE)); .eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE));
TaskUtils.setUpdateByAcs(task); // 修改修改者 TaskUtils.setUpdateByAcs(task);
List<String> startRegionStr = Arrays.stream(taskConfig.getStart_region_str().split(",")).collect(Collectors.toList()); List<String> startRegionStr = Arrays.stream(taskConfig.getStart_region_str().split(","))
.collect(Collectors.toList());
// 找起点 // 找起点
SchBasePoint point = findStartPoint(startRegionStr); SchBasePoint point = findStartPoint(startRegionStr);
if (ObjectUtil.isEmpty(point)) { if (ObjectUtil.isEmpty(point)) {
@ -107,7 +107,7 @@ public class CTQKTask extends AbstractTask {
task.setVehicle_qty(point.getVehicle_qty()); task.setVehicle_qty(point.getVehicle_qty());
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());
taskService.save(task); taskService.save(task);
// 点位更新
point.setIng_task_code(task.getTask_code()); point.setIng_task_code(task.getTask_code());
pointService.update(point); pointService.update(point);
PointUtils.setUpdateByAcs(point); PointUtils.setUpdateByAcs(point);
@ -135,7 +135,6 @@ public class CTQKTask extends AbstractTask {
if (taskObj.getTask_status().equals(TaskStatus.CANCELED.getCode())) { if (taskObj.getTask_status().equals(TaskStatus.CANCELED.getCode())) {
throw new BadRequestException("该任务已取消!"); throw new BadRequestException("该任务已取消!");
} }
// 根据传来的类型去对任务进行操作 // 根据传来的类型去对任务进行操作
if (status.equals(TaskStatus.EXECUTING)) { // 执行中 if (status.equals(TaskStatus.EXECUTING)) { // 执行中
taskObj.setTask_status(TaskStatus.EXECUTING.getCode()); taskObj.setTask_status(TaskStatus.EXECUTING.getCode());
@ -168,12 +167,11 @@ public class CTQKTask extends AbstractTask {
} }
this.cancelTask(taskObj, TaskFinishedTypeEnum.MANUAL_PC); this.cancelTask(taskObj, TaskFinishedTypeEnum.MANUAL_PC);
} }
public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) { public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
// 获取参数 // 获取参数
String startPoint = taskObj.getPoint_code1(); // 获取起点 SchBasePoint startPointObj = pointService.getById(taskObj.getPoint_code1());
String endPoint = taskObj.getPoint_code2(); // 获取起点 SchBasePoint endPointObj = pointService.getById(taskObj.getPoint_code2());
SchBasePoint startPointObj = pointService.getById(startPoint);
SchBasePoint endPointObj = pointService.getById(endPoint);
// 起点清空 // 起点清空
if (ObjectUtil.isNotEmpty(startPointObj)) { if (ObjectUtil.isNotEmpty(startPointObj)) {
PointUtils.setUpdateByType(startPointObj, taskFinishedType); PointUtils.setUpdateByType(startPointObj, taskFinishedType);
@ -193,10 +191,10 @@ public class CTQKTask extends AbstractTask {
TaskUtils.setUpdateByType(taskObj, taskFinishedType); TaskUtils.setUpdateByType(taskObj, taskFinishedType);
taskService.updateById(taskObj); taskService.updateById(taskObj);
} }
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) { public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
// 获取参数 // 获取参数
String startPoint = taskObj.getPoint_code1(); // 获取起点 SchBasePoint startPointObj = pointService.getById(taskObj.getPoint_code1());
SchBasePoint startPointObj = pointService.getById(startPoint);
// 起点解锁 // 起点解锁
if (ObjectUtil.isNotEmpty(startPointObj)) { if (ObjectUtil.isNotEmpty(startPointObj)) {
startPointObj.setIng_task_code(""); startPointObj.setIng_task_code("");

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

@ -48,7 +48,6 @@ public class DTSKTask extends AbstractTask {
@Autowired @Autowired
private DTKMapper dtkMapper; private DTKMapper dtkMapper;
@Override @Override
protected void create() throws BadRequestException { protected void create() throws BadRequestException {
// 获取任务 // 获取任务
@ -66,7 +65,7 @@ public class DTSKTask extends AbstractTask {
task.setRemark("未找到所需点位!"); task.setRemark("未找到所需点位!");
taskService.updateById(task); taskService.updateById(task);
// 消息通知 // 消息通知
noticeService.createNotice(task.getRemark(), TASK_CONFIG_CODE + task.getTask_code(), noticeService.createNotice(task.getRemark(), TASK_CONFIG_CODE + task.getPoint_code1(),
NoticeTypeEnum.WARN.getCode()); NoticeTypeEnum.WARN.getCode());
continue; continue;
} }
@ -80,9 +79,6 @@ public class DTSKTask extends AbstractTask {
point.setIng_task_code(task.getTask_code()); point.setIng_task_code(task.getTask_code());
PointUtils.setUpdateByAcs(point); PointUtils.setUpdateByAcs(point);
pointService.updateById(point); pointService.updateById(point);
//下发
//this.renotifyAcs(task);
} }
} }

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

@ -11,5 +11,11 @@ import java.util.List;
*/ */
public interface DTKMapper { public interface DTKMapper {
List<SchBasePoint> findPointForDTSK(List<String> regionCode); List<SchBasePoint> findPointForDTSK(List<String> regionCode);
/**
* 拆盘机找空盘
* @param regionCode
* @return
*/
List<SchBasePoint> findPointForCTQK(List<String> regionCode); List<SchBasePoint> findPointForCTQK(List<String> regionCode);
} }

28
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java

@ -101,23 +101,8 @@ public class FJMKTask extends AbstractTask {
continue; continue;
} }
task.setPoint_code2(packagePoint.getPoint_code()); // 包装线 task.setPoint_code2(packagePoint.getPoint_code()); // 包装线
List<ApplyDeviceDto> list = JSONArray.parseArray(jsonObject.getString("list"), ApplyDeviceDto.class);
// 1 获取点位相应数量
int sum = 0;
for (ApplyDeviceDto applyDeviceDto : list) {
sum += Integer.parseInt(applyDeviceDto.getQty());
}
// 2 获取剩余量 surplusNumber
int surplusNumber = fjMapper.getInventoryQuantity(workorder.getMaterial_id());
// 3 现有总数 total
int total = sum + surplusNumber;
// 4 获取木托盘需要多少块 needFullNumber
String needFullNumberStr = fjMapper.getNeedFullNumber(workorder.getMaterial_id());
int needFullNumber = TaskUtils.convertMultiply(needFullNumberStr);
// 大于两托正常,大于1托给1,小于1托给2
// 5 校验是否够码满一托/两托
// 大于等于2就可以码 // 大于等于2就可以码
if (total / needFullNumber >= 2) { if (jsonObject.getInteger("special_param") == 0) {
/** 覆膜机木托盘位 */ /** 覆膜机木托盘位 */
SchBasePoint LaminatePoint = findStartPoint(startRegionStr, jsonObject); SchBasePoint LaminatePoint = findStartPoint(startRegionStr, jsonObject);
if (ObjectUtil.isEmpty(LaminatePoint)) { if (ObjectUtil.isEmpty(LaminatePoint)) {
@ -133,7 +118,6 @@ public class FJMKTask extends AbstractTask {
response = JSON.parseObject(responseParam); response = JSON.parseObject(responseParam);
} }
response.put("fmj_device", LaminatePoint.getPoint_code()); response.put("fmj_device", LaminatePoint.getPoint_code());
// 生产木托盘编码
// 设置终点并修改创建成功状态 // 设置终点并修改创建成功状态
task.setPoint_code3(LaminatePoint.getParent_point_code()); task.setPoint_code3(LaminatePoint.getParent_point_code());
task.setPoint_code4(startPoint); task.setPoint_code4(startPoint);
@ -165,12 +149,12 @@ public class FJMKTask extends AbstractTask {
.collect(Collectors.toList()); .collect(Collectors.toList());
List<String> startRegionStr = Arrays.stream(taskConfig.getStart_region_str().split(",")) List<String> startRegionStr = Arrays.stream(taskConfig.getStart_region_str().split(","))
.collect(Collectors.toList()); .collect(Collectors.toList());
String requestParam = task.getRequest_param();// 任务的其他数据 JSONObject jsonObject = JSONObject.parseObject(task.getRequest_param());
JSONObject jsonObject = JSONObject.parseObject(requestParam);
String startPoint = task.getPoint_code1(); String startPoint = task.getPoint_code1();
// 获取起点 回写载具编码 // 获取起点 回写载具编码
SchBasePoint startPointObj = pointService.getById(startPoint); SchBasePoint startPointObj = pointService.getById(startPoint);
task.setVehicle_code(startPointObj.getVehicle_code()); // 起点的木托盘编码 // 起点的木托盘编码
task.setVehicle_code(startPointObj.getVehicle_code());
// 找终点 // 找终点
/** 包装位 */ /** 包装位 */
SchBasePoint packagePoint = findNextPoint(nextRegionStr, jsonObject); SchBasePoint packagePoint = findNextPoint(nextRegionStr, jsonObject);
@ -180,7 +164,9 @@ public class FJMKTask extends AbstractTask {
NoticeTypeEnum.WARN.getCode()); NoticeTypeEnum.WARN.getCode());
throw new BadRequestException("包装线不可用!"); throw new BadRequestException("包装线不可用!");
} }
task.setPoint_code2(packagePoint.getPoint_code()); // 包装线 // 设置组盘 - 需要的话由子类自行实现
task.setGroup_id(setGroupPlate(jsonObject));
task.setPoint_code2(packagePoint.getPoint_code());
// 大于等于2就可以码 // 大于等于2就可以码
if (jsonObject.getInteger("special_param") == 0) { if (jsonObject.getInteger("special_param") == 0) {
/** 覆膜机木托盘位 */ /** 覆膜机木托盘位 */

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQZRKTask.java

@ -106,6 +106,10 @@ public class FJQZRKTask extends AbstractTask {
NoticeTypeEnum.WARN.getCode()); NoticeTypeEnum.WARN.getCode());
throw new BadRequestException("找不到可用的包装位!"); throw new BadRequestException("找不到可用的包装位!");
} }
String requestParam = task.getRequest_param();
JSONObject jsonObject = JSONObject.parseObject(requestParam);
// 设置组盘 - 需要的话由子类自行实现
task.setGroup_id(setGroupPlate(jsonObject));
// 设置终点并修改创建成功状态 // 设置终点并修改创建成功状态
task.setPoint_code2(point.getPoint_code()); task.setPoint_code2(point.getPoint_code());
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJRKTask.java

@ -153,6 +153,8 @@ public class FJRKTask extends AbstractTask {
PointUtils.setUpdateByAcs(basePoint); PointUtils.setUpdateByAcs(basePoint);
pointService.updateById(basePoint); pointService.updateById(basePoint);
} }
// 设置组盘 - 需要的话由子类自行实现
task.setGroup_id(setGroupPlate(jsonObject));
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());
task.setRemark(""); task.setRemark("");
taskService.save(task); taskService.save(task);

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJSKTask.java

@ -110,6 +110,10 @@ public class FJSKTask extends AbstractTask {
NoticeTypeEnum.WARN.getCode()); NoticeTypeEnum.WARN.getCode());
throw new BadRequestException("叠盘架位置不可用!"); throw new BadRequestException("叠盘架位置不可用!");
} }
String requestParam = task.getRequest_param();
JSONObject jsonObject = JSONObject.parseObject(requestParam);
// 设置组盘 - 需要的话由子类自行实现
task.setGroup_id(setGroupPlate(jsonObject));
// 设置终点并修改创建成功状态 // 设置终点并修改创建成功状态
task.setPoint_code2(point.getPoint_code()); task.setPoint_code2(point.getPoint_code());
task.setVehicle_type(GeneralDefinition.STEEL_TRAY); task.setVehicle_type(GeneralDefinition.STEEL_TRAY);

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJSLTask.java

@ -113,6 +113,8 @@ public class FJSLTask extends AbstractTask {
NoticeTypeEnum.WARN.getCode()); NoticeTypeEnum.WARN.getCode());
throw new BadRequestException("分拣机械手[" + task.getPoint_code1() + "]未找到所需点位!"); throw new BadRequestException("分拣机械手[" + task.getPoint_code1() + "]未找到所需点位!");
} }
// 设置组盘 - 需要的话由子类自行实现
task.setGroup_id(setGroupPlate(jsonObject));
// 设置终点并修改创建成功状态 // 设置终点并修改创建成功状态
task.setPoint_code2(point.getPoint_code()); task.setPoint_code2(point.getPoint_code());
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java

@ -194,6 +194,7 @@ public class HNMLTask extends AbstractTask {
// *: 混碾无工单 // *: 混碾无工单
String materialCode = requestParam.getString("material_code"); // 混碾编码 String materialCode = requestParam.getString("material_code"); // 混碾编码
Assert.notNull(materialCode, "物料编码不能为空!"); Assert.notNull(materialCode, "物料编码不能为空!");
materialCode = materialCode.substring(0, 12);
// 根据工单物料标识寻找点位 // 根据工单物料标识寻找点位
List<SchBasePoint> points = hnMapper.findPointForHNMLAndWorkOrder(nextRegionStr, materialCode); List<SchBasePoint> points = hnMapper.findPointForHNMLAndWorkOrder(nextRegionStr, materialCode);
return ObjectUtil.isNotEmpty(points) ? points.get(0) : null; return ObjectUtil.isNotEmpty(points) ? points.get(0) : null;

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/CYZCTask.java

@ -110,7 +110,7 @@ public class CYZCTask extends AbstractTask {
.eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE)); .eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE));
List<String> nextRegionStr = Arrays.stream(taskConfig.getNext_region_str().split(",")).collect(Collectors.toList()); List<String> nextRegionStr = Arrays.stream(taskConfig.getNext_region_str().split(",")).collect(Collectors.toList());
// 找终点 // 找终点
String extGroupData = task.getExt_group_data(); String extGroupData = task.getRequest_param();
JSONObject jsonObject = JSONObject.parseObject(extGroupData); JSONObject jsonObject = JSONObject.parseObject(extGroupData);
SchBasePoint point = findNextPoint(nextRegionStr, jsonObject); SchBasePoint point = findNextPoint(nextRegionStr, jsonObject);
if (ObjectUtil.isEmpty(point)) { if (ObjectUtil.isEmpty(point)) {
@ -119,6 +119,8 @@ public class CYZCTask extends AbstractTask {
NoticeTypeEnum.WARN.getCode()); NoticeTypeEnum.WARN.getCode());
throw new BadRequestException("未找到钢托盘缓存区域空位!"); throw new BadRequestException("未找到钢托盘缓存区域空位!");
} }
// 设置组盘 - 需要的话由子类自行实现
task.setGroup_id(setGroupPlate(jsonObject));
// 设置终点并修改创建成功状态 // 设置终点并修改创建成功状态
task.setVehicle_type(GeneralDefinition.STEEL_TRAY); task.setVehicle_type(GeneralDefinition.STEEL_TRAY);
task.setPoint_code2(point.getPoint_code()); task.setPoint_code2(point.getPoint_code());

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZSLTask.java

@ -131,6 +131,8 @@ public class YZSLTask extends AbstractTask {
NoticeTypeEnum.WARN.getCode()); NoticeTypeEnum.WARN.getCode());
throw new BadRequestException("压机[" + task.getPoint_code1() + "]未找到所需点位!"); throw new BadRequestException("压机[" + task.getPoint_code1() + "]未找到所需点位!");
} }
// 设置组盘 - 需要的话由子类自行实现
task.setGroup_id(setGroupPlate(jsonObject));
// 设置终点并修改创建成功状态 // 设置终点并修改创建成功状态
task.setPoint_code2(point.getPoint_code()); task.setPoint_code2(point.getPoint_code());
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());

Loading…
Cancel
Save