From d0c19f08b4a51297247955de83b32096ddcfd9d2 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 9 Oct 2024 10:53:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=BA=93=E5=A2=9E=E5=8A=A0=E6=B3=95?= =?UTF-8?q?=E4=BA=BA=E3=80=81=E6=B3=95=E4=BA=BA=E8=81=94=E7=B3=BB=E7=94=B5?= =?UTF-8?q?=E8=AF=9D=E3=80=81=E6=8A=BC=E9=87=91=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/BasicdataWarehouseEntity.java | 25 +++++++------------ .../feign/IWarehouseConfigClient.java | 5 ++++ .../BasicdataWarehouseController.java | 15 ++++++++++- .../mapper/BasicdataWarehouseMapper.xml | 3 +++ .../feign/WarehouseConfigClient.java | 5 ++++ 5 files changed, 36 insertions(+), 17 deletions(-) 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 @@ <!-- <result column="manage_city_code" property="manageCityCode"/>--> <!-- <result column="manage_code" property="manageCode"/>--> <result column="payment_code_url" property="paymentCodeUrl"/> + <result column="legal_person" property="legalPerson"/> + <result column="legal_person_phone" property="legalPersonPhone"/> + <result column="deposit" property="deposit"/> </resultMap> <!-- AND NOT EXISTS (SELECT f.id FROM logpm_basic_team_group f WHERE f.belong_to=#{id} AND f.is_deleted = 0 )--> <update id="removeWarehouse"> 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.<WarehouseConfigEntity>query().lambda().eq(WarehouseConfigEntity::getWarehouseId,warehouseId)); } + + @Override + public boolean saveWarehouseConfig(WarehouseConfigEntity warehouseConfigEntity) { + return warehouseConfigService.save(warehouseConfigEntity); + } }