|
@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
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;
|
|
@@ -49,7 +50,21 @@ import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
public class CmmsSpotcheckContentController extends JeecgController<CmmsSpotcheckContent, ICmmsSpotcheckContentService> {
|
|
|
@Autowired
|
|
|
private ICmmsSpotcheckContentService cmmsSpotcheckContentService;
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 如果要修改该点检内容状态为“启用”,那该设备的其他点检项都停掉
|
|
|
+ * */
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据设备id查询该设备现在点检内容已启用数量
|
|
|
+ * */
|
|
|
+ @ApiOperation("根据设备id查询该设备现在点检内容已启用数量")
|
|
|
+ @GetMapping(value = "/numByEquipmentid/{equipmentid}")
|
|
|
+ public Result<Integer> numByEquipmentid(@PathVariable("equipmentid") String equipmentid){
|
|
|
+ return Result.OK(cmmsSpotcheckContentService.numByEquipmentid(equipmentid));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|
|
@@ -71,7 +86,7 @@ public class CmmsSpotcheckContentController extends JeecgController<CmmsSpotchec
|
|
|
IPage<CmmsSpotcheckContent> pageList = cmmsSpotcheckContentService.page(page, queryWrapper);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|
|
@@ -86,7 +101,7 @@ public class CmmsSpotcheckContentController extends JeecgController<CmmsSpotchec
|
|
|
cmmsSpotcheckContentService.save(cmmsSpotcheckContent);
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 编辑
|
|
|
*
|
|
@@ -101,7 +116,7 @@ public class CmmsSpotcheckContentController extends JeecgController<CmmsSpotchec
|
|
|
cmmsSpotcheckContentService.updateById(cmmsSpotcheckContent);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id删除
|
|
|
*
|
|
@@ -116,7 +131,7 @@ public class CmmsSpotcheckContentController extends JeecgController<CmmsSpotchec
|
|
|
cmmsSpotcheckContentService.removeById(id);
|
|
|
return Result.OK("删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 批量删除
|
|
|
*
|
|
@@ -131,7 +146,7 @@ public class CmmsSpotcheckContentController extends JeecgController<CmmsSpotchec
|
|
|
this.cmmsSpotcheckContentService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
return Result.OK("批量删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id查询
|
|
|
*
|