装备编码可重复,编码装备退租后先下架
This commit is contained in:
parent
bd0f6df8fe
commit
0787dfbaba
|
|
@ -300,10 +300,10 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
throw new ServiceException("非法参数异常: " + e.getMessage());
|
throw new ServiceException("非法参数异常: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
DevInfo deviceNameCount = devInfoMapper.getDeviceNameCount(devInfo.getDeviceName());
|
/* DevInfo deviceNameCount = devInfoMapper.getDeviceNameCount(devInfo.getDeviceName());
|
||||||
if (deviceNameCount != null && deviceNameCount.getMaId() > 0) {
|
if (deviceNameCount != null && deviceNameCount.getMaId() > 0) {
|
||||||
return AjaxResult.error("设备名称已存在,请修改后重试!");
|
return AjaxResult.error("设备名称已存在,请修改后重试!");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//获取用户信息
|
//获取用户信息
|
||||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||||
|
|
@ -428,10 +428,10 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
if (devInfo.getMaId() == null) {
|
if (devInfo.getMaId() == null) {
|
||||||
return AjaxResult.error("设备ID为空,请携带设备信息修改");
|
return AjaxResult.error("设备ID为空,请携带设备信息修改");
|
||||||
}
|
}
|
||||||
DevInfo deviceId = devInfoMapper.getDeviceNameCount(devInfo.getDeviceName());
|
/*DevInfo deviceId = devInfoMapper.getDeviceNameCount(devInfo.getDeviceName());
|
||||||
if (deviceId != null && !deviceId.getMaId().equals(devInfo.getMaId())) {
|
if (deviceId != null && !deviceId.getMaId().equals(devInfo.getMaId())) {
|
||||||
return AjaxResult.error("设备名称已存在,请修改后重试!");
|
return AjaxResult.error("设备名称已存在,请修改后重试!");
|
||||||
}
|
}*/
|
||||||
return devInfoMapper.updateDevInfo(devInfo) > 0 ? AjaxResult.success("修改成功") : AjaxResult.error("修改失败");
|
return devInfoMapper.updateDevInfo(devInfo) > 0 ? AjaxResult.success("修改成功") : AjaxResult.error("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,8 @@ public class OrderController extends BaseController {
|
||||||
if (dtos.size() > 0) {
|
if (dtos.size() > 0) {
|
||||||
for (OrderDetailDto dto : dtos) {
|
for (OrderDetailDto dto : dtos) {
|
||||||
if ("0".equals(dto.getManageType())) {
|
if ("0".equals(dto.getManageType())) {
|
||||||
// 编码设备已退租的重新上架
|
// 编码设备已退租的先下架
|
||||||
dto.setMaStatus("2");
|
dto.setMaStatus("1");
|
||||||
orderMapper.updateDeviceStatus(dto);
|
orderMapper.updateDeviceStatus(dto);
|
||||||
} else {
|
} else {
|
||||||
// 数量设备已退租的增加库存
|
// 数量设备已退租的增加库存
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue