fix:木箱出库时存在移库任务将出库锁释放

This commit is contained in:
zhangzq
2025-03-11 19:46:48 +08:00
parent a80c561cdd
commit 52e9cadce9
5 changed files with 19 additions and 6 deletions

View File

@@ -98,10 +98,17 @@ public class TwoMoveBoxTask extends AbstractAcsTask {
JSONObject jsonAttrStar = attrTab.query("struct_code = '" + taskObj.getString("point_code1") + "'").uniqueResult(0);
jsonAttrStar.put("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"));
jsonAttrStar.put("storagevehicle_code","");
attrTab.update(jsonAttrStar);
// 更新终点
JSONObject jsonAttrEnd = attrTab.query("struct_code = '" + taskObj.getString("point_code2") + "'").uniqueResult(0);
//如果是木箱出库锁的话:移库锁保持
attrTab.update(jsonAttrStar);
if (IOSEnum.LOCK_TYPE.code("木箱出库锁").equals(jsonAttrStar.getString("lock_type"))){
jsonAttrEnd.put("lock_type",IOSEnum.LOCK_TYPE.code("木箱出库锁"));
}else {
jsonAttrEnd.put("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"));
}
// 更新终点
jsonAttrEnd.put("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"));
jsonAttrEnd.put("storagevehicle_code",taskObj.getString("vehicle_code"));
attrTab.update(jsonAttrEnd);

View File

@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/szls/getStructInfo")
@RequestMapping("/api/szls")
@Slf4j
public class LmsToBigScreenController {
private final LmsToBigScreenService LmsToBigScreenService;

View File

@@ -111,6 +111,12 @@ public abstract class AbstractAcsTask {
*
*/
public JSONObject immediateNotifyAcs(String task_id) {
try {
Thread.sleep(1000);
}catch (Exception ex){
}
List<AcsTaskDto> taskList = this.schedule();
if (ObjectUtil.isNotEmpty(taskList)) {
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(taskList));