优化商品导出excel的功能
This commit is contained in:
@@ -308,6 +308,12 @@ public class MaterialController {
|
||||
@RequestParam("name") String name,
|
||||
@RequestParam("standard") String standard,
|
||||
@RequestParam("model") String model,
|
||||
@RequestParam("color") String color,
|
||||
@RequestParam("weight") String weight,
|
||||
@RequestParam("expiryNum") String expiryNum,
|
||||
@RequestParam("enableSerialNumber") String enableSerialNumber,
|
||||
@RequestParam("enableBatchNumber") String enableBatchNumber,
|
||||
@RequestParam("remark") String remark,
|
||||
@RequestParam("mpList") String mpList,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
@@ -316,7 +322,9 @@ public class MaterialController {
|
||||
mpArr= mpList.split(",");
|
||||
}
|
||||
List<MaterialVo4Unit> dataList = materialService.findByAll(StringUtil.toNull(barCode), StringUtil.toNull(name),
|
||||
StringUtil.toNull(standard), StringUtil.toNull(model), StringUtil.toNull(categoryId));
|
||||
StringUtil.toNull(standard), StringUtil.toNull(model), StringUtil.toNull(color), StringUtil.toNull(weight),
|
||||
StringUtil.toNull(expiryNum), StringUtil.toNull(enableSerialNumber), StringUtil.toNull(enableBatchNumber),
|
||||
StringUtil.toNull(remark), StringUtil.toNull(categoryId));
|
||||
String[] names = {"条码", "名称", "规格", "型号", "颜色", "类别", "扩展信息", "单位", "基础重量", "保质期", "采购价", "销售价", "零售价", "最低售价", "备注", "状态", "序列号", "批号"};
|
||||
String title = "商品信息";
|
||||
List<String[]> objects = new ArrayList<>();
|
||||
|
||||
@@ -67,6 +67,12 @@ public interface MaterialMapperEx {
|
||||
@Param("name") String name,
|
||||
@Param("standard") String standard,
|
||||
@Param("model") String model,
|
||||
@Param("color") String color,
|
||||
@Param("weight") String weight,
|
||||
@Param("expiryNum") String expiryNum,
|
||||
@Param("enableSerialNumber") String enableSerialNumber,
|
||||
@Param("enableBatchNumber") String enableBatchNumber,
|
||||
@Param("remark") String remark,
|
||||
@Param("idList") List<Long> idList);
|
||||
/**
|
||||
* 通过商品名称查询商品信息
|
||||
|
||||
@@ -432,7 +432,9 @@ public class MaterialService {
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<MaterialVo4Unit> findByAll(String barCode, String name, String standard, String model, String categoryId)throws Exception {
|
||||
public List<MaterialVo4Unit> findByAll(String barCode, String name, String standard, String model, String color,
|
||||
String weight, String expiryNum, String enableSerialNumber, String enableBatchNumber,
|
||||
String remark, String categoryId)throws Exception {
|
||||
List<MaterialVo4Unit> resList = new ArrayList<>();
|
||||
List<MaterialVo4Unit> list =null;
|
||||
try{
|
||||
@@ -440,7 +442,8 @@ public class MaterialService {
|
||||
if(StringUtil.isNotEmpty(categoryId)){
|
||||
idList = getListByParentId(Long.parseLong(categoryId));
|
||||
}
|
||||
list= materialMapperEx.findByAll(barCode, name, standard, model, idList);
|
||||
list= materialMapperEx.findByAll(barCode, name, standard, model, color, weight, expiryNum,
|
||||
enableSerialNumber, enableBatchNumber, remark, idList);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user