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

View File

@@ -217,4 +217,11 @@ public class AcsToWmsController {
public ResponseEntity<Object> getBoxInfo(@RequestBody JSONObject param) { public ResponseEntity<Object> getBoxInfo(@RequestBody JSONObject param) {
return new ResponseEntity<>(acsToWmsService.getBoxInfo(param), HttpStatus.OK); 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 / * @return /
*/ */
JSONObject actionFinishRequest2(JSONObject param); 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) { public JSONObject actionFinishRequest2(JSONObject param) {
return slitterService.acsActionFinishRequestToRelease(param); return slitterService.acsActionFinishRequestToRelease(param);
} }
@Override
public JSONObject acsCallShaftFromCache(JSONObject param) {
return slitterService.acsCallShaftFromCache(param);
}
} }