Browse Source

Merge remote-tracking branch 'origin/dev' into dev

training
pref_mail@163.com 1 year ago
parent
commit
f1453ebb5a
  1. 16
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java
  2. 7
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java
  3. 32
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java
  4. 3
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.java
  5. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml
  6. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseGoodsAllocationService.java
  7. 7
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java
  8. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

16
blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java

@ -45,6 +45,7 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -175,6 +176,21 @@ public class BasicMaterialController extends BladeController {
// queryWrapper.lambda().eq(BasicMaterialEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); // queryWrapper.lambda().eq(BasicMaterialEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
// List<BasicMaterialExcel> list = basicMaterialService.exportBasicMaterial(queryWrapper); // List<BasicMaterialExcel> list = basicMaterialService.exportBasicMaterial(queryWrapper);
List<BasicMaterialExcel> list = new ArrayList<>(); List<BasicMaterialExcel> list = new ArrayList<>();
//存入模板
BasicMaterialExcel basicMaterialExcel = new BasicMaterialExcel();
basicMaterialExcel.setProductCode("G21214471");
basicMaterialExcel.setName("QD-U50863M-1RD9L2W-2芝华仕-圣多斯沙发-单右贵左双单无沙发组(单右电动/象牙白)");
basicMaterialExcel.setSku("G21214471");
basicMaterialExcel.setProperty("家配");
basicMaterialExcel.setPackagingMaterial("纸箱");
basicMaterialExcel.setPackingSpecification("OP-0322013-1.8慕思.苏斯西雅图软床排骨架条(通配)/1800*2000");
basicMaterialExcel.setExtent("2260");
basicMaterialExcel.setBreadth("1030");
basicMaterialExcel.setAltitude("640");
basicMaterialExcel.setVolume("1.489792");
basicMaterialExcel.setLogpmUnit("1");
basicMaterialExcel.setPackageNum("3");
basicMaterialExcel.setWeight(BigDecimal.valueOf(0));
ExcelUtil.export(response, "物料基础信息数据模板" + DateUtil.time(), "物料基础信息数据模板表", list, BasicMaterialExcel.class); ExcelUtil.export(response, "物料基础信息数据模板" + DateUtil.time(), "物料基础信息数据模板表", list, BasicMaterialExcel.class);
} }

7
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java

@ -5,6 +5,7 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.warehouse.dto.*; import com.logpm.warehouse.dto.*;
import com.logpm.warehouse.feign.WarehouseGoodsAllocationClient; import com.logpm.warehouse.feign.WarehouseGoodsAllocationClient;
import com.logpm.warehouse.service.IWarehouseGoodsAllocationService;
import com.logpm.warehouse.service.IWarehouseUpdownTypeService; import com.logpm.warehouse.service.IWarehouseUpdownTypeService;
import com.logpm.warehouse.vo.*; import com.logpm.warehouse.vo.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -238,7 +239,11 @@ public class WarehouseUpdownTypeApiController {
} }
//上架托盘维度 //上架托盘维度
return warehouseUpdownTypeService.upShelfTray(trayCode,allocationId,myCurrentWarehouse.getId()); R r = warehouseUpdownTypeService.upShelfTray(trayCode, allocationId, myCurrentWarehouse.getId());
if (r.getCode() == 200) {
warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString());
}
return r;
}catch (CustomerException e){ }catch (CustomerException e){
log.warn(e.message); log.warn(e.message);
return R.fail(e.code,e.message); return R.fail(e.code,e.message);

32
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java

@ -206,6 +206,11 @@ public class WarehouseGoodsAllocationController extends BladeController {
if (upShelfOrderList.size() == 0 || Objects.isNull(allocationId)) { if (upShelfOrderList.size() == 0 || Objects.isNull(allocationId)) {
return R.fail("参数不全"); return R.fail("参数不全");
} }
//查询是否为备货区
Boolean b = warehouseGoodsAllocationService.selectIsStocking(allocationId);
if (b){
return R.fail("备货区不可上架");
}
//当前登录人选择的仓库 //当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){ if(Objects.isNull(myCurrentWarehouse)){
@ -230,7 +235,10 @@ public class WarehouseGoodsAllocationController extends BladeController {
//取出服务号 //取出服务号
List<UpShelfOrderDTO> upShelfOrderList = updownTypeDTO.getUpShelfOrderList(); List<UpShelfOrderDTO> upShelfOrderList = updownTypeDTO.getUpShelfOrderList();
Long allocationId = updownTypeDTO.getAllocationId(); Long allocationId = updownTypeDTO.getAllocationId();
Boolean b = warehouseGoodsAllocationService.selectIsStocking(allocationId);
if (b){
return R.fail("备货区不可上架");
}
//当前登录人选择的仓库 //当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){ if(Objects.isNull(myCurrentWarehouse)){
@ -265,6 +273,10 @@ public class WarehouseGoodsAllocationController extends BladeController {
if (upShelfPackageList.size() == 0 || Objects.isNull(allocationId)) { if (upShelfPackageList.size() == 0 || Objects.isNull(allocationId)) {
return R.fail("参数不全"); return R.fail("参数不全");
} }
Boolean b = warehouseGoodsAllocationService.selectIsStocking(allocationId);
if (b){
return R.fail("备货区不可上架");
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){ if(Objects.isNull(myCurrentWarehouse)){
return R.fail("仓库信息不能为空"); return R.fail("仓库信息不能为空");
@ -293,11 +305,15 @@ public class WarehouseGoodsAllocationController extends BladeController {
if (Objects.isNull(myCurrentWarehouse)) { if (Objects.isNull(myCurrentWarehouse)) {
return R.fail("仓库信息不能为空"); return R.fail("仓库信息不能为空");
} }
Boolean b = warehouseGoodsAllocationService.selectIsStocking(allocationId);
if (b){
return R.fail("备货区不可上架");
}
//上架托盘 //上架托盘
R r = warehouseUpdownTypeService.upShelfTray(trayCode, allocationId,myCurrentWarehouse.getId()); R r = warehouseUpdownTypeService.upShelfTray(trayCode, allocationId,myCurrentWarehouse.getId());
// if (r.getCode() == 200) { if (r.getCode() == 200) {
// warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString()); warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString());
// } }
return r; return r;
} }
@ -317,6 +333,10 @@ public class WarehouseGoodsAllocationController extends BladeController {
if(Objects.isNull(myCurrentWarehouse)){ if(Objects.isNull(myCurrentWarehouse)){
return R.fail("仓库信息不能为空"); return R.fail("仓库信息不能为空");
} }
Boolean b = warehouseGoodsAllocationService.selectIsStocking(allocationId);
if (b){
return R.fail("备货区不可上架");
}
//查询该库位的货物信息 //查询该库位的货物信息
R r = warehouseUpdownTypeService.upShelfStockList(upShelfStockList, allocationId,myCurrentWarehouse.getId()); R r = warehouseUpdownTypeService.upShelfStockList(upShelfStockList, allocationId,myCurrentWarehouse.getId());
@ -343,6 +363,10 @@ public class WarehouseGoodsAllocationController extends BladeController {
if(Objects.isNull(myCurrentWarehouse)){ if(Objects.isNull(myCurrentWarehouse)){
return R.fail("仓库信息为空"); return R.fail("仓库信息为空");
} }
Boolean b = warehouseGoodsAllocationService.selectIsStocking(allocationId);
if (b){
return R.fail("备货区不可上架");
}
//查询该库位的货物信息 //查询该库位的货物信息
R r = warehouseUpdownTypeService.upShelfZeroOrder(upShelfZeroOrderList, allocationId,myCurrentWarehouse.getId()); R r = warehouseUpdownTypeService.upShelfZeroOrder(upShelfZeroOrderList, allocationId,myCurrentWarehouse.getId());

3
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.java

@ -164,4 +164,7 @@ public interface WarehouseGoodsAllocationMapper extends BaseMapper<WarehouseGood
List<Long> selectCargoSumId(); List<Long> selectCargoSumId();
List<BasicdataWarehouseEntity> AllWarehouse(); List<BasicdataWarehouseEntity> AllWarehouse();
List<Long> selectIsStocking(@Param("allocationId") Long allocationId);
} }

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml

@ -319,6 +319,10 @@
WHERE is_deleted = 0 WHERE is_deleted = 0
and enable_status = '1' and enable_status = '1'
</select> </select>
<select id="selectIsStocking" resultType="java.lang.Long">
SELECT lwgaa.id FROM logpm_warehouse_goods_allocation lwgaa join logpm_warehouse_goods_area lwga on lwgaa.goods_area_id =lwga.id WHERE
lwgaa.id = #{allocationId} and lwgaa.is_deleted = 0 and lwga.area_type ='1'
</select>
</mapper> </mapper>

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseGoodsAllocationService.java

@ -115,4 +115,8 @@ public interface IWarehouseGoodsAllocationService extends BaseService<WarehouseG
* 更新货位 缓存 * 更新货位 缓存
*/ */
Boolean updateAllocationCache(String ids); Boolean updateAllocationCache(String ids);
/**
* 货位 查询是否为备货区
*/
Boolean selectIsStocking(Long allocationId);
} }

7
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java

@ -361,7 +361,6 @@ public class WarehouseGoodsAllocationServiceImpl extends BaseServiceImpl<Warehou
Long goodsAreaId = warehouseGoodsAllocationEntity.getGoodsAreaId(); Long goodsAreaId = warehouseGoodsAllocationEntity.getGoodsAreaId();
Long goodsShelfId = warehouseGoodsAllocationEntity.getGoodsShelfId(); Long goodsShelfId = warehouseGoodsAllocationEntity.getGoodsShelfId();
if (null != bladeRedis.get(Url + "/" + warehouseGoodsAllocationEntity.getGoodsShelfId())) { if (null != bladeRedis.get(Url + "/" + warehouseGoodsAllocationEntity.getGoodsShelfId())) {
//查询所有包件数量 //查询所有包件数量
//转换当前货位的信息 //转换当前货位的信息
WarehouseGoodsAllocationVO warehouseGoodsAllocationVO = this.convert(warehouseGoodsAllocationEntity); WarehouseGoodsAllocationVO warehouseGoodsAllocationVO = this.convert(warehouseGoodsAllocationEntity);
@ -385,6 +384,12 @@ public class WarehouseGoodsAllocationServiceImpl extends BaseServiceImpl<Warehou
return true; return true;
} }
@Override
public Boolean selectIsStocking(Long allocationId) {
List<Long> list = baseMapper.selectIsStocking(allocationId);
return null == list && list.isEmpty()?false:true;
}
public List<Long> getMyWatchWarehouseIds(){ public List<Long> getMyWatchWarehouseIds(){
//获取当前登录人仓库 //获取当前登录人仓库
List<BasicdataWarehouseEntity> myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); List<BasicdataWarehouseEntity> myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse();

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

@ -2128,7 +2128,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
updateUpdownTypeNum(updownTypeEntity); updateUpdownTypeNum(updownTypeEntity);
String type = trayTypeEntity.getType(); String type = trayTypeEntity.getType();
//更新货位缓存 //更新货位缓存
warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString()); // warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString());
if("3".equals(type)){ if("3".equals(type)){
Integer stockNum = trayTypeEntity.getStockNum(); Integer stockNum = trayTypeEntity.getStockNum();
return Resp.scanSuccess("上架成功","整托上架成功"+stockNum+"件"); return Resp.scanSuccess("上架成功","整托上架成功"+stockNum+"件");

Loading…
Cancel
Save