|
|
@@ -343,6 +343,20 @@ public class ReplenishmentOrderServiceImpl extends ServiceImpl<ReplenishmentOrde
|
|
|
throw new BusinessException(400, "门店信息不存在");
|
|
|
}
|
|
|
|
|
|
+ // 校验门店必填字段(ERP 要求收件人信息完整)
|
|
|
+ if (!StringUtils.hasText(shop.getContactName())) {
|
|
|
+ throw new BusinessException(400, "门店「" + shop.getName() + "」未设置联系人姓名,请先在门店管理中完善信息");
|
|
|
+ }
|
|
|
+ if (!StringUtils.hasText(shop.getContactPhone())) {
|
|
|
+ throw new BusinessException(400, "门店「" + shop.getName() + "」未设置联系电话,请先在门店管理中完善信息");
|
|
|
+ }
|
|
|
+ if (!StringUtils.hasText(shop.getProvince())
|
|
|
+ || !StringUtils.hasText(shop.getCity())
|
|
|
+ || !StringUtils.hasText(shop.getDistrict())
|
|
|
+ || !StringUtils.hasText(shop.getAddress())) {
|
|
|
+ throw new BusinessException(400, "门店「" + shop.getName() + "」收件地址不完整(省/市/区/详细地址),请先在门店管理中完善信息");
|
|
|
+ }
|
|
|
+
|
|
|
// 查询明细
|
|
|
List<ReplenishmentOrderItem> items = orderItemMapper.selectByOrderId(id);
|
|
|
if (items == null || items.isEmpty()) {
|