自测fix

This commit is contained in:
psh
2024-02-26 18:05:35 +08:00
parent ad55cf9f6a
commit 87e8219b96
4 changed files with 36 additions and 43 deletions

View File

@@ -53,6 +53,7 @@ public class PdaServiceImpl implements PdaService {
public PdaResponseVo yclrk(JSONObject param) {
param.put("request_medthod_code", "YCLRKTask");
param.put("request_medthod_name", "原材料入库");
param.put("device_code",param.getString("start_point"));
acsToWmsService.acsApply(param);
return PdaResponseVo.pdaResultOk("原材料入库成功");
}
@@ -60,6 +61,7 @@ public class PdaServiceImpl implements PdaService {
public PdaResponseVo yclck(JSONObject param) {
param.put("request_medthod_code", "YCLCKTask");
param.put("request_medthod_name", "原材料出库");
param.put("device_code",param.getString("start_point"));
acsToWmsService.acsApply(param);
return PdaResponseVo.pdaResultOk("原材料出库成功");
}

View File

@@ -94,6 +94,7 @@ public class YCLRKTask extends AbstractTask {
// 设置终点并修改创建成功状态
task.setPoint_code2(point.getPoint_code());
task.setTask_status(TaskStatus.CREATED.getCode());
task.setVehicle_code(jsonObject.getString("mother_tray"));
task.setRemark("");
taskService.update(task);
@@ -114,9 +115,9 @@ public class YCLRKTask extends AbstractTask {
*/
private SchBasePoint findNextPoint() {
String regionCode = "YL";
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode, "2");
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode, "0");
for (SchBasePoint schBasePoint : schBasePointList) {
if ("2".equals(schBasePoint.getPoint_status())
if ("0".equals(schBasePoint.getPoint_status())
&& schBasePoint.getVehicle_qty() ==0) {
log.info("原材料入库找到当前符合条件的点位{}", schBasePoint.getPoint_code());
return schBasePoint;
@@ -152,7 +153,7 @@ public class YCLRKTask extends AbstractTask {
: null;
}
String startPoint = taskObj.getPoint_code1(); // 获取起点
String endPoint = ObjectUtil.isNotEmpty(taskObj.getPoint_code2())?taskObj.getPoint_code2().substring(0,taskObj.getPoint_code2().length()-2):"0"; // 获取终点
String endPoint = taskObj.getPoint_code2(); // 获取终点
SchBasePoint startPointObj = pointService.getById(startPoint);
SchBasePoint endPointObj = pointService.getById(endPoint);
// 根据传来的类型去对任务进行操作