fix: 初始化恢复子卷套轴可手动选择,新增气胀轴库出轴API

This commit is contained in:
2024-07-18 18:48:31 +08:00
parent 0f748b1aea
commit de9e24bf05
4 changed files with 35 additions and 10 deletions

View File

@@ -870,26 +870,32 @@ public class SlitterServiceImpl implements SlitterService {
public JSONObject doInitShaftPoint(JSONObject param) {
log.info("手持穿拔轴初始化参数:{}", param);
String pointCode = param.getString("point_code");
String isAgainTz = param.getString("is_again_tz");
if (ObjectUtil.isEmpty(isAgainTz)) {
isAgainTz = SlitterConstant.SLITTER_YES;
}
// 手持按钮:穿拔轴初始化
//1、判断当前点位不能存在其他任务
List<SchBaseTask> taskList = taskService.checkHaveTask(pointCode);
if (taskList.size() > 0) {
throw new BadRequestException("操作失败,点位[" + pointCode + "]存在未完成的任务!");
}
//2、把当前点位上子卷号对应的is_paper_ok改为1
BstIvtShafttubeivt shaftPoint = shafttubeivtService.getByPointCode(pointCode, false);
if (SlitterConstant.SLITTER_NO.equals(shaftPoint.getHave_qzz())) {
throw new BadRequestException("点位不存在气胀轴信息,无需初始化!");
}
List<String> containers = Stream.of(shaftPoint.getContainer_name1(), shaftPoint.getContainer_name2())
.filter(ObjectUtil::isNotEmpty).collect(Collectors.toList());
LambdaUpdateWrapper<PdmBiSlittingproductionplan> upPlanLam = new LambdaUpdateWrapper<>();
upPlanLam.set(PdmBiSlittingproductionplan::getIs_paper_ok, "1")
.set(PdmBiSlittingproductionplan::getUpdate_optid, SecurityUtils.getCurrentUserId())
.set(PdmBiSlittingproductionplan::getUpdate_optname, SecurityUtils.getCurrentUsername())
.set(PdmBiSlittingproductionplan::getUpdate_time, DateUtil.now())
.in(PdmBiSlittingproductionplan::getContainer_name, containers);
slittingproductionplanService.update(upPlanLam);
if (SlitterConstant.SLITTER_YES.equals(isAgainTz)) {
//2、把当前点位上子卷号对应的is_paper_ok改为1
List<String> containers = Stream.of(shaftPoint.getContainer_name1(), shaftPoint.getContainer_name2())
.filter(ObjectUtil::isNotEmpty).collect(Collectors.toList());
LambdaUpdateWrapper<PdmBiSlittingproductionplan> upPlanLam = new LambdaUpdateWrapper<>();
upPlanLam.set(PdmBiSlittingproductionplan::getIs_paper_ok, "1")
.set(PdmBiSlittingproductionplan::getUpdate_optid, SecurityUtils.getCurrentUserId())
.set(PdmBiSlittingproductionplan::getUpdate_optname, SecurityUtils.getCurrentUsername())
.set(PdmBiSlittingproductionplan::getUpdate_time, DateUtil.now())
.in(PdmBiSlittingproductionplan::getContainer_name, containers);
slittingproductionplanService.update(upPlanLam);
}
//3、清空当前穿拔轴点位的库存信息
shaftPoint.setHave_qzz(SlitterConstant.SLITTER_NO);
shaftPoint.setTube_code1("");

View File

@@ -217,4 +217,11 @@ public class AcsToWmsController {
public ResponseEntity<Object> getBoxInfo(@RequestBody JSONObject param) {
return new ResponseEntity<>(acsToWmsService.getBoxInfo(param), HttpStatus.OK);
}
@PostMapping("/acsCallShaftFromCache")
@Log(value = "二期ACS请求出轴", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
@SaIgnore
public ResponseEntity<Object> acsCallShaftFromCache(@RequestBody JSONObject param) {
return new ResponseEntity<>(acsToWmsService.acsCallShaftFromCache(param), HttpStatus.OK);
}
}

View File

@@ -209,4 +209,11 @@ public interface AcsToWmsService {
* @return /
*/
JSONObject actionFinishRequest2(JSONObject param);
/**
* 二期ACS请求出轴
* @param param /
* @return /
*/
JSONObject acsCallShaftFromCache(JSONObject param);
}

View File

@@ -2530,4 +2530,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
public JSONObject actionFinishRequest2(JSONObject param) {
return slitterService.acsActionFinishRequestToRelease(param);
}
@Override
public JSONObject acsCallShaftFromCache(JSONObject param) {
return slitterService.acsCallShaftFromCache(param);
}
}