|
|
|
@ -18,6 +18,7 @@ package com.logpm.basicdata.service.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.extra.qrcode.QrCodeUtil; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
|
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; |
|
|
|
|
import com.logpm.basic.entity.BasicPrintTemplateEntity; |
|
|
|
@ -36,6 +37,7 @@ import com.logpm.basicdata.vo.BasicdataGoodsAllocationVO;
|
|
|
|
|
import com.logpm.basicdata.vo.BasicdataNodeVO; |
|
|
|
|
import com.logpm.basicdata.vo.FreightSpaceVO; |
|
|
|
|
import com.logpm.basicdata.vo.WarehouseAllocationInfoVO; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant; |
|
|
|
|
import org.springblade.common.utils.QRCodeUtil; |
|
|
|
@ -45,6 +47,7 @@ import org.springblade.core.mp.support.Condition;
|
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
@ -85,6 +88,8 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl<Basicda
|
|
|
|
|
|
|
|
|
|
private final IBasicdataWarehouseService basicdataWarehouseService; |
|
|
|
|
|
|
|
|
|
private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<BasicdataGoodsAllocationVO> selectBasicdataGoodsAllocationPage(IPage<BasicdataGoodsAllocationVO> page, BasicdataGoodsAllocationVO BasicdataGoodsAllocation) { |
|
|
|
@ -255,4 +260,26 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl<Basicda
|
|
|
|
|
return goodsAllocationMapper.getEntityByAllocationCode(allocationCode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R enableGoodsAllocation(String ids) { |
|
|
|
|
|
|
|
|
|
boolean update = this.update(new UpdateWrapper<BasicdataGoodsAllocationEntity>().lambda() |
|
|
|
|
.set(BasicdataGoodsAllocationEntity::getEnableStatus, 1) |
|
|
|
|
.in(BasicdataGoodsAllocationEntity::getId, Func.toLongList(ids))); |
|
|
|
|
return update?R.success("成功"):R.fail("失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R disableGoodsAllocation(String ids) { |
|
|
|
|
//查询该货区有无货物
|
|
|
|
|
Integer integer = warehouseUpdownGoodsClient.selectCountByArea(Func.toLongList(ids)); |
|
|
|
|
if (integer>0){ |
|
|
|
|
return R.fail("有货物,无法禁用"); |
|
|
|
|
} |
|
|
|
|
boolean update = this.update(new UpdateWrapper<BasicdataGoodsAllocationEntity>().lambda() |
|
|
|
|
.set(BasicdataGoodsAllocationEntity::getEnableStatus, 2) |
|
|
|
|
.in(BasicdataGoodsAllocationEntity::getId, Func.toLongList(ids))); |
|
|
|
|
return update?R.success("成功"):R.fail("失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|