|
|
|
@ -28,10 +28,8 @@ import com.logpm.basic.feign.IBasicPrintTemplateClient;
|
|
|
|
|
import com.logpm.basic.feign.IBasicTenantCodeClient; |
|
|
|
|
import com.logpm.basicdata.dto.BasicdataGoodsShelfDTO; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataGoodsAllocationEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataGoodsAreaEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataGoodsShelfEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
|
|
|
|
import com.logpm.basicdata.excel.BasicdataGoodsAreaExcel; |
|
|
|
|
import com.logpm.basicdata.excel.BasicdataGoodsShelfExcel; |
|
|
|
|
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; |
|
|
|
|
import com.logpm.basicdata.mapper.BasicdataGoodsAllocationMapper; |
|
|
|
@ -47,6 +45,7 @@ import org.springblade.common.utils.FileUtil;
|
|
|
|
|
import org.springblade.common.utils.QRCodeUtil; |
|
|
|
|
import org.springblade.common.utils.TemplateUtil; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.core.redis.cache.BladeRedis; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
@ -93,6 +92,8 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
|
|
|
|
|
private IBasicdataWarehouseService basicdataWarehouseService; |
|
|
|
|
|
|
|
|
|
private BladeRedis bladeRedis; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -137,6 +138,9 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
log.error("仓库货区信息不合法"); |
|
|
|
|
throw new RuntimeException("请完善货区信息!!!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Long warehouseId = basicdataGoodsShelfDTO.getWarehouseId(); |
|
|
|
|
|
|
|
|
|
// BasicdataWarehouseEntity basicdataWarehouseVO = basicdataWarehouseClient.getMyCurrentWarehouse();
|
|
|
|
|
// if (Objects.isNull(basicdataWarehouseVO)){
|
|
|
|
|
// throw new RuntimeException("当前登录人没有选择仓库!!!");
|
|
|
|
@ -194,6 +198,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// basicdataGoodsAllocationService.saveBatch(arrayList);
|
|
|
|
|
bladeRedis.del("warehouse:all:allocationIds:" + warehouseId); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -206,8 +211,12 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
BasicdataGoodsShelfEntity goodsShelfEntity = this.getById(basicdataGoodsShelfDTO.getId()); |
|
|
|
|
Long warehouseId = goodsShelfEntity.getWarehouseId(); |
|
|
|
|
BeanUtils.copyProperties(basicdataGoodsShelfDTO, goodsShelfEntity); |
|
|
|
|
result = SqlHelper.retBool(basicdataGoodsShelfMapper.updateById(goodsShelfEntity)); |
|
|
|
|
|
|
|
|
|
bladeRedis.del("warehouse:all:allocationIds:" + warehouseId); |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -242,6 +251,12 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
.in(BasicdataGoodsAllocationEntity::getGoodsShelfId, longs) |
|
|
|
|
); |
|
|
|
|
int i = basicdataGoodsShelfMapper.deleteBatchIds(longs); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if(!Objects.isNull(myCurrentWarehouse)){ |
|
|
|
|
bladeRedis.del("warehouse:all:allocationIds:" + myCurrentWarehouse.getId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return i > 0 ? R.success("删除成功") : R.fail("删除失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -662,6 +677,7 @@ public class BasicdataGoodsShelfServiceImpl extends BaseServiceImpl<BasicdataGoo
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
bladeRedis.del("warehouse:all:allocationIds:" + ck); |
|
|
|
|
return R.fail("无法新增"); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|