|
|
|
@ -36,10 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Locale;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
public class WareHouseController {
|
|
|
|
@ -318,8 +315,9 @@ public class WareHouseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
|
|
|
|
|
if (udiEntity == null)
|
|
|
|
|
if (udiEntity == null) {
|
|
|
|
|
return ResultVOUtils.error(500, "无效条码!");
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.isNotEmpty(addOrderRequest.getBatchNo())) {
|
|
|
|
|
udiEntity.setBatchNo(addOrderRequest.getBatchNo());
|
|
|
|
|
}
|
|
|
|
@ -449,11 +447,7 @@ public class WareHouseController {
|
|
|
|
|
}
|
|
|
|
|
warehousetempEntity.setCount(warehousetempEntity.getCount() * actCount);
|
|
|
|
|
} else {
|
|
|
|
|
if (unitFk == null)
|
|
|
|
|
return ResultVOUtils.error(500, "耗材字典不存在此产品!");
|
|
|
|
|
else
|
|
|
|
|
return ResultVOUtils.error(500, "当前供应商不存在此配送产品!");
|
|
|
|
|
|
|
|
|
|
return ResultVOUtils.error(500, "耗材字典不存在此产品!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OrderEntity isExit = orderService.findById(orderId);
|
|
|
|
@ -480,6 +474,7 @@ public class WareHouseController {
|
|
|
|
|
orderSaveRequest.setCustomerId(customerId);
|
|
|
|
|
orderService.insertOrder(orderSaveRequest);
|
|
|
|
|
}
|
|
|
|
|
warehouseTempService.insertTempWarehouses(warehousetempEntities);
|
|
|
|
|
}
|
|
|
|
|
addCodeResult.setOrderId(orderId);
|
|
|
|
|
|
|
|
|
@ -517,4 +512,28 @@ public class WareHouseController {
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@PostMapping("warehouse/inout/saveOrderWeb")
|
|
|
|
|
public BaseResponse saveOrderWeb(@RequestBody AddOrderRequest addOrderRequest) {
|
|
|
|
|
OrderEntity orderEntity = new OrderEntity();
|
|
|
|
|
orderEntity.setOrderId(addOrderRequest.getOrderId());
|
|
|
|
|
BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(addOrderRequest.getAction(), addOrderRequest.getCustomerId());
|
|
|
|
|
orderEntity.setAction(addOrderRequest.getAction());
|
|
|
|
|
orderEntity.setMainAction(bussinessTypeEntity.getMainAction());
|
|
|
|
|
orderEntity.setFromCorp(addOrderRequest.getFromCorp());
|
|
|
|
|
orderEntity.setFromCorpId(addOrderRequest.getFromCorpId());
|
|
|
|
|
orderEntity.setLocStorageCode(addOrderRequest.getLocStorageCode());
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderService.updateOrder(orderEntity);
|
|
|
|
|
WarehouseEntity warehouseEntity = new WarehouseEntity();
|
|
|
|
|
warehouseEntity.setOrderId(addOrderRequest.getOrderId());
|
|
|
|
|
warehouseEntity.setAction(addOrderRequest.getAction());
|
|
|
|
|
warehouseEntity.setMainAction(addOrderRequest.getMainAction());
|
|
|
|
|
warehouseEntity.setFromCorp(addOrderRequest.getFromCorp());
|
|
|
|
|
warehouseEntity.setFromCorpId(addOrderRequest.getFromCorpId());
|
|
|
|
|
warehouseEntity.setLocStorageCode(addOrderRequest.getLocStorageCode());
|
|
|
|
|
warehouseTempService.updateByOrderId(warehouseEntity);
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|