新火炬后端单体项目初始化代码
lixiangyu
17 小时以前 345941d946f5a48d31660a58dfc7911d7639a97d
src/main/java/org/jeecg/modules/cms/controller/CuttingInventoryController.java
@@ -3,15 +3,11 @@
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.cms.entity.CuttingInventory;
import org.jeecg.modules.cms.service.ICuttingInventoryService;
@@ -20,18 +16,10 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
@@ -174,4 +162,18 @@
        return super.importExcel(request, response, CuttingInventory.class);
    }
    /**
     * 刀具库存统计
     */
    @ApiOperation(value = "刀具库存-统计分页查询", notes = "刀具库存-统计分页查询")
    @GetMapping(value = "/statistics")
    public Result<IPage<Map<String, Object>>> statistics(
            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
        Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
        IPage<Map<String, Object>> pageList = cuttingInventoryService.statisticsByCuttingIdAndStatus(page);
        return Result.OK(pageList);
    }
}