This commit is contained in:
2023-03-06 12:38:39 +08:00
parent 6d57e7cb66
commit d74b3c1ff4
8 changed files with 73 additions and 20 deletions

View File

@@ -55,4 +55,11 @@ public class FeedingController {
public ResponseEntity<Object> handleConfirm(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(feedingService.handleConfirm(whereJson), HttpStatus.OK);
}
@PostMapping("/vehicleReturn")
@Log("空轴送回")
@ApiOperation("空轴送回")
public ResponseEntity<Object> vehicleReturn(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(feedingService.vehicleReturn(whereJson), HttpStatus.OK);
}
}

View File

@@ -37,4 +37,12 @@ public interface FeedingService {
*/
JSONObject handleConfirm(JSONObject whereJson);
/**
* 空轴送回
*
* @param whereJson /
* @return JSONObject
*/
JSONObject vehicleReturn(JSONObject whereJson);
}

View File

@@ -333,4 +333,51 @@ public class FeedingServiceImpl implements FeedingService {
result.put("message", "操作成功!");
return jo;
}
@Transactional(rollbackFor = Exception.class)
@Override
public JSONObject vehicleReturn(JSONObject form) {
String point_code = form.getString("point_code");
if (StrUtil.isEmpty(point_code)) {
throw new BadRequestException("输入的点位不能为空!");
}
//查询对应的分切点位是否存在
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("empty_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(cut_jo)) {
throw new BadRequestException("请输入或者扫码分切区域的空轴点位!");
}
if (StrUtil.equals("01", cut_jo.getString("empty_point_status"))) {
throw new BadRequestException("该点位库存状态不存在空轴!");
}
// 2.找冷却区空货位
JSONObject map = new JSONObject();
map.put("flag", "2");
map.put("product_area", cut_jo.getString("product_area"));
map.put("point_location", "0");
JSONObject jsonCooIvt = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
// 如果为空
if (ObjectUtil.isEmpty(jsonCooIvt)) {
map.put("point_location", "1");
jsonCooIvt = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
}
if (ObjectUtil.isEmpty(jsonCooIvt)) {
throw new BadRequestException("冷却区空位不足");
}
// 3.创建任务
JSONObject param = new JSONObject();
param.put("point_code1", point_code);
param.put("point_code2", jsonCooIvt.getString("empty_point_code"));
param.put("product_area", cut_jo.getString("product_area"));
param.put("task_type", "010303");
AbstractAcsTask task = new CoolCutTask();
task.createTask(param);
JSONObject result = new JSONObject();
result.put("message", "操作成功!");
return result;
}
}

View File

@@ -63,6 +63,9 @@
OPTION 输入.point_type <> ""
point_type = 输入.point_type
ENDOPTION
OPTION 输入.point_type = "5"
IFNULL(material_code,'') = ''
ENDOPTION
order by point_code ASC

View File

@@ -166,7 +166,7 @@
der.STATUS
WHEN '01' THEN '开始'
WHEN '02' THEN '空轴搬出'
WHEN '03' THEN '确认下卷'
WHEN '03' THEN '准备就绪'
WHEN '04' THEN '下卷完成'
WHEN '09' THEN '结束'
END

View File

@@ -234,7 +234,7 @@ public class CoolCutTask extends AbstractAcsTask {
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo2);
//更新冷却区空轴库存
JSONObject jsonCoolIvt2 = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code2 + "'").uniqueResult(0);
JSONObject jsonCoolIvt2 = WQLObject.getWQLObject("st_ivt_coolpointivt").query("empty_point_code = '" + point_code2 + "'").uniqueResult(0);
jsonCoolIvt2.put("empty_point_status", "02");
jsonCoolIvt2.put("empty_vehicle_code", jsonTask.getString("vehicle_code"));
jsonCoolIvt2.put("cool_ivt_status", "01");