Merge remote-tracking branch 'origin/ah-simple' into ah-simple
This commit is contained in:
commit
0d53f44ee7
|
|
@ -399,7 +399,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
}
|
}
|
||||||
devInfo.setCode(code);
|
devInfo.setCode(code);
|
||||||
devInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString());
|
devInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString());
|
||||||
devInfo.setDeviceCount(1);
|
devInfo.setDeviceCount(devInfo.getDeviceCount());
|
||||||
devInfo.setIdentifyCode(devInfo.getTableList().get(i).getIdentifyCode());
|
devInfo.setIdentifyCode(devInfo.getTableList().get(i).getIdentifyCode());
|
||||||
if (devInfoMapper.insertDevInfo(devInfo) == 0) {
|
if (devInfoMapper.insertDevInfo(devInfo) == 0) {
|
||||||
return AjaxResult.error("设备信息SQL保存失败,请修改后重试");
|
return AjaxResult.error("设备信息SQL保存失败,请修改后重试");
|
||||||
|
|
|
||||||
|
|
@ -88,14 +88,18 @@ public class OrderServiceImpl implements OrderService {
|
||||||
@Transactional
|
@Transactional
|
||||||
public Integer submitOrderInfo(List<OrderInfoDto> orderInfoDtos) {
|
public Integer submitOrderInfo(List<OrderInfoDto> orderInfoDtos) {
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
orderInfoDtos.removeIf(Objects::isNull);
|
||||||
for (OrderInfoDto orderInfoDto : orderInfoDtos) {
|
for (OrderInfoDto orderInfoDto : orderInfoDtos) {
|
||||||
// 首先判断库存是否足够
|
// 首先判断库存是否足够
|
||||||
List<OrderDetailDto> orderDetailDtos = orderInfoDto.getDetailsList();
|
List<OrderDetailDto> orderDetailDtos = orderInfoDto.getDetailsList();
|
||||||
orderDetailDtos.removeIf(Objects::isNull);
|
if(orderDetailDtos == null){
|
||||||
if (orderDetailDtos.isEmpty()) {
|
|
||||||
continue;
|
continue;
|
||||||
// throw new RuntimeException("请正确添加设备");
|
|
||||||
}
|
}
|
||||||
|
// orderDetailDtos.removeIf(Objects::isNull);
|
||||||
|
// if (orderDetailDtos.isEmpty()) {
|
||||||
|
// continue;
|
||||||
|
//// throw new RuntimeException("请正确添加设备");
|
||||||
|
// }
|
||||||
//生成订单信息
|
//生成订单信息
|
||||||
String code = "D" + System.currentTimeMillis();
|
String code = "D" + System.currentTimeMillis();
|
||||||
orderInfoDto.setCode(code);
|
orderInfoDto.setCode(code);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue