add:增加取货完成接口

This commit is contained in:
2025-12-02 10:40:14 +08:00
parent 20ed20bedd
commit 1ed2732cf5
3 changed files with 38 additions and 5 deletions

View File

@@ -56,4 +56,11 @@ public class AcsToWmsController {
return new ResponseEntity<>(acsToWmsService.isPutVehicle(whereJson), HttpStatus.OK);
}
@PostMapping("/getConfirm")
@Log(value = "ACS请求WMS取货完成")
@SaIgnore
public ResponseEntity<Object> getConfirm(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(acsToWmsService.getConfirm(whereJson), HttpStatus.OK);
}
}

View File

@@ -61,4 +61,14 @@ public interface AcsToWmsService {
* }
*/
BaseResponse isPutVehicle(JSONObject whereJson);
/**
* 取货完成
* @param whereJson {
* point_code: 点位编码
* task_code: 任务编码
* }
* @return BaseResponse
*/
BaseResponse getConfirm(JSONObject whereJson);
}

View File

@@ -1,11 +1,8 @@
package org.nl.wms.ext.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.unit.DataUnit;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException;
@@ -188,7 +185,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
SysParamServiceImpl sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class);
Param ParamDao = sysParamService.findByCode("is_pat");
if (ParamDao.getValue().equals(IOSConstant.IS_DELETE_YES)) {
HikvisionSnapshotUtil.sync截图(vehicleDao.getStoragevehicle_code(),taskDao.getTask_code());
HikvisionSnapshotUtil.sync截图(vehicleDao.getStoragevehicle_code(), taskDao.getTask_code());
}
log.info("ACS向WMS反馈重量返回参数--------------------------------------" + BaseResponse.responseOk(resultWeigh).toString());
@@ -205,7 +202,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
SchBasePoint pointDao = iSchBasePointService.getById(whereJson.getString("point_code"));
if (ObjectUtil.isEmpty(pointDao)) {
data.put("is_confirm", IOSConstant.ZERO);
return BaseResponse.responseOk("当前点位不存在【" + whereJson.getString("point_code")+ "", data);
return BaseResponse.responseOk("当前点位不存在【" + whereJson.getString("point_code") + "", data);
}
// 判断当前点位是否有货
@@ -218,4 +215,23 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
log.info("ACS向WMS请求是否可以取放货返回参数--------------------------------------" + BaseResponse.responseOk(data).toString());
return BaseResponse.responseOk(data);
}
@Override
@Transactional(rollbackFor = Exception.class)
public BaseResponse getConfirm(JSONObject whereJson) {
log.info("ACS向WMS请求取货完成请求参数--------------------------------------" + whereJson.toString());
// 查询当前点位
SchBasePoint pointDao = iSchBasePointService.getById(whereJson.getString("point_code"));
if (ObjectUtil.isEmpty(pointDao)) {
return BaseResponse.responseOk("当前点位不存在【" + whereJson.getString("point_code") + "");
}
// 清空点位载具信息
pointDao.setVehicle_code("");
iSchBasePointService.updateById(pointDao);
log.info("ACS向WMS请求取货完成返回参数--------------------------------------" + BaseResponse.responseOk().toString());
return BaseResponse.responseOk();
}
}