|
@@ -1,43 +1,26 @@
|
|
|
package org.jeecg.modules.cmmsSpotcheckContent.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.cmmsSpotcheckContent.entity.CmmsSpotcheckContent;
|
|
|
-import org.jeecg.modules.cmmsSpotcheckContent.service.ICmmsSpotcheckContentService;
|
|
|
-
|
|
|
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.modules.cmmsSpotcheckItem.entity.CmmsSpotcheckItem;
|
|
|
-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.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.cmmsSpotcheckContent.entity.CmmsSpotcheckContent;
|
|
|
+import org.jeecg.modules.cmmsSpotcheckContent.service.ICmmsSpotcheckContentService;
|
|
|
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;
|
|
|
+
|
|
|
+/**
|
|
|
* @Description: 点检内容
|
|
|
* @Author: jeecg-boot
|
|
|
* @Date: 2024-01-15
|
|
@@ -53,7 +36,22 @@ public class CmmsSpotcheckContentController extends JeecgController<CmmsSpotchec
|
|
|
|
|
|
/**
|
|
|
* 如果要修改该点检内容状态为“启用”,那该设备的其他点检项都停掉
|
|
|
+ * 启用:0
|
|
|
+ * 禁用:1
|
|
|
* */
|
|
|
+ @AutoLog(value = "点检内容-修改该点检内容状态为“启用”,该设备的其他点检项都停用")
|
|
|
+ @ApiOperation(value="点检内容-修改该点检内容状态为“启用”,该设备的其他点检项都停用", notes="点检内容-修改该点检内容状态为“启用”,该设备的其他点检项都停用")
|
|
|
+ @RequestMapping(value = "/editStatus", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
|
+ public Result<String> editStatus(@RequestBody CmmsSpotcheckContent cmmsSpotcheckContent) {
|
|
|
+ if(cmmsSpotcheckContent.getStatus()!=null && !"".equals(cmmsSpotcheckContent.getStatus())){
|
|
|
+ if(cmmsSpotcheckContent.getStatus().equals("0")){
|
|
|
+ cmmsSpotcheckContentService.updateStatusByEquipmentid(cmmsSpotcheckContent.getEquipmentid(),"1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ cmmsSpotcheckContentService.updateById(cmmsSpotcheckContent);
|
|
|
+ return Result.OK("编辑成功!");
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
/**
|