|
@@ -1,44 +1,30 @@
|
|
|
package org.jeecg.modules.cmmsSpotcheckItem.controller;
|
|
|
|
|
|
-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.cmmsSpotcheckItem.entity.CmmsSpotcheckItem;
|
|
|
-import org.jeecg.modules.cmmsSpotcheckItem.service.ICmmsSpotcheckItemService;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
+import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+import org.jeecg.modules.cmmsSpotcheckItem.convert.CmmsSpotcheckItemConvert;
|
|
|
+import org.jeecg.modules.cmmsSpotcheckItem.entity.CmmsSpotcheckItem;
|
|
|
+import org.jeecg.modules.cmmsSpotcheckItem.service.ICmmsSpotcheckItemService;
|
|
|
import org.jeecg.modules.util.AutoCodeUtil;
|
|
|
import org.jeecg.modules.util.UserConstants;
|
|
|
-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;
|
|
|
|
|
|
- /**
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
* @Description: 点检项
|
|
|
* @Author: jeecg-boot
|
|
|
* @Date: 2024-01-15
|
|
@@ -79,7 +65,12 @@ public class CmmsSpotcheckItemController extends JeecgController<CmmsSpotcheckIt
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
HttpServletRequest req) {
|
|
|
- QueryWrapper<CmmsSpotcheckItem> queryWrapper = QueryGenerator.initQueryWrapper(cmmsSpotcheckItem, req.getParameterMap());
|
|
|
+ CmmsSpotcheckItem cmmsSpotcheckItem1 = CmmsSpotcheckItemConvert.INSTANCE.convert(cmmsSpotcheckItem.getEquipmenttreeid(),cmmsSpotcheckItem.getItemtype());
|
|
|
+ QueryWrapper<CmmsSpotcheckItem> queryWrapper = QueryGenerator.initQueryWrapper(cmmsSpotcheckItem1, req.getParameterMap());
|
|
|
+ queryWrapper.like(cmmsSpotcheckItem.getItemcode()!=null && !"".equals(cmmsSpotcheckItem.getItemcode()),"itemcode",cmmsSpotcheckItem.getItemcode());
|
|
|
+ queryWrapper.like(cmmsSpotcheckItem.getItemname()!=null && !"".equals(cmmsSpotcheckItem.getItemname()),"itemname",cmmsSpotcheckItem.getItemname());
|
|
|
+ queryWrapper.like(cmmsSpotcheckItem.getConditions()!=null && !"".equals(cmmsSpotcheckItem.getConditions()),"conditions",cmmsSpotcheckItem.getConditions());
|
|
|
+ queryWrapper.like(cmmsSpotcheckItem.getTag()!=null && !"".equals(cmmsSpotcheckItem.getTag()),"tag",cmmsSpotcheckItem.getTag());
|
|
|
Page<CmmsSpotcheckItem> page = new Page<CmmsSpotcheckItem>(pageNo, pageSize);
|
|
|
IPage<CmmsSpotcheckItem> pageList = cmmsSpotcheckItemService.page(page, queryWrapper);
|
|
|
return Result.OK(pageList);
|