add:增加取货完成接口
This commit is contained in:
@@ -56,4 +56,11 @@ public class AcsToWmsController {
|
|||||||
return new ResponseEntity<>(acsToWmsService.isPutVehicle(whereJson), HttpStatus.OK);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,4 +61,14 @@ public interface AcsToWmsService {
|
|||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
BaseResponse isPutVehicle(JSONObject whereJson);
|
BaseResponse isPutVehicle(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取货完成
|
||||||
|
* @param whereJson {
|
||||||
|
* point_code: 点位编码
|
||||||
|
* task_code: 任务编码
|
||||||
|
* }
|
||||||
|
* @return BaseResponse
|
||||||
|
*/
|
||||||
|
BaseResponse getConfirm(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
package org.nl.wms.ext.service.impl;
|
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.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
@@ -188,7 +185,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
SysParamServiceImpl sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class);
|
SysParamServiceImpl sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class);
|
||||||
Param ParamDao = sysParamService.findByCode("is_pat");
|
Param ParamDao = sysParamService.findByCode("is_pat");
|
||||||
if (ParamDao.getValue().equals(IOSConstant.IS_DELETE_YES)) {
|
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());
|
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"));
|
SchBasePoint pointDao = iSchBasePointService.getById(whereJson.getString("point_code"));
|
||||||
if (ObjectUtil.isEmpty(pointDao)) {
|
if (ObjectUtil.isEmpty(pointDao)) {
|
||||||
data.put("is_confirm", IOSConstant.ZERO);
|
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());
|
log.info("ACS向WMS请求是否可以取放货,返回参数:--------------------------------------" + BaseResponse.responseOk(data).toString());
|
||||||
return BaseResponse.responseOk(data);
|
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();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user