diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataWarehouseEntity.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataWarehouseEntity.java
index d4c3ae1cf..fdcd70595 100644
--- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataWarehouseEntity.java
+++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataWarehouseEntity.java
@@ -252,22 +252,6 @@ public class BasicdataWarehouseEntity extends TenantEntity {
@ApiModelProperty(value = "管理区域")
private String administrativeAreas;
-// /**
-// * 镇区划编号
-// */
-// @ApiModelProperty(value = "管理区域省级区划编号")
-// private String manageProvinceCode;
-// /**
-// * 村区划编号
-// */
-// @ApiModelProperty(value = "管理区域市级区划编号")
-// private String manageCityCode;
-// /**
-// * 村区划编号
-// */
-// @ApiModelProperty(value = "管理区域区划编号")
-// private String manageCode;
-
/**
* 村区划编号
*/
@@ -292,5 +276,14 @@ public class BasicdataWarehouseEntity extends TenantEntity {
@ApiModelProperty(value = "单库位面积")
private BigDecimal singleStorageLocationArea;
+ @ApiModelProperty(value = "法人")
+ private String legalPerson;
+
+ @ApiModelProperty(value = "法人联系电话")
+ private String legalPersonPhone;
+
+ @ApiModelProperty(value = "押金")
+ private BigDecimal deposit;
+
}
diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseConfigClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseConfigClient.java
index 234dca890..c535ac647 100644
--- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseConfigClient.java
+++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseConfigClient.java
@@ -22,6 +22,8 @@ import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
@@ -37,6 +39,7 @@ public interface IWarehouseConfigClient {
String API_PREFIX = "WarehouseConfig/client";
String TOP = API_PREFIX + "/top";
+ String SAVE_WAREHOUSE_CONFIG = TOP + "/save";
/**
* 查询当前仓库扩展配置
@@ -45,4 +48,6 @@ public interface IWarehouseConfigClient {
@GetMapping(TOP)
WarehouseConfigEntity getWarehouseConfig(@RequestParam("warehouseId") Long warehouseId);
+ @PostMapping(SAVE_WAREHOUSE_CONFIG)
+ boolean saveWarehouseConfig(@RequestBody WarehouseConfigEntity warehouseConfigEntity);
}
diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
index c9db23068..c140bee5e 100644
--- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
+++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
@@ -26,6 +26,8 @@ import com.logpm.basicdata.excel.BasicdataWarehouseExcel;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.basicdata.service.IBasicdataWarehouseService;
import com.logpm.basicdata.vo.BasicdataWarehouseVO;
+import com.logpm.warehouse.entity.WarehouseConfigEntity;
+import com.logpm.warehouse.feign.IWarehouseConfigClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@@ -33,6 +35,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.cache.CacheNames;
import org.springblade.common.cache.CacheObjNames;
+import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.excel.util.ExcelUtil;
@@ -78,6 +81,8 @@ public class BasicdataWarehouseController extends BladeController {
private final BladeRedis bladeRedis;
+ private final IWarehouseConfigClient warehouseConfigClient;
+
/**
* 仓库 详情
*/
@@ -199,7 +204,15 @@ public class BasicdataWarehouseController extends BladeController {
if(ObjectUtil.isNotEmpty(warehouseWarehouse.getAcreage()) && ObjectUtil.isNotEmpty(warehouseWarehouse.getSeating())){
warehouseWarehouse.setSingleStorageLocationArea(NumberUtil.div(warehouseWarehouse.getAcreage(),warehouseWarehouse.getSeating()));
}
- return R.status(warehouseService.save(warehouseWarehouse));
+ boolean flag = false;
+ flag = warehouseService.save(warehouseWarehouse);
+ WarehouseConfigEntity warehouseConfigEntity = new WarehouseConfigEntity();
+ warehouseConfigEntity.setWarehouseId(warehouseWarehouse.getId());
+ warehouseConfigEntity.setIsAutoRelease(Integer.parseInt(IsOrNoConstant.no.getValue()));
+ warehouseConfigEntity.setIsStrictLoading(Integer.parseInt(IsOrNoConstant.no.getValue()));
+ //进行仓库配置初始化
+ flag = warehouseConfigClient.saveWarehouseConfig(warehouseConfigEntity);
+ return R.status(flag);
}
/**
diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml
index 664a2c5cb..1a52649a3 100644
--- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml
+++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml
@@ -53,6 +53,9 @@
+
+
+
diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseConfigClient.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseConfigClient.java
index 9899e2ee3..e8512a61b 100644
--- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseConfigClient.java
+++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseConfigClient.java
@@ -46,4 +46,9 @@ private IWarehouseConfigService warehouseConfigService;
public WarehouseConfigEntity getWarehouseConfig(Long warehouseId) {
return warehouseConfigService.getOne(Wrappers.query().lambda().eq(WarehouseConfigEntity::getWarehouseId,warehouseId));
}
+
+ @Override
+ public boolean saveWarehouseConfig(WarehouseConfigEntity warehouseConfigEntity) {
+ return warehouseConfigService.save(warehouseConfigEntity);
+ }
}