rev: 新增输送线入库立库的载具划分位置

This commit is contained in:
2023-08-14 10:13:23 +08:00
parent f19948e7ee
commit 8d01750f8f
5 changed files with 30 additions and 9 deletions

View File

@@ -1,6 +1,23 @@
package org.nl.wms.autotask;/**
* @Author: lyd
* @Description:
* @Date: 2023/8/2
*/public class MaterialSynchronization {
package org.nl.wms.autotask;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.wql.util.SpringContextHolder;
import org.nl.wms.basedata.service.impl.MaterialbaseServiceImpl;
import org.springframework.stereotype.Component;
/**
* @Author: lyd
* @Description: 自定义同步物料
* @Date: 2023/8/2
*/
@Slf4j
@Component
@RequiredArgsConstructor
public class MaterialSynchronization {
public void run(){
log.info("定时任务 - 同步物料");
MaterialbaseServiceImpl bean = SpringContextHolder.getBean(MaterialbaseServiceImpl.class);
bean.synchronize(null);
}
}

View File

@@ -337,6 +337,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
CpSendMaterialTask taskBean = SpringContextHolder.getBean(CpSendMaterialTask.class);
String task_id = taskBean.createTask(param);
}
return null;
JSONObject res = new JSONObject();
res.put("status", 200);
return res;
}
}

View File

@@ -52,7 +52,7 @@ public class SSXSendMaterialServiceImpl implements SSXSendMaterialService {
throw new BadRequestException("物料不能为空");
}
// 执行创建任务并下发给acs: 1001 -> 1004
param.put("point_code", "BZSSX1001");
param.put("point_code", "BZX1001");
param.put("material_id", materialId);
param.put("vehicle_type", vehicle_type);
param.put("qty", qty);

View File

@@ -116,6 +116,7 @@ public class BZXSendMaterialTask extends AbstractAcsTask {
// 1.3选择第一位
startPointCode = startPointCode + "01";
} else {
// 1.6、1.9
startPointCode = startPointCode + "02";
}
//判断当前点是否有未完成的任务
@@ -156,7 +157,8 @@ public class BZXSendMaterialTask extends AbstractAcsTask {
for (int i = 0; i < taskArr.size(); i++) {
JSONObject taskObj = taskArr.getJSONObject(i);
JSONObject pointObj = pointTab.query("region_code = 'CPQYA01' AND is_delete = '0' " +
"AND is_used = '1' AND lock_type = '1' AND point_status = '1'").uniqueResult(0);
"AND is_used = '1' AND lock_type = '1' AND point_status = '1' AND can_vehicle_type LIKE '%" +
taskObj.getString("vehicle_type") + "%'").uniqueResult(0);
if (ObjectUtil.isEmpty(pointObj)) {
taskObj.put("remark", "暂无可用的点位!");
taskObj.put("update_time", DateUtil.now());

View File

@@ -158,7 +158,7 @@ public class BzssxSendMaterialTask extends AbstractAcsTask {
for (int i = 0; i < taskArr.size(); i++) {
JSONObject taskObj = taskArr.getJSONObject(i);
// 找BZSSX04, 先查看是否锁住
JSONObject point = pointTab.query("point_code = 'BZSSX1005' AND lock_type = '1' AND is_used = '1' AND is_delete = '0'").uniqueResult(0);
JSONObject point = pointTab.query("point_code = 'BZX1005' AND lock_type = '1' AND is_used = '1' AND is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isEmpty(point)) {
taskObj.put("remark", "暂无可用的点位!");
taskObj.put("update_time", DateUtil.now());