Merge remote-tracking branch 'origin/ah-simple' into ah-simple

This commit is contained in:
mashuai 2025-03-12 14:52:53 +08:00
commit 0d53f44ee7
2 changed files with 8 additions and 4 deletions

View File

@ -399,7 +399,7 @@ public class DevInfoServiceImpl implements DevInfoService {
}
devInfo.setCode(code);
devInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString());
devInfo.setDeviceCount(1);
devInfo.setDeviceCount(devInfo.getDeviceCount());
devInfo.setIdentifyCode(devInfo.getTableList().get(i).getIdentifyCode());
if (devInfoMapper.insertDevInfo(devInfo) == 0) {
return AjaxResult.error("设备信息SQL保存失败请修改后重试");

View File

@ -88,14 +88,18 @@ public class OrderServiceImpl implements OrderService {
@Transactional
public Integer submitOrderInfo(List<OrderInfoDto> orderInfoDtos) {
int j = 0;
orderInfoDtos.removeIf(Objects::isNull);
for (OrderInfoDto orderInfoDto : orderInfoDtos) {
// 首先判断库存是否足够
List<OrderDetailDto> orderDetailDtos = orderInfoDto.getDetailsList();
orderDetailDtos.removeIf(Objects::isNull);
if (orderDetailDtos.isEmpty()) {
if(orderDetailDtos == null){
continue;
// throw new RuntimeException("请正确添加设备");
}
// orderDetailDtos.removeIf(Objects::isNull);
// if (orderDetailDtos.isEmpty()) {
// continue;
//// throw new RuntimeException("请正确添加设备");
// }
//生成订单信息
String code = "D" + System.currentTimeMillis();
orderInfoDto.setCode(code);