|
|
|
@ -1,5 +1,6 @@ |
|
|
|
package org.springblade.wms.controller; |
|
|
|
package org.springblade.wms.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
@ -17,6 +18,7 @@ import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
import org.springblade.core.secure.annotation.IsAdmin; |
|
|
|
import org.springblade.core.secure.annotation.IsAdmin; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
|
|
|
import org.springblade.core.tool.constant.BladeConstant; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.wms.excel.StGoodsExcel; |
|
|
|
import org.springblade.wms.excel.StGoodsExcel; |
|
|
|
@ -171,6 +173,23 @@ public class StGoodsController extends BladeController { |
|
|
|
// queryWrapper.lambda().eq(StGoods::getTenantId, bladeUser.getTenantId());
|
|
|
|
// queryWrapper.lambda().eq(StGoods::getTenantId, bladeUser.getTenantId());
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
//queryWrapper.lambda().eq(StGoodsEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
|
|
|
//queryWrapper.lambda().eq(StGoodsEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
|
|
|
|
|
|
|
queryWrapper.clear(); |
|
|
|
|
|
|
|
// 物理编号
|
|
|
|
|
|
|
|
String goodsCode = Func.toStr(stGoods.get("goodsCode")); |
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(goodsCode)) { |
|
|
|
|
|
|
|
queryWrapper.like("t1.goods_code", goodsCode); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 物料名称
|
|
|
|
|
|
|
|
String goodsName = Func.toStr(stGoods.get("goodsName")); |
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(goodsName)) { |
|
|
|
|
|
|
|
queryWrapper.like("t1.goods_name", goodsName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 型号
|
|
|
|
|
|
|
|
String materialModel = Func.toStr(stGoods.get("materialModel")); |
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(materialModel)) { |
|
|
|
|
|
|
|
queryWrapper.like("t1.material_model", materialModel); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
queryWrapper.eq("t1.is_deleted", BladeConstant.DB_NOT_DELETED); |
|
|
|
List<StGoodsExcel> list = stGoodsService.exportStGoods(queryWrapper); |
|
|
|
List<StGoodsExcel> list = stGoodsService.exportStGoods(queryWrapper); |
|
|
|
ExcelUtil.export(response, "物料信息表数据" + DateUtil.time(), "物料信息表数据表", list, StGoodsExcel.class); |
|
|
|
ExcelUtil.export(response, "物料信息表数据" + DateUtil.time(), "物料信息表数据表", list, StGoodsExcel.class); |
|
|
|
} |
|
|
|
} |
|
|
|
|