add: 手持维护气胀轴库库存信息

This commit is contained in:
2024-07-12 09:16:55 +08:00
parent 94a7b5b431
commit 886c8af826
4 changed files with 43 additions and 4 deletions

View File

@@ -93,4 +93,11 @@ public class SlitterPdaController {
public ResponseEntity<Object> toSubvolumeBinding(@RequestBody JSONObject param) {
return new ResponseEntity<>(slitterDevices.toSubvolumeBinding(param), HttpStatus.OK);
}
@PostMapping("/shaftMaintenanceInventory")
@Log("气胀轴库维护库存")
@SaIgnore
public ResponseEntity<Object> shaftMaintenanceInventory(@RequestBody JSONObject param) {
return new ResponseEntity<>(slitterDevices.shaftMaintenanceInventory(param), HttpStatus.OK);
}
}

View File

@@ -6,7 +6,7 @@
<select id="checkHaveTask" resultType="org.nl.b_lms.sch.task.dao.SchBaseTask">
SELECT *
FROM sch_base_task
WHERE task_code <![CDATA[ < ]]> '07'
WHERE task_code <![CDATA[ <= ]]> '071' AND task_status <![CDATA[ <> ]]> '07'
AND ( point_code1 = #{code}
OR point_code2 = #{code}
OR point_code3 = #{code}

View File

@@ -103,7 +103,8 @@ public interface SlitterService {
/**
* 下卷
* @param param
* @param param /
* @return /
*/
JSONObject downRolls(JSONObject param);
@@ -178,4 +179,11 @@ public interface SlitterService {
* @return /
*/
JSONObject toSubvolumeBinding(JSONObject param);
/**
* 气胀轴库维护库存
* @param param /
* @return /
*/
JSONObject shaftMaintenanceInventory(JSONObject param);
}

View File

@@ -867,7 +867,7 @@ public class SlitterServiceImpl implements SlitterService {
//1、判断当前点位不能存在其他任务
List<SchBaseTask> taskList = taskService.checkHaveTask(pointCode);
if (taskList.size() > 0) {
throw new BadRequestException("操作失败,点位存在未完成的任务!");
throw new BadRequestException("操作失败,点位[" + pointCode + "]存在未完成的任务!");
}
//2、把当前点位上子卷号对应的is_paper_ok改为1
BstIvtShafttubeivt shaftPoint = shafttubeivtService.getByPointCode(pointCode, false);
@@ -963,6 +963,11 @@ public class SlitterServiceImpl implements SlitterService {
}
try {
if (openLock) {
// 校验是否存在任务
List<SchBaseTask> taskList = taskService.checkHaveTask(pointCode);
if (taskList.size() > 0) {
throw new BadRequestException("操作失败,点位[" + pointCode + "]存在未完成的任务!");
}
BstIvtCutpointivt point = bcutpointivtService.getPintByAgvCode(pointCode, false);
if (Objects.equals(point.getPoint_status(), "1")) {
// 如果是没货
@@ -1009,7 +1014,7 @@ public class SlitterServiceImpl implements SlitterService {
}
JSONObject res = new JSONObject();
res.put("status", HttpStatus.HTTP_OK);
res.put("message", "请求成功!");
res.put("message", "创建AGV任务请求成功!");
return res;
}
@@ -1147,4 +1152,23 @@ public class SlitterServiceImpl implements SlitterService {
res.put("message", "子卷绑定成功!");
return res;
}
@Override
public JSONObject shaftMaintenanceInventory(JSONObject param) {
log.info("手持维护气胀轴库库存:{}", param);
// param : point_code, type
BstIvtShafttubeivt shafttubeivt = new BstIvtShafttubeivt();
if (SlitterConstant.SLITTER_YES.equals(param.getString("type"))) {
shafttubeivt.setHave_qzz(SlitterConstant.SLITTER_YES);
} else {
shafttubeivt.setHave_qzz(SlitterConstant.SLITTER_NO);
}
TaskUtils.updateOptMessageByBShaftPoint(shafttubeivt);
shafttubeivtService.update(shafttubeivt, new LambdaQueryWrapper<BstIvtShafttubeivt>()
.eq(BstIvtShafttubeivt::getPoint_code, param.getString("point_code")));
JSONObject res = new JSONObject();
res.put("status", HttpStatus.HTTP_OK);
res.put("message", "气胀轴库设置成功!");
return res;
}
}